/* ============================================================
   COLEGIO ALFONSO LÓPEZ PUMAREJO — Sistema de diseño 2026
   Sitio público · HTML5 + CSS3 puro (sin frameworks)
   Estilo: limpio y moderno (referencia Linear/Vercel/shadcn)
   Identidad: verde #1B5E20 + amarillo #F9A825 (solo acentos)
   Tipografías: Sora (títulos) + Inter Tight (cuerpo), Google Fonts
   Enfoque: mobile-first, breakpoints 480 / 768 / 1024
   ============================================================ */

/* ---------- 1. Tokens del sistema ---------- */
:root {
  /* Escala monocromática del verde institucional */
  --verde-50:  #E8F5E9;
  --verde-100: #C8E6C9;
  --verde-200: #A5D6A7;
  --verde-700: #388E3C;
  --verde-800: #1B5E20;   /* color de marca */
  --verde-900: #0D3B11;
  --tinta:      #0D2818;  /* verde-negro: texto y footer */

  --amarillo:      #F9A825;  /* SOLO acentos puntuales */
  --amarillo-700:  #F57F17;
  --amarillo-suave:#FFF7E0;

  --fondo:     #F4F8F4;  /* nunca blanco puro */
  --superficie:#FDFEFD;  /* tarjetas, casi blanco cálido */
  --borde:     #DCE7DC;
  --borde-suave:#E4EDE4;

  --texto:    #0D2818;
  --texto-2:  rgba(13, 40, 24, 0.62);
  --texto-3:  rgba(13, 40, 24, 0.45);

  --error: #B3261E;
  --exito: #2E7D32;

  /* Sombras mínimas, estilo editorial limpio */
  --sombra-1: 0 1px 2px rgba(13, 40, 24, 0.05);
  --sombra-2: 0 8px 24px rgba(13, 40, 24, 0.09);
  --sombra-3: 0 18px 44px rgba(13, 40, 24, 0.14);

  /* Radios consistentes */
  --radio-s: 10px;    /* inputs y botones */
  --radio:   14px;    /* tarjetas */
  --radio-l: 20px;    /* modales y paneles */
  --radio-pill: 999px;

  --max-ancho: 1140px;

  --fuente-titulos: "Sora", "Segoe UI", system-ui, sans-serif;
  --fuente-cuerpo: "Inter Tight", "Inter", "Segoe UI", system-ui,
                   -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 90px; /* compensa el header sticky */
}

body {
  font-family: var(--fuente-cuerpo);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--fuente-titulos);
  color: var(--texto);
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

img, svg, video {
  max-width: 100%;
  display: block;
}

a {
  color: var(--verde-700);
  text-decoration: none;
}

a:hover {
  color: var(--verde-800);
}

::selection {
  background: var(--verde-800);
  color: var(--verde-50);
}

ul, ol {
  list-style-position: inside;
}

/* ---------- 3. Accesibilidad ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--verde-800);
  color: #fff;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 var(--radio-s) 0;
  z-index: 500;
}

.skip-link:focus {
  left: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--amarillo);
  outline-offset: 2px;
  border-radius: 4px;
}

.solo-lectores {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- 4. Utilidades de layout ---------- */
.contenedor {
  width: 100%;
  max-width: var(--max-ancho);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.seccion {
  padding: 3.5rem 0;
}

.seccion--suave {
  background: var(--verde-50);
  border-block: 1px solid var(--borde);
}

.seccion--amarilla {
  background: var(--amarillo-suave);
  border-block: 1px solid #F3E3B3;
}

.seccion-titulo {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--texto);
  margin-bottom: 0.45rem;
}

/* Subrayado amarillo institucional de títulos */
.seccion-titulo::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  border-radius: 2px;
  background: var(--amarillo);
  margin-top: 0.65rem;
}

.seccion-subtitulo {
  color: var(--texto-2);
  margin-bottom: 2.2rem;
  max-width: 640px;
  font-size: 1.02rem;
}

.texto-centrado {
  text-align: center;
}

.texto-centrado .seccion-titulo::after {
  margin-left: auto;
  margin-right: auto;
}

.texto-centrado .seccion-subtitulo {
  margin-left: auto;
  margin-right: auto;
}

