/* ==========================================================================
   Sociedad de San Vicente de Paúl de Colombia
   Hoja de estilos principal — v2.0
   Sin frameworks. CSS moderno (custom properties, grid, clamp, :focus-visible)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens de diseño
   -------------------------------------------------------------------------- */
:root {
  /* Marca */
  --brand-900: #013f66;
  --brand-800: #01527f;
  --brand-700: #016dae;   /* azul institucional SSVP */
  --brand-600: #0a82c9;
  --brand-500: #2a9ce0;
  --brand-100: #e3f2fb;
  --brand-050: #f2f9fe;

  --accent-700: #b4741a;
  --accent-600: #d98e21;  /* dorado / caridad */
  --accent-100: #fdf3e2;

  --ok-600: #128a5a;
  --err-600: #c8342b;

  /* Superficies y texto (modo claro) */
  --bg: #ffffff;
  --bg-soft: #f5f8fb;
  --bg-elev: #ffffff;
  --border: #e2e8f0;
  --border-soft: #eef2f7;
  --text: #16212e;
  --text-soft: #4d5b6c;
  --text-muted: #6f7d8e;
  --on-brand: #ffffff;

  /* Tipografía */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Manrope", var(--font-body);
  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-h3: clamp(1.15rem, 1rem + .6vw, 1.4rem);
  --fs-h2: clamp(1.65rem, 1.25rem + 1.6vw, 2.35rem);
  --fs-h1: clamp(2rem, 1.3rem + 3.2vw, 3.6rem);

  /* Espaciado y forma */
  --sp-section: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  --wrap: 1180px;
  --wrap-narrow: 820px;
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 33, 46, .06), 0 1px 3px rgba(16, 33, 46, .05);
  --shadow-md: 0 4px 12px rgba(16, 33, 46, .07), 0 2px 4px rgba(16, 33, 46, .04);
  --shadow-lg: 0 18px 40px rgba(16, 33, 46, .12), 0 4px 12px rgba(16, 33, 46, .06);

  --header-h: 74px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* Modo oscuro: automático o forzado con [data-theme] */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e161f;
    --bg-soft: #131e2a;
    --bg-elev: #182534;
    --border: #26364a;
    --border-soft: #1e2c3d;
    --text: #e8eef5;
    --text-soft: #b3c1d1;
    --text-muted: #8d9db0;
    --brand-100: #16354b;
    --brand-050: #12283a;
    --accent-100: #3a2c12;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, .45);
    --shadow-lg: 0 18px 44px rgba(0, 0, 0, .55);
  }
}

:root[data-theme="dark"] {
  --bg: #0e161f;
  --bg-soft: #131e2a;
  --bg-elev: #182534;
  --border: #26364a;
  --border-soft: #1e2c3d;
  --text: #e8eef5;
  --text-soft: #b3c1d1;
  --text-muted: #8d9db0;
  --brand-100: #16354b;
  --brand-050: #12283a;
  --accent-100: #3a2c12;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, .55);
}

/* --------------------------------------------------------------------------
   2. Reset moderno
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: 800; }
h2 { font-size: var(--fs-h2); font-weight: 800; }
h3 { font-size: var(--fs-h3); font-weight: 700; }
h4 { font-size: 1.05rem;      font-weight: 700; }

p { margin: 0 0 1rem; color: var(--text-soft); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--brand-600); }

img, svg, video { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--brand-700); color: #fff; }

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

/* --------------------------------------------------------------------------
   3. Utilidades
   -------------------------------------------------------------------------- */
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.wrap--narrow { max-width: var(--wrap-narrow); }

.section { padding-block: var(--sp-section); }
.section--soft { background: var(--bg-soft); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 8px; top: -60px;
  z-index: 2000;
  padding: .7rem 1.1rem;
  background: var(--brand-700); color: #fff;
  border-radius: var(--r-sm); font-weight: 600;
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 8px; color: #fff; }

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Encabezado de sección */
.section-head { max-width: 68ch; margin-inline: auto; text-align: center; margin-bottom: clamp(2rem, 1rem + 3vw, 3.5rem); }
.section-head.is-left { margin-inline: 0; text-align: left; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head);
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-700);
  background: var(--brand-100);
  padding: .4rem .8rem; border-radius: var(--r-full);
  margin-bottom: 1rem;
}

