/**
 * BYO Blog Card — Byomedic Blocs
 * Variables personalizables desde Elementor (Grid de blog).
 */

.byo-post-card {
	--byo-card-bg: #ffffff;
	--byo-card-bg-hover: #faf9f7;
	--byo-card-accent: #e8412a;
	--byo-card-border-w: 2px;
	--byo-card-title-color: #111111;
	--byo-card-excerpt-color: #aaaaaa;
	--byo-card-date-color: #cccccc;
	--byo-card-cta-color: #111111;
	--byo-card-cta-hover: #f5a623;
	--byo-card-overlay-bg: rgba(245, 166, 35, 0.8);
	--byo-card-pad-y: 20px;
	--byo-card-pad-x: 22px;
	--byo-card-img-ratio: 16 / 10;
	background: var(--byo-card-bg);
	display: flex;
	flex-direction: column;
	cursor: pointer;
	transition: background 0.2s ease;
	height: 100%;
}

.byo-post-card:hover {
	background: var(--byo-card-bg-hover);
}

.byo-post-card__img {
	position: relative;
	overflow: hidden;
	aspect-ratio: var(--byo-card-img-ratio);
}

.byo-post-card__img > a {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.byo-post-card__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.5s ease;
}

.byo-post-card:hover .byo-post-card__img img {
	transform: scale(1.04);
}

.byo-post-card__overlay {
	position: absolute;
	inset: 0;
	background: rgba(245, 166, 35, 0);
	transition: background 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.byo-post-card:hover .byo-post-card__overlay {
	background: var(--byo-card-overlay-bg);
}

.byo-post-card__overlay span {
	font-family: 'Barlow', sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 3px;
	text-transform: uppercase;
	color: #fff;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.byo-post-card:hover .byo-post-card__overlay span {
	opacity: 1;
}

.byo-post-card__body {
	padding: var(--byo-card-pad-y) var(--byo-card-pad-x);
	flex: 1;
	display: flex;
	flex-direction: column;
	border-top: var(--byo-card-border-w) solid var(--byo-card-accent);
}

.byo-post-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.byo-post-card__cat {
	font-family: 'Barlow', sans-serif;
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--byo-card-accent);
}

.byo-post-card__dot {
	width: 3px;
	height: 3px;
	border-radius: 50%;
	background: #ddd;
	flex-shrink: 0;
}

.byo-post-card__date {
	font-family: 'Barlow', sans-serif;
	font-size: 9px;
	color: var(--byo-card-date-color);
	letter-spacing: 1px;
	text-transform: uppercase;
}

.byo-post-card__title {
	font-family: 'Bebas Neue', sans-serif;
	font-size: 22px;
	color: var(--byo-card-title-color);
	line-height: 1.05;
	margin: 0 0 10px;
	font-weight: 400;
}

.byo-post-card__title a {
	color: inherit;
	text-decoration: none;
}

.byo-post-card__excerpt {
	font-family: 'Barlow', sans-serif;
	font-size: 12px;
	color: var(--byo-card-excerpt-color);
	line-height: 1.6;
	font-weight: 300;
	flex: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 16px;
}

.byo-post-card__cta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-family: 'Barlow', sans-serif;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--byo-card-cta-color);
	text-decoration: none;
	margin-top: auto;
	transition: color 0.2s ease;
}

.byo-post-card__cta-icon {
	flex-shrink: 0;
	display: block;
}

.byo-post-card:hover .byo-post-card__cta {
	color: var(--byo-card-cta-hover);
}

.byo-post-card--placeholder .byo-post-card__body {
	border-top-color: #dddbd6;
}

.byo-post-card--placeholder .byo-post-card__img {
	background: #f5f4f0;
	min-height: 120px;
}

@media (prefers-reduced-motion: reduce) {
	.byo-post-card,
	.byo-post-card__img img,
	.byo-post-card__overlay,
	.byo-post-card__overlay span,
	.byo-post-card__cta {
		transition: none;
	}

	.byo-post-card:hover .byo-post-card__img img {
		transform: none;
	}
}

@media (max-width: 767px) {
	.byo-post-card {
		--byo-card-pad-y: 16px;
		--byo-card-pad-x: 16px;
	}

	.byo-post-card__title {
		font-size: 20px;
	}

	.byo-post-card__overlay span {
		letter-spacing: 2px;
	}
}
