/* El Avellano — estilos del sitio. Los valores salen de DESIGN.md. */

@font-face { font-family: "Gabarito"; src: url("../fonts/gabarito.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
/* Respaldos del mismo ancho: mientras llegan Gabarito y Barlow el texto se dibuja con Arial ajustada, para que al cambiar no salte.
   size-adjust medido el 14-oct-2026 en el navegador, al tamaño real (ancho del mismo texto con la fuente y con Arial):
   Gabarito 600–700 vs Arial negrita 91,6–91,9 %; Barlow 400–500 vs Arial 96,2–96,9 %; Barlow 600–700 vs Arial negrita 90,8–91,4 %. */
@font-face { font-family: "Gabarito respaldo"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Roboto Bold"), local("Roboto-Bold"); font-weight: 400 900; size-adjust: 91.8%; }
@font-face { font-family: "Barlow respaldo"; src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular"); font-weight: 300 500; size-adjust: 96.5%; }
@font-face { font-family: "Barlow respaldo"; src: local("Arial Bold"), local("Arial-BoldMT"), local("Roboto Bold"), local("Roboto-Bold"); font-weight: 600 900; size-adjust: 91.1%; }

:root {
  /* Manual de marca */
  --azul: #5678f5;
  --turquesa: #0dbcc1;
  --lavanda: #b1a1d9;
  --amarillo: #ffd230;
  /* Derivados para la web */
  --tinta: #171c4f;
  --tinta-suave: #454b7a;
  --azul-hondo: #425dd6; /* el azul del manual, oscurecido para pie y botones (pedido del centro, 14-oct-2026): texto blanco 5,6:1 */
  --azul-hondo-2: #3a52c4;
  --azul-texto: #3550c9;
  --amarillo-fuerte: #f2c200;
  --papel: #ffffff;
  --niebla: #f1f3fe;
  --linea: rgb(23 28 79 / 0.16);
  --linea-campo: rgb(23 28 79 / 0.28);
  --error: #b3261e;

  --titulos: "Gabarito", "Gabarito respaldo", "Trebuchet MS", system-ui, sans-serif;
  --texto: "Barlow", "Barlow respaldo", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-base: 1.0625rem;
  --t-chico: 1rem;
  --t-bajada: clamp(1.125rem, 0.93rem + 0.84vw, 1.5rem);
  --t-h3: clamp(1.1875rem, 1.03rem + 0.66vw, 1.625rem);
  --t-h2: clamp(1.5rem, 1.1rem + 2.1vw, 3rem);
  --t-h1: clamp(1.875rem, 1.2rem + 3.4vw, 4rem);
  --t-lema: clamp(2rem, 1rem + 5vw, 5.25rem);

  --e-1: 0.25rem; --e-2: 0.5rem; --e-3: 0.75rem; --e-4: 1rem; --e-5: 1.5rem;
  --e-6: 2rem; --e-7: 3rem; --e-8: 4rem; --e-9: 6rem;
  --seccion: clamp(2.75rem, 1.7rem + 5.6vw, 7.5rem);
  --margen: clamp(1.375rem, 0.9rem + 2.4vw, 2.5rem);
  --ancho: 76rem;

  --radio: 1rem;
  --radio-chico: 0.625rem;
  --sombra: 0 10px 30px -14px rgb(23 28 79 / 0.45);
  --salida: cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 40rem) { :root { --t-base: 1.125rem; } }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
@media (min-width: 62rem) { html { scroll-padding-top: 6.5rem; } }
body {
  margin: 0;
  font-family: var(--texto);
  font-size: var(--t-base);
  line-height: 1.55;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--azul-texto);
}
::selection { background: var(--amarillo); color: var(--tinta); }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { font-family: var(--titulos); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.01em; font-weight: 600; }
p { margin: 0; max-width: 68ch; text-wrap: pretty; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: var(--azul-texto); text-decoration-thickness: 0.09em; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 0.16em; }
strong { font-weight: 600; }
:focus-visible { outline: 3px solid var(--tinta); outline-offset: 3px; border-radius: 0.375rem; }
.campo--azul :focus-visible, .campo--tinta :focus-visible { outline-color: var(--amarillo); }

.solo-lector { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.salto { position: absolute; left: var(--margen); top: -5rem; z-index: 30; background: var(--amarillo); color: var(--tinta); padding: 0.75rem 1.25rem; border-radius: 999px; font-weight: 600; text-decoration: none; }
.salto:focus { top: 0.75rem; }

.envoltura { width: 100%; max-width: calc(var(--ancho) + 2 * var(--margen)); margin-inline: auto; padding-inline: var(--margen); }
.seccion { padding-block: var(--seccion); }
.seccion--corta { padding-block: calc(var(--seccion) * 0.62); }

/* Campos de color: cada uno ocupa una región completa */
.campo--azul { background: var(--azul); color: #fff; }
.campo--turquesa { background: var(--turquesa); }
.campo--lavanda { background: var(--lavanda); }
.campo--amarillo { background: var(--amarillo); }
.campo--niebla { background: var(--niebla); }
.campo--tinta { background: var(--azul-hondo); color: #fff; }
.campo--turquesa a:not(.boton), .campo--lavanda a:not(.boton), .campo--amarillo a:not(.boton) { color: var(--tinta); }
.campo--azul a:not(.boton), .campo--tinta a:not(.boton) { color: #fff; }

/* ---------- Botones y enlaces ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 2.875rem; padding: 0.6rem 1.25rem;
  font: 600 1rem/1.2 var(--texto); text-decoration: none; text-align: center;
  color: var(--tinta); background: var(--amarillo);
  border: 0; border-radius: 999px; cursor: pointer;
  transition: background-color 160ms var(--salida), transform 160ms var(--salida);
}
@media (min-width: 40rem) { .boton { min-height: 3rem; padding: 0.7rem 1.4rem; font-size: 1.0625rem; } }
.boton:hover { background: var(--amarillo-fuerte); }
.boton:active { transform: scale(0.97); }
.boton svg { width: 1.2rem; height: 1.2rem; flex: none; }
.boton--tinta { background: var(--azul-hondo); color: #fff; }
.boton--tinta:hover { background: var(--azul-hondo-2); }
.boton--linea { background: transparent; color: var(--tinta); box-shadow: inset 0 0 0 2px var(--tinta); }
.boton--linea:hover { background: rgb(23 28 79 / 0.08); }
.campo--azul .boton--linea, .campo--tinta .boton--linea { color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.campo--azul .boton--linea:hover, .campo--tinta .boton--linea:hover { background: rgb(255 255 255 / 0.14); }
.campo--amarillo .boton { background: var(--azul-hondo); color: #fff; }
.campo--amarillo .boton:hover { background: var(--azul-hondo-2); }
.campo--amarillo .boton--linea { background: transparent; color: var(--tinta); }
.campo--amarillo .boton--linea:hover { background: rgb(23 28 79 / 0.1); }
.boton[disabled] { opacity: 0.6; cursor: progress; }

.flecha { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem; font-weight: 600; color: var(--tinta); }
.flecha svg { width: 1.15rem; height: 1.15rem; flex: none; transition: transform 200ms var(--salida); }
.flecha:hover svg { transform: translateX(0.25rem); }
.acciones { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-3) var(--e-5); }

/* ---------- Barra de navegación ---------- */
.cima { position: sticky; top: 0; z-index: 20; background: var(--papel); box-shadow: 0 8px 22px -16px rgb(23 28 79 / 0.5); }
.barra {
  position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: var(--e-3);
  min-height: 3.5rem; padding-block: 0.375rem; color: var(--tinta);
}
.barra__logo { display: flex; align-items: center; min-height: 2.75rem; color: var(--azul); line-height: 0; margin-right: auto; border-radius: 0.5rem; }
.barra__logo svg { width: auto; height: 1.875rem; }
.menu, .menu ul { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
.menu { flex-basis: 100%; padding-bottom: var(--e-3); }
.menu a:not(.boton) {
  display: flex; align-items: center; min-height: 3rem; padding: 0 0.75rem;
  color: var(--tinta); font-weight: 500; font-size: 1.0625rem; text-decoration: none; border-radius: var(--radio-chico);
  transition: background-color 160ms var(--salida);
}
.menu a:not(.boton):hover { background: var(--niebla); }
.menu a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--tinta); border-radius: 0; }
.menu .boton { margin-top: var(--e-3); }
.barra__menu {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0 1rem;
  font: 600 1rem/1 var(--texto); color: var(--tinta); background: var(--niebla);
  border: 0; border-radius: 999px; cursor: pointer;
}
.barra__menu svg { width: 1.25rem; height: 1.25rem; }
.barra__menu .cerrar, .barra__menu[aria-expanded="true"] .abrir { display: none; }
.barra__menu[aria-expanded="true"] .cerrar { display: block; }
.con-js .menu { display: none; }
.con-js .barra.abierta .menu { display: flex; animation: bajar 220ms var(--salida); transform-origin: top; }
@keyframes bajar { from { opacity: 0; transform: translateY(-0.375rem); } to { opacity: 1; transform: none; } }

@media (min-width: 62rem) {
  .cima { background: none; box-shadow: none; padding-block: 0.75rem; pointer-events: none; }
  .barra {
    pointer-events: auto; flex-wrap: nowrap; gap: var(--e-4); min-height: 4rem; padding: 0.5rem 0.5rem 0.5rem 1.25rem;
    background: var(--papel); border-radius: 2rem; box-shadow: var(--sombra);
  }
  .barra__logo svg { height: 2.25rem; }
  .barra__menu { display: none; }
  .menu, .menu ul, .con-js .menu { display: flex; flex-direction: row; align-items: center; gap: var(--e-1); }
  .menu { flex-basis: auto; padding-bottom: 0; }
  .menu a:not(.boton) { display: inline-flex; min-height: 2.75rem; padding: 0 0.9rem; border-radius: 999px; }
  .menu a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--tinta); border-radius: 0; }
  .menu .boton { margin: 0 0 0 var(--e-2); }
  /* La primera sección de cada página sube por debajo de la barra flotante */
  .portada, .cabecera, .contacto-campo { margin-top: -5.5rem; padding-top: 5.5rem; }
}

/* ---------- Portada: dos puertas ---------- */
.portada { position: relative; overflow: hidden; }
.portada__cuerpo { display: grid; gap: var(--e-7); padding-block: clamp(1.5rem, 0.6rem + 4vw, 4rem) var(--seccion); position: relative; }
.portada__texto { display: grid; gap: var(--e-4); align-content: start; }
.portada__bajada, .campo--azul .bajada { font-size: 1.1875rem; font-weight: 700; line-height: 1.36; max-width: 30ch; }
@media (min-width: 40rem) { .portada__bajada, .campo--azul .bajada { font-size: 1.5625rem; font-weight: 500; } }
.portada__texto, .puertas { position: relative; }

.puertas { display: flex; flex-direction: column; gap: var(--e-3); }
.puerta { flex: 1 1 0; min-width: 0; container-type: inline-size; transition: flex-grow 280ms var(--salida); }
.puerta__hoja {
  position: relative; height: 100%; display: flex; flex-direction: column;
  border-radius: 11rem 11rem var(--radio) var(--radio);
  border-radius: 50cqw 50cqw var(--radio) var(--radio);
  overflow: hidden; color: var(--tinta);
}
.puerta--centro .puerta__hoja { background: var(--turquesa); }
.puerta--fundacion .puerta__hoja { background: var(--lavanda); }
.puerta__foto { aspect-ratio: 1 / 0.92; overflow: hidden; }
.puerta__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--salida); }
.puerta:hover .puerta__foto img { transform: scale(1.03); }
.puerta__texto { display: flex; flex-direction: column; gap: var(--e-3); padding: var(--e-5) var(--e-5) var(--e-6); flex: 1; }
.puerta h2 { font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.125rem); }
.puerta h2 a, .campo--azul .puerta h2 a:not(.boton) { color: var(--tinta); text-decoration: none; }
.puerta h2 a::after { content: ""; position: absolute; inset: 0; }
.puerta p { font-size: 1.125rem; line-height: 1.45; }
.puerta .acciones { margin-top: auto; padding-top: var(--e-3); position: relative; z-index: 1; }

@media (max-width: 39.99rem) {
  /* En celular las dos puertas caben en la primera pantalla: foto en arco a la izquierda, nombre y botón a la derecha */
  .portada__cuerpo { gap: var(--e-6); }
  .puerta__hoja { display: grid; grid-template-columns: 5.75rem minmax(0, 1fr); align-items: center; gap: var(--e-4); padding: var(--e-3); border-radius: var(--radio); }
  .puerta__foto { aspect-ratio: 1 / 1.14; border-radius: 2.875rem 2.875rem 0.5rem 0.5rem; }
  .puerta__texto { padding: 0; gap: var(--e-3); }
  .puerta h2 { font-size: 1.1875rem; line-height: 1.15; }
  .puerta p { display: none; }
  .puerta .acciones { margin-top: 0; padding-top: 0; }
  .puerta .boton { min-height: 2.75rem; padding-block: 0.5rem; }
}
@media (min-width: 40rem) {
  .puertas { flex-direction: row; gap: var(--e-5); }
  .puerta__foto { aspect-ratio: 1 / 0.84; }
  .portada h1 { max-width: 17ch; }
}
@media (min-width: 40rem) and (hover: hover) and (prefers-reduced-motion: no-preference) {
  .puertas:has(.puerta:hover) .puerta { flex-grow: 0.86; }
  .puertas:has(.puerta:hover) .puerta:hover { flex-grow: 1.14; }
}
@media (min-width: 68rem) {
  .portada__cuerpo { grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); align-items: center; gap: var(--e-7); }
  .portada h1 { max-width: 14ch; }
  .puerta__foto { aspect-ratio: 1 / 1.08; }
}

