/* ==========================================================================
   gob.css — Sistema de diseño institucional
   Centro de Producción Santa Rita, S.A. de C.V.
   --------------------------------------------------------------------------
   Mobile-first · CSS puro · WCAG 2.1 AA (AAA en texto principal)
   Índice:
     01. Tokens (variables)
     02. Reset y base
     03. Tipografía
     04. Utilidades de accesibilidad
     05. Layout (contenedor, grid, secciones)
     06. Barra de gobierno + herramientas de accesibilidad
     07. Header y navegación principal
     08. Buscador
     09. Hero y migas de pan
     10. Componentes: botones, tarjetas, alertas, estadísticas, acordeón
     11. Tablas y listas de documentos (transparencia)
     12. Footer
     13. Modo alto contraste
     14. Movimiento reducido e impresión
     15. Componentes de transparencia (insertado antes de la sección 13)
     16. Contabilidad gubernamental: tablas trimestrales (antes de la 13)
     17. Denuncias / Órgano de Control Interno (antes de la 13)
     18. Institucional: misión, valores, línea de tiempo, galería (antes de la 13)
     19. Textos legales: aviso de privacidad (antes de la 13)
     20. Formularios y contacto (antes de la 13)
   ========================================================================== */


/* ==========================================================================
   01. TOKENS
   Color institucional: verde #0A4905.
   Contrastes verificados contra blanco (#FFFFFF):
     --c-brand-900 #0A4905 → 10.7:1 (AAA)   --c-ink     #1F2A21 → 14.9:1 (AAA)
     --c-brand-700 #0F620A →  7.6:1 (AAA)   --c-muted   #4B564C →  7.7:1 (AAA)
     --c-brand-600 #1B7A14 →  5.5:1 (AA)    enlaces
     --c-gold-700  #7A5A12 →  6.6:1 (AA)    --c-gold-400 #C9A44C → decorativo
     Dorado sobre verde #0A4905 → 4.5:1 (AA)
   ========================================================================== */
:root {
  /* Color — institucional (verde #0A4905) */
  --c-brand-900: #0A4905;
  --c-brand-800: #0C5507;
  --c-brand-700: #0F620A;
  --c-brand-600: #1B7A14;
  --c-brand-100: #E4F0E2;
  --c-brand-50:  #F2F8F1;

  --c-gold-700: #7A5A12;
  --c-gold-400: #C9A44C;
  --c-gold-100: #F6EEDA;

  --c-ink:      #1F2A21;
  --c-muted:    #4B564C;
  --c-line:     #D6DCD4;
  --c-surface:  #FFFFFF;
  --c-bg:       #F5F7F4;

  /* Color — estados */
  --c-info:     #1B7A14;  --c-info-bg:    #E4F0E2;
  --c-success:  #1E6B3A;  --c-success-bg: #E5F2EA;
  --c-warning:  #7A4E00;  --c-warning-bg: #FDF2DC;
  --c-danger:   #A4161A;  --c-danger-bg:  #FBE6E6;

  --c-focus:    #C9A44C;  /* anillo de foco dorado, visible sobre azul y blanco */

  /* Tipografía */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --fs-base: 1rem;             /* 16px; escalable con las herramientas A-/A+ */
  --fs-sm:   0.875rem;
  --fs-xs:   0.8125rem;
  --fs-lg:   1.125rem;
  --fs-h4:   1.125rem;
  --fs-h3:   clamp(1.2rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-h2:   clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --fs-h1:   clamp(1.875rem, 1.5rem + 1.8vw, 2.875rem);
  --lh-tight: 1.2;
  --lh-base:  1.6;

  /* Espaciado (escala 4px) */
  --sp-1: 0.25rem; --sp-2: 0.5rem; --sp-3: 0.75rem; --sp-4: 1rem;
  --sp-5: 1.5rem;  --sp-6: 2rem;   --sp-7: 3rem;    --sp-8: 4rem;

  /* Forma y profundidad */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(10, 73, 5, .08);
  --shadow:    0 2px 8px rgba(10, 73, 5, .08), 0 1px 2px rgba(10, 73, 5, .06);
  --shadow-lg: 0 12px 32px rgba(10, 73, 5, .14);

  /* Layout */
  --container: 1200px;
  --gutter: 1rem;
  --header-h: 72px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 180ms;
}

@media (min-width: 768px) { :root { --gutter: 1.5rem; } }


/* ==========================================================================
   02. RESET Y BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
input, button, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p, ul, ol, dl, figure, blockquote { margin: 0 0 var(--sp-4); }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; margin: 0; }
address { font-style: normal; }
hr { border: 0; border-top: 1px solid var(--c-line); margin: var(--sp-6) 0; }

a { color: var(--c-brand-600); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--c-brand-900); text-decoration-thickness: 2px; }

/* Foco visible universal (WCAG 2.4.7 / 2.4.11) */
:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  border-radius: 2px;
}


/* ==========================================================================
   03. TIPOGRAFÍA
   ========================================================================== */
h1, h2, h3, h4 {
  margin: 0 0 var(--sp-4);
  line-height: var(--lh-tight);
  color: var(--c-brand-900);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.025em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); font-weight: 650; }
h4 { font-size: var(--fs-h4); font-weight: 650; }