/* Palabra clave subrayada en amarillo (titulares grandes) */
.subrayado {
  background: linear-gradient(var(--amarillo), var(--amarillo)) left 92% / 100% 0.22em no-repeat;
  padding-bottom: 0.1em;
}

/* Marco para fotografías editoriales */
.marco-foto {
  border-radius: var(--radio);
  border: 1px solid var(--borde);
  box-shadow: var(--sombra-2);
  width: 100%;
  object-fit: cover;
}

/* ---------- 5. Pills / badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.85rem;
  border-radius: var(--radio-pill);
  background: var(--verde-50);
  color: var(--verde-800);
  border: 1px solid rgba(27, 94, 32, 0.14);
}

.pill--amarillo {
  background: var(--amarillo-suave);
  color: #6B5A1E;
  border-color: rgba(249, 168, 37, 0.45);
}

/* ---------- 6. Botones ---------- */
.boton {
  display: inline-block;
  font-family: var(--fuente-cuerpo);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radio-s);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease,
              box-shadow 0.2s ease, border-color 0.2s ease;
}

.boton:hover,
.boton:focus-visible {
  text-decoration: none;
}

.boton--primario {
  background: var(--verde-800);
  color: #fff;
  box-shadow: var(--sombra-1);
}

.boton--primario:hover,
.boton--primario:focus-visible {
  background: #16601B;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(13, 40, 24, 0.18);
}

.boton--secundario {
  background: transparent;
  color: var(--verde-800);
  border-color: rgba(27, 94, 32, 0.45);
}

.boton--secundario:hover,
.boton--secundario:focus-visible {
  background: var(--verde-50);
  border-color: var(--verde-800);
  color: var(--verde-900);
}

/* Botón claro sobre fondos verde oscuro */
.boton--claro {
  background: #F4F8F4;
  color: var(--verde-900);
}

.boton--claro:hover,
.boton--claro:focus-visible {
  background: #fff;
  color: #0D3B11;
  transform: translateY(-1px);
}

/* Compatibilidad con clases anteriores */
.boton--amarillo {
  background: var(--amarillo);
  color: #3B2A05;
}

.boton--amarillo:hover,
.boton--amarillo:focus-visible {
  background: var(--amarillo-700);
  color: #fff;
}

.boton--contorno {
  background: transparent;
  color: var(--verde-900);
  border-color: rgba(27, 94, 32, 0.35);
}

.boton--contorno:hover {
  background: var(--verde-50);
}

.boton--borde-verde {
  background: transparent;
  color: var(--verde-800);
  border-color: rgba(27, 94, 32, 0.45);
}

.boton--borde-verde:hover,
.boton--borde-verde:focus-visible {
  background: var(--verde-50);
  border-color: var(--verde-800);
}

/* ---------- 7. Banner superior + barra de contacto ---------- */
.aviso-banner {
  background: var(--amarillo);
  color: #3B2A05;
  padding: 0.55rem 0;
  font-size: 0.9rem;
}

.aviso-banner .contenedor {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}

.aviso-banner button {
  background: var(--verde-900);
  color: var(--verde-50);
  border: none;
  border-radius: var(--radio-pill);
  padding: 0.32rem 1.1rem;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.aviso-banner button:hover {
  background: var(--verde-800);
}

.barra-superior {
  display: none; /* visible desde 768px */
  background: var(--verde-900);
  color: var(--verde-100);
  font-size: 0.8rem;
  padding: 0.38rem 0;
}

.barra-superior .contenedor {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- 8. Header sticky con blur ---------- */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(244, 248, 244, 0.85);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  border-bottom: 1px solid var(--borde);
  transition: box-shadow 0.25s ease;
}

/* Clase que añade JS al hacer scroll (>10px) */
.cabecera.elevado {
  box-shadow: 0 6px 22px rgba(13, 40, 24, 0.08);
}

.cabecera-principal {
  position: relative; /* ancla el menú móvil desplegable */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 0;
}

.marca {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--texto);
  min-width: 0;
}

.marca img {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 11px;
  border: 1px solid var(--borde);
  box-shadow: var(--sombra-1);
  object-fit: cover;
  background: #fff;
}