/* ---------- Cabecera de páginas interiores ---------- */
.cabecera__cuerpo { display: grid; gap: var(--e-6); padding-block: clamp(1.25rem, 0.6rem + 3vw, 3.5rem) clamp(2.25rem, 1.4rem + 4vw, 5rem); align-items: end; }
.cabecera__texto { display: grid; gap: var(--e-4); }
.cabecera h1 { max-width: 18ch; }
.cabecera .bajada { max-width: 34ch; }
.cabecera__marco { container-type: inline-size; width: 100%; max-width: 17rem; }
@media (min-width: 40rem) { .cabecera__marco { max-width: 26rem; } }
.cabecera__foto { border-radius: 11rem 11rem var(--radio) var(--radio); border-radius: 50cqw 50cqw var(--radio) var(--radio); overflow: hidden; aspect-ratio: 4 / 4.5; }
.cabecera__foto img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 56rem) { .cabecera__cuerpo { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--e-8); } .cabecera__marco, .cabecera .cierre__datos { justify-self: end; } }
.migas { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: var(--t-chico); font-weight: 500; }
.migas a { color: inherit; display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; }
.migas li + li::before { content: "/"; margin-right: 0.4rem; opacity: 0.6; }
.migas li { display: inline-flex; align-items: center; }
.campo--azul .migas { font-family: var(--titulos); font-weight: 700; font-size: 1.1875rem; }
.bajada { font-size: var(--t-bajada); line-height: 1.45; }