.lead { font-size: var(--fs-lg); color: var(--c-muted); max-width: 68ch; }
.prose { max-width: 72ch; }
.prose p { text-wrap: pretty; }
.eyebrow {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-gold-700);
  margin-bottom: var(--sp-2);
}
.text-muted { color: var(--c-muted); }
.small { font-size: var(--fs-sm); }


/* ==========================================================================
   04. UTILIDADES DE ACCESIBILIDAD
   ========================================================================== */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Enlace "Saltar al contenido" (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  left: var(--sp-4); top: -100px;
  z-index: 1000;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-gold-400);
  color: var(--c-brand-900);
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: var(--sp-3); }


/* ==========================================================================
   05. LAYOUT
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sp-7); }
.section--white { background: var(--c-surface); }
.section--tint  { background: var(--c-brand-50); }
.section--navy  { background: var(--c-brand-900); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
@media (min-width: 1024px) { .section { padding-block: var(--sp-8); } }

.section-head { margin-bottom: var(--sp-6); max-width: 72ch; }
.section-head h2 { margin-bottom: var(--sp-2); }
.section-head h2::after {
  content: "";
  display: block;
  width: 48px; height: 3px;
  margin-top: var(--sp-3);
  background: var(--c-gold-400);
  border-radius: 2px;
}

/* Grid responsivo: 1 col → 2 → 3/4 */
.grid { display: grid; gap: var(--sp-4); grid-template-columns: 1fr; }
@media (min-width: 600px)  { .grid--2, .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .grid { gap: var(--sp-5); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* Dos columnas: contenido + lateral */
.split { display: grid; gap: var(--sp-6); }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--sp-7); align-items: start; }
}


/* ==========================================================================
   06. BARRA DE GOBIERNO + HERRAMIENTAS DE ACCESIBILIDAD
   ========================================================================== */
.gov-bar {
  background: var(--c-brand-900);
  color: #DDEBDA;
  font-size: var(--fs-xs);
  border-bottom: 3px solid var(--c-gold-400);
}
.gov-bar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  min-height: 40px;
}
.gov-bar__entity { margin: 0; font-weight: 500; }
.gov-bar__entity strong { color: #fff; font-weight: 600; }

.a11y-tools { display: flex; align-items: center; gap: var(--sp-1); }
.a11y-tools__btn {
  min-width: 32px; min-height: 32px;
  padding: 0 var(--sp-2);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius-sm);
  background: transparent;
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1;
}
.a11y-tools__btn:hover { background: rgba(255,255,255,.1); }
.a11y-tools__btn[aria-pressed="true"] { background: var(--c-gold-400); color: var(--c-brand-900); border-color: var(--c-gold-400); }
.a11y-tools__label { display: none; margin-right: var(--sp-1); }
@media (min-width: 768px) { .a11y-tools__label { display: inline; } }


/* ==========================================================================
   07. HEADER Y NAVEGACIÓN PRINCIPAL
   Móvil: menú colapsable (botón con aria-expanded).
   Escritorio (≥1024px): barra horizontal.
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4);
  min-height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; color: inherit; }
.brand img { width: 84px; height: auto; }
.brand__text { display: none; line-height: 1.25; }
.brand__name { display: block; font-weight: 700; color: var(--c-brand-900); font-size: var(--fs-sm); }
.brand__tag  { display: block; font-size: var(--fs-xs); color: var(--c-muted); }
@media (min-width: 480px) { .brand__text { display: block; padding-left: var(--sp-3); border-left: 1px solid var(--c-line); } }

.header-actions { display: flex; align-items: center; gap: var(--sp-2); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-width: 44px; min-height: 44px;              /* objetivo táctil (WCAG 2.5.5) */
  padding: 0 var(--sp-3);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-brand-900);
  font-weight: 600; font-size: var(--fs-sm);
}
.icon-btn:hover { background: var(--c-brand-50); border-color: var(--c-brand-600); }
.icon-btn svg { width: 20px; height: 20px; }

/* Navegación — móvil */
.main-nav { display: none; border-top: 1px solid var(--c-line); background: var(--c-surface); }
.main-nav.is-open { display: block; }
.main-nav__list { list-style: none; margin: 0; padding: var(--sp-2) 0 var(--sp-4); }
.main-nav__link {
  display: block;
  padding: var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--c-bg);
  color: var(--c-brand-900);
  font-weight: 500;
  text-decoration: none;
}
.main-nav__link:hover { background: var(--c-brand-50); }
.main-nav__link[aria-current="page"] {
  color: var(--c-brand-900);
  font-weight: 700;
  box-shadow: inset 4px 0 0 var(--c-gold-400);
  padding-left: var(--sp-4);
}

/* Navegación — escritorio */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .main-nav { display: block; }
  .main-nav__list { display: flex; flex-wrap: wrap; gap: 0; padding: 0; }
  .main-nav__link {
    padding: var(--sp-3) var(--sp-3);
    border-bottom: 0;
    font-size: var(--fs-sm);
    position: relative;
  }
  .main-nav__link::after {
    content: ""; position: absolute; left: var(--sp-3); right: var(--sp-3); bottom: 0;
    height: 3px; background: var(--c-gold-400);
    transform: scaleX(0); transform-origin: left;
    transition: transform var(--dur) var(--ease);
  }
  .main-nav__link:hover { background: transparent; }
  .main-nav__link:hover::after,
  .main-nav__link[aria-current="page"]::after { transform: scaleX(1); }
  .main-nav__link[aria-current="page"] { box-shadow: none; padding-left: var(--sp-3); }
}