.section-head p { font-size: var(--fs-lg); color: var(--text-soft); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .8rem 1.6rem;
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-sm);
  border: 1.5px solid transparent; border-radius: var(--r-full);
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease),
              border-color .18s var(--ease), box-shadow .18s var(--ease), color .18s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary { background: var(--brand-700); color: #fff; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--brand-800); color: #fff; box-shadow: var(--shadow-lg); }

.btn--accent { background: var(--accent-600); color: #22190a; box-shadow: var(--shadow-md); }
.btn--accent:hover { background: var(--accent-700); color: #fff; }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--bg-soft); border-color: var(--brand-700); color: var(--brand-700); }

.btn--on-dark { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .45); backdrop-filter: blur(6px); }
.btn--on-dark:hover { background: #fff; color: var(--brand-800); border-color: #fff; }

/* Revelado al hacer scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   4. Cabecera y navegación
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), backdrop-filter .3s var(--ease);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(6, 20, 32, .72), rgba(6, 20, 32, 0));
  transition: opacity .3s var(--ease);
}
.site-header.is-stuck {
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: var(--shadow-md);
}

/* Fuera del menú móvil el velo no debe existir en el flujo */
.nav-backdrop { display: none; }
.site-header.is-stuck::before { opacity: 0; }

/* Páginas internas: cabecera sólida desde el inicio */
.site-header.is-solid { background: var(--bg); box-shadow: var(--shadow-sm); }
.site-header.is-solid::before { opacity: 0; }

.site-header__inner { display: flex; align-items: center; gap: 1rem; width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; min-width: 0; }
.brand img { width: 42px; height: 42px; border-radius: 50%; background: #fff; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__name { font-family: var(--font-head); font-weight: 800; font-size: .95rem; letter-spacing: -.01em; color: #fff; transition: color .3s var(--ease); }
.brand__tag { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .72); transition: color .3s var(--ease); }
.is-stuck .brand__name, .is-solid .brand__name { color: var(--text); }
.is-stuck .brand__tag, .is-solid .brand__tag { color: var(--text-muted); }

.nav { display: flex; align-items: center; gap: .15rem; }
.nav a {
  position: relative;
  display: block; padding: .5rem .85rem;
  font-family: var(--font-head); font-weight: 600; font-size: var(--fs-sm);
  color: rgba(255, 255, 255, .92); text-decoration: none;
  border-radius: var(--r-sm);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.is-stuck .nav a, .is-solid .nav a { color: var(--text-soft); }
.nav a::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .25rem;
  height: 2px; border-radius: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav a:hover::after, .nav a[aria-current="page"]::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a:hover, .nav a[aria-current="page"], .nav a.is-active { color: #fff; }
.is-stuck .nav a:hover, .is-stuck .nav a[aria-current="page"], .is-stuck .nav a.is-active,
.is-solid .nav a:hover, .is-solid .nav a[aria-current="page"], .is-solid .nav a.is-active { color: var(--brand-700); }

.header-actions { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  background: rgba(255, 255, 255, .12); color: #fff;
  border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--r-full);
  cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.icon-btn:hover { background: rgba(255, 255, 255, .24); }
.is-stuck .icon-btn, .is-solid .icon-btn { background: var(--bg-soft); color: var(--text); border-color: var(--border); }
.is-stuck .icon-btn:hover, .is-solid .icon-btn:hover { background: var(--brand-100); color: var(--brand-700); border-color: var(--brand-500); }

.nav-toggle { display: none; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* Menú móvil */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  /* IMPORTANTE: backdrop-filter convierte al elemento en bloque contenedor de
     sus descendientes position:fixed. Si la cabecera lo conserva en móvil, el
     panel del menú se posiciona respecto a la barra de 74 px en vez de la
     ventana y queda recortado. En móvil se usa fondo sólido. */
  .site-header.is-stuck {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .nav {
    position: fixed; inset: 0 0 0 auto;
    z-index: 5;                 /* por encima del velo dentro del header */
    width: min(85vw, 340px);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: .25rem;
    padding: calc(var(--header-h) + 1.5rem) 1.25rem 2rem;
    padding-top: calc(var(--header-h) + 1.5rem + env(safe-area-inset-top, 0px));
    padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
    background: var(--bg-elev);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform .32s var(--ease), visibility .32s var(--ease);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    visibility: hidden;
  }
  body.nav-open .nav { transform: translateX(0); visibility: visible; }
  .nav a { color: var(--text) !important; padding: .85rem 1rem; font-size: 1.05rem; border-radius: var(--r-md); }
  .nav a::after { display: none; }
  .nav a:hover, .nav a[aria-current="page"], .nav a.is-active { background: var(--brand-100); color: var(--brand-700) !important; }

  /* El velo es hermano de <header>, nunca hijo: así no puede taparlo */
  .nav-backdrop {
    display: block;
    position: fixed; inset: 0; z-index: 998;
    background: rgba(8, 18, 28, .55);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .3s var(--ease), visibility .3s;
  }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  /* Con el menú abierto la barra superior se vuelve sólida para que el logo
     y el botón de cerrar sean legibles sobre el panel claro */
  body.nav-open .site-header { background: var(--bg); box-shadow: var(--shadow-sm); }
  body.nav-open .site-header::before { opacity: 0; }
  body.nav-open .brand__name { color: var(--text); }
  body.nav-open .brand__tag { color: var(--text-muted); }
  body.nav-open .icon-btn { background: var(--bg-soft); color: var(--text); border-color: var(--border); }
}

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 88vh;
  min-height: min(92svh, 820px);
  display: grid; align-items: center;
  isolation: isolate;
  color: #fff;
  padding-block: calc(var(--header-h) + 3rem) 4rem;
  overflow: hidden;
}
.hero__slides { position: absolute; inset: 0; z-index: -2; }
.hero__slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.hero__slide.is-active { opacity: 1; }
.hero__slide img { width: 100%; height: 100%; object-fit: cover; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(105deg, rgba(1, 47, 76, .93) 0%, rgba(1, 63, 102, .82) 42%, rgba(1, 63, 102, .38) 100%),
    linear-gradient(to top, rgba(4, 22, 36, .75), transparent 55%);
}
.hero__content { max-width: 40rem; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero h1 em { font-style: normal; color: #ffd486; }
.hero__lead { font-size: clamp(1.02rem, .95rem + .5vw, 1.25rem); color: rgba(255, 255, 255, .9); margin-bottom: 2rem; max-width: 34rem; }
.hero .eyebrow { background: rgba(255, 255, 255, .14); color: #ffd486; border: 1px solid rgba(255, 255, 255, .2); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero__dots { position: absolute; left: 0; right: 0; bottom: 1.75rem; display: flex; justify-content: center; gap: .5rem; z-index: 3; }
.hero__dots button {
  width: 34px; height: 5px; padding: 0;
  border: none; border-radius: var(--r-full);
  background: rgba(255, 255, 255, .35); cursor: pointer;
  transition: background-color .25s var(--ease), width .25s var(--ease);
}
.hero__dots button[aria-selected="true"] { background: #ffd486; width: 52px; }

/* Cifras bajo el hero */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--border-soft); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); margin-top: -3.5rem; position: relative; z-index: 5; }
.stat { background: var(--bg-elev); padding: 1.75rem 1.5rem; text-align: center; }
.stat__num { font-family: var(--font-head); font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 800; color: var(--brand-700); line-height: 1; }
.stat__label { font-size: var(--fs-sm); color: var(--text-muted); margin-top: .45rem; }

/* --------------------------------------------------------------------------
   6. Tarjetas genéricas
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1.25rem, 1rem + 1vw, 2rem); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  height: 100%;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--brand-100); }

.card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); }
@supports not (aspect-ratio: 1) {
  .card__media { height: 220px; }
  .member__photo { height: 260px; }
  .modal__media { height: 220px; }
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }

.card__icon {
  position: absolute; left: 1.25rem; bottom: -24px;
  width: 52px; height: 52px; display: grid; place-items: center;
  background: var(--brand-700); color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
}
.card__icon .icon { width: 24px; height: 24px; }

.card__body { padding: 2.1rem 1.5rem 1.6rem; flex: 1; }
.card__body > h3 { margin-bottom: .5rem; }
.card__body p { font-size: var(--fs-sm); }

/* --------------------------------------------------------------------------
   7. Equipo
   -------------------------------------------------------------------------- */
.member { text-align: center; }
.member__photo {
  position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--r-lg);
  overflow: hidden; background: var(--bg-soft); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.member:hover .member__photo { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.member__photo img { width: 100%; height: 100%; object-fit: cover; }
.member__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(1, 63, 102, .55), transparent 55%);
  opacity: 0; transition: opacity .3s var(--ease);
}
.member:hover .member__photo::after { opacity: 1; }
.member h3 { font-size: 1.02rem; margin: 1rem 0 .15rem; }
.member p { font-size: var(--fs-sm); color: var(--brand-700); font-weight: 600; margin: 0; }

/* --------------------------------------------------------------------------
   8. Transparencia / documentos
   -------------------------------------------------------------------------- */
.doc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1rem; }

.doc {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.05rem 1.2rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  text-decoration: none; color: var(--text);
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.doc:hover { transform: translateY(-3px); border-color: var(--brand-500); box-shadow: var(--shadow-md); color: var(--text); background: var(--brand-050); }

.doc__icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--brand-100); color: var(--brand-700); }
.doc__icon .icon { width: 21px; height: 21px; }
.doc__text { min-width: 0; flex: 1; }
.doc__title { display: block; font-family: var(--font-head); font-weight: 700; font-size: var(--fs-sm); line-height: 1.35; }
.doc__meta { display: block; font-size: var(--fs-xs); color: var(--text-muted); margin-top: .15rem; }
.doc__arrow { color: var(--text-muted); transition: transform .2s var(--ease), color .2s var(--ease); }
.doc:hover .doc__arrow { transform: translateX(3px); color: var(--brand-700); }

/* Acordeón de vigencias anteriores */
.accordion { margin-top: 1.75rem; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elev); overflow: hidden; }
.accordion summary {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.05rem 1.25rem; cursor: pointer;
  font-family: var(--font-head); font-weight: 700; font-size: var(--fs-sm);
  list-style: none;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .icon { transition: transform .25s var(--ease); margin-left: auto; }
.accordion[open] summary .icon { transform: rotate(180deg); }
.accordion summary:hover { background: var(--bg-soft); }
.accordion__body { padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--border-soft); padding-top: 1.25rem; }

.notice {
  display: flex; gap: .85rem;
  padding: 1rem 1.15rem; margin-bottom: 1.75rem;
  background: var(--accent-100);
  border: 1px solid var(--accent-600);
  border-color: color-mix(in srgb, var(--accent-600) 35%, transparent);
  border-radius: var(--r-md); font-size: var(--fs-sm); color: var(--text-soft);
}
.notice .icon { color: var(--accent-700); flex: none; margin-top: .15rem; }

/* --------------------------------------------------------------------------
   9. Sedes / mapa interactivo
   -------------------------------------------------------------------------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; }
@media (max-width: 880px) { .map-layout { grid-template-columns: 1fr; } }

.map-figure {
  position: relative; margin: 0;
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-soft); border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-md);
}
.map-figure img { width: 100%; }

.map-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .35rem .7rem .35rem .5rem;
  font-family: var(--font-head); font-weight: 700; font-size: .78rem; white-space: nowrap;
  color: #fff; background: var(--brand-700);
  border: 2px solid #fff; border-radius: var(--r-full);
  box-shadow: 0 3px 10px rgba(1, 47, 76, .35);
  cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.map-pin::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ffd486; flex: none;
  box-shadow: 0 0 0 0 rgba(255, 212, 134, .8);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(255, 212, 134, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 212, 134, 0); } }
.map-pin:hover, .map-pin[aria-expanded="true"] { background: var(--accent-600); color: #22190a; transform: translate(-50%, -50%) scale(1.08); }
.map-pin[aria-expanded="true"]::before { background: var(--brand-800); }

@media (max-width: 620px) {
  .map-figure { display: none; }
}

.sede-list { display: grid; gap: .75rem; }
.sede {
  display: grid; grid-template-columns: 72px 1fr; gap: 1rem; align-items: center;
  width: 100%; text-align: left;
  padding: .8rem; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.sede:hover, .sede.is-active { border-color: var(--brand-500); box-shadow: var(--shadow-md); transform: translateX(3px); }
.sede.is-active { background: var(--brand-050); }
.sede img { width: 72px; height: 60px; object-fit: cover; border-radius: var(--r-sm); }
.sede__name { font-family: var(--font-head); font-weight: 700; font-size: .98rem; }
.sede__desc { font-size: var(--fs-xs); color: var(--text-muted); }

/* Diálogo nativo */
dialog.modal {
  width: min(92vw, 540px); padding: 0; border: none;
  border-radius: var(--r-lg); background: var(--bg-elev); color: var(--text);
  box-shadow: var(--shadow-lg);
}
dialog.modal::backdrop { background: rgba(6, 20, 32, .6); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop .28s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal__media { aspect-ratio: 16 / 9; background: var(--bg-soft); }
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__body { padding: 1.5rem; }
.modal__body h3 { margin-bottom: .35rem; }
.modal__close {
  position: absolute; top: .75rem; right: .75rem;
  width: 36px; height: 36px; display: grid; place-items: center;
  background: rgba(10, 22, 34, .6); color: #fff;
  border: none; border-radius: 50%; cursor: pointer;
  transition: background-color .2s var(--ease);
}
.modal__close:hover { background: rgba(10, 22, 34, .85); }
.modal__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }

/* --------------------------------------------------------------------------
   10. Contacto
   -------------------------------------------------------------------------- */
.contact-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 1rem + 3vw, 3.5rem); align-items: start; }
@media (max-width: 880px) { .contact-layout { grid-template-columns: 1fr; } }