/* ---------- Bloques de contenido ---------- */
.dupla { display: grid; gap: var(--e-6); }
.dupla > * { min-width: 0; }
@media (min-width: 56rem) {
  .dupla { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e-8); align-items: start; }
  .dupla--ancha { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .dupla__fija { position: sticky; top: 7rem; }
}
.pila { display: grid; gap: var(--e-5); align-content: start; }
.pila--suelta { gap: var(--e-6); }
.lema { font-family: var(--titulos); font-weight: 700; font-size: var(--t-lema); line-height: 1; letter-spacing: -0.03em; text-wrap: balance; max-width: 14ch; }
.declaracion { font-size: clamp(1.625rem, 1.05rem + 3vw, 3.75rem); max-width: 16ch; }

/* Mosaico de fotos con leyenda */
.mosaico { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-4); margin-top: var(--e-7); }
.mosaico figure { display: grid; gap: var(--e-2); align-content: start; }
.mosaico img { width: 100%; object-fit: cover; border-radius: var(--radio); aspect-ratio: 4 / 5; }
.mosaico figcaption { font-weight: 600; font-size: 1rem; line-height: 1.4; }
.mosaico .ancha { grid-column: 1 / -1; }
.mosaico .ancha img { aspect-ratio: 4 / 3; }
@media (min-width: 40rem) and (max-width: 55.99rem) { .mosaico .ancha { grid-column: auto; } .mosaico .ancha img { aspect-ratio: 4 / 5; } }
@media (min-width: 56rem) {
  .mosaico { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--e-5); align-items: end; }
  .mosaico figure { grid-column: span 3; }
  .mosaico .ancha { grid-column: span 5; }
  .mosaico .alta { grid-column: span 4; }
  .mosaico .alta img { aspect-ratio: 3 / 4; }
  .mosaico .baja { margin-bottom: var(--e-8); }
}