/* ==========================================================================
   08. BUSCADOR
   ========================================================================== */
.search-panel { display: none; background: var(--c-brand-50); border-top: 1px solid var(--c-line); }
.search-panel.is-open { display: block; }
.search-panel .container { padding-block: var(--sp-4); }

.search { position: relative; max-width: 720px; }
.search__field { display: flex; gap: var(--sp-2); }
.search__input {
  flex: 1; min-width: 0;
  min-height: 48px;
  padding: 0 var(--sp-4);
  border: 2px solid var(--c-brand-700);
  border-radius: var(--radius);
  background: #fff;
}
.search__input::placeholder { color: #6B7280; }
.search__results {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20;
  list-style: none; margin: 0; padding: var(--sp-2) 0;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.search__results[hidden] { display: none; }
.search__results a { display: block; padding: var(--sp-2) var(--sp-4); text-decoration: none; color: var(--c-ink); }
.search__results a:hover, .search__results a:focus-visible { background: var(--c-brand-50); }
.search__results small { display: block; color: var(--c-muted); font-size: var(--fs-xs); }
.search__empty { padding: var(--sp-2) var(--sp-4); color: var(--c-muted); }


/* ==========================================================================
   09. HERO Y MIGAS DE PAN
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  background: var(--c-brand-900);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .28;
  filter: grayscale(.35);
}
.hero::after {           /* degradado para garantizar contraste del texto */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(10,73,5,.97) 0%, rgba(10,73,5,.88) 45%, rgba(10,73,5,.55) 100%);
}
.hero__inner { padding-block: var(--sp-7) var(--sp-8); max-width: 760px; }
.hero h1 { color: #fff; margin-bottom: var(--sp-4); }
.hero .eyebrow { color: var(--c-gold-400); }
.hero__lead { font-size: var(--fs-lg); color: #DDEBDA; margin-bottom: var(--sp-5); max-width: 60ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
@media (min-width: 1024px) { .hero__inner { padding-block: var(--sp-8) calc(var(--sp-8) + var(--sp-6)); } }

/* Página interior */
.page-header { background: var(--c-brand-900); color: #fff; padding-block: var(--sp-6); border-bottom: 3px solid var(--c-gold-400); }
.page-header h1 { color: #fff; margin: 0; }

.breadcrumb { font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: var(--sp-2); opacity: .6; }
.breadcrumb a { color: #DDEBDA; }
.breadcrumb [aria-current="page"] { color: #fff; font-weight: 600; }


/* ==========================================================================
   10. COMPONENTES
   ========================================================================== */

/* --- Botones --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 48px;
  padding: 0 var(--sp-5);
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--primary { background: var(--c-brand-700); color: #fff; }
.btn--primary:hover { background: var(--c-brand-900); color: #fff; }
.btn--gold { background: var(--c-gold-400); color: var(--c-brand-900); }
.btn--gold:hover { background: #D8B65F; color: var(--c-brand-900); }
.btn--ghost { border-color: rgba(255,255,255,.6); color: #fff; background: transparent; }
.btn--ghost:hover { background: #fff; color: var(--c-brand-900); }
.btn--outline { border-color: var(--c-brand-700); color: var(--c-brand-700); background: transparent; }
.btn--outline:hover { background: var(--c-brand-700); color: #fff; }

/* --- Tarjetas de acceso rápido --- */
.quick-access { position: relative; z-index: 2; margin-top: calc(var(--sp-6) * -1); }
@media (min-width: 1024px) { .quick-access { margin-top: calc(var(--sp-8) * -1); } }

.card {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%;
  padding: var(--sp-5);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.card h3 { font-size: var(--fs-h4); margin-bottom: var(--sp-2); }
.card p { color: var(--c-muted); font-size: var(--fs-sm); margin-bottom: 0; }

.card--link:hover, .card--link:focus-within {
  box-shadow: var(--shadow-lg);
  border-color: var(--c-brand-600);
  transform: translateY(-2px);
}
/* Toda la tarjeta clicable con un solo enlace (accesible) */
.card__link { color: var(--c-brand-900); text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__link:focus-visible { outline: none; }
.card--link:focus-within { outline: 3px solid var(--c-focus); outline-offset: 2px; }

.card__icon {
  display: grid; place-items: center;
  width: 48px; height: 48px;
  margin-bottom: var(--sp-4);
  border-radius: var(--radius);
  background: var(--c-brand-100);
  color: var(--c-brand-700);
}
.card__icon svg { width: 24px; height: 24px; }
.card__more {
  margin-top: auto; padding-top: var(--sp-4);
  font-size: var(--fs-sm); font-weight: 600; color: var(--c-brand-600);
  display: inline-flex; align-items: center; gap: var(--sp-1);
}

/* Accesos rápidos compactos en móvil: ícono a la izquierda */
@media (max-width: 599px) {
  .quick-access .grid { gap: var(--sp-3); }
  .quick-access .card {
    display: grid;
    grid-template-columns: 48px 1fr;
    column-gap: var(--sp-4);
    padding: var(--sp-4);
  }
  .quick-access .card__icon { grid-row: span 2; margin: 0; }
  .quick-access .card h3 { margin-bottom: var(--sp-1); }
  .quick-access .card__more { display: none; }
}

/* Tarjeta con imagen */
.card--media { padding: 0; overflow: hidden; }
.card--media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card--media .card__body { padding: var(--sp-5); display: flex; flex-direction: column; flex: 1; }

/* --- Alertas institucionales --- */
.alert {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4);
  border: 1px solid;
  border-left-width: 5px;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
}
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.alert p { margin: 0; }
.alert strong { display: block; margin-bottom: 2px; }
.alert--info    { background: var(--c-info-bg);    border-color: var(--c-info);    color: var(--c-brand-900); }
.alert--success { background: var(--c-success-bg); border-color: var(--c-success); color: #123F23; }
.alert--warning { background: var(--c-warning-bg); border-color: var(--c-warning); color: #4A2F00; }
.alert--danger  { background: var(--c-danger-bg);  border-color: var(--c-danger);  color: #5E0B0E; }

.notice-bar { background: var(--c-gold-100); border-bottom: 1px solid #E8D7AA; color: #3D2C06; font-size: var(--fs-sm); }
.notice-bar .container { display: flex; gap: var(--sp-3); align-items: center; padding-block: var(--sp-3); }
.notice-bar a { color: #3D2C06; font-weight: 600; }

/* --- Cifras clave --- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); margin: 0; }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  padding: var(--sp-4);
  border-left: 3px solid var(--c-gold-400);
  background: var(--c-surface);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.stat dt { font-size: var(--fs-sm); color: var(--c-muted); order: 2; }
.stat dd { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 700; color: var(--c-brand-900); line-height: 1.1; letter-spacing: -.02em; }
.stat { display: flex; flex-direction: column-reverse; gap: var(--sp-1); }

/* --- Barra de proporción (variedades) --- */
.share { margin: 0; }
.share__bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; gap: 2px; margin-bottom: var(--sp-4); }
.share__bar span:nth-child(1) { background: var(--c-brand-900); }
.share__bar span:nth-child(2) { background: var(--c-brand-600); }
.share__bar span:nth-child(3) { background: var(--c-gold-400); }
.share__legend { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-2); }
.share__legend li { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.share__legend li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; flex: none; }
.share__legend li:nth-child(1)::before { background: var(--c-brand-900); }
.share__legend li:nth-child(2)::before { background: var(--c-brand-600); }
.share__legend li:nth-child(3)::before { background: var(--c-gold-400); }
.share__legend b { margin-left: auto; color: var(--c-brand-900); font-variant-numeric: tabular-nums; }

/* --- Acordeón (details/summary nativo, accesible sin JS) --- */
.accordion { border-top: 1px solid var(--c-line); }
.accordion details { border-bottom: 1px solid var(--c-line); background: var(--c-surface); }
.accordion summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  min-height: 56px;
  padding: var(--sp-3) var(--sp-4);
  font-weight: 600; color: var(--c-brand-900);
  cursor: pointer;
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: ""; flex: none;
  width: 10px; height: 10px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform var(--dur) var(--ease);
}
.accordion details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.accordion summary:hover { background: var(--c-brand-50); }
.accordion__body { padding: 0 var(--sp-4) var(--sp-4); color: var(--c-ink); }
.accordion__body p:last-child { margin-bottom: 0; }

/* --- Figura --- */
.figure { margin: 0; }
.figure img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; box-shadow: var(--shadow); }
.figure figcaption { margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--c-muted); }

/* --- Ubicaciones --- */
.location h3 { display: flex; align-items: center; gap: var(--sp-2); }
.location .badge { margin-bottom: var(--sp-3); }
.location address { color: var(--c-ink); font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.location__tel { font-weight: 600; font-size: var(--fs-sm); }

.badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px var(--sp-2);
  border-radius: 999px;
  font-size: var(--fs-xs); font-weight: 600;
  background: var(--c-brand-100); color: var(--c-brand-800);
}
.badge--gold { background: var(--c-gold-100); color: var(--c-gold-700); }


/* ==========================================================================
   11. TABLAS Y LISTAS DE DOCUMENTOS (Transparencia / Art. 18 y 19)
   ========================================================================== */
.table-wrap { overflow-x: auto; border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table caption { text-align: left; padding: var(--sp-3) var(--sp-4); font-weight: 600; color: var(--c-brand-900); }
.table th, .table td { padding: var(--sp-3) var(--sp-4); text-align: left; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.table thead th { background: var(--c-brand-900); color: #fff; font-weight: 600; white-space: nowrap; }
.table tbody tr:nth-child(even) { background: var(--c-brand-50); }
.table tbody tr:hover { background: var(--c-brand-100); }

.doc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--c-line); }
.doc-list li { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-3) 0; border-bottom: 1px solid var(--c-line); }
.doc-list a { font-weight: 500; }
.doc-list .doc-meta { margin-left: auto; font-size: var(--fs-xs); color: var(--c-muted); white-space: nowrap; }


/* ==========================================================================
   12. FOOTER
   ========================================================================== */
.site-footer { background: var(--c-brand-900); color: #C9DBC5; font-size: var(--fs-sm); }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h2 {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--c-gold-400); margin-bottom: var(--sp-4);
}
.footer-main { display: grid; gap: var(--sp-6); padding-block: var(--sp-7); }
@media (min-width: 600px)  { .footer-main { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-main { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-main ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-2); }
.footer-brand img { width: 110px; background: #fff; padding: var(--sp-2); border-radius: var(--radius); margin-bottom: var(--sp-4); }

.seals { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-4); }
.seal {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  font-size: var(--fs-xs); font-weight: 600;
}
.seal svg { width: 16px; height: 16px; color: var(--c-gold-400); }
.site-footer a.seal:hover { background: rgba(255,255,255,.08); text-decoration: none; }

.footer-legal { border-top: 1px solid rgba(255,255,255,.15); }
.footer-legal .container {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding-block: var(--sp-5);
  font-size: var(--fs-xs);
}
.footer-legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
@media (min-width: 768px) { .footer-legal .container { flex-direction: row; justify-content: space-between; align-items: center; } }

.back-to-top {
  position: fixed; right: var(--sp-4); bottom: var(--sp-4); z-index: 90;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--c-brand-700); color: #fff;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }
.back-to-top svg { width: 20px; height: 20px; }


/* ==========================================================================
   15. COMPONENTES DE TRANSPARENCIA
   ========================================================================== */

/* --- Enlace externo: ícono + texto oculto "se abre en nueva pestaña" --- */
.ext::after {
  content: "";
  display: inline-block;
  width: .75em; height: .75em;
  margin-left: .3em;
  vertical-align: baseline;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 4h6v6M20 4l-9 9M18 14v5a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* --- Ejercicios por año --- */
.years { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, 1fr); list-style: none; margin: 0; padding: 0; }
@media (min-width: 768px)  { .years { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .years { grid-template-columns: repeat(4, 1fr); gap: var(--sp-4); } }

.year {
  position: relative;
  display: flex; flex-direction: column; gap: var(--sp-1);
  height: 100%;
  padding: var(--sp-4);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.year:hover, .year:focus-within { border-color: var(--c-brand-600); box-shadow: var(--shadow); transform: translateY(-2px); }
.year:focus-within { outline: 3px solid var(--c-focus); outline-offset: 2px; }
.year__num { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 700; color: var(--c-brand-900); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.year__src { font-size: var(--fs-xs); color: var(--c-muted); }
.year a { font-size: var(--fs-sm); font-weight: 600; color: var(--c-brand-600); text-decoration: none; margin-top: auto; padding-top: var(--sp-2); }
.year a::before { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.year a:focus-visible { outline: none; }
.year .badge { align-self: flex-start; margin-bottom: var(--sp-1); }
.year--archive .year__num { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); }

.year--current { background: var(--c-brand-900); border-color: var(--c-brand-900); }
.year--current .year__num { color: #fff; }
.year--current .year__src { color: #C9DBC5; }
.year--current a { color: var(--c-gold-400); }
.year--current .badge { background: var(--c-gold-400); color: var(--c-brand-900); }

.year--archive { background: var(--c-bg); border-style: dashed; }

/* --- Pasos numerados --- */
.steps { counter-reset: paso; list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-4); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); } }
.steps li { counter-increment: paso; position: relative; padding-top: var(--sp-7); }
.steps li::before {
  content: counter(paso);
  position: absolute; top: 0; left: 0;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c-gold-400); color: var(--c-brand-900);
  font-weight: 700;
}
.steps h3 { font-size: var(--fs-h4); margin-bottom: var(--sp-2); }
.steps p { color: var(--c-muted); font-size: var(--fs-sm); margin: 0; }

/* --- Barra lateral / índice de página --- */
.layout-aside { display: grid; gap: var(--sp-6); }
@media (min-width: 1024px) { .layout-aside { grid-template-columns: 240px minmax(0, 1fr); gap: var(--sp-7); align-items: start; } }
.toc { font-size: var(--fs-sm); }
@media (min-width: 1024px) { .toc { position: sticky; top: calc(var(--header-h) + var(--sp-5)); } }
.toc h2 { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); margin-bottom: var(--sp-3); }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--c-line); }
.toc a { display: block; padding: var(--sp-2) var(--sp-4); margin-left: -2px; border-left: 2px solid transparent; color: var(--c-ink); text-decoration: none; }
.toc a:hover { color: var(--c-brand-900); border-left-color: var(--c-brand-600); background: var(--c-brand-50); }
.toc a.is-active { color: var(--c-brand-900); font-weight: 600; border-left-color: var(--c-gold-400); }

.block + .block { margin-top: var(--sp-8); }
.block > h2 { scroll-margin-top: calc(var(--header-h) + var(--sp-4)); }

/* --- Filtro de lista --- */
.filter { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); max-width: 480px; }
.filter label { font-weight: 600; font-size: var(--fs-sm); color: var(--c-brand-900); }
.filter input {
  min-height: 44px; padding: 0 var(--sp-4);
  border: 1px solid #8A9488; border-radius: var(--radius); background: #fff;
}
.filter input:focus-visible { border-color: var(--c-brand-700); }
.filter__count { font-size: var(--fs-xs); color: var(--c-muted); }

/* Lista de fracciones */
.frac-list { list-style: none; margin: 0; padding: 0; }
.frac-list li { border-bottom: 1px solid var(--c-line); }
.frac-list li:first-child { border-top: 1px solid var(--c-line); }
.frac-list a {
  display: grid; grid-template-columns: 4.5rem 1fr auto; gap: var(--sp-3); align-items: baseline;
  padding: var(--sp-3) var(--sp-2);
  text-decoration: none; color: var(--c-ink);
}
.frac-list a:hover { background: var(--c-brand-50); }
.frac-list a:hover .frac__title { text-decoration: underline; }
.frac__num { font-weight: 700; color: var(--c-brand-700); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.frac__title { color: var(--c-brand-900); }
.frac__meta { font-size: var(--fs-xs); color: var(--c-muted); white-space: nowrap; }
@media (max-width: 599px) {
  .frac-list a { grid-template-columns: 3.5rem 1fr; }
  .frac__meta { grid-column: 2; }
}

/* --- Tarjeta de plataforma --- */
.platform h3 { margin-bottom: var(--sp-1); }
.platform .platform__abbr { font-size: var(--fs-xs); font-weight: 600; color: var(--c-gold-700); letter-spacing: .06em; text-transform: uppercase; }


/* ==========================================================================
   16. CONTABILIDAD GUBERNAMENTAL (tablas trimestrales)
   ========================================================================== */

/* Navegación entre ejercicios */
.year-nav { display: flex; flex-wrap: wrap; gap: var(--sp-2); list-style: none; margin: var(--sp-4) 0 0; padding: 0; }
.year-nav a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--sp-3);
  border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
  color: #fff; text-decoration: none; font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums;
}
.year-nav a:hover { background: rgba(255,255,255,.12); }
.year-nav a[aria-current="page"] { background: var(--c-gold-400); border-color: var(--c-gold-400); color: var(--c-brand-900); }

/* Resumen del ejercicio */
.summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); margin: 0 0 var(--sp-6); }
@media (min-width: 768px) { .summary { grid-template-columns: repeat(4, 1fr); } }
.summary .stat dd { font-size: 1.5rem; }

/* Tabla de documentos */
.fin-section + .fin-section { margin-top: var(--sp-7); }
.fin-section h2 { font-size: var(--fs-h3); scroll-margin-top: calc(var(--header-h) + var(--sp-4)); }
.fin-section h2::after { display: none; }

.fin-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: #fff; }
.fin-table caption { text-align: left; }
.fin-table th, .fin-table td { padding: var(--sp-3); border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: middle; }
.fin-table thead th { background: var(--c-brand-900); color: #fff; font-weight: 600; font-size: var(--fs-xs); letter-spacing: .02em; }
.fin-table thead th.q, .fin-table td.q { text-align: center; width: 76px; }
.fin-table tbody th { font-weight: 500; color: var(--c-brand-900); }
.fin-table .law { color: var(--c-muted); font-size: var(--fs-xs); white-space: nowrap; }
.fin-table tbody tr:hover { background: var(--c-brand-50); }

.pdf {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 52px; min-height: 32px; padding: 0 var(--sp-2);
  border: 1px solid var(--c-brand-600); border-radius: var(--radius-sm);
  color: var(--c-brand-700); background: #fff;
  font-size: var(--fs-xs); font-weight: 700; text-decoration: none; letter-spacing: .03em;
}
.pdf svg { width: 14px; height: 14px; flex: none; }
.pdf:hover { background: var(--c-brand-700); color: #fff; }
.na { color: #8A9488; }

/* Móvil: cada fila se convierte en tarjeta */
@media (max-width: 767px) {
  .fin-table, .fin-table tbody, .fin-table tr, .fin-table th, .fin-table td { display: block; }
  .fin-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .fin-table tbody tr {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2);
    padding: var(--sp-4); border: 1px solid var(--c-line); border-radius: var(--radius); margin-bottom: var(--sp-3);
  }
  .fin-table tbody th, .fin-table td.law { grid-column: 1 / -1; padding: 0; border: 0; }
  .fin-table td.law { margin-bottom: var(--sp-2); }
  .fin-table td.q { width: auto; padding: 0; border: 0; text-align: center; }
  .fin-table td.q::before { content: attr(data-label); display: block; font-size: var(--fs-xs); color: var(--c-muted); margin-bottom: 2px; }
  .fin-table td.q .pdf { width: 100%; }
  .fin-table--annual tbody tr { grid-template-columns: 1fr; }
  .fin-section .table-wrap { border: 0; background: transparent; overflow: visible; }
}


/* ==========================================================================
   17. DENUNCIAS (Órgano de Control Interno)
   ========================================================================== */
.callout {
  display: grid; gap: var(--sp-4); align-items: center;
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  background: var(--c-gold-100);
  border: 1px solid #E8D7AA;
  border-left: 6px solid var(--c-gold-400);
}
.callout h2 { font-size: var(--fs-h3); margin: 0 0 var(--sp-1); }
.callout h2::after { display: none; }
.callout p { margin: 0; color: #3D2C06; }
.callout__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--c-brand-900); color: var(--c-gold-400); }
.callout__icon svg { width: 28px; height: 28px; }
@media (min-width: 768px) { .callout { grid-template-columns: auto 1fr auto; padding: var(--sp-5) var(--sp-6); } }

.channel { gap: var(--sp-2); }
.channel h3 { margin-bottom: 0; }
.card .channel__value { font-size: var(--fs-lg); font-weight: 700; color: var(--c-brand-900); word-break: break-word; margin: var(--sp-1) 0 var(--sp-3); }
.card .channel__value small { display: block; font-size: var(--fs-xs); font-weight: 500; color: var(--c-muted); }
.channel .btn { margin-top: auto; align-self: flex-start; }
.channel address { font-size: var(--fs-sm); }
.addresses { display: grid; gap: var(--sp-3); margin-top: var(--sp-2); }
.addresses address + address { padding-top: var(--sp-3); border-top: 1px solid var(--c-line); }
@media (min-width: 768px) {
  .addresses { grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
  .addresses address + address { padding-top: 0; border-top: 0; padding-left: var(--sp-5); border-left: 1px solid var(--c-line); }
}
.channel--wide { margin-top: var(--sp-4); }
@media (min-width: 1024px) { .channel--wide { margin-top: var(--sp-5); } }
.split > .card { height: auto; }
.channel address strong { display: block; color: var(--c-brand-900); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
@media (min-width: 768px) { .checklist--2 { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3) var(--sp-6); } }
.checklist li { display: flex; gap: var(--sp-3); align-items: flex-start; }
.checklist svg { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--c-success-bg); color: var(--c-success); margin-top: 1px; }


/* ==========================================================================
   18. INSTITUCIONAL (Quiénes somos): misión/visión, valores, línea de tiempo, galería
   ========================================================================== */
.mv { display: grid; gap: var(--sp-4); }
@media (min-width: 768px) { .mv { grid-template-columns: 1fr 1fr; gap: var(--sp-5); } }
.mv__item { position: relative; padding: var(--sp-6) var(--sp-5) var(--sp-5); border-radius: var(--radius-lg); background: var(--c-surface); border: 1px solid var(--c-line); box-shadow: var(--shadow); overflow: hidden; }
.mv__item::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c-gold-400); }
.mv__item--navy { background: var(--c-brand-900); border-color: var(--c-brand-900); color: #DDEBDA; }
.mv__item--navy h2, .mv__item--navy .mv__text { color: #fff; }
.mv__item h2 { font-size: var(--fs-h3); margin-bottom: var(--sp-3); }
.mv__item h2::after { display: none; }
.mv__text { font-size: var(--fs-lg); line-height: 1.55; color: var(--c-brand-900); margin: 0; text-wrap: pretty; }

.values { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 600px)  { .values { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .values { grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); } }
.value {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-3); text-align: center;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  font-weight: 650; color: var(--c-brand-900);
}
.value__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--c-brand-100); color: var(--c-brand-700); }
.value__icon svg { width: 24px; height: 24px; }
.values li:last-child:nth-child(odd) { grid-column: 1 / -1; }
@media (min-width: 600px) { .values li:last-child:nth-child(odd) { grid-column: auto; } }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--c-line); }
.timeline li { position: relative; padding: 0 0 var(--sp-5) var(--sp-7); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 4px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--c-surface); border: 3px solid var(--c-gold-400);
}
.timeline li:last-child::before { background: var(--c-gold-400); }
.timeline__when { display: block; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-gold-700); }
.timeline h3 { font-size: var(--fs-h4); margin: var(--sp-1) 0; }
.timeline p { margin: 0; color: var(--c-muted); }

