/* =========================================================
   ONG Entre Todos — hoja de estilos principal
   ========================================================= */
@font-face {
  font-family: "Bebas Neue";
  src: url("../Font/BebasNeue-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --verde-900: #0c3b17;
  --verde-800: #0f4d1d;
  --verde-700: #136325;
  --verde-600: #1a7a2e;
  --lima-500: #7cbf2e;
  --lima-400: #9bd34c;
  --lima-100: #eef7e2;
  --crema: #f7f8f3;
  --texto: #1d2a20;
  --texto-suave: #4f5d52;
  --borde: #dfe6da;
  --blanco: #ffffff;
  --sombra: 0 10px 30px -12px rgba(12, 59, 23, .25);
  --sombra-sm: 0 2px 10px -4px rgba(12, 59, 23, .2);
  --radio: 18px;
  --radio-sm: 10px;
  --header-h: 72px;
  --f-titulo: "Lexend", system-ui, sans-serif;
  --f-texto: "Source Sans 3", system-ui, sans-serif;
  --f-display: "Bebas Neue", "Lexend", system-ui, sans-serif;

  /* Colores por tema (claro por defecto) */
  color-scheme: light;
  --fondo: #ffffff;
  --superficie: #ffffff;
  --barra: rgba(255, 255, 255, .92);
  --titulo: var(--verde-900);
  --acento: var(--verde-700);
  --relleno: var(--verde-700);
  --relleno-hover: var(--verde-800);
  --tinte: var(--lima-100);
  --pie: var(--verde-900);
}

/* Tema oscuro: se aplica si se elige "Oscuro", o con "Sistema" cuando el equipo está en modo oscuro */
:root[data-theme="dark"] {
  color-scheme: dark;
  --fondo: #0e1510;
  --superficie: #162019;
  --barra: rgba(14, 21, 16, .9);
  --crema: #121a14;
  --texto: #e2eae1;
  --texto-suave: #a5b3a7;
  --borde: #2a382d;
  --titulo: #eaf5e0;
  --acento: #95d46c;
  --relleno: #2a7d37;
  --relleno-hover: #33923f;
  --tinte: #1e2c21;
  --pie: #08100a;
  --sombra: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --sombra-sm: 0 2px 10px -4px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --fondo: #0e1510;
    --superficie: #162019;
    --barra: rgba(14, 21, 16, .9);
    --crema: #121a14;
    --texto: #e2eae1;
    --texto-suave: #a5b3a7;
    --borde: #2a382d;
    --titulo: #eaf5e0;
    --acento: #95d46c;
    --relleno: #2a7d37;
    --relleno-hover: #33923f;
    --tinte: #1e2c21;
    --pie: #08100a;
    --sombra: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --sombra-sm: 0 2px 10px -4px rgba(0, 0, 0, .5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--acento); }
h1, h2, h3 { font-family: var(--f-titulo); line-height: 1.2; color: var(--titulo); margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 1em; }
/* Títulos principales con la fuente de la marca (Bebas Neue) */
h1, h2, .brand { font-family: var(--f-display); font-weight: 400; letter-spacing: .02em; line-height: 1.05; }
button { font: inherit; cursor: pointer; }
svg { width: 1.25em; height: 1.25em; flex: none; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--verde-800); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--lima-400); outline-offset: 2px; border-radius: 4px; }