/* Filas: programas y listas con nombre + explicación */
.filas { border-bottom: 1px solid var(--linea); }
.fila { display: grid; gap: var(--e-2) var(--e-6); padding-block: var(--e-5); border-top: 1px solid var(--linea); }
.fila p { font-size: var(--t-base); }
.fila__dato { font-weight: 600; font-size: var(--t-chico); color: var(--tinta-suave); }
.campo--lavanda .filas, .campo--turquesa .filas, .campo--lavanda .fila, .campo--turquesa .fila { border-color: var(--linea-campo); }
.campo--lavanda .fila__dato, .campo--turquesa .fila__dato { color: var(--tinta); }
@media (min-width: 44rem) { .fila { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } .fila > h3 { grid-row: span 2; } }

/* Programa en detalle (página Centro) */
.programa { display: grid; gap: var(--e-6); padding-block: var(--e-7); border-top: 1px solid var(--linea); }
.programa:first-of-type { border-top: 0; padding-top: 0; }
.programa__foto img { width: 100%; border-radius: var(--radio); aspect-ratio: 4 / 3; object-fit: cover; }
.programa h3 { font-size: clamp(1.625rem, 1.3rem + 1.4vw, 2.25rem); font-weight: 700; }
@media (min-width: 56rem) { .programa { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--e-8); align-items: center; } .programa--invertido .programa__foto { order: 2; } }

/* Listas con marca */
.marcas { display: grid; gap: var(--e-3); }
.marcas li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: var(--e-3); align-items: start; }
.marcas svg { width: 1.5rem; height: 1.5rem; margin-top: 0.15rem; }
.marcas--si svg { color: var(--azul-texto); }
.campo--lavanda .marcas svg, .campo--turquesa .marcas svg, .campo--amarillo .marcas svg { color: var(--tinta); }
.marcas--chica { font-size: 1.0625rem; font-weight: 500; gap: var(--e-2); }
.lamina img { width: 100%; border-radius: var(--radio); aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 44rem) { .marcas--doble { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-4) var(--e-7); } }

/* Principios: término + definición */
.principios { display: grid; gap: 0; border-bottom: 1px solid var(--linea); }
.principios > div { display: grid; gap: var(--e-2) var(--e-6); padding-block: var(--e-5); border-top: 1px solid var(--linea); }
.principios dt { font-family: var(--titulos); font-weight: 600; font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.01em; }
.principios dd { max-width: 60ch; }
.campo--azul .principios, .campo--azul .principios > div { border-color: rgb(255 255 255 / 0.4); }
.campo--azul .principios dd { font-size: 1.5rem; line-height: 1.4; }
@media (min-width: 44rem) { .principios > div { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); } .principios--pila > div { grid-template-columns: minmax(0, 1fr); } }

/* Aviso de estado */
.aviso { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); gap: var(--e-3); padding: var(--e-5); background: var(--niebla); border-radius: var(--radio); max-width: 38rem; }
.aviso svg { width: 1.75rem; height: 1.75rem; color: var(--azul-texto); }
.aviso p { font-size: var(--t-base); }