.gallery { display: grid; gap: var(--sp-3); grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .gallery { grid-template-columns: repeat(6, 1fr); gap: var(--sp-4); }
  .gallery figure:nth-child(1) { grid-column: span 4; grid-row: span 2; }
  .gallery figure:nth-child(n+2) { grid-column: span 2; }
  .gallery figure:nth-child(4) { grid-column: span 6; }
  .gallery figure:nth-child(4) img { aspect-ratio: 21 / 8; }
}
.gallery figure { position: relative; margin: 0; border-radius: var(--radius-lg); overflow: hidden; background: var(--c-brand-900); }
.gallery a { display: block; height: 100%; color: inherit; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 400ms var(--ease), opacity var(--dur); }
.gallery a:hover img { transform: scale(1.03); opacity: .9; }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--sp-6) var(--sp-4) var(--sp-3);
  background: linear-gradient(transparent, rgba(10,73,5,.92));
  color: #fff; font-size: var(--fs-sm); font-weight: 600;
}
.gallery figcaption span { display: block; font-weight: 400; font-size: var(--fs-xs); color: #DDEBDA; }


/* --- Tarjeta de contacto (sucursales) --- */
.contact-card h2 { font-size: var(--fs-h3); margin-bottom: var(--sp-4); }
.contact-card h2::after { display: none; }
.contact-list { margin: 0 0 var(--sp-5); display: grid; gap: var(--sp-4); }
.contact-list dt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-gold-700); margin-bottom: var(--sp-1); }
.contact-list dd { margin: 0; color: var(--c-ink); }
.contact-list a { font-weight: 600; }
.contact-card .btn { align-self: flex-start; }
.figure--wide img { aspect-ratio: 16 / 9; }