/* ---------- Barra superior y menú ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--barra);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--borde);
  transition: box-shadow .2s;
}
.topbar.is-scrolled { box-shadow: var(--sombra-sm); }
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--f-titulo); font-weight: 700; font-size: 1.15rem; color: var(--acento); white-space: nowrap; }
.brand img { width: 44px; height: 44px; }
.brand--light { color: #fff; }
.main-nav { margin-left: auto; }
.menu, .submenu { list-style: none; margin: 0; padding: 0; }
.menu { display: flex; align-items: center; gap: 2px; }
.nav-item { position: relative; }
.nav-row { display: flex; align-items: center; }
.nav-row a {
  display: block; padding: 8px 10px; border-radius: 8px;
  font-family: var(--f-titulo); font-size: .9rem; font-weight: 500;
  color: var(--texto); text-decoration: none; white-space: nowrap;
}
.nav-row a:hover { background: var(--tinte); color: var(--acento); }
.menu > .is-active > .nav-row > a { color: var(--acento); box-shadow: inset 0 -2px 0 var(--lima-500); border-radius: 8px 8px 0 0; }
.submenu .is-active > .nav-row > a, .submenu a[aria-current] { color: var(--acento); font-weight: 600; }
.sub-toggle { display: grid; place-items: center; width: 28px; height: 28px; margin-left: -6px; border: 0; background: none; color: var(--texto-suave); border-radius: 6px; }
.sub-toggle svg { transition: transform .2s; }
.sub-toggle:hover { background: var(--tinte); }

@media (min-width: 1101px) {
  .submenu {
    position: absolute; top: 100%; left: 0; min-width: 240px; padding: 8px;
    background: var(--superficie); border: 1px solid var(--borde); border-radius: 14px; box-shadow: var(--sombra);
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s ease;
  }
  .submenu .submenu { top: -9px; left: 100%; margin-left: 6px; }
  .submenu .nav-row { justify-content: space-between; }
  .submenu .nav-row a { flex: 1; }
  .submenu .sub-toggle svg { transform: rotate(-90deg); }
  .has-sub:hover > .submenu, .has-sub:focus-within > .submenu, .has-sub.is-open > .submenu { opacity: 1; visibility: visible; transform: none; }
  .menu > .has-sub:hover > .nav-row .sub-toggle svg { transform: rotate(180deg); }
}

.menu-toggle { margin-left: auto; width: 46px; height: 46px; border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); display: grid; place-content: center; gap: 5px; }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--acento); border-radius: 2px; transition: .25s; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1101px) { .menu-toggle { display: none; } }

@media (max-width: 1100px) {
  /* backdrop-filter convertiría la barra en el contenedor del menú fijo */
  .topbar { backdrop-filter: none; background: var(--superficie); }
  .main-nav {
    position: fixed; inset: var(--header-h) 0 0 0; background: var(--superficie);
    overflow-y: auto; padding: 12px 16px 40px;
    transform: translateX(100%); transition: transform .3s ease; visibility: hidden;
  }
  .main-nav.is-open { transform: none; visibility: visible; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-bottom: 1px solid var(--borde); }
  .submenu .nav-item { border: 0; }
  .nav-row { justify-content: space-between; }
  .nav-row a { flex: 1; font-size: 1.05rem; padding: 14px 8px; }
  .menu > .is-active > .nav-row > a { box-shadow: none; }
  .sub-toggle { width: 44px; height: 44px; }
  .submenu { display: none; padding: 0 0 8px 14px; border-left: 2px solid var(--tinte); margin-left: 8px; }
  .submenu .nav-row a { padding: 10px 8px; font-size: .98rem; }
  .is-open > .submenu { display: block; }
  .is-open > .nav-row .sub-toggle svg { transform: rotate(180deg); }
  body.menu-open { overflow: hidden; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; color: #fff; min-height: 300px; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12, 59, 23, .25) 0%, rgba(12, 59, 23, .82) 100%); }
.hero-inner { padding: 56px 0 44px; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.2rem); margin: 0; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 640px; margin: 14px 0 0; opacity: .95; }
.hero .accent { color: var(--lima-400); }
.hero--home { min-height: min(82vh, 720px); align-items: center; }
/* Espacio inferior para la tarjeta de introducción, que sube 56px sobre la portada */
.hero--home .hero-inner { padding: 64px 0 104px; }
.hero--home::after { background: linear-gradient(100deg, rgba(12, 59, 23, .88) 0%, rgba(12, 59, 23, .55) 55%, rgba(12, 59, 23, .2) 100%); }
.hero--home h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); max-width: 760px; }
.breadcrumbs { font-size: .92rem; margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.breadcrumbs a { color: #fff; opacity: .85; text-decoration: none; }
.breadcrumbs a:hover { opacity: 1; text-decoration: underline; }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs [aria-current] { color: var(--lima-400); font-weight: 600; }

/* ---------- Secciones ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section--compact { padding: 28px 0 0; }
.section--tint { background: var(--crema); }
.section-head { margin-bottom: 32px; max-width: 760px; }
.eyebrow { font-family: var(--f-titulo); font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--lima-500); font-weight: 600; margin-bottom: 8px; }
.section-head h2, .story-head h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
.lead { font-size: 1.15rem; color: var(--texto-suave); max-width: 820px; }
.lead--big { font-size: clamp(1.15rem, 2vw, 1.35rem); color: var(--texto); margin-bottom: 40px; }
.lead-block { margin-bottom: 40px; }
.center .lead, .section-head.center { margin-inline: auto; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid var(--relleno);
  background: var(--relleno); color: #fff; font-family: var(--f-titulo); font-weight: 500; font-size: .98rem;
  text-decoration: none; transition: .2s;
}
.btn:hover { background: var(--relleno-hover); border-color: var(--relleno-hover); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--acento); }
.btn--ghost:hover { background: var(--relleno); color: #fff; }
.btn--small { padding: 8px 16px; font-size: .9rem; }
.btn--wa { background: #25d366; border-color: #25d366; color: #0b3d1f; margin-top: 8px; }
.btn--wa:hover { background: #1fb457; border-color: #1fb457; color: #fff; }
.btn--wa img { width: 22px; height: 22px; }
.center .btn { margin-top: 36px; }

/* Inicio */
.intro-strip { padding: 0; margin-top: -56px; position: relative; z-index: 2; }
.intro-grid { background: var(--superficie); border-radius: var(--radio); box-shadow: var(--sombra); padding: 32px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.intro-text { margin: 0; font-size: 1.12rem; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stats li { background: var(--tinte); border-radius: 14px; padding: 16px 12px; text-align: center; }
.stats strong { display: block; font-family: var(--f-titulo); font-size: 1.9rem; color: var(--acento); line-height: 1.1; }
.stats span { font-size: .9rem; color: var(--texto-suave); line-height: 1.3; display: block; margin-top: 4px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.split--reverse .split-text { order: 2; }
.mosaic { display: grid; gap: 12px; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radio-sm); box-shadow: var(--sombra-sm); }
.mosaic--3 { grid-template-columns: 1.2fr 1fr; grid-template-rows: 220px 220px; }
.mosaic--3 img:first-child { grid-row: span 2; }
.mosaic--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 200px; }

.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.value-card { background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 26px 22px; transition: .2s; }
.value-card:hover { border-color: var(--lima-400); box-shadow: var(--sombra); transform: translateY(-3px); }
.value-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--tinte); color: var(--acento); margin-bottom: 16px; }
.value-icon svg { width: 28px; height: 28px; }
.value-card h3 { font-size: 1.2rem; }
.value-card p { font-size: .98rem; color: var(--texto-suave); margin: 0; }

/* Tarjetas de enlace */
.link-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.link-card { display: flex; flex-direction: column; background: var(--superficie); border-radius: var(--radio); overflow: hidden; border: 1px solid var(--borde); text-decoration: none; color: inherit; transition: .25s; }
.link-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; transition: transform .4s; }
.link-card:hover { box-shadow: var(--sombra); transform: translateY(-4px); }
.link-card:hover img { transform: scale(1.04); }
.link-card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.link-card h3 { font-size: 1.3rem; }
.link-card p { color: var(--texto-suave); flex: 1; }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--acento); font-family: var(--f-titulo); font-weight: 500; }