/* Lo que está pasando */
.ahora { display: grid; gap: var(--e-6); }
.ahora__fotos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e-3); }
.ahora__fotos img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radio); }
.ahora__fotos figure:nth-child(2) { margin-top: var(--e-6); }
@media (min-width: 56rem) { .ahora { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--e-8); align-items: center; } .ahora__fotos { gap: var(--e-5); } }

/* Preguntas frecuentes */
.preguntas { border-bottom: 1px solid var(--linea); max-width: 52rem; }
.preguntas details { border-top: 1px solid var(--linea); }
.preguntas summary {
  display: grid; grid-template-columns: minmax(0, 1fr) 1.5rem; gap: var(--e-4); align-items: center;
  min-height: 3.75rem; padding-block: var(--e-4); cursor: pointer; list-style: none;
  font-family: var(--titulos); font-weight: 600; font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); line-height: 1.25;
}
.preguntas summary::-webkit-details-marker { display: none; }
.preguntas summary svg { width: 1.5rem; height: 1.5rem; color: var(--azul-texto); transition: transform 200ms var(--salida); }
.preguntas details[open] summary svg { transform: rotate(45deg); }
.preguntas details > div { padding-bottom: var(--e-5); display: grid; gap: var(--e-3); }

/* Cierre */
.cierre__cuerpo { display: grid; gap: var(--e-7); }
.cierre__datos { display: grid; gap: var(--e-2); font-size: var(--t-base); }
.cierre__datos a { font-weight: 600; display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; }
.cierre__datos svg { width: 1.4rem; height: 1.4rem; flex: none; }
.cierre__datos li { display: flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; }
@media (min-width: 56rem) { .cierre__cuerpo { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--e-8); align-items: end; } }