/* ==========================================================================
   19. TEXTOS LEGALES (Aviso de privacidad)
   ========================================================================== */
.privacy-summary { display: grid; gap: var(--sp-3); margin: 0; }
@media (min-width: 768px) { .privacy-summary { grid-template-columns: 1fr 1fr; gap: var(--sp-4); } }
.privacy-summary .card { box-shadow: none; }
.privacy-summary dt { font-weight: 700; color: var(--c-brand-900); margin-bottom: var(--sp-1); }
.privacy-summary dd { margin: 0; font-size: var(--fs-sm); color: var(--c-muted); }

.legal { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: var(--sp-5); }
@media (min-width: 768px) { .legal { padding: var(--sp-7); } }
.legal__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-bottom: var(--sp-4); margin-bottom: var(--sp-5); border-bottom: 2px solid var(--c-brand-900); }
.legal__head h2 { margin: 0; font-size: var(--fs-h3); }
.legal__print { min-height: 40px; padding: 0 var(--sp-4); font-size: var(--fs-sm); }
.legal-section { max-width: 72ch; }
.legal-section + .legal-section { margin-top: var(--sp-6); }
.legal-section h2 { font-size: var(--fs-h4); display: flex; align-items: baseline; gap: var(--sp-3); scroll-margin-top: calc(var(--header-h) + var(--sp-4)); }
.legal-num { flex: none; min-width: 2.6em; font-variant-numeric: tabular-nums; color: var(--c-gold-700); font-weight: 700; }
.legal-section p { text-align: left; }
.legal-list { margin: 0 0 var(--sp-4); padding-left: var(--sp-5); }
.legal-list li { margin-bottom: var(--sp-2); }
.legal-list li::marker { color: var(--c-gold-700); }