.marca-nombre {
  font-family: var(--fuente-titulos);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  color: var(--verde-900);
  letter-spacing: -0.01em;
}

.marca-nombre small {
  display: block;
  font-family: var(--fuente-cuerpo);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--texto-2);
  letter-spacing: 0;
}

/* Botón hamburguesa (solo móvil) */
.nav-boton {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 46px;
  height: 46px;
  padding: 11px;
  background: transparent;
  border: 1.5px solid var(--borde);
  border-radius: var(--radio-s);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.nav-boton:hover {
  border-color: var(--verde-700);
  background: var(--verde-50);
}

.nav-boton span {
  display: block;
  width: 100%;
  height: 2.5px;
  border-radius: 2px;
  background: var(--verde-900);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-boton[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-boton[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-boton[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Menú móvil: panel desplegable con animación suave (transform) */
.nav-principal {
  position: absolute;
  top: calc(100% + 1px);
  left: -1.25rem;   /* compensa el padding del contenedor */
  right: -1.25rem;
  background: rgba(253, 254, 253, 0.97);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--borde);
  box-shadow: 0 18px 30px rgba(13, 40, 24, 0.10);
  opacity: 0;
  transform: translateY(-10px);
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.nav-principal.abierto {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  pointer-events: auto;
}

.nav-principal ul {
  list-style: none;
  padding: 0.6rem 1.25rem 1rem;
}

.nav-principal a {
  display: block;
  color: var(--texto);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radio-s);
  transition: background 0.18s, color 0.18s;
}

.nav-principal a:hover,
.nav-principal a:focus-visible {
  background: var(--verde-50);
  color: var(--verde-800);
  text-decoration: none;
}

.nav-principal a.activo {
  background: var(--verde-50);
  color: var(--verde-800);
}

.nav-principal a.destacado {
  background: var(--verde-800);
  color: #fff;
  margin-top: 0.4rem;
  text-align: center;
}

.nav-principal a.destacado:hover,
.nav-principal a.destacado:focus-visible {
  background: #16601B;
  color: #fff;
}

/* ---------- 9. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--verde-50) 0%, var(--fondo) 100%);
  border-bottom: 1px solid var(--borde);
}

/* Patrón de rejilla ligero */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(27, 94, 32, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 94, 32, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.4;
  mask-image: linear-gradient(#000 55%, transparent 95%);
  -webkit-mask-image: linear-gradient(#000 55%, transparent 95%);
  pointer-events: none;
}

.hero-contenido {
  position: relative;
  display: grid;
  gap: 2.4rem;
  padding: 3.2rem 0 3.6rem;
}

.hero-eyebrow {
  display: inline-block;
  align-self: flex-start;
  background: #fff;
  color: var(--verde-800);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.32rem 0.95rem;
  border-radius: var(--radio-pill);
  border: 1px solid var(--borde);
  box-shadow: var(--sombra-1);
  margin-bottom: 1.2rem;
}

.hero-titulo {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-texto {
  font-size: 1.08rem;
  color: var(--texto-2);
  max-width: 54ch;
  margin-bottom: 1.8rem;
}

.hero-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.6rem;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* Fotografía del hero con escudo institucional */
.hero-figura {
  position: relative;
  align-self: center;
  width: 100%;
}

.hero-figura img.foto {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radio-l);
  border: 1px solid var(--borde);
  box-shadow: var(--sombra-3);
}

.hero-escudo {
  position: absolute;
  left: 1.3rem;
  bottom: -1.6rem;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  object-fit: cover;
  background: #fff;
  border: 3px solid #fff;
  box-shadow: var(--sombra-2);
}

/* ---------- 10. Tarjetas ---------- */
.tarjeta {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tarjeta:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-2);
  border-color: var(--verde-100);
}

.tarjeta-imagen {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--verde-100);
  border-bottom: 1px solid var(--borde-suave);
}

.tarjeta-cuerpo {
  padding: 1.25rem 1.3rem 1.4rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  align-items: flex-start;
}

.tarjeta-etiqueta {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--verde-50);
  color: var(--verde-800);
  border: 1px solid rgba(27, 94, 32, 0.14);
  border-radius: var(--radio-pill);
  padding: 0.16rem 0.75rem;
}

.tarjeta-titulo {
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--texto);
  line-height: 1.35;
}

.tarjeta-texto {
  color: var(--texto-2);
  font-size: 0.94rem;
  flex: 1;
}

.tarjeta-fecha {
  font-size: 0.8rem;
  color: var(--texto-3);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.rejilla {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
}

/* ---------- 11. Accesos rápidos ---------- */
.accesos {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

.acceso {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  text-align: center;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-1);
  padding: 1.35rem 0.8rem 1.2rem;
  font-family: var(--fuente-titulos);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--texto);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.acceso:hover,
.acceso:focus-visible {
  text-decoration: none;
  color: var(--verde-800);
  transform: translateY(-3px);
  box-shadow: var(--sombra-2);
  border-color: var(--verde-100);
}

.acceso-icono {
  width: 54px;
  height: 54px;
  border-radius: var(--radio);
  background: var(--verde-50);
  border: 1px solid rgba(27, 94, 32, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* ---------- 12. Pilares (misión / visión / valores) ---------- */
.pilares {
  display: grid;
  gap: 1.4rem;
  grid-template-columns: 1fr;
}

.pilar {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-top: 3px solid var(--amarillo);
  border-radius: var(--radio);
  box-shadow: var(--sombra-1);
  padding: 1.8rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pilar:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-2);
}

.pilar-icono {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--verde-50);
  border: 1px solid rgba(27, 94, 32, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
}

.pilar h3 {
  font-size: 1.18rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pilar p {
  color: var(--texto-2);
  font-size: 0.96rem;
}

/* ---------- 13. Franja de datos (cifras con count-up) ---------- */
.franja-datos {
  background: linear-gradient(135deg, var(--verde-900) 0%, #10431A 100%);
  color: #fff;
  padding: 2.6rem 0;
  position: relative;
  overflow: hidden;
}

.franja-datos::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 245, 233, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 245, 233, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.franja-datos .rejilla {
  gap: 1.8rem;
}

.dato {
  text-align: center;
  position: relative;
}

.dato-numero {
  font-family: var(--fuente-titulos);
  font-size: clamp(2.1rem, 4vw, 2.7rem);
  font-weight: 700;
  color: #F4F8F4;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.dato-numero .sufijo {
  color: var(--amarillo);
  font-weight: 700;
}

.dato-texto {
  font-size: 0.9rem;
  color: rgba(200, 230, 201, 0.85);
  margin-top: 0.3rem;
}

/* ---------- 14. Contenido editorial ---------- */
.dos-columnas {
  display: grid;
  gap: 2.2rem;
  align-items: start;
}

.articulo h2 {
  margin: 1.6rem 0 0.6rem;
}

.articulo h3 {
  font-size: 1.15rem;
  margin: 1.4rem 0 0.5rem;
}

.articulo p {
  margin-bottom: 1rem;
  color: rgba(13, 40, 24, 0.78);
}

.articulo strong {
  color: var(--texto);
}

.articulo ul,
.articulo ol {
  margin: 0 0 1rem 1.2rem;
  color: rgba(13, 40, 24, 0.78);
}

/* Bloque de símbolos institucionales */
.simbolo-caja {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}

.simbolo-caja img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radio);
  border: 4px solid #fff;
  outline: 1px solid var(--borde);
  box-shadow: var(--sombra-2);
}

/* ---------- 15. Tablas ---------- */
.tabla-wrap {
  overflow-x: auto;
  border-radius: var(--radio);
  border: 1px solid var(--borde);
  box-shadow: var(--sombra-1);
  margin: 1rem 0 1.6rem;
  background: var(--superficie);
}

table.tabla {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 0.95rem;
}

table.tabla caption {
  caption-side: top;
  text-align: left;
  font-family: var(--fuente-titulos);
  font-weight: 600;
  color: var(--texto);
  padding: 0.9rem 1.1rem 0.5rem;
}

table.tabla th,
table.tabla td {
  text-align: left;
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--borde-suave);
}

table.tabla thead th {
  background: var(--verde-50);
  color: var(--verde-900);
  font-family: var(--fuente-titulos);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

table.tabla tbody tr:last-child th,
table.tabla tbody tr:last-child td {
  border-bottom: none;
}

table.tabla tbody tr:hover {
  background: var(--fondo);
}

/* ---------- 16. Pasos de proceso ---------- */
.pasos {
  counter-reset: paso;
  display: grid;
  gap: 1.2rem;
}

.paso {
  position: relative;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-1);
  padding: 1.5rem 1.4rem 1.4rem 4.6rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.paso:hover {
  transform: translateY(-3px);
  box-shadow: var(--sombra-2);
}

.paso::before {
  counter-increment: paso;
  content: counter(paso);
  position: absolute;
  left: 1.1rem;
  top: 1.35rem;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--verde-800);
  color: #fff;
  font-family: var(--fuente-titulos);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(27, 94, 32, 0.28);
}

.paso h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.paso p {
  color: var(--texto-2);
  font-size: 0.93rem;
}

/* ---------- 17. Galería ---------- */
.galeria {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
}

.galeria-item {
  position: relative;
  border-radius: var(--radio);
  border: 1px solid var(--borde);
  overflow: hidden;
  box-shadow: var(--sombra-1);
  cursor: zoom-in;
  padding: 0;
  border-width: 1px;
  background: var(--verde-100);
  display: block;
  width: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.galeria-item:hover,
.galeria-item:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--sombra-2);
}

.galeria-item img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.galeria-item:hover img,
.galeria-item:focus-visible img {
  transform: scale(1.05);
}

.galeria-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(transparent, rgba(13, 59, 17, 0.88));
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 2.2rem 1rem 0.85rem;
  text-align: left;
}

/* ---------- 18. Lightbox ---------- */
.visor {
  position: fixed;
  inset: 0;
  background: rgba(13, 40, 24, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.5rem;
  z-index: 400;
}

.visor.abierto {
  display: flex;
}

.visor img {
  max-width: min(92vw, 960px);
  max-height: 74vh;
  border-radius: var(--radio-l);
  border: 1px solid rgba(232, 245, 233, 0.2);
  box-shadow: var(--sombra-3);
  animation: visor-entrada 0.28s ease;
}

@keyframes visor-entrada {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.visor-leyenda {
  color: var(--verde-50);
  font-weight: 600;
}

.visor-cerrar {
  position: absolute;
  top: 1.1rem;
  right: 1.2rem;
  background: var(--amarillo);
  color: #3B2A05;
  border: none;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.visor-cerrar:hover {
  background: var(--amarillo-700);
  color: #fff;
  transform: rotate(90deg);
}

/* ---------- 19. Carrusel ---------- */
.carrusel {
  position: relative;
}

.carrusel-ventana {
  overflow: hidden;
  margin: 0 -0.2rem;
  padding: 0.2rem;
}

.carrusel-pista {
  display: flex;
  gap: 1.4rem;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.carrusel-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: flex;
}

.carrusel-slide .tarjeta {
  width: 100%;
}

.carrusel-puntos {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
}

.carrusel-punto {
  width: 9px;
  height: 9px;
  padding: 0;
  border: none;
  border-radius: var(--radio-pill);
  background: var(--verde-100);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.carrusel-punto:hover {
  background: var(--verde-200);
}

.carrusel-punto.activo {
  width: 26px;
  background: var(--verde-800);
}

/* ---------- 20. Formularios ---------- */
.formulario {
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-1);
  padding: 1.9rem 1.6rem;
}

.campo {
  margin-bottom: 1.15rem;
}

.campo label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.campo .obligatorio {
  color: var(--error);
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--texto);
  background: #FBFDFB;
  border: 1.5px solid var(--borde);
  border-radius: var(--radio-s);
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--verde-700);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.16);
}

.campo textarea {
  resize: vertical;
  min-height: 120px;
}

.campo-ayuda {
  font-size: 0.8rem;
  color: var(--texto-2);
  margin-top: 0.35rem;
}

.campo-error {
  font-size: 0.8rem;
  color: var(--error);
  font-weight: 600;
  margin-top: 0.3rem;
  display: none;
}

.campo.invalido input,
.campo.invalido select,
.campo.invalido textarea {
  border-color: var(--error);
  background: #FDF2F1;
}

.campo.invalido .campo-error {
  display: block;
}

.formulario-mensaje {
  border-radius: var(--radio-s);
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: none;
}

.formulario-mensaje.exito {
  display: block;
  background: var(--verde-50);
  border: 1px solid rgba(46, 125, 50, 0.25);
  color: var(--exito);
}

.formulario-mensaje.error {
  display: block;
  background: #FDF2F1;
  border: 1px solid rgba(179, 38, 30, 0.2);
  color: var(--error);
}

.campo-check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.campo-check input {
  width: auto;
  margin-top: 0.35rem;
}

/* ---------- 21. Cajas de contacto ---------- */
.caja-info {
  display: grid;
  gap: 1.1rem;
}

.caja-info-item {
  display: flex;
  gap: 0.95rem;
  align-items: flex-start;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra-1);
  padding: 1.15rem 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.caja-info-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--sombra-2);
}