.contact-item { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--border-soft); }
.contact-item:last-of-type { border-bottom: none; }
.contact-item__icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: var(--r-md); background: var(--brand-100); color: var(--brand-700); }
.contact-item h3 { font-size: .95rem; margin-bottom: .15rem; }
.contact-item p, .contact-item address { font-size: var(--fs-sm); font-style: normal; color: var(--text-soft); margin: 0; }
.contact-item a { text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }

.form { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--r-lg); padding: clamp(1.25rem, 1rem + 1.5vw, 2rem); box-shadow: var(--shadow-sm); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: var(--fs-sm); margin-bottom: .4rem; }
.field label .req { color: var(--err-600); }

.field input, .field textarea {
  width: 100%; padding: .75rem .9rem;
  background: var(--bg); color: var(--text);
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-size: var(--fs-sm); line-height: 1.5;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-600);
  box-shadow: 0 0 0 4px rgba(42, 156, 224, .22);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-500) 22%, transparent);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--err-600); }
.field .error { display: block; min-height: 1.1rem; font-size: var(--fs-xs); color: var(--err-600); margin-top: .3rem; }

/* Honeypot antispam: invisible para humanos, presente para bots */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

.form-status { display: none; gap: .6rem; align-items: flex-start; padding: .9rem 1.1rem; border-radius: var(--r-sm); font-size: var(--fs-sm); margin-bottom: 1.25rem; }
.form-status.is-visible { display: flex; }
.form-status.is-ok { background: rgba(18, 138, 90, .12); color: var(--ok-600); border: 1px solid rgba(18, 138, 90, .35); }
.form-status.is-err { background: rgba(200, 52, 43, .10); color: var(--err-600); border: 1px solid rgba(200, 52, 43, .32); }

