.cd-featured-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	width: 100%;
}

.cd-featured-card {
	display: block;
	min-width: 0;
	padding: 20px;
	overflow: hidden;
	background: #e7edf4;
	color: inherit;
	text-decoration: none !important;
	transition-property: color, background, border-color, box-shadow, transform;
	transition-duration: .3s;
	transition-timing-function: ease;
}

.cd-featured-card:hover,
.cd-featured-card:focus,
.cd-featured-card:focus-visible {
	color: inherit;
	text-decoration: none !important;
}

.cd-featured-card:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.cd-featured-media {
	position: relative;
	width: 100%;
	height: auto;
	overflow: hidden;
	background-color: #e7edf4;
}

.cd-featured-media img {
	display: block;
	width: 100%;
	height: auto;
	max-width: none;
	margin: 0;
	object-fit: contain;
	object-position: center center;
	transition-property: transform, filter, opacity;
	transition-duration: .3s;
	transition-timing-function: ease;
}

.cd-image--manual .cd-featured-media {
	height: 490px;
}

.cd-image--manual .cd-featured-media img {
	height: 100%;
	object-fit: cover;
}

.cd-featured-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background:
		linear-gradient(135deg, transparent 48%, rgba(255, 255, 255, .45) 49%, rgba(255, 255, 255, .45) 51%, transparent 52%),
		#dfe7f0;
}

.cd-image--auto .cd-featured-placeholder {
	min-height: 230px;
}

.cd-featured-play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background-color: rgba(0, 58, 112, .88);
	color: #fff;
	transform: translate(-50%, -50%);
	transition-property: background-color, color, opacity, box-shadow, transform;
	transition-duration: .3s;
	transition-timing-function: ease;
	pointer-events: none;
}

.cd-featured-play svg {
	display: block;
	width: 34px;
	height: 34px;
	margin-left: 4px;
}

.cd-featured-card:hover .cd-featured-play,
.cd-featured-card:focus-visible .cd-featured-play {
	transform: translate(-50%, -50%) scale(1.06);
}

.cd-featured-content {
	position: relative;
	min-width: 0;
	text-align: left;
}

.cd-featured-term-row {
	position: relative;
	z-index: 1;
	margin: -8px 0 4px;
	line-height: 1;
}

.cd-featured-term {
	display: inline-block;
	max-width: 100%;
	padding: 3px 5px;
	overflow: hidden;
	background: #003a70;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.1;
	margin: 0 6px 4px 0;
	text-overflow: ellipsis;
	vertical-align: top;
	white-space: nowrap;
}

.cd-featured-date {
	margin: 0 0 4px;
	color: #111827;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
	text-transform: uppercase;
}

.cd-featured-title {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	color: #071b39;
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(22px, 3vw, 34px);
	font-weight: 500;
	line-height: 1.15;
	text-wrap: balance;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	transition-property: color, opacity, transform;
	transition-duration: .3s;
	transition-timing-function: ease;
}

/* Evita que estilos del tema o de Elementor oculten el título visible. */
.cd-featured-grid.cd-title--always .cd-featured-title {
	display: -webkit-box !important;
	height: auto !important;
	max-height: none;
	opacity: 1 !important;
	visibility: visible !important;
	transform: none !important;
}

.cd-featured-grid.cd-title--hover .cd-featured-title {
	display: -webkit-box !important;
	height: auto !important;
	visibility: visible !important;
}

.cd-title--hover .cd-featured-title {
	opacity: 0;
	transform: translateY(8px);
}

.cd-title--hover .cd-featured-card:hover .cd-featured-title,
.cd-title--hover .cd-featured-card:focus-visible .cd-featured-title {
	opacity: 1 !important;
	transform: translateY(0) !important;
}

/*
 * Compatibilidad con Chaves Digital - Modo Nocturno.
 * La mayor especificidad y !important evitan que reglas globales oculten
 * el contenido, pero los colores siguen siendo configurables en Elementor.
 */
html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected {
	color-scheme: dark;
}

html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-card,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-card {
	background: var(--cd-featured-dark-card-bg, var(--cd-night-surface, #111a2b)) !important;
	border-color: var(--cd-featured-dark-border, var(--cd-night-border, #2a3850)) !important;
	color: var(--cd-featured-dark-title, var(--cd-night-text, #e8eef7)) !important;
}

html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-card:hover,
html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-card:focus-visible,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-card:hover,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-card:focus-visible {
	background: var(--cd-featured-dark-card-hover-bg, var(--cd-featured-dark-card-bg, var(--cd-night-surface, #111a2b))) !important;
}

html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-content,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-content {
	background-color: transparent !important;
	color: var(--cd-featured-dark-title, var(--cd-night-text, #e8eef7)) !important;
}

html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-title,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-title {
	display: -webkit-box !important;
	color: var(--cd-featured-dark-title, var(--cd-night-text, #e8eef7)) !important;
	visibility: visible !important;
}

html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-card:hover .cd-featured-title,
html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-card:focus-visible .cd-featured-title,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-card:hover .cd-featured-title,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-card:focus-visible .cd-featured-title {
	color: var(--cd-featured-dark-title-hover, var(--cd-night-link, #75bfff)) !important;
}

html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-date,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-date {
	color: var(--cd-featured-dark-date, var(--cd-night-muted, #b8c4d6)) !important;
}

html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-term,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-term {
	background-color: var(--cd-featured-dark-category-bg, #003a70) !important;
	color: var(--cd-featured-dark-category, #fff) !important;
}

html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-media,
html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected .cd-featured-placeholder,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-media,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected .cd-featured-placeholder {
	background-color: var(--cd-featured-dark-image-bg, var(--cd-night-surface, #111a2b)) !important;
	border-color: var(--cd-featured-dark-border, var(--cd-night-border, #2a3850)) !important;
}

html.cd-night-mode .cd-featured-grid.cd-dark-mode--protected img,
html[data-cd-color-mode="dark"] .cd-featured-grid.cd-dark-mode--protected img {
	filter: none !important;
}

.cd-featured-empty {
	margin: 0;
}

@media (max-width: 1024px) {
	.cd-image--manual .cd-featured-media {
		height: 360px;
	}
}

@media (max-width: 767px) {
	.cd-featured-card {
		padding: 12px;
	}

	.cd-image--manual .cd-featured-media {
		height: 230px;
	}

	.cd-featured-play {
		width: 58px;
		height: 58px;
	}

	.cd-featured-play svg {
		width: 27px;
		height: 27px;
	}

	.cd-featured-title {
		font-size: clamp(20px, 6vw, 28px);
	}
}

@media (hover: none), (pointer: coarse) {
	.cd-title--hover .cd-featured-title {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cd-featured-card,
	.cd-featured-card * {
		transition-duration: .01ms !important;
	}
}