.caja-info-icono {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--verde-50);
  border: 1px solid rgba(27, 94, 32, 0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.caja-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.caja-info p {
  color: var(--texto-2);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.mapa-placeholder {
  border-radius: var(--radio);
  overflow: hidden;
  border: 1px solid var(--borde);
  box-shadow: var(--sombra-1);
  background: var(--superficie);
}

/* ---------- 22. Login de la plataforma ---------- */
.login-caja {
  max-width: 480px;
  margin: 0 auto;
  background: var(--superficie);
  border: 1px solid var(--borde);
  border-radius: var(--radio-l);
  box-shadow: var(--sombra-2);
  padding: 2.3rem 1.9rem;
  position: relative;
}

.login-caja .logo-login {
  margin: 0 auto 1.1rem;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  object-fit: cover;
  border: 3px solid #fff;
  outline: 1px solid var(--borde);
  box-shadow: var(--sombra-2);
}

.login-credenciales {
  background: var(--verde-50);
  border: 1px solid rgba(27, 94, 32, 0.12);
  border-radius: var(--radio-s);
  padding: 1rem 1.1rem;
  font-size: 0.86rem;
  margin-top: 1.5rem;
}

.login-credenciales code {
  background: #fff;
  padding: 0.1rem 0.42rem;
  border-radius: 6px;
  border: 1px solid var(--borde);
  font-size: 0.84em;
}

/* ---------- 23. Avisos ---------- */
.aviso {
  border-left: 4px solid var(--amarillo);
  background: var(--amarillo-suave);
  border-radius: var(--radio-s);
  padding: 0.95rem 1.15rem;
  margin: 1rem 0;
  font-size: 0.93rem;
}

.aviso--verde {
  border-left-color: var(--verde-700);
  background: var(--verde-50);
}

/* ---------- 24. Panel CTA oscuro ---------- */
.panel-cta {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--verde-900) 0%, #134916 100%);
  border-radius: var(--radio-l);
  padding: 3.2rem 1.5rem;
  text-align: center;
  box-shadow: var(--sombra-2);
}

.panel-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 245, 233, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 245, 233, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}