/* --------------------------------------------------------------------------
   11. Pie de página
   -------------------------------------------------------------------------- */
.site-footer { background: var(--brand-900); color: rgba(255, 255, 255, .78); padding-block: clamp(3rem, 2rem + 3vw, 4.5rem) 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(160px, 1fr)); gap: clamp(1.75rem, 1rem + 3vw, 3rem); }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1.1rem; }
.site-footer p, .site-footer address { color: rgba(255, 255, 255, .74); font-size: var(--fs-sm); font-style: normal; }
.site-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; font-size: var(--fs-sm); }
.site-footer a:hover { color: #ffd486; }
.site-footer li { margin-bottom: .55rem; }
.site-footer li a { display: inline-flex; align-items: center; gap: .45rem; }

.footer-brand { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.footer-brand img { width: 52px; height: 52px; border-radius: 50%; background: #fff; }
.footer-brand strong { color: #fff; font-family: var(--font-head); font-size: 1.02rem; line-height: 1.25; display: block; }

.social { display: flex; gap: .5rem; margin-top: 1.1rem; }
.social a {
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); border-radius: 50%;
  transition: background-color .2s var(--ease), transform .2s var(--ease), color .2s var(--ease);
}
.social a:hover { background: var(--accent-600); color: #22190a; transform: translateY(-3px); }

.footer-bottom {
  margin-top: clamp(2rem, 1rem + 3vw, 3rem);
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .12);
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: center; justify-content: space-between;
  font-size: var(--fs-xs); color: rgba(255, 255, 255, .6);
}

/* Botón volver arriba */
.to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 900;
  width: 46px; height: 46px; display: grid; place-items: center;
  background: var(--brand-700); color: #fff;
  border: none; border-radius: 50%; box-shadow: var(--shadow-lg); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s, background-color .2s var(--ease);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--brand-800); }

/* --------------------------------------------------------------------------
   12. Página de error
   -------------------------------------------------------------------------- */
.error-page { min-height: 78svh; display: grid; place-items: center; text-align: center; padding-block: calc(var(--header-h) + 3rem) 4rem; }
.error-page .code { font-family: var(--font-head); font-size: clamp(4rem, 3rem + 8vw, 8rem); font-weight: 800; color: var(--brand-100); line-height: 1; }

/* --------------------------------------------------------------------------
   13. Impresión
   -------------------------------------------------------------------------- */
@media print {
  .site-header, .to-top, .hero__dots, .nav, .form, .social { display: none !important; }
  body { color: #000; background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .75em; color: #555; }
}