@media print {
  .toc, .privacy-summary, .legal__print, .page-header .hero__lead { display: none !important; }
  .layout-aside { display: block; }
  .legal { border: 0; padding: 0; }
}


/* ==========================================================================
   20. FORMULARIOS Y CONTACTO
   ========================================================================== */
.form { display: grid; gap: var(--sp-4); }
/* Campo trampa antispam: fuera de pantalla (no usar display:none, algunos robots lo detectan) */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__row { display: grid; gap: var(--sp-4); }
@media (min-width: 600px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--sp-1); }
.field label { font-weight: 600; font-size: var(--fs-sm); color: var(--c-brand-900); }
.field .req { color: var(--c-danger); margin-left: 2px; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: var(--sp-3) var(--sp-4);
  border: 1px solid #8A9488; border-radius: var(--radius); background: #fff;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--c-brand-700); box-shadow: 0 0 0 3px rgba(201,164,76,.55); }
.field__hint { font-size: var(--fs-xs); color: var(--c-muted); }
.field__error { font-size: var(--fs-xs); color: var(--c-danger); font-weight: 600; }
.field__error:empty { display: none; }
.field [aria-invalid="true"] { border-color: var(--c-danger); background: #FFFAFA; }
.form__legal { font-size: var(--fs-xs); color: var(--c-muted); margin: 0; }
.form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); }
.form__status:empty { display: none; }
.btn[disabled] { opacity: .6; cursor: progress; }

