/* =========================================================
   ND Secciones Destacadas — estilos de frontend
   Todo el CSS usa el prefijo "ndsx-" para no chocar con el tema.
   Ajusta libremente estos valores; son solo un punto de partida.
   ========================================================= */

:root {
	--ndsx-color-acento: #c0392b;
	--ndsx-overlay-bg: rgba(255, 255, 255, 0.5);
	--ndsx-overlay-color: #1a1a1a;
	--ndsx-radius: 4px;
}

/* ---------------------------------------------------------
   1. TEMAS CLAVE — Carrusel de portada
   --------------------------------------------------------- */

.ndsx-tc-carrusel {
	position: relative;
	width: 100%;
	height: 350px;
	overflow: hidden;
	margin: 1.5em 0;
}

.ndsx-tc-viewport {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.ndsx-tc-pista {
	display: flex;
	height: 100%;
	transition: transform 0.6s ease;
	will-change: transform;
}

.ndsx-tc-item {
	position: relative;
	flex: 0 0 calc(100% / var(--ndsx-visibles, 3));
	max-width: calc(100% / var(--ndsx-visibles, 3));
	height: 100%;
	box-sizing: border-box;
	padding: 0 6px;
}

.ndsx-tc-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
	border-radius: var(--ndsx-radius);
	text-decoration: none;
	overflow: hidden;
}

/* El overlay solo envuelve el ancho del título, no todo el banner */
.ndsx-tc-overlay {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 90%;
	background: var(--ndsx-overlay-bg);
	border: 2px solid var(--ndsx-color-acento);
	border-radius: var(--ndsx-radius);
	padding: 0.4em 0.9em;
}

.ndsx-tc-titulo {
	color: var(--ndsx-overlay-color);
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.25;
	text-align: center;
}

.ndsx-tc-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(0, 0, 0, 0.4);
	color: #fff;
	border: none;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}
.ndsx-tc-prev { left: 10px; }
.ndsx-tc-next { right: 10px; }

@media (max-width: 782px) {
	.ndsx-tc-carrusel { height: 220px; }
	.ndsx-tc-item { flex: 0 0 100%; max-width: 100%; }
	.ndsx-tc-titulo { font-size: 1rem; }
}

/* ---------------------------------------------------------
   1b. TEMAS CLAVE — banner único con fundido (sidebar)
   --------------------------------------------------------- */

.ndsx-tc-sidebar {
	position: relative;
	width: 100%;
	height: 200px;
	border-radius: var(--ndsx-radius);
	overflow: hidden;
	margin: 1em 0;
}

.ndsx-tc-sidebar-item {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-size: cover;
	background-position: center;
	opacity: 0;
	transition: opacity 1s ease;
	text-decoration: none;
}

.ndsx-tc-sidebar-item.is-active {
	opacity: 1;
}

/* ---------------------------------------------------------
   2. SEGUIMIENTO ESPECIAL
   --------------------------------------------------------- */

.ndsx-sg-bloque {
	display: grid;
	grid-template-columns: 0.9fr 1.4fr 1fr;
	gap: 16px;
	margin: 1.5em 0;
	align-items: stretch;
}

.ndsx-sg-portada {
	width: 100%;
}

.ndsx-sg-banner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	background-size: cover;
	background-position: center;
	border-radius: var(--ndsx-radius);
	text-decoration: none;
}

.ndsx-sg-notas {
	display: contents; /* deja que "principal" y "secundarias" ocupen columnas propias del grid padre */
}

.ndsx-sg-nota {
	display: block;
	text-decoration: none;
	color: inherit;
}

.ndsx-sg-nota--principal {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: 180px;
	background-size: cover;
	background-position: center;
	border-radius: var(--ndsx-radius);
	overflow: hidden;
}

.ndsx-sg-nota-degradado {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 60%);
}

.ndsx-sg-nota--principal .ndsx-sg-nota-titulo {
	position: relative;
	z-index: 1;
	color: #fff;
	font-weight: 700;
	font-size: 1.15rem;
	padding: 14px;
}

.ndsx-sg-notas-secundarias {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ndsx-sg-nota--fila {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ndsx-sg-nota-thumb {
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: var(--ndsx-radius);
	flex-shrink: 0;
}

.ndsx-sg-nota--fila .ndsx-sg-nota-titulo {
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.3;
}

@media (max-width: 782px) {
	.ndsx-sg-bloque {
		grid-template-columns: 1fr;
	}
}

/* Widget de sidebar: apilado vertical, versión compacta */
.ndsx-sg-sidebar-wrap {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.ndsx-sg-compacto {
	grid-template-columns: 1fr;
}
.ndsx-sg-compacto .ndsx-sg-banner { min-height: 120px; }
.ndsx-sg-compacto .ndsx-sg-nota--principal { min-height: 140px; }
.ndsx-sg-compacto .ndsx-sg-notas-secundarias { flex-direction: row; }
.ndsx-sg-compacto .ndsx-sg-nota-thumb { width: 56px; height: 56px; }

/* ---------------------------------------------------------
   3. ÁREA MUNICIPIOS
   --------------------------------------------------------- */

.ndsx-mun-widget {
	margin: 1em 0;
}