/* Historia y trayectoria */
.article-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 48px; align-items: start; }
.prose p { font-size: 1.1rem; }
.prose p:first-child::first-letter { font-family: var(--f-titulo); float: left; font-size: 3.4em; line-height: .9; padding: 6px 10px 0 0; color: var(--acento); font-weight: 700; }
.aside-card { position: sticky; top: calc(var(--header-h) + 24px); background: var(--crema); border-radius: var(--radio); padding: 28px; }
.aside-card h2 { font-size: 1.3rem; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--lima-400); }
.timeline li { position: relative; padding: 0 0 18px 30px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--superficie); border: 3px solid var(--relleno); }
.tl-year { font-family: var(--f-titulo); font-weight: 700; color: var(--acento); }
.timeline p { margin: 2px 0 0; font-size: .98rem; color: var(--texto-suave); }

/* Equipo */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 24px; margin-top: 32px; }
.member { text-align: center; background: var(--superficie); border: 1px solid var(--borde); border-radius: var(--radio); padding: 22px 18px 24px; transition: .2s; }
.member:hover { box-shadow: var(--sombra); transform: translateY(-3px); }
.member img, .member .avatar { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 4px solid var(--tinte); }
.avatar { display: grid; place-items: center; background: linear-gradient(135deg, var(--verde-700), var(--lima-500)); color: #fff; font-family: var(--f-titulo); font-size: 2.4rem; font-weight: 600; }
.member h3 { font-size: 1.05rem; margin-bottom: 4px; }
.member p { font-size: .95rem; color: var(--texto-suave); margin: 0; }
.team-grid--board { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.member--board p { color: var(--acento); font-weight: 600; }

/* Proyectos */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 24px; }
.project-card { background: var(--superficie); border-radius: var(--radio); overflow: hidden; border: 1px solid var(--borde); display: flex; flex-direction: column; }
.project-card img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.project-body { padding: 22px 24px 26px; }
.project-body h3 { font-size: 1.3rem; }
.project-note { color: var(--texto-suave); margin: -6px 0 10px; font-size: .95rem; }
.program-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.program-list li { border-left: 3px solid var(--lima-500); padding: 4px 0 4px 14px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.prog { font-size: .98rem; line-height: 1.45; }
.chip { display: inline-block; background: var(--tinte); color: var(--acento); font-size: .82rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }

/* Contacto */
.social-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; background: linear-gradient(120deg, var(--verde-800), var(--verde-600)); color: #fff; border-radius: var(--radio); padding: 28px 32px; margin-bottom: 32px; }
.social-band h2 { color: #fff; font-size: 1.5rem; margin: 0 0 4px; }
.social-band p { margin: 0; opacity: .9; }
.social { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; }
.social a { display: block; border-radius: 50%; transition: transform .2s; }
.social a:hover { transform: translateY(-3px) scale(1.05); }
.social img { width: 40px; height: 40px; }
.social--big img { width: 56px; height: 56px; background: #fff; border-radius: 50%; }
.social--footer img { background: #fff; border-radius: 50%; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.contact-card { border: 1px solid var(--borde); border-radius: var(--radio); padding: 28px; background: var(--superficie); border-top: 5px solid var(--lima-500); }
.contact-card h2 { font-size: 1.35rem; }
.contact-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 12px; align-items: center; }
.contact-list a { color: var(--texto); text-decoration: none; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--acento); text-decoration: underline; }
.ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--tinte); color: var(--acento); flex: none; }

/* Dirección */
.offices { display: grid; gap: 32px; }
.office { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); border-radius: var(--radio); overflow: hidden; border: 1px solid var(--borde); background: var(--superficie); }
.office:nth-child(even) .office-info { order: 2; }
.office-info { padding: 32px; }
.office-info h2 { font-size: 1.6rem; margin-bottom: 20px; }
.info-row { display: flex; gap: 14px; margin-bottom: 18px; }
.info-row h3 { font-size: 1rem; margin-bottom: 4px; }
.info-row p, .info-row address { margin: 0 0 4px; font-style: normal; color: var(--texto-suave); }
.map { min-height: 380px; background: var(--crema); }
.map iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }

/* Nuestra historia */
.chips, .filters { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-link { display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--borde); background: var(--superficie); color: var(--acento); text-decoration: none; font-family: var(--f-titulo); font-size: .9rem; transition: .2s; }
.chip-link:hover { border-color: var(--lima-500); background: var(--tinte); }
.chip-link.is-on { background: var(--relleno); color: #fff; border-color: var(--relleno); }
.story-head { max-width: 820px; margin-bottom: 28px; }
.story-count { display: inline-block; font-family: var(--f-titulo); font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lima-500); margin-bottom: 8px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.gal-item { padding: 0; border: 0; border-radius: var(--radio-sm); overflow: hidden; aspect-ratio: 1; background: var(--borde); }
.gal-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.gal-item:hover img { transform: scale(1.06); }
.gallery:not(.is-expanded) .is-extra { display: none; }

/* Actualidad */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.search input { width: min(340px, 100%); padding: 11px 18px; border: 1px solid var(--borde); border-radius: 999px; font: inherit; background: var(--crema); }
.search input:focus { outline: none; border-color: var(--lima-500); background: var(--superficie); box-shadow: 0 0 0 3px var(--tinte); }
.search { flex: 0 1 340px; }
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.news-grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.news-card { background: var(--superficie); border-radius: var(--radio); overflow: hidden; border: 1px solid var(--borde); display: flex; flex-direction: column; transition: .2s; }
.news-card:hover { box-shadow: var(--sombra); transform: translateY(-3px); }
.news-media { padding: 0; border: 0; display: block; overflow: hidden; background: var(--borde); }
.news-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .35s; }
.news-card:hover .news-media img { transform: scale(1.05); }
.news-body { padding: 18px 20px 22px; }
.news-body time { display: block; font-size: .85rem; font-weight: 600; color: var(--lima-500); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.news-body h3 { font-size: 1.08rem; margin: 0; line-height: 1.35; }
.news-card[hidden] { display: none; }
.empty { text-align: center; color: var(--texto-suave); padding: 40px 0; }

/* Transparencia */
.doc-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 24px; }
.doc-group { border: 1px solid var(--borde); border-radius: var(--radio); padding: 24px 26px; background: var(--superficie); }
.doc-group h2 { font-size: 1.2rem; padding-bottom: 12px; border-bottom: 2px solid var(--tinte); }
.docs { list-style: none; margin: 0; padding: 0; }
.doc { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px dashed var(--borde); }
.doc:last-child { border-bottom: 0; }
.doc-ic { color: var(--acento); }
.doc-ic svg { width: 26px; height: 26px; }
.doc-title { flex: 1; font-weight: 600; line-height: 1.35; }