.panel-cta > * {
  position: relative;
}

.panel-cta h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.6rem;
}

.panel-cta p {
  color: rgba(200, 230, 201, 0.9);
  max-width: 620px;
  margin: 0 auto 1.8rem;
}

/* ---------- 25. Pie de página ---------- */
.pie {
  background: var(--tinta);
  color: var(--verde-100);
  padding: 3rem 0 0;
  margin-top: 3.5rem;
}

.pie-rejilla {
  display: grid;
  gap: 1.9rem;
  grid-template-columns: 1fr;
  padding-bottom: 1.8rem;
}

.pie .marca {
  margin-bottom: 0.9rem;
}

.pie .marca img {
  border-color: rgba(232, 245, 233, 0.25);
  background: var(--tinta);
}

.pie .marca-nombre {
  color: #fff;
}

.pie .marca-nombre small {
  color: rgba(200, 230, 201, 0.7);
}

.pie h3 {
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pie h3::after {
  content: "";
  display: block;
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background: var(--amarillo);
  margin-top: 0.4rem;
}

.pie ul {
  list-style: none;
}

.pie a {
  color: var(--verde-100);
}

.pie a:hover,
.pie a:focus-visible {
  color: var(--amarillo);
}

.pie-texto {
  font-size: 0.9rem;
  color: rgba(200, 230, 201, 0.85);
}

.pie-legal {
  border-top: 1px solid rgba(232, 245, 233, 0.12);
  padding: 1.15rem 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(200, 230, 201, 0.65);
}

/* ---------- 26. Páginas internas ---------- */
.miga {
  font-size: 0.85rem;
  color: var(--texto-2);
  margin-bottom: 0.9rem;
}

.miga a {
  color: var(--verde-700);
  font-weight: 600;
}

.pagina-encabezado {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--verde-50) 0%, var(--fondo) 100%);
  border-bottom: 1px solid var(--borde);
  padding: 2.6rem 0 2.9rem;
}

