/* N24 Core — base global: tokens, tipografía, modo oscuro, CLS y anuncios.
   Paleta del tema: #03242B / #449C9E / #E6E6E6. Sin fuentes web nuevas:
   Georgia y la pila del sistema ya están en el dispositivo (0 KB, 0 CLS). */

:root {
	--n24-ink: #111a1d;
	--n24-ink-soft: #4a5a60;
	--n24-bg: #ffffff;
	--n24-bg-soft: #f3f5f5;
	--n24-line: #e2e6e7;
	--n24-brand: #03242b;
	--n24-accent: #449c9e;
	--n24-alert: #c8102e;
	--n24-radius: 8px;
	--n24-gap: clamp(12px, 2vw, 24px);
	--n24-font-head: "Inter", "Helvetica Neue", Arial, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--n24-font-body: "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
	--n24-font-ui: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Tipografía unificada ---------- */

.n24-home,
#mvp-content-main {
	font-family: var(--n24-font-body);
}

#mvp-content-main p,
#mvp-content-main li {
	font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
	line-height: 1.7;
}

.n24-home h1, .n24-home h2, .n24-home h3, .n24-home h4,
h1.mvp-post-title,
.mvp-post-title,
#mvp-content-main h2,
#mvp-content-main h3 {
	font-family: var(--n24-font-head);
	letter-spacing: -0.01em;
	line-height: 1.18;
	text-wrap: balance;
}

.n24-card__cat,
.n24-time,
.n24-section-title,
.n24-ad__label,
.n24-btn {
	font-family: var(--n24-font-ui);
}

/* ---------- CLS: espacio reservado ---------- */

/* Imágenes con width/height: el navegador reserva el hueco por proporción. */
img[width][height] {
	height: auto;
}

/* Logos de header.php: se imprimen sin width/height (PNG 100×100).
   "auto 1/1" reserva un cuadrado hasta que carga y luego usa la proporción real. */
.mvp-nav-logo-reg img,
.mvp-nav-logo-small img,
.mvp-nav-small-logo img,
#mvp-foot-logo img {
	aspect-ratio: auto 1 / 1;
}

/* Placeholders de EWWW sin dimensiones dentro del contenido del tema. */
.mvp-main-box img.lazyload:not([width]) {
	aspect-ratio: 16 / 9;
	width: 100%;
	object-fit: cover;
}

/* Embeds responsivos con proporción fija. */
#mvp-content-main iframe[src*="youtube"],
#mvp-content-main iframe[src*="vimeo"] {
	aspect-ratio: 16 / 9;
	width: 100%;
	height: auto;
}

/* ---------- Anuncios (tamaños fijos por breakpoint = CLS 0) ---------- */

.n24-ad {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin: var(--n24-gap) auto;
	contain: layout;
	clear: both;
}

.n24-ad__label {
	font-size: 10px;
	line-height: 16px;
	height: 16px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--n24-ink-soft);
}

.n24-ins { display: inline-block; background: var(--n24-bg-soft); }

.n24-ad--inline { min-height: 266px; }
.n24-ins--inline { width: 300px; height: 250px; }

.n24-ad--wide { min-height: 266px; }
.n24-ins--wide { width: 300px; height: 250px; }

.n24-ad--side { min-height: 266px; }
.n24-ins--side { width: 300px; height: 250px; }

@media (min-width: 768px) {
	.n24-ad--inline { min-height: 296px; }
	.n24-ins--inline { width: 336px; height: 280px; }
	.n24-ad--wide { min-height: 106px; }
	.n24-ins--wide { width: 728px; height: 90px; }
}

@media (min-width: 1024px) {
	.n24-ad--side { min-height: 616px; }
	.n24-ins--side { width: 300px; height: 600px; }
}

.n24-ad--placeholder .n24-ins {
	display: flex;
	align-items: center;
	justify-content: center;
	outline: 2px dashed var(--n24-accent);
	color: var(--n24-ink-soft);
	font: 12px/1.3 var(--n24-font-ui);
	text-align: center;
	padding: 8px;
	box-sizing: border-box;
}

/* ---------- Fachada de YouTube ---------- */

.n24-yt {
	position: relative;
	aspect-ratio: 16 / 9;
	width: 100%;
	background: #000;
	border-radius: var(--n24-radius);
	overflow: hidden;
	margin: 1.5em 0;
}

.n24-yt img,
.n24-yt iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border: 0;
}

.n24-yt button {
	position: absolute;
	inset: 0;
	width: 100%;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.n24-yt button::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 68px;
	height: 48px;
	transform: translate(-50%, -50%);
	border-radius: 12px;
	background: #f00 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat;
}

/* ---------- Atribución de fuente (agregador) ---------- */

.n24-source {
	margin: 2em 0;
	padding: 14px 16px;
	border-left: 4px solid var(--n24-accent);
	background: var(--n24-bg-soft);
	border-radius: 0 var(--n24-radius) var(--n24-radius) 0;
	font-family: var(--n24-font-ui);
	font-size: 0.95rem;
}

.n24-source a { font-weight: 700; color: var(--n24-accent); }

/* ---------- Modo oscuro nativo ---------- */

@media (prefers-color-scheme: dark) {
	:root {
		--n24-ink: #e6e6e6;
		--n24-ink-soft: #9fb0b4;
		--n24-bg: #0b1316;
		--n24-bg-soft: #13202a;
		--n24-line: #22333a;
		--n24-accent: #5fb8ba;
	}

	/* Portadas N24: siempre. */
	.n24-home { color: var(--n24-ink); }
	body.n24-layout-breaking,
	body.n24-layout-magazine,
	body.n24-layout-feed { background: var(--n24-bg); }

	/* Resto del tema (Zox), si "Modo oscuro en todo el sitio" está activo.
	   !important porque el Personalizador de Zox imprime colores en línea. */
	body.n24-dark-global,
	body.n24-dark-global #mvp-site,
	body.n24-dark-global #mvp-site-main,
	body.n24-dark-global #mvp-main-body-wrap,
	body.n24-dark-global .mvp-main-box,
	body.n24-dark-global #mvp-article-wrap,
	body.n24-dark-global #mvp-post-main,
	body.n24-dark-global .mvp-widget-home,
	body.n24-dark-global .mvp-side-widget,
	body.n24-dark-global #mvp-foot-wrap {
		background-color: var(--n24-bg) !important;
		color: var(--n24-ink) !important;
	}

	body.n24-dark-global h1,
	body.n24-dark-global h2,
	body.n24-dark-global h3,
	body.n24-dark-global h4,
	body.n24-dark-global #mvp-content-main,
	body.n24-dark-global #mvp-content-main p,
	body.n24-dark-global [class*="-text"] h2,
	body.n24-dark-global [class*="-text"] h3,
	body.n24-dark-global .mvp-widget-home-title {
		color: var(--n24-ink) !important;
	}

	body.n24-dark-global #mvp-content-main a { color: var(--n24-accent) !important; }

	body.n24-dark-global .mvp-widget-home-head,
	body.n24-dark-global .mvp-blog-story-wrap,
	body.n24-dark-global hr {
		border-color: var(--n24-line) !important;
	}

	/* Imágenes ligeramente atenuadas para no deslumbrar. */
	body.n24-dark-global #mvp-content-main img { filter: brightness(0.92); }
}

/* Accesibilidad: respetar reducción de movimiento. */
@media (prefers-reduced-motion: reduce) {
	.n24-home *,
	.n24-home *::before,
	.n24-home *::after {
		transition: none !important;
		animation: none !important;
	}
}