.contact-grid { display: grid; gap: var(--sp-6); }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--sp-7); align-items: start; } }
.contact-grid > .card { height: auto; }
.location-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-3); }
.location-list .card { padding: var(--sp-4) var(--sp-5); box-shadow: none; }
.location-list h3 { font-size: var(--fs-h4); margin: var(--sp-1) 0; }
.location-list address { font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
.location-list .location__tel { margin: 0; }
.map { margin-top: var(--sp-4); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--c-line); background: var(--c-brand-50); }
.map iframe { display: block; width: 100%; height: 320px; border: 0; }


/* --- Lista de documentos descargables (Control archivístico) --- */
.doc-group__title { font-size: var(--fs-h3); margin-bottom: var(--sp-1); scroll-margin-top: calc(var(--header-h) + var(--sp-4)); }
.docs { list-style: none; margin: var(--sp-4) 0 0; padding: 0; display: grid; gap: var(--sp-3); }
.doc {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4); background: var(--c-surface);
  border: 1px solid var(--c-line); border-radius: var(--radius);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.doc:hover { border-color: var(--c-brand-600); box-shadow: var(--shadow); }
.doc__year { min-width: 3.2rem; font-weight: 700; font-size: var(--fs-lg); color: var(--c-brand-900); font-variant-numeric: tabular-nums; }
.doc__year--none { color: #8A9488; font-weight: 400; }
.doc__title { display: block; font-weight: 600; color: var(--c-brand-900); }
.doc__meta { display: block; font-size: var(--fs-xs); color: var(--c-muted); }
@media (max-width: 479px) {
  .doc { grid-template-columns: 1fr auto; row-gap: var(--sp-1); }
  .doc__year { grid-column: 1 / -1; font-size: var(--fs-sm); color: var(--c-gold-700); }
  .doc__year--none { display: none; }
}


/* ==========================================================================
   13. MODO ALTO CONTRASTE (activado por el usuario: html.hc)
   ========================================================================== */
html.hc {
  --c-ink: #000; --c-muted: #000; --c-bg: #fff; --c-line: #000;
  --c-brand-50: #fff; --c-brand-100: #fff;
  --c-brand-600: #00008B; --c-brand-700: #000; --c-brand-900: #000;
  --c-gold-700: #000; --c-focus: #FF8C00;
}
html.hc .hero__bg { display: none; }
html.hc .hero::after { background: #000; }
html.hc a:not(.btn) { text-decoration: underline; }
html.hc .year--current { background: #000; }
html.hc .pdf { border: 2px solid #000; color: #000; }
html.hc .mv__item--navy { background: #000; }
html.hc .callout { background: #fff; border: 2px solid #000; }
html.hc .card, html.hc .stat, html.hc .year { box-shadow: none; border: 2px solid #000; }


/* ==========================================================================
   14. MOVIMIENTO REDUCIDO E IMPRESIÓN
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  .gov-bar, .site-header, .search-panel, .quick-access, .back-to-top, .hero__actions, .notice-bar { display: none !important; }
  .hero, .section--navy, .site-footer { background: #fff !important; color: #000 !important; }
  .hero h1, .site-footer a { color: #000 !important; }
  .hero::after, .hero__bg { display: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; }
}