.pagina-encabezado::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(27, 94, 32, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 94, 32, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  opacity: 0.4;
  mask-image: linear-gradient(#000 45%, transparent 92%);
  -webkit-mask-image: linear-gradient(#000 45%, transparent 92%);
  pointer-events: none;
}

.pagina-encabezado .contenedor {
  position: relative;
}

.pagina-encabezado h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 700;
}

.pagina-encabezado p {
  color: var(--texto-2);
  max-width: 640px;
  margin-top: 0.6rem;
  font-size: 1.04rem;
}

/* ---------- 27. Animaciones de aparición (scroll reveal) ---------- */
/* Solo se ocultan los elementos si JS está activo (clase .js en <html>) */
.js .revelar {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--retraso, 0ms);
}

.js .revelar.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   BREAKPOINTS — mobile-first
   ============================================================ */

/* ---- 480px: teléfonos grandes ---- */
@media (min-width: 480px) {
  .galeria {
    grid-template-columns: repeat(2, 1fr);
  }

  .accesos {
    grid-template-columns: repeat(3, 1fr);
  }

  .pasos {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---- 768px: tablet ---- */
@media (min-width: 768px) {
  .rejilla {
    grid-template-columns: repeat(2, 1fr);
  }

  .pilares {
    grid-template-columns: repeat(3, 1fr);
  }

  .galeria {
    grid-template-columns: repeat(3, 1fr);
  }

  .caja-info {
    grid-template-columns: repeat(2, 1fr);
  }

  .pie-rejilla {
    grid-template-columns: repeat(2, 1fr);
  }

  .dos-columnas {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 2.6rem;
  }

  .hero-contenido {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    padding: 4rem 0 4.4rem;
  }

  .hero-figura img.foto {
    height: 420px;
  }

  .carrusel-slide {
    flex-basis: calc(50% - 0.7rem);
  }

  .barra-superior {
    display: block;
  }

  /* Menú horizontal: desaparece el botón hamburguesa */
  .nav-boton {
    display: none;
  }

  .nav-principal {
    position: static;
    opacity: 1;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    width: auto;
  }

  .nav-principal ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
    padding: 0;
  }

  .nav-principal a {
    padding: 0.48rem 0.85rem;
    font-size: 0.94rem;
    border-radius: var(--radio-s);
  }

  .nav-principal a.destacado {
    margin: 0 0 0 0.5rem;
    padding: 0.55rem 1.2rem;
  }
}

/* ---- 1024px: escritorio ---- */
@media (min-width: 1024px) {
  .rejilla {
    grid-template-columns: repeat(3, 1fr);
  }

  .accesos {
    grid-template-columns: repeat(5, 1fr);
  }

  .galeria {
    grid-template-columns: repeat(4, 1fr);
  }

  .pie-rejilla {
    grid-template-columns: repeat(4, 1fr);
  }

  .pasos {
    grid-template-columns: repeat(4, 1fr);
  }

  .dos-columnas {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .carrusel-slide {
    flex-basis: calc(33.3333% - 0.94rem);
  }

  .seccion {
    padding: 4.2rem 0;
  }
}

/* ---------- Preferencias de accesibilidad ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }

  .js .revelar {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Impresión ---------- */
@media print {
  .cabecera,
  .pie,
  .nav-boton,
  .aviso-banner,
  .barra-superior,
  .skip-link,
  .carrusel-puntos {
    display: none !important;
  }

  body {
    background: #fff;
    font-size: 12pt;
  }
}