/* ---------- Contacto: el formulario va primero y cabe en una pantalla de celular ---------- */
.contacto-campo { padding-bottom: var(--seccion); }
.contacto { display: grid; gap: var(--e-7); padding-top: var(--e-4); }
.contacto h1 { font-size: clamp(1.625rem, 1.1rem + 2.6vw, 3.25rem); }
.contacto__bajada { display: none; font-size: var(--t-bajada); line-height: 1.45; margin-top: var(--e-3); max-width: 34ch; }
.formulario { display: grid; gap: var(--e-3); margin-top: var(--e-3); max-width: 36rem; }
.caminos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-2); }
.camino { position: relative; display: block; }
.camino input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.camino span {
  display: flex; align-items: center; justify-content: center; min-height: 2.75rem; padding: 0.35rem 0.75rem;
  font: 600 1rem/1.2 var(--texto); text-align: center; border-radius: 999px;
  background: rgb(255 255 255 / 0.6); box-shadow: inset 0 0 0 2px var(--linea-campo);
  transition: background-color 160ms var(--salida), box-shadow 160ms var(--salida);
}
.camino input:hover + span { box-shadow: inset 0 0 0 2px var(--tinta); }
.camino input:checked + span { box-shadow: inset 0 0 0 3px var(--tinta); }
.camino--familia input:checked + span { background: var(--turquesa); }
.camino--institucion input:checked + span { background: var(--lavanda); }
.camino input:focus-visible + span { outline: 3px solid var(--tinta); outline-offset: 3px; }
.campo-form { display: grid; align-content: start; }
.campo-form label { font-weight: 600; font-size: 1rem; line-height: 1.3; margin-bottom: 0.25rem; }
.opcional { font-weight: 400; }
.campo-form input, .campo-form textarea {
  width: 100%; min-height: 2.75rem; padding: 0.5rem 0.85rem;
  font: 400 1.0625rem/1.35 var(--texto); color: var(--tinta); background: var(--papel);
  border: 2px solid var(--tinta); border-radius: var(--radio-chico);
}
.campo-form textarea { min-height: 4.25rem; resize: vertical; }
.campo-form input:focus-visible, .campo-form textarea:focus-visible { outline: 3px solid var(--azul-texto); outline-offset: 2px; }
.campo-form .falla { display: none; grid-template-columns: 1.25rem minmax(0, 1fr); gap: var(--e-2); margin-top: 0.25rem; color: var(--error); font-weight: 600; font-size: 1rem; line-height: 1.3; }
.campo-form .falla svg { width: 1.25rem; height: 1.25rem; }
.campo-form.con-error input, .campo-form.con-error textarea { border-color: var(--error); }
.campo-form.con-error .falla { display: grid; }
.fila-form, .solo-institucion { display: grid; gap: var(--e-3); align-items: start; }
.acepto { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.6rem; align-items: center; font-size: 1rem; line-height: 1.3; min-height: 2.75rem; }
.acepto input { width: 1.375rem; height: 1.375rem; margin: 0; accent-color: var(--tinta); }
.acepto.con-error { color: var(--error); font-weight: 600; }
.trampa { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.formulario .boton { width: 100%; }
.estado { padding: var(--e-3) var(--e-4); border-radius: var(--radio-chico); font-weight: 600; }
.estado--error { background: #fdecea; color: var(--error); }
.listo { display: grid; gap: var(--e-4); padding: var(--e-5); margin-top: var(--e-4); background: var(--papel); border-radius: var(--radio); max-width: 36rem; }
.listo h2 { font-size: var(--t-h2); }
.vias { display: grid; gap: var(--e-3); }
.vias h2 { font-size: var(--t-h3); font-weight: 600; }
.vias ul { display: grid; gap: var(--e-1); }
.vias li a, .vias li > span { display: inline-flex; align-items: center; gap: 0.7rem; min-height: 2.75rem; font-weight: 600; }
.vias svg { width: 1.4rem; height: 1.4rem; flex: none; }
.vias li:first-child { margin-bottom: var(--e-2); }
@media (min-width: 40rem) {
  .contacto { padding-top: var(--e-6); }
  .contacto__bajada { display: block; }
  .formulario { gap: var(--e-4); margin-top: var(--e-5); }
  .fila-form, .solo-institucion { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-4); }
  .campo-form input { min-height: 3.125rem; }
  .campo-form textarea { min-height: 6.5rem; }
  .formulario .boton { width: auto; justify-self: start; }
}
@media (min-width: 60rem) { .contacto { grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: var(--e-9); align-items: start; } .vias { padding-top: var(--e-7); } }

/* ---------- Texto largo (privacidad) ---------- */
.prosa { display: grid; gap: var(--e-4); max-width: 46rem; }
.prosa h2 { font-size: var(--t-h3); font-weight: 600; margin-top: var(--e-6); }
.prosa ul { list-style: disc; padding-left: 1.25rem; display: grid; gap: var(--e-2); }

/* ---------- Pie ---------- */
.pie { padding-block: var(--e-8) var(--e-6); }
.pie__arriba { display: grid; gap: var(--e-7); }
.pie__logo { color: #fff; display: inline-block; line-height: 0; }
.pie__logo svg { height: 3rem; width: auto; }
.pie__lema { font-family: var(--titulos); font-size: 1.375rem; font-weight: 600; margin-top: var(--e-4); }
.pie h2 { font: 600 var(--t-chico)/1.4 var(--texto); letter-spacing: 0; margin-bottom: var(--e-2); color: #eef0ff; }
.pie li a, .pie li span { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 1.0625rem; }
.pie__abajo { margin-top: var(--e-7); padding-top: var(--e-5); border-top: 1px solid rgb(255 255 255 / 0.22); display: flex; flex-wrap: wrap; gap: var(--e-2) var(--e-6); justify-content: space-between; font-size: var(--t-chico); color: #eef0ff; }
.pie__abajo a { color: #fff; }
@media (min-width: 52rem) { .pie__arriba { grid-template-columns: minmax(0, 5fr) repeat(2, minmax(0, 3fr)); gap: var(--e-8); } }

/* ---------- Texturas de fondo ----------
   Dos capas detrás del contenido: una foto de los talleres en duotono (se multiplica con el color del campo) y una mancha de
   pintura en un color de contraste. Reglas: la mancha nunca queda debajo de texto blanco; las fotos bajo texto oscuro van como
   franja al pie de la sección, donde no hay contenido. Solo manos y objetos, sin repetir la foto de una puerta. */
.fondo { position: relative; isolation: isolate; overflow: hidden; overflow: clip; } /* clip: recorta sin romper las columnas fijas */
.fondo::before, .fondo::after { content: ""; position: absolute; z-index: -1; pointer-events: none; }
.fondo::after { -webkit-mask: var(--mancha) center / contain no-repeat; mask: var(--mancha) center / contain no-repeat; }

/* Portada: manos en el torno detrás del titular (texto blanco: la foto oscurece el azul y mejora el contraste) y mancha amarilla tras las puertas */
.fondo--portada::before {
  left: -4rem; bottom: -4rem; width: min(40rem, 150vw); aspect-ratio: 16 / 11.5;
  background: url("../img/fondo-torno-800.webp") center / cover no-repeat; mix-blend-mode: multiply; opacity: 0.6;
  -webkit-mask: radial-gradient(closest-side, #000 55%, transparent 100%); mask: radial-gradient(closest-side, #000 55%, transparent 100%);
}
.fondo--portada::after { --mancha: url("../img/mancha-1.webp"); aspect-ratio: 3 / 2; width: 27rem; right: -10rem; bottom: -7rem; transform: rotate(-14deg); background: var(--amarillo); }

/* Franja de foto al pie de las secciones del Centro y de la Fundación */
.fondo--centro, .fondo--fundacion { --franja: clamp(9rem, 4rem + 16vw, 19rem); padding-bottom: calc(var(--seccion) * 0.5 + var(--franja)); }
.fondo--centro::before, .fondo--fundacion::before {
  left: 0; right: 0; bottom: 0; height: var(--franja); background: center / cover no-repeat; mix-blend-mode: multiply; opacity: 0.7;
  -webkit-mask: linear-gradient(to top, #000 45%, transparent); mask: linear-gradient(to top, #000 45%, transparent);
}
.fondo--centro::before { background-image: url("../img/fondo-dibujo-800.webp"); background-position: center 35%; }
.fondo--fundacion::before { background-image: url("../img/fondo-plaza-800.webp"); background-position: center 60%; }
.fondo--centro::after { --mancha: url("../img/mancha-1.webp"); aspect-ratio: 3 / 2; width: 22rem; right: -11rem; top: -8rem; transform: rotate(165deg); background: var(--lavanda); }
.fondo--fundacion::after { --mancha: url("../img/mancha-2.webp"); aspect-ratio: 6.75 / 1; width: 22rem; right: -10rem; top: -1.7rem; transform: rotate(-7deg); background: var(--turquesa); }

/* Cierre y cabeceras: solo mancha, en la esquina libre de texto */
.fondo--cierre::after { --mancha: url("../img/mancha-1.webp"); aspect-ratio: 3 / 2; width: 16rem; right: -8rem; top: -7rem; transform: rotate(200deg); background: var(--azul); }
.fondo--cabecera::after { --mancha: url("../img/mancha-2.webp"); aspect-ratio: 6.75 / 1; width: 28rem; right: -9rem; bottom: 2.5rem; transform: rotate(-9deg); }
.fondo--cabecera.campo--turquesa::after { background: var(--lavanda); }
.fondo--cabecera.campo--lavanda::after { background: var(--turquesa); }
.fondo--cabecera.campo--azul::after { background: var(--amarillo); }
.fondo--cabecera.campo--niebla::after { display: none; }

@media (min-width: 40rem) {
  .fondo--portada::before { background-image: url("../img/fondo-torno-1400.webp"); width: min(58rem, 135vw); left: -6rem; bottom: -6rem; }
  .fondo--portada::after { width: 40rem; right: -14rem; bottom: -10rem; }
  .fondo--centro::before { background-image: url("../img/fondo-dibujo-1400.webp"); }
  .fondo--fundacion::before { background-image: url("../img/fondo-plaza-1400.webp"); }
  .fondo--centro::after { width: 40rem; right: auto; left: -22rem; top: -16rem; }
  .fondo--fundacion::after { width: 52rem; right: -18rem; top: -4.5rem; }
  .fondo--cierre::after { width: 38rem; right: -14rem; top: -12rem; }
  .fondo--cabecera::after { width: 46rem; right: -12rem; bottom: 3.5rem; }
}
@media (min-width: 68rem) {
  .fondo--portada::after { width: 74rem; right: -20rem; top: -9rem; bottom: auto; }
}
@media print { .fondo::before, .fondo::after { display: none; } }

.pie__cookies { background: none; border: 0; padding: 0; font: inherit; color: #fff; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; min-height: 2.75rem; }

/* ---------- Aviso de cookies: ventana al centro, solo si hay medición configurada ---------- */
.cookies { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--margen); background: rgb(23 28 79 / 0.6); }
.cookies__caja { width: 100%; max-width: 25rem; display: grid; gap: var(--e-3); padding: var(--e-6) var(--e-5); background: var(--papel); border-radius: 1.25rem; text-align: center; animation: aparecer 220ms var(--salida); }
.cookies__caja svg { height: 2.25rem; width: auto; margin: 0 auto var(--e-2); color: var(--azul); }
.cookies__caja h2 { font-size: var(--t-h3); }
.cookies__caja p { font-size: 1rem; margin-bottom: var(--e-2); }
.cookies__caja .boton { width: 100%; }
@keyframes aparecer { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: none; } }

/* ---------- Página no encontrada ---------- */
.perdida { min-height: 60vh; display: grid; align-content: center; gap: var(--e-5); padding-block: var(--seccion); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print { .cima, .pie, .cierre { display: none; } }

/* ---------- Servicios de la portada: cuatro círculos que se abren ---------- */
.servicios__cabeza { display: grid; gap: var(--e-2); margin-bottom: var(--e-6); }
.circulos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-5) var(--e-4); justify-items: center; }
@media (min-width: 48rem) { .circulos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.circulo { display: grid; justify-items: center; gap: var(--e-3); width: 100%; padding: var(--e-2); border: 0; background: none; color: var(--tinta); font: 600 1.0625rem/1.25 var(--titulos); text-align: center; cursor: pointer; border-radius: var(--radio); }
.circulo__bola { display: grid; place-items: center; width: clamp(6.5rem, 5rem + 6vw, 9.5rem); aspect-ratio: 1; border-radius: 50%; background: var(--papel); color: var(--azul-texto); transition: background-color 200ms var(--salida), transform 200ms var(--salida), color 200ms var(--salida); }
.circulo__bola svg { width: 44%; height: 44%; }
.circulo:hover .circulo__bola { transform: scale(1.04); }
.circulo[aria-expanded="true"] .circulo__bola { background: var(--amarillo); color: var(--tinta); box-shadow: 0 0 0 4px var(--papel); }
.circulo__nombre { max-width: 11rem; font-size: clamp(1rem, 0.9rem + 0.4vw, 1.25rem); }
.servicios__paneles { margin-block: var(--e-6) var(--e-5); }
.servicio { display: grid; gap: var(--e-5); padding: clamp(1.25rem, 0.8rem + 2vw, 2.25rem); border-radius: var(--radio); background: var(--papel); }
.servicio + .servicio { margin-top: var(--e-4); }
.servicio__nota { flex-basis: 100%; font-size: var(--t-chico); font-weight: 600; color: var(--tinta-suave); }
.con-js .servicio[data-cerrado] { display: none; }
@media (min-width: 56rem) { .servicio { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } .servicio .acciones { grid-column: 1 / -1; } }
.seccion--fotos .mosaico { margin-top: 0; }

/* ---------- WhatsApp flotante ---------- */
.wsp { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 25; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #25d366; color: #fff; box-shadow: 0 10px 24px -10px rgb(0 0 0 / 0.5); transition: transform 160ms var(--salida); }
.wsp:hover { transform: scale(1.06); }
.wsp svg { width: 1.9rem; height: 1.9rem; }
.pie { padding-bottom: 5.5rem; } /* que el botón no tape la firma ni los enlaces del pie */
@media print { .wsp { display: none; } }

/* ---------- Noticias (/noticias/): lista y página de cada noticia. Las arma noticias/index.php ---------- */
.fecha { font-size: var(--t-chico); font-weight: 600; color: var(--tinta-suave); }
.noticias { display: grid; gap: var(--e-7); }
@media (min-width: 44rem) { .noticias { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-7) var(--e-6); } }
@media (min-width: 68rem) { .noticias { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.noticias__item { display: grid; gap: var(--e-4); align-content: start; }
.noticias__foto { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--radio); background: var(--niebla); }
.noticias__foto img { width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--salida); }
.noticias__item:hover .noticias__foto img { transform: scale(1.03); }
.noticias__texto { display: grid; gap: var(--e-2); }
.noticias__texto h2 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.01em; }
.noticias__texto h2 a { color: var(--tinta); text-decoration: none; }
.noticias__texto h2 a:hover { text-decoration: underline; text-decoration-thickness: 0.09em; }
.noticias__paginas { margin-top: var(--e-7); justify-content: space-between; }
.noticias-vacio { display: grid; gap: var(--e-4); max-width: 40rem; }
.noticias-vacio h2 { font-size: var(--t-h3); line-height: 1.2; }
.noticia .cabecera h1 { max-width: 24ch; font-size: clamp(1.75rem, 1.15rem + 2.6vw, 3.25rem); }
.noticia .cabecera .bajada { max-width: 44ch; }
.noticia__cuerpo { display: grid; gap: var(--e-6); }
.noticia__cuerpo > * { max-width: 46rem; }
.noticia__foto img { width: 100%; border-radius: var(--radio); }
.aviso--previa { background: var(--amarillo); max-width: 46rem; }
.aviso--previa svg { color: var(--tinta); }
.aviso--previa a { color: var(--tinta); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .noticias__item:hover .noticias__foto img { transform: none; } }

/* Textos que el panel permite dejar vacíos: si quedan vacíos no ocupan lugar */
.fila__dato:empty, .servicio__nota:empty, .pila > p:empty { display: none; }

/* Listas con título en cada punto (Fundación, Cómo trabajamos) */
.marcas--titulos strong { display: block; font-family: var(--titulos); font-weight: 600; font-size: 1.125rem; line-height: 1.25; margin-bottom: var(--e-1); }
.marcas--titulos li { font-size: var(--t-base); }

/* Personas (Nosotros): foto 4:5 con radio, nombre en Gabarito, cargo en el estilo de dato y una línea de qué hace */
.personas { display: grid; gap: var(--e-6) var(--e-5); margin-top: var(--e-6); }
@media (min-width: 40rem) { .personas--tres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .personas--tres { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e-6); } }
.personas--chicas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-5) var(--e-4); }
@media (min-width: 40rem) { .personas--chicas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .personas--chicas { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.persona { display: grid; gap: var(--e-2); align-content: start; }
.persona__foto { margin: 0 0 var(--e-2); }
.persona__foto img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radio); background: var(--niebla); }
.persona h3 { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); font-weight: 700; }
.persona--chica h3 { font-size: 1.125rem; }
.persona--chica p { font-size: var(--t-chico); }
.comunidad__cabeza { max-width: 44rem; }
/* En celular el equipo va con la foto al costado: a todo el ancho se veía gigante */
@media (max-width: 39.99rem) {
  .personas--tres .persona { grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: var(--e-4); align-items: start; }
  .personas--tres .persona__foto { grid-row: 1 / span 3; margin: 0; }
}

/* Lema dentro de «¿Por qué El Avellano?» */
.cita-lema { font-family: var(--titulos); font-weight: 700; font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.25rem); line-height: 1.12; letter-spacing: -0.02em; color: var(--azul-texto); margin-top: var(--e-2); }

/* Logos de instituciones */
.instituciones { margin-top: var(--e-8); padding-top: var(--e-6); border-top: 1px solid var(--linea); }
.instituciones h3 { font-size: var(--t-chico); font-family: var(--texto); font-weight: 600; color: var(--tinta-suave); }
.instituciones ul { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e-5) var(--e-8); margin-top: var(--e-4); }
.instituciones img { display: block; height: 48px; width: auto; }

/* Cabecera con foto de grupo: arco apaisado */
@media (min-width: 40rem) { .cabecera__marco--ancho { max-width: 34rem; } }
.cabecera__marco--ancho .cabecera__foto { aspect-ratio: 4 / 3; }
