/* =========================================================
   Saiens — tokens y capas base
   Tailwind (Play CDN) se encarga de las utilidades.
   Aqui viven variables, reset minimo y patrones repetidos.
   ========================================================= */

:root {
	/* Verde institucional */
	--sa-green-900: #1f4a43;
	--sa-green-800: #275c53;
	--sa-green-700: #2f6e63;
	--sa-green-400: #88c2bb;
	--sa-green-300: #a9cfc9;
	--sa-green-200: #bcdcd7;
	--sa-green-100: #e4f0ed;

	/* Azul portal / resultados */
	--sa-blue-700: #33526f;
	--sa-blue-600: #3f6488;
	--sa-blue-500: #4e7599;

	/* Grises de texto e interfaz */
	--sa-ink-900: #22282b;
	--sa-ink-800: #33383b;
	--sa-ink-700: #55595a;
	--sa-ink-600: #5f6467;
	--sa-ink-500: #696e70;
	--sa-ink-400: #8a9093;
	--sa-line: #e2e5e7;
	--sa-bg-soft: #f3f5f6;

	/* Superficies oscuras (footer) */
	--sa-graphite-700: #414a52;
	--sa-graphite-600: #48545c;
	--sa-graphite-300: #c6cfd8;
	--sa-graphite-200: #d3dbe2;

	--sa-gutter: 20px;
	--sa-site-max: 1440px;
}

@media (min-width: 768px) {
	:root { --sa-gutter: 40px; }
}

@media (min-width: 1024px) {
	:root { --sa-gutter: 80px; }
}

*, ::before, ::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: 'Open Sans', system-ui, sans-serif;
	color: var(--sa-ink-700);
	background: #fff;
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* El diseno original no usa radios. Normalizamos campos nativos. */
input, select, textarea {
	font: inherit;
	color: inherit;
	border-radius: 0;
	background: transparent;
	border: 0;
	width: 100%;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--sa-green-700);
	outline-offset: 2px;
}

::placeholder { color: var(--sa-ink-400); opacity: 1; }

/* ---------- Patrones repetidos ---------- */

/* Contenedor de seccion: ancho de sitio + gutters responsivos. */
.sa-shell {
	width: 100%;
	max-width: var(--sa-site-max);
	margin-inline: auto;
	padding-inline: var(--sa-gutter);
}

/* Enlaces de navegacion y listas del footer */
.sa-link { transition: color .15s ease, opacity .15s ease; }
.sa-link:hover { color: #fff; opacity: 1; }

/* Tarjetas con borde fino del diseno */
.sa-card { transition: box-shadow .18s ease, transform .18s ease; }
.sa-card:hover { box-shadow: 0 10px 30px rgba(34, 40, 43, .10); transform: translateY(-2px); }

/* Accesibilidad: salto al contenido */
.sa-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 12px 20px;
	background: var(--sa-green-800);
	color: #fff;
	font-weight: 700;
}
.sa-skip-link:focus { left: 0; }

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

/* ---------- Menu movil ---------- */
body.sa-nav-open { overflow: hidden; }

.sa-mobile-panel {
	transform: translateX(100%);
	transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}
.sa-mobile-panel[data-open="true"] { transform: translateX(0); }

/* ---------- Acordeon / submenus ---------- */
.sa-accordion-body { display: none; }
.sa-accordion[data-open="true"] .sa-accordion-body { display: block; }
.sa-accordion[data-open="true"] .sa-accordion-chevron { transform: rotate(180deg); }
.sa-accordion-chevron { transition: transform .2s ease; }

/* ---------- Mega menu escritorio ---------- */
.sa-mega {
	display: none;
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 40;
}
.sa-has-mega:hover > .sa-mega,
.sa-has-mega:focus-within > .sa-mega,
.sa-has-mega[data-open="true"] > .sa-mega { display: block; }

/* ---------- Contenido editorial (the_content) ---------- */
.sa-prose { color: var(--sa-ink-700); font-size: 14.5px; line-height: 26px; }
.sa-prose > * + * { margin-top: 1.1em; }
.sa-prose h2 {
	font-family: Montserrat, system-ui, sans-serif;
	font-weight: 700;
	font-size: 22px;
	letter-spacing: -.5px;
	color: var(--sa-ink-900);
	margin-top: 1.8em;
}
.sa-prose h3 {
	font-family: Montserrat, system-ui, sans-serif;
	font-weight: 700;
	font-size: 17px;
	color: var(--sa-ink-900);
	margin-top: 1.6em;
}
.sa-prose ul, .sa-prose ol { padding-left: 1.2em; }
.sa-prose li + li { margin-top: .5em; }
.sa-prose a { color: var(--sa-green-700); text-decoration: underline; }
.sa-prose strong { color: var(--sa-ink-900); }
.sa-prose blockquote {
	border-left: 3px solid var(--sa-green-700);
	padding-left: 18px;
	color: var(--sa-ink-600);
	font-style: italic;
}

/* ---------- Impresion (resultados / expediente) ---------- */
@media print {
	.sa-no-print { display: none !important; }
	body { background: #fff; }
}

/* ---------- Respeta reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, ::before, ::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}

/* Estado activo de los chips de filtro */
.sa-chip-on {
	background: var(--sa-green-700) !important;
	border-color: var(--sa-green-700) !important;
	color: #fff !important;
}
.sa-chip-on .sa-chip-count { color: rgba(255, 255, 255, .75) !important; }

/* Mensajes de formulario */
.sa-error { color: #C0392B !important; }
