.cdyt-grid {
	display: grid;
	gap: 2rem 1.5rem;
	margin: 0;
}

.cdyt-grid--1 { grid-template-columns: 1fr; }
.cdyt-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cdyt-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cdyt-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cdyt-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cdyt-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 980px) {
	.cdyt-grid--3,
	.cdyt-grid--4,
	.cdyt-grid--5,
	.cdyt-grid--6 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.cdyt-grid { grid-template-columns: 1fr; }
}

.cdyt-card {
	margin: 0;
	display: flex;
	flex-direction: column;
}

.cdyt-card__thumb {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: 8px;
	background: #f2f2f2;
	line-height: 0;
}

.cdyt-card__thumb img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform .3s ease;
}

.cdyt-card__thumb:hover img {
	transform: scale(1.04);
}

.cdyt-card__noimg {
	display: block;
	padding-top: 56.25%;
}

.cdyt-card__duration {
	position: absolute;
	right: 6px;
	bottom: 6px;
	background: rgba(0, 0, 0, .8);
	color: #fff;
	font-size: 12px;
	line-height: 1;
	padding: 3px 6px;
	border-radius: 3px;
	letter-spacing: .02em;
}

.cdyt-card__play {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0);
	transition: background .3s ease;
}

.cdyt-card__thumb:hover .cdyt-card__play {
	background: rgba(0, 0, 0, .18);
}

.cdyt-card__title {
	font-size: 1rem;
	line-height: 1.35;
	margin: .8rem 0 .3rem;
	font-weight: 600;
}

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

.cdyt-card__title a:hover {
	text-decoration: underline;
}

.cdyt-card__meta {
	font-size: .82rem;
	color: #666;
	margin: 0 0 .35rem;
}

.cdyt-card__excerpt {
	font-size: .9rem;
	line-height: 1.5;
	color: #444;
	margin: 0;
}

.cdyt-empty,
.cdyt-notice {
	padding: 1rem;
	background: #f6f7f7;
	border-left: 4px solid #3858e9;
}

.cdyt-page__title {
	margin-bottom: .2em;
}

.cdyt-page__intro {
	color: #555;
	margin-top: 0;
}

.cdyt-index {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: .6rem;
}

.cdyt-index__item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: .75rem;
	padding: .7rem .9rem;
	background: #f6f7f7;
	border-radius: 6px;
}

.cdyt-index__item a {
	font-weight: 600;
	text-decoration: none;
}

.cdyt-index__item a:hover {
	text-decoration: underline;
}

.cdyt-index__count {
	color: #888;
	font-size: .85em;
	white-space: nowrap;
}

.et_pb_text .cdyt-card__title,
.cdyt-card__title {
	letter-spacing: normal;
	text-transform: none;
}
/* Fondo blanco de las páginas de secciones */
body.cdyt-pagina-seccion #et-main-area,
body.cdyt-pagina-seccion #main-content,
body.cdyt-pagina-seccion .entry-content,
body.cdyt-pagina-seccion .et_pb_section {
	background-color: #fff;
}

/* Megamenú de secciones: etiqueta de grupo (escritorio y móvil) */
.cdyt-mega-group-label {
	display: block;
	margin: 14px 0 6px;
	padding: 0 0 4px;
	border-bottom: 1px solid #eef0f4;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .09em;
	line-height: 1.4;
	text-transform: uppercase;
	color: #7b8494;
	list-style: none;
}

.cdyt-mega-group-label:first-child {
	margin-top: 0;
}

a[data-cdyt-count]::after {
	content: attr(data-cdyt-count);
	display: inline-block;
	margin-left: 8px;
	padding: 1px 8px;
	border-radius: 999px;
	background: #eef1f6;
	color: #6b7484;
	font-size: 12px;
	line-height: 1.6;
}

/* Panel del megamenú, en la franja superior de la cabecera */
@media (min-width: 981px) {
	#top-menu li.cdyt-mega-parent {
		position: relative;
		padding-bottom: 22px;
		margin-bottom: -22px;
	}

	#top-menu li.cdyt-mega-parent > ul.sub-menu {
		position: absolute;
		top: 100%;
		left: 50vw;
		z-index: 99999;
		display: none;
		width: 1080px;
		max-width: 92vw;
		padding: 22px 26px;
		margin: 0;
		transform: translate(-50%, 12px);
		columns: 4;
		column-gap: 26px;
		background: #fff;
		border: 1px solid #e6e8ec;
		border-radius: 12px;
		box-shadow: 0 18px 44px rgba(16, 24, 40, .16);
		text-align: left;
	}

	#top-menu li.cdyt-mega-parent:hover > ul.sub-menu,
	#top-menu li.cdyt-mega-parent:focus-within > ul.sub-menu {
		display: block;
		animation: cdyt-mega-in .18s ease-out;
	}

	#top-menu li.cdyt-mega-parent > ul.sub-menu li {
		display: block !important;
		float: none !important;
		width: auto !important;
		margin: 0 0 2px !important;
		padding: 0 !important;
		break-inside: avoid;
		-webkit-column-break-inside: avoid;
		page-break-inside: avoid;
	}

	#top-menu li.cdyt-mega-parent > ul.sub-menu li > a {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
		width: auto !important;
		max-width: none !important;
		padding: 7px 10px !important;
		border-radius: 8px;
		font-size: 14px;
		line-height: 1.35;
		color: #1f2430;
		text-decoration: none;
		transition: background-color .15s ease, color .15s ease;
	}

	#top-menu li.cdyt-mega-parent > ul.sub-menu li > a:hover {
		background: #f2f5f9;
		color: #0b63ce;
	}

	#top-menu li.cdyt-mega-parent > ul.sub-menu li > a[data-cdyt-count]::after {
		flex: 0 0 auto;
		margin-left: 0;
	}

	#top-menu li.cdyt-mega-parent > ul.sub-menu .cdyt-mega-group-label {
		column-span: all;
		-webkit-column-span: all;
		break-after: avoid;
		margin: 0 0 12px;
		padding: 0 0 6px;
	}

	#top-menu li.cdyt-mega-parent > ul.sub-menu .cdyt-mega-group-label:not(:first-child) {
		margin-top: 22px;
	}
}

@keyframes cdyt-mega-in {
	from { opacity: 0; }
	to { opacity: 1; }
}