/* ---------- Pie ---------- */
.site-footer { background: var(--pie); color: rgba(255, 255, 255, .85); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding: 56px 0 40px; }
.footer-brand p { margin: 16px 0 20px; max-width: 420px; }
.footer-title { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-links a { color: rgba(255, 255, 255, .85); text-decoration: none; overflow-wrap: anywhere; }
.footer-links a:hover { color: var(--lima-400); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0; font-size: .9rem; text-align: center; color: rgba(255, 255, 255, .7); }

/* ---------- Visor de imágenes ---------- */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(6, 22, 10, .94); display: grid; place-items: center; padding: 56px 64px; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: #fff; margin-top: 14px; text-align: center; font-size: 1rem; }
.lightbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; display: grid; place-items: center; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lb-close { top: 14px; right: 14px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Animación de entrada ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, .reveal { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .intro-grid, .split, .article-layout, .office { grid-template-columns: 1fr; }
  .split--reverse .split-text, .office:nth-child(even) .office-info { order: 0; }
  .aside-card { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 1rem; }
  :root { --header-h: 64px; }
  .brand { font-size: 1rem; }
  .brand img { width: 38px; height: 38px; }
  .hero { min-height: 240px; }
  .hero--home { min-height: 0; }
  .intro-grid { padding: 22px; }
  .stats strong { font-size: 1.5rem; }
  .mosaic--3 { grid-template-rows: 150px 150px; }
  .mosaic--4 { grid-template-rows: 140px 140px; }
  .projects-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .member { padding: 16px 10px 18px; }
  .member img, .member .avatar { width: 96px; height: 96px; font-size: 1.8rem; }
  .member h3 { font-size: .98rem; }
  .member p { font-size: .88rem; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .office-info, .contact-card, .doc-group { padding: 22px; }
  .doc { flex-wrap: wrap; }
  .doc .btn { margin-left: 40px; }
  .footer-grid { grid-template-columns: 1fr; }
  .social-band { padding: 22px; }
  .lightbox { padding: 56px 8px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
}

/* ---------- Tamaños para la fuente de títulos (Bebas Neue es condensada) ---------- */
.brand { font-family: var(--f-display); font-weight: 400; font-size: 1.65rem; letter-spacing: .03em; }
.brand--light { font-size: 1.9rem; }
.hero h1 { font-size: clamp(2.8rem, 6vw, 4.4rem); }
.hero--home h1 { font-size: clamp(3.2rem, 8vw, 5.8rem); }
.section-head h2, .story-head h2 { font-size: clamp(2.3rem, 4.5vw, 3.3rem); }
.footer-title { font-size: 1.4rem; letter-spacing: .08em; }
.aside-card h2, .contact-card h2, .social-band h2 { font-size: 1.9rem; }
.office-info h2 { font-size: 2.2rem; }
.doc-group h2 { font-size: 1.65rem; }
@media (max-width: 600px) {
  .brand { font-size: 1.45rem; }
}

/* ---------- Selector de tema (claro / oscuro / sistema) ---------- */
.theme-switch { position: relative; margin-left: 4px; }
.theme-btn { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); color: var(--acento); }
.theme-btn:hover { background: var(--tinte); }
.theme-btn svg { width: 22px; height: 22px; }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 170px; padding: 6px; margin: 0; list-style: none;
  background: var(--superficie); border: 1px solid var(--borde); border-radius: 14px; box-shadow: var(--sombra);
}
.theme-menu[hidden] { display: none; }
.theme-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; background: none; color: var(--texto); font-family: var(--f-titulo); font-size: .92rem; text-align: left; }
.theme-menu button:hover { background: var(--tinte); }
.theme-menu button[aria-checked="true"] { color: var(--acento); font-weight: 600; }
.theme-menu button[aria-checked="true"]::after { content: "✓"; margin-left: auto; }
.theme-menu svg { width: 18px; height: 18px; }
@media (max-width: 1100px) { .theme-switch { order: 2; margin-left: auto; } .menu-toggle { order: 3; margin-left: 8px; } }

/* Ajustes puntuales en modo oscuro */
:root[data-theme="dark"] .map iframe { filter: brightness(.85) contrast(1.05); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map iframe { filter: brightness(.85) contrast(1.05); } }

/* ---------- Logo según el tema (logo 3 en modo oscuro) ---------- */
.logo-oscuro { display: none; }
:root[data-theme="dark"] .logo-claro { display: none; }
:root[data-theme="dark"] .logo-oscuro { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-claro { display: none; }
  :root:not([data-theme="light"]) .logo-oscuro { display: block; }
}

/* ---------- Créditos de imágenes (enlace en el pie y página propia) ---------- */
.footer-bottom a { color: inherit; }
.footer-bottom a:hover { color: var(--lima-400); }
.sep-dot { margin: 0 6px; opacity: .6; }
.page-title { font-size: clamp(2.6rem, 6vw, 4rem); margin: 8px 0 16px; }
.breadcrumbs--plain a { color: var(--texto-suave); opacity: 1; }
.breadcrumbs--plain .sep { color: var(--texto-suave); }
.breadcrumbs--plain [aria-current] { color: var(--acento); }
.doc-title small { font-weight: 400; color: var(--texto-suave); }

/* ---------- Noticias con varias fotos ---------- */
.news-media { position: relative; }
.news-count {
  position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; background: rgba(12, 59, 23, .82); color: #fff;
  font-family: var(--f-titulo); font-size: .8rem;
}
.news-count svg { width: 15px; height: 15px; }
.news-extra { display: none; }
