/* ============================================
   SECTION RECENT POSTS
   Widget: webc-section-recent-posts
   Globales: usa tokens --webc__* del theme
   ============================================ */

.section-recent-posts {
	padding: var(--webc__section-padding-y);
	background-color: var(--webc__color-white);
}

.section-recent-posts__container {
	max-width: var(--webc__container-max-width);
	margin: 0 auto;
}

.section-recent-posts__titulo {
	font-family: var(--webc__font-display);
	font-size: var(--webc__font-size-2xl);
	font-weight: var(--webc__font-weight-bold);
	color: var(--webc__color-primary);
	margin: 0 0 var(--webc__spacing-xl) 0;
	text-align: center;
	line-height: var(--webc__line-height-tight);
}

.section-recent-posts__grid {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--webc__spacing-lg);
}

.section-recent-posts__item {
	background-color: var(--webc__color-white);
	border: 1px solid var(--webc__color-primary-light);
	border-radius: 8px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-recent-posts__item:hover {
	transform: translateY(-4px);
	box-shadow: var(--webc__shadow-md);
}

.section-recent-posts__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.section-recent-posts__media {
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: var(--webc__color-primary-light);
}

.section-recent-posts__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.section-recent-posts__item:hover .section-recent-posts__img {
	transform: scale(1.05);
}

.section-recent-posts__body {
	display: flex;
	flex-direction: column;
	gap: var(--webc__spacing-sm);
	padding: var(--webc__spacing-lg);
	flex: 1;
}

.section-recent-posts__post-titulo {
	font-family: var(--webc__font-text);
	font-size: var(--webc__font-size-md);
	font-weight: var(--webc__font-weight-semibold);
	color: var(--webc__color-secondary);
	margin: 0;
	line-height: var(--webc__line-height-tight);
	transition: color 0.3s ease;
}

.section-recent-posts__link:hover .section-recent-posts__post-titulo {
	color: var(--webc__color-primary);
}

.section-recent-posts__fecha {
	font-family: var(--webc__font-text);
	font-size: var(--webc__font-size-xs);
	color: var(--webc__color-text);
	text-transform: uppercase;
	letter-spacing: var(--webc__letter-spacing-wide);
}

.section-recent-posts__excerpt {
	font-family: var(--webc__font-text);
	font-size: var(--webc__font-size-sm);
	color: var(--webc__color-text);
	line-height: var(--webc__line-height-normal);
	margin: 0;
}

.section-recent-posts__footer {
	margin-top: var(--webc__spacing-xl);
	text-align: center;
}

.section-recent-posts__ver-todos {
	display: inline-block;
	font-family: var(--webc__font-text);
	font-size: var(--webc__font-size-sm);
	font-weight: var(--webc__font-weight-semibold);
	color: var(--webc__color-primary);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: var(--webc__letter-spacing-cta);
	border-bottom: 2px solid var(--webc__color-accent);
	padding-bottom: var(--webc__spacing-xs);
	transition: color 0.3s ease;
}

.section-recent-posts__ver-todos:hover {
	color: var(--webc__color-accent);
}

.section-recent-posts__vacio {
	text-align: center;
	font-family: var(--webc__font-text);
	color: var(--webc__color-text);
	font-style: italic;
}

@media (max-width: 1024px) {
	.section-recent-posts__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.section-recent-posts__grid {
		grid-template-columns: 1fr;
	}
}
