﻿/* ==================================================================
   BOMBEROS VUELTA DE ROCHA — V4 ELITE DESIGN SYSTEM
   Sistema de diseño institucional premium para cuerpo de bomberos.
   ================================================================== */

/* ==================================================================
   1. DESIGN TOKENS — CSS Custom Properties
   ================================================================== */
:root {
  /* ——— Colores institucionales ——— */
  --rojo: #CE2B37;
  --rojo-700: #A81F29;
  --rojo-800: #8A1922;
  --rojo-900: #6B131B;
  --rojo-luz: rgba(206, 43, 55, 0.6);
  --rojo-50: rgba(206, 43, 55, 0.08);

  /* ——— Variante funcional: rojo legible sobre fondos oscuros ——— */
  /* Estrategia de color §2 y §5: #FF6572 sobre grafito = 5,93:1, para
     enlaces y etiquetas pequeñas sobre oscuro. NO reemplaza al rojo de
     marca: es una variante de legibilidad. */
  --rojo-texto-oscuro: #FF6572;

  --verde: #009246;
  --verde-700: #00723A;
  --verde-800: #005B2E;
  --verde-luz: rgba(0, 146, 70, 0.5);

  /* ——— Nueva paleta V4 ——— */
  --negro-carbono: #0D0D0D;
  --grafito: #1A1D20;
  --grafito-800: #22262A;
  --acero: #2C3035;
  --acero-600: #3A3F45;
  --marfil: #F5F3EF;
  --marfil-100: #EDEBE6;
  --marfil-200: #E3E1DB;
  --plata: #C8CCD0;
  --plata-300: #B0B5BA;
  --plata-500: #8A9096;
  --azul-tecnico: #1B2A4A;
  --azul-tecnico-600: #15223D;
  --azul-tecnico-luz: rgba(27, 42, 74, 0.12);

  /* ——— Celeste patrio — del escudo oficial (círculo y moño) ——— */
  --celeste: #74ACDF;
  --celeste-600: #5B94C9;
  --celeste-luz: rgba(116, 172, 223, 0.15);

  /* ——— Paleta Gentleman ——— */
  --bordeaux: #7A2E3A;
  --bordeaux-600: #5F232D;
  --oro: #C9A94E;
  --oro-300: #D4BA6A;
  --oro-700: #A88A32;
  --oro-luz: rgba(201, 169, 78, 0.15);
  --marfil-claro: #FAF8F4;
  --marfil-oscuro: #E8E4DC;
  --gris-elegante: #6B6F75;
  --gris-elegante-300: #9DA1A6;

  /* ——— Neutros funcionales ——— */
  --blanco: #FFFFFF;
  --blanco-95: rgba(255, 255, 255, 0.95);
  --blanco-80: rgba(255, 255, 255, 0.8);
  --negro: #000000;
  --negro-80: rgba(0, 0, 0, 0.8);
  --negro-60: rgba(0, 0, 0, 0.6);
  --negro-40: rgba(0, 0, 0, 0.4);
  --negro-20: rgba(0, 0, 0, 0.2);
  --negro-10: rgba(0, 0, 0, 0.1);

  /* ——— Tipografía — EXACTAMENTE 2 fuentes:
        Barlow Condensed (títulos/display) + DM Sans (cuerpo y resto).
        --font-mono se conserva SOLO para kickers/labels técnicos (var(--font-mono)):
        apunta a mono de sistema (Cascadia/JetBrains/Fira NO son webfonts cargadas),
        por lo que NO agrega una 3ª fuente a la descarga → no viola las 2 fuentes.
        --font-serif y --font-body-serif se eliminaron (apuntaban a lo mismo que display). ——— */
  --font-display: 'Barlow Condensed', Impact, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  /* ——— Escala tipográfica FLUIDA — Perfect Fourth (1.333) ———
     Fórmula: cada paso = paso mayor ÷ 1.333. Saltos más contenidos y
     elegantes que la anterior razón áurea (1.618).
     FLUIDEZ REAL: min=escala móvil (más chico) → max=escala desktop (actual).
     Interpolación lineal "min + K·vw": vale K tal que max se alcanza a ~1500px
     (K = (max_rem - min_rem) / 15 porque 15 = (1500/100)vw).
     Los tokens xs→3sm permanecen en su valor (piso legible): no conviene
     encogerlos aún más en móvil. */
  
  --text-xs: 0.375rem;      /* 6px  — fine print (fijo, piso legible) */
  --text-nano: 0.4375rem;   /* 7px  — micro etiqueta (fijo) */
  --text-3xs: 0.5rem;       /* 8px  — meta ultra small (fijo) */
  --text-2xs: 0.5625rem;    /* 9px  — UI tiny (fijo) */
  --text-sm: 0.625rem;      /* 10px — caption (fijo) */
  --text-2sm: 0.75rem;      /* 12px — badge / kicker (fijo) */
  --text-3sm: 0.875rem;     /* 14px — caption prominente (fijo) */
  --text-base: clamp(0.875rem, calc(0.875rem + 0.133vw), 1rem);        /* 14→16px — piso legible — body */
  --text-md: clamp(1.0625rem, calc(1.0625rem + 0.0208vw), 1.375rem);   /* 17→22px — cuerpo grande / sub */
  --text-lg: clamp(1.25rem, calc(1.25rem + 0.0417vw), 1.875rem);      /* 20→30px — h4 */
  --text-xl: clamp(1.625rem, calc(1.625rem + 0.0542vw), 2.4375rem);  /* 26→39px — h3 */
  --text-2xl: clamp(2.125rem, calc(2.125rem + 0.075vw), 3.25rem);    /* 34→52px — h2 */
  --text-3xl: clamp(2.8125rem, calc(2.8125rem + 0.1vw), 4.3125rem);  /* 45→69px — h1 */

  /* ——— Altura de línea φ — inversamente proporcional al tamaño ——— */
  /* Tipo grande → lh apretado (1.1), tipo pequeño → lh suelto (1.8) */
  --phi-lh-tight: 1.1;      /* display / hero (177-287px) */
  --phi-lh-snug: 1.2;       /* h3-h4 (68-110px) */
  --phi-lh-normal: 1.35;    /* h5-h6 (26-42px) */
  --phi-lh-reading: 1.5;    /* body text (16px) */
  --phi-lh-relaxed: 1.65;   /* small text (10px) */
  --phi-lh-loose: 1.8;      /* fine print (6px) */

  /* ——— Espaciado — Proporción Áurea (φ = 1.618) ——— */
  /* Base: 4px. Cada paso = anterior × 1.618 */
  /* 4→6→10→17→27→44→72→116 */
  
  --space-xs: 6px;       /* 4 × φ     = 6.47 ≈ 6px  — inline gaps */
  --space-sm: 10px;      /* 6 × φ     = 10.47 ≈ 10px — element padding */
  --space-md: 17px;      /* 10 × φ    = 16.94 ≈ 17px — component padding */
  --space-lg: 27px;      /* 17 × φ    = 27.41 ≈ 27px — card padding */
  --space-xl: 44px;      /* 27 × φ    = 44.35 ≈ 44px — section gaps */
  --space-2xl: 72px;     /* 44 × φ    = 71.76 ≈ 72px — major breaks */
  --space-3xl: 116px;    /* 72 × φ    = 116.1 ≈ 116px — hero spacing */
  --space-4xl: 140px;    /* large section padding */
  --space-5xl: 188px;    /* hero spacing extra — φ × 116 = 188px */
  --space-6xl: 140px;    /* large section padding (alias de --space-4xl) */

  /* ——— Contenedor ——— */
  --container: 1319px;
  --container-narrow: 900px;

  /* ——— Radios de borde ——— */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ——— Sombras — dark theme ——— */
  --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5);
  --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-rojo: 0 8px 24px rgba(206, 43, 55, 0.3);
  --shadow-rojo-lg: 0 16px 40px rgba(206, 43, 55, 0.35);
  --shadow-verde: 0 8px 24px rgba(0, 146, 70, 0.25);
  --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-inner-dark: inset 0 1px 0 rgba(255, 255, 255, 0.04);

  /* ——— Animaciones ——— */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 120ms;
  --duration-base: 220ms;
  --duration-slow: 420ms;
  --duration-reveal: 700ms;

  /* ——— Glassmorphism ——— */
  --glass-bg: rgba(26, 29, 32, 0.75);
  --glass-bg-light: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-strong: rgba(255, 255, 255, 0.18);
  --glass-blur: blur(16px);

  /* ——— Bordes iluminados ——— */
  --border-glow-rojo: 0 0 0 1px rgba(206, 43, 55, 0.3);
  --border-glow-verde: 0 0 0 1px rgba(0, 146, 70, 0.25);

  /* ———— Tema oscuro fijo ——— */
  --bg-primary: var(--negro-carbono);
  --bg-secondary: var(--grafito);
  --bg-card: var(--grafito-800);
  --text-primary: var(--marfil);
  --text-secondary: var(--plata-300);
  --text-inverse: var(--blanco);
  --border-color: var(--acero);
  --header-bg: rgba(13, 13, 13, 0.88);
  --hero-overlay: var(--overlay-dark-horizontal);

  /* ——— Aliases semánticos de marca ——— */
  /* Mapean la paleta del proyecto a funciones. Si la marca cambia,
     solo se actualizan estos aliases. */
  --brand-primary: var(--rojo);
  --brand-primary-700: var(--rojo-700);
  --brand-primary-800: var(--rojo-800);
  --brand-primary-luz: var(--rojo-luz);
  --brand-primary-50: var(--rojo-50);
  --brand-secondary: var(--verde);
  --brand-secondary-700: var(--verde-700);
  --brand-secondary-luz: var(--verde-luz);
  --brand-accent: var(--oro);
  --brand-accent-luz: var(--oro-luz);
  --brand-bg: var(--negro-carbono);
  --brand-surface: var(--grafito);
  --brand-surface-800: var(--grafito-800);
  --brand-text: var(--marfil);
  --brand-text-muted: var(--plata-300);
  --brand-text-inverse: var(--blanco);
  --brand-border: var(--acero);
  --brand-info: var(--azul-tecnico);
  --brand-dark: var(--rojo-700);

  /* ——— Alias de acción y enlace — estrategia de color §6.1 ——— */
  /* Alimentan los botones y enlaces compartidos. El tema es oscuro fijo,
     por eso --link-color y --focus-ring apuntan por defecto a la variante
     clara de rojo; las bandas claras futuras los sobrescribirán por
     superficie (--rojo-700 sobre marfil, estrategia §5). */
  --action-bg: var(--brand-primary);
  --action-hover: var(--brand-primary-700);
  --action-text: var(--blanco);
  --link-color: var(--rojo-texto-oscuro);
  --focus-ring: var(--rojo-texto-oscuro);

  /* ——— Aliases para sección contacto/CTC ——— */
  --texto: var(--text-primary);
  --texto-muted: var(--text-secondary);
  --tarjeta: var(--bg-card);
  --borde: var(--border-color);
  --surface: var(--bg-secondary);
  --surface-alt: var(--bg-card);
  --brand: var(--brand-primary);
  --text-muted: var(--text-secondary);

  /* ——— Overlay para imágenes de fondo — WCAG AA ——— */
  /* Texto claro sobre imagen: mínimo 4.5:1 */
  --overlay-dark: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.65) 100%
  );
  /* Texto claro sobre imagen — variante horizontal (hero) */
  --overlay-dark-horizontal: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.88) 0%,
    rgba(0, 0, 0, 0.55) 40%,
    rgba(0, 0, 0, 0.15) 100%
  );
  /* Texto oscuro sobre imagen clara */
  --overlay-light: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.75) 0%,
    rgba(255, 255, 255, 0.92) 100%
  );
  /* Fallback sólido cuando el gradiente no alcanza */
  --overlay-solid-dark: rgba(0, 0, 0, 0.6);
  --overlay-solid-light: rgba(255, 255, 255, 0.85);

  /* ——— Colores de texto garantizados sobre overlays ——— */
  /* Verificación de contraste (WCAG AA):
     #F5F3EF sobre #0D0D0D = 18.3:1 ✓
     #F5F3EF sobre rgba(0,0,0,0.65) = ~12:1 ✓
     #B0B5BA sobre rgba(0,0,0,0.65) = ~7:1 ✓
     #0D0D0D sobre rgba(255,255,255,0.85) = ~14:1 ✓ */
  --text-on-dark: var(--marfil);
  --text-on-dark-muted: var(--plata-300);
  --text-on-light: var(--negro-carbono);

  /* ——— Sombras oscuras (ya integradas arriba) ——— */

  /* ——— Header ——— */
  --nav-link: rgba(255, 255, 255, 0.85);
  --nav-link-hover: var(--blanco);
  --brand-color: var(--marfil);
  --brand-sub: var(--plata-300);
  --header-glass: rgba(13, 13, 13, 0.82);

  /* ——— REFERENCIA: Qué usa φ y qué no ———
     ESPACIADO ESTRUCTURAL (φ):
       --space-xs (6px) → --space-3xl (116px) ✓
       Section padding, card gaps, grid gaps, section margins ✓
     
     MICRO-AJUSTES DE COMPONENTES (NO φ — intencional):
       Botones: padding 16px 32px, 10px 20px, 20px 40px
       Chips/badges: padding 5px 10px, 8px 14px
       Header: padding 13px, 4px
       Cards internas: gap 4px, 5px, 6px, 8px, 10px
       Mobile menu: padding 14px 16px, 80px 32px 32px
       Hero content: padding 160px 0 110px
     
     RAZÓN: El φ gobierna la RITMICA visual (proporción entre
     secciones). Los micro-ajustes sonDecisiones de UI específicas
     que no necesitan seguir la misma escala.
     
     SI UN COMPONENTE NUEVO necesita spacing estructural:
       Usar --space-* tokens (φ).
     SI UN COMPONENTE necesita ajuste fino:
       Valores px directos son aceptables.
  ——————————————————————————————————————————————— */
}

/* ==================================================================
   2. BASE & RESET
   ================================================================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: var(--phi-lh-reading);  /* 1.5 — cómodo para lectura larga */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background var(--duration-slow) var(--ease-out),
              color var(--duration-slow) var(--ease-out);
}

body.home {
  background: var(--bg-primary);
}


img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ==================================================================
   3. TYPOGRAPHY
   ================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  /* ——— Sombra sutil que da profundidad sin romper legibilidad ——— */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ——— Alturas de línea φ: inversamente proporcionales al tamaño ——— */
h1 {
  font-size: var(--text-3xl);
  line-height: var(--phi-lh-tight);
  /* ——— Gradiente rojo→blanco en el texto del hero ——— */
  background: linear-gradient(135deg, var(--marfil) 0%, var(--plata-300) 50%, var(--marfil-100) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}
h2 {
  font-size: var(--text-2xl);
  line-height: var(--phi-lh-snug);
  /* ——— Borde decorativo inferior en h2 de secciones ——— */
  position: relative;
}
h3 {
  font-size: var(--text-xl);
  line-height: var(--phi-lh-snug);
}
h4 {
  font-size: var(--text-lg);
  line-height: var(--phi-lh-normal);
  text-transform: none;
  letter-spacing: 0.02em;
}

/* ——— h2: línea decorativa roja debajo ——— */
.section-head h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  margin-top: 12px;
  background: linear-gradient(90deg, var(--rojo), var(--rojo-700));
  border-radius: 2px;
}

/* ——— h1 em / h2 em: resaltado rojo con glow ——— */
h1 em, h2 em, h3 em {
  font-style: normal;
  color: var(--rojo);
  text-shadow: 0 0 20px rgba(206, 43, 55, 0.4);
}

/* ——— Hero h1: sin gradient, con color sólido y glow ——— */
.hero-content h1 {
  background: none;
  -webkit-text-fill-color: unset;
  color: var(--marfil);
  text-shadow:
    0 0 40px rgba(206, 43, 55, 0.25),
    0 2px 4px rgba(0, 0, 0, 0.5);
  filter: none;
}

p {
  font-size: var(--text-base);
  line-height: var(--phi-lh-reading);  /* 1.5 — φ body reading */
  color: var(--text-secondary);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--rojo);
  margin-bottom: var(--space-md);
}

.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--rojo);
  display: inline-block;
  flex-shrink: 0;
}

.lead {
  font-size: var(--text-md);
  color: var(--text-secondary);
  line-height: var(--phi-lh-reading);  /* 1.5 — φ body reading */
}

.text-gradient {
  background: linear-gradient(135deg, var(--rojo), var(--verde));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--rojo);
  color: var(--blanco);
  padding: 5px 10px;
  border-radius: var(--radius-full);
}

.tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blanco);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.6);
  animation: dotPulse 2s ease-in-out infinite;
}

/* ==================================================================
   4. LAYOUT
   ================================================================== */
.section {
  padding: var(--space-3xl) 0;  /* 116px — φ hero spacing */
  position: relative;
}
.section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.25) 30%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.25) 70%,
    transparent
  );
}

.section--dark {
  background: var(--grafito);
  color: var(--marfil);
}
.section--dark::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 146, 70, 0.3) 30%,
    rgba(0, 146, 70, 0.45) 50%,
    rgba(0, 146, 70, 0.3) 70%,
    transparent
  );
}

.section-head {
  max-width: 720px;
  margin-bottom: var(--space-2xl);  /* 72px — φ major break */
}

.section-head h1,
.section-head h2 {
  color: var(--text-primary);
  font-size: var(--text-2xl);
}

.section-head p {
  margin-top: var(--space-md);
  max-width: 640px;
}

.section--dark .section-head h1,
.section--dark .section-head h2 { color: var(--marfil); }
.section--dark .section-head p { color: var(--plata-300); }
.section--dark .eyebrow { color: var(--rojo); }

.stagger-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: var(--space-lg);  /* 27px — φ card gap */
}

/* ==================================================================
   5. HEADER PREMIUM — Sticky, Blur, Comando
   ================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--header-bg);
  backdrop-filter: var(--header-blur);
  -webkit-backdrop-filter: var(--header-blur);
  transition: background var(--duration-slow) var(--ease-out),
              backdrop-filter var(--duration-slow) var(--ease-out),
              padding var(--duration-slow) var(--ease-out),
              box-shadow var(--duration-slow) var(--ease-out);
  padding: 12px 0 12px 0;
  border-top: 0;
}

.site-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.site-header.is-scrolled {
  background: var(--header-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
  padding: 4px 0;
}

/* Home: el header transparente flota sobre el hero oscuro (banda fija),
   así que la navegación se mantiene clara hasta que se aplica el glass. */
body.home .site-header:not(.is-scrolled) {
  --nav-link: rgba(255, 255, 255, 0.85);
  --nav-link-hover: var(--blanco);
  --brand-color: var(--marfil);
  --brand-sub: var(--plata-300);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  color: var(--brand-color);
  flex-shrink: 0;
}

.brand-logo-img {
  width: 46px;
  height: auto;
  aspect-ratio: 512 / 487;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.45));
  transition: transform var(--duration-base) var(--ease-spring);
}

.brand:hover .brand-logo-img {
  transform: scale(1.05);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-text span {
  font-size: var(--text-sm);
  letter-spacing: 0.18em;
  color: var(--brand-sub);
  text-transform: uppercase;
  opacity: 0.8;
}

/* ——— Navegación principal ——— */
.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.main-nav a {
  color: var(--nav-link);
  font-size: var(--text-2sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  position: relative;
  transition: color var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out);
  white-space: nowrap;
}

.main-nav a::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  /* Variante clara: contraste suficiente sobre el header oscuro (estrategia §5) */
  background: var(--rojo-texto-oscuro);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-slow) var(--ease-out);
  border-radius: 2px;
}

.main-nav a:hover {
  color: var(--nav-link-hover);
  background: rgba(255, 255, 255, 0.06);
}

.main-nav a:hover::after {
  transform: scaleX(1);
}

.main-nav a[aria-current="page"],
.main-nav a.is-active {
  color: var(--blanco);
}

.main-nav a[aria-current="page"]::after,
.main-nav a.is-active::after {
  transform: scaleX(1);
  background: var(--verde);
}

/* ——— Nav Dropdown — submenu de CUERPO DE BOMBEROS ——— */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  margin: 0;
  cursor: pointer;
  font-size: var(--text-2sm);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--nav-link);
  padding: 6px 10px;
  border-radius: var(--radius-md);
  transition: color var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out);
}

/* Flechita indicadora */
.nav-dropdown-trigger::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  vertical-align: middle;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.6;
  transition: transform var(--duration-base) var(--ease-out);
}

.nav-dropdown:hover .nav-dropdown-trigger::before {
  transform: rotate(180deg);
}

/* Menú desplegable */
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--grafito-800);
  border: 1px solid var(--acero);
  border-radius: var(--radius-md);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out),
              visibility var(--duration-base);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 8px 16px;
  font-size: var(--text-2sm);
  color: var(--plata-300);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 0;
  transition: color var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out);
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-dropdown-menu a:hover {
  color: var(--blanco);
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown-trigger:hover {
  color: var(--nav-link-hover);
  background: rgba(255, 255, 255, 0.06);
}

.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown.is-open .nav-dropdown-trigger::before {
  transform: rotate(180deg);
}

/* ——— Header actions ——— */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.emergency-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 600;
  color: #fef2f2;
  background: linear-gradient(135deg, rgba(107, 19, 27, 0.3), rgba(107, 19, 27, 0.7), rgba(107, 19, 27, 0.3));
  box-shadow: 0 0 0 4px rgba(107, 19, 27, 0.2);
  border-radius: 9999px;
  overflow: hidden;
  transition: opacity 0.2s;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.emergency-badge:hover {
  opacity: 0.9;
}

.emergency-badge::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(254, 242, 242, 0.1), transparent);
  filter: blur(24px);
  pointer-events: none;
}

.emergency-badge svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.emergency-badge-inner {
  display: none;
}

/* ——— Mobile nav toggle ——— */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--nav-link);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--duration-base) var(--ease-out);
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

/* ——— Menú móvil avanzado ——— */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: min(85vw, 360px);
  height: 100vh;
  background: var(--negro-carbono);
  z-index: 999;
  padding: 80px 32px 32px;
  flex-direction: column;
  gap: var(--space-sm);
  transition: right var(--duration-slow) var(--ease-out);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  overflow-y: auto;
}

.mobile-menu.is-open {
  right: 0;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
  pointer-events: none;
}

.mobile-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu a {
  display: block;
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  transition: color var(--duration-base) var(--ease-out),
              background var(--duration-base) var(--ease-out);
  border-left: 3px solid transparent;
}

.mobile-menu a:hover,
.mobile-menu a.is-active {
  color: var(--blanco);
  background: rgba(255, 255, 255, 0.04);
  border-left-color: var(--rojo);
}

.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--marfil);
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out);
}

.mobile-menu-close svg {
  width: 20px;
  height: 20px;
}

.mobile-menu-close:hover {
  background: var(--rojo);
}

/* ==================================================================
   6. HERO CINEMATOGRÁFICO
   ================================================================== */
.hero {
  position: relative;
  min-height: 72vh;
  min-height: 72dvh;
  display: flex;
  align-items: center;
  background: var(--negro-carbono);
  overflow: hidden;
  isolation: isolate;
}

/* ——— Capa de profundidad 1: Imagen de fondo ——— */
.hero-bg-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.55;
  filter: saturate(0.9) contrast(1.08);
  transition: transform 0.3s ease-out;
}

/* ——— Capa de profundidad 2: Overlay dinámico ——— */
/* Overlay horizontal: zona izquierda sólida para texto, derecha transparente para imagen */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Degradado sutil de izquierda→derecha: oscurece la zona del texto
     a la izquierda y deja la foto protagonista a la derecha. */
  background: linear-gradient(90deg,
    rgba(5, 5, 5, 0.86) 0%,
    rgba(5, 5, 5, 0.62) 38%,
    rgba(5, 5, 5, 0.18) 68%,
    rgba(5, 5, 7, 0.05) 100%);
}

.hero-ambient {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-ambient::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 80%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(206, 43, 55, 0.12) 0%, transparent 70%);
  animation: ambientDrift 12s ease-in-out infinite alternate;
}

.hero-ambient::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(0, 146, 70, 0.08) 0%, transparent 70%);
  animation: ambientDrift2 15s ease-in-out infinite alternate;
}

@keyframes ambientDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8%, 6%) scale(1.1); }
}

@keyframes ambientDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-6%, -4%) scale(1.08); }
}

/* ——— Capa de profundidad 3: Contenido ——— */
.hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-left: clamp(24px, 6vw, 96px);
  padding-right: clamp(24px, 6vw, 96px);
}

.hero-content {
  max-width: 780px;
  padding: 80px 0 40px;
}

.hero-emblem {
  width: 140px;
  height: auto;
  aspect-ratio: 512 / 487;
  margin: 0;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-flag {
  display: flex;
  width: 66px;
  height: 6px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: 0 auto 22px;
}

.hero-flag i {
  flex: 1;
  display: block;
}

.hero-flag i:first-child { background: var(--rojo); }
.hero-flag i:last-child { background: var(--verde); }

.hero-content .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--plata-300);
  font-family: var(--font-display);
  font-size: var(--text-2sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  margin-bottom: var(--space-md);
}

.hero-content .eyebrow::before {
  content: '';
  flex: 0 0 auto;
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--rojo) 50%, var(--verde) 50%);
  border-radius: var(--radius-full);
}

.hero-content h1 {
  color: var(--marfil);
  margin-bottom: 22px;
  font-size: var(--text-3xl);
  line-height: 0.98;
  letter-spacing: 0.03em;
  max-width: 660px;
  text-wrap: balance;
}

.hero-content h1 em {
  font-style: normal;
  color: var(--rojo);
  font-weight: 400;
}

.hero-content p.lead {
  color: var(--plata-300);
  max-width: 52ch;
  margin-bottom: var(--space-2xl);
  font-size: var(--text-md);
  line-height: var(--phi-lh-reading);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.hero-ctas .btn {
  font-size: var(--text-2sm);
  letter-spacing: 0.08em;
}

.preliminar-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(206, 43, 55, 0.16);
  border: 1px solid rgba(206, 43, 55, 0.42);
  color: var(--marfil);
  border-radius: var(--radius-full);
  padding: 8px 14px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-lg);
}

/* ——— Parallax wrapper ——— */
.hero-parallax {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  will-change: transform;
}

/* ==================================================================
   7. BUTTONS
   ================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 16px 32px;
  border-radius: var(--radius-lg);
  border: 1.5px solid transparent;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--duration-base) var(--ease-spring),
              box-shadow var(--duration-slow) var(--ease-out),
              background var(--duration-base) var(--ease-out),
              border-color var(--duration-base) var(--ease-out),
              color var(--duration-base) var(--ease-out);
  will-change: transform;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s var(--ease-out);
  pointer-events: none;
}

.btn:hover::after { left: 140%; }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

.btn--solid {
  background: linear-gradient(135deg, var(--action-bg) 0%, var(--action-hover) 100%);
  color: var(--action-text);
  box-shadow: var(--shadow-rojo), var(--shadow-inner);
}

.btn--solid:hover {
  background: var(--action-hover);  /* Rojo profundo plano — estrategia §6.3 */
  box-shadow: var(--shadow-rojo-lg), var(--shadow-inner);
}

.btn--outline {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--marfil);
  padding-left: 34px;
}

.btn--outline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rojo);
  transform: translateY(-50%);
  box-shadow: 0 0 0 0 rgba(206, 43, 55, 0.55);
  animation: dotPulse 2.6s ease-in-out infinite;
}

.btn--outline:hover {
  border-color: var(--marfil);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-lg);
}

.btn--secondary {
  background: linear-gradient(135deg, var(--verde), var(--verde-700));
  color: var(--blanco);
  box-shadow: var(--shadow-verde), var(--shadow-inner);
}

.btn--secondary:hover {
  box-shadow: 0 12px 32px rgba(0, 146, 70, 0.35), var(--shadow-inner);
}

.btn--ghost {
  background: transparent;
  color: var(--plata-300);
  border-color: transparent;
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--marfil);
}

.btn--sm {
  padding: 10px 20px;
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
}

.btn--lg {
  padding: 20px 40px;
  font-size: var(--text-base);
}

/* ==================================================================
   7.1. ENLACES COMPARTIDOS — color según superficie
   ================================================================== */
/* Estrategia §4 y §6.1: sobre oscuro los enlaces usan la variante clara
   de rojo (--rojo-texto-oscuro) y los enlaces dentro de párrafos llevan
   subrayado además de color. Los contextos sobre bandas claras definirán
   --link-color propio (--rojo-700) en la próxima iteración. */
.missing-card a {
  color: var(--link-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--duration-base) var(--ease-out);
}

.missing-card a:hover {
  color: var(--marfil);
}

/* ==================================================================
   8. STATS
   ================================================================== */
.stats {
  background: var(--negro-carbono);
  padding: 0;
  position: relative;
}

.stats::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(206, 43, 55, 0.03) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 50%, rgba(206, 43, 55, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(206, 43, 55, 0.08);
  border-bottom: 1px solid rgba(206, 43, 55, 0.08);
  position: relative;
}

.stat {
  padding: var(--space-3xl) var(--space-lg);
  text-align: center;
  border-right: 1px solid rgba(206, 43, 55, 0.08);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.stat:last-child { border-right: none; }

.stat:hover {
  background: rgba(206, 43, 55, 0.03);
}

/* Animated accent bar at bottom */
.stat::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--rojo);
  transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stat.revealed::after {
  width: 40%;
}

.stat .num {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  color: var(--rojo);
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  position: relative;
}

.stat .num::after {
  content: attr(data-suffix);
  font-size: 0.4em;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--rojo);
  opacity: 0;
  transition: opacity 0.5s ease 0.3s;
}

.stat.revealed .num::after {
  opacity: 1;
  transform: translateY(0);
}

.stat .label {
  font-size: var(--text-3sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plata-500);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.5s ease 0.5s, transform 0.5s ease 0.5s;
  margin-top: 4px;
}

.stat.revealed .label {
  opacity: 1;
  transform: translateY(0);
}

.stat-ico {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  opacity: 0.4;
  transition: opacity 0.3s ease;
}

.stat:hover .stat-ico {
  opacity: 0.7;
}

/* ==================================================================
   9. CARDS — Unidades, Cuerpo Activo
   ================================================================== */

/* ——— Unit Cards Premium ——— */
.units-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: var(--space-lg);  /* 27px — φ card gap */
}

.unit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--duration-slow) var(--ease-spring),
              box-shadow var(--duration-slow) var(--ease-out);
  position: relative;
}

.unit-card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--rojo) 0 50%, var(--verde) 50%);
  transition: width 0.45s var(--ease-spring);
}

.unit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.unit-card:hover::after { width: 100%; }

.unit-photo-wrap {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--acero-600);
  position: relative;
}

/* Overlay gradient on photo */
.unit-photo-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.4));
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.unit-card:hover .unit-photo-wrap::after {
  opacity: 1;
}

/* Inner border on photo hover */
.unit-photo-wrap::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 2;
}

.unit-card:hover .unit-photo-wrap::before {
  opacity: 1;
}

.unit-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out), filter 0.5s var(--ease-out);
  filter: saturate(0.95) contrast(1.02);
}

.unit-card:hover .unit-photo-wrap img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.06);
}

.unit-status {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(0, 146, 70, 0.9);
  color: var(--blanco);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.unit-status .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6); }
  50% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
}

.unit-body {
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
}

.unit-code {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--rojo);
  font-weight: 600;
  line-height: 1;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.02em;
}

.unit-body h3 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  text-transform: none;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.unit-body p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

/* Video de unidad: la foto queda de poster y el <video> se muestra encima */
.unit-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* Los clips son verticales (404x720) y el marco es 16/10: contain evita
     recortar ~72% del ancho. El fondo del wrap hace de marco. */
  object-fit: contain;
  background: var(--acero-600);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  z-index: 1;
}

.unit-photo-wrap.is-playing .unit-video {
  opacity: 1;
  visibility: visible;
}

.unit-photo-wrap.is-playing .unit-photo {
  transform: none;
  filter: none;
}

.unit-play {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  width: 100%;
  padding: 0;
  border: 0;
  background: rgba(10, 12, 14, 0.28);
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, opacity 0.3s ease;
}

.unit-play:hover {
  background: rgba(10, 12, 14, 0.44);
}

.unit-play__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: rgba(10, 12, 14, 0.45);
  transition: transform 0.3s var(--ease-out), background 0.3s ease;
}

.unit-play:hover .unit-play__icon {
  transform: scale(1.08);
  background: rgba(206, 43, 55, 0.85);
}

.unit-play__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  margin-left: 2px;
}

.unit-play:focus-visible {
  outline: 2px solid #fff;
  outline-offset: -4px;
}

/* M2 y M39 tienen dos clips: numeramos el boton para no saturar la card */
.unit-play[data-unit-videos="2"] .unit-play__icon::after {
  content: attr(data-clip-count);
  position: absolute;
  bottom: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--rojo);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.unit-play__icon {
  position: relative;
}

@media (prefers-reduced-motion: reduce) {
  .unit-video,
  .unit-play,
  .unit-play__icon {
    transition: none;
  }
}

.unit-stats {
  display: flex;
  gap: var(--space-md);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
}

.unit-stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.unit-stat-item .stat-value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--rojo);
}

.unit-stat-item .stat-label {
  font-size: var(--text-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* ——— Roster Cards ——— */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: var(--space-lg);  /* 27px — φ card gap */
}

.roster-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: transform var(--duration-slow) var(--ease-spring),
              box-shadow var(--duration-slow) var(--ease-out);
  position: relative;
}

.roster-card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--rojo) 0 50%, var(--verde) 50%);
  transition: width 0.45s var(--ease-spring);
}

.roster-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.roster-card:hover::after { width: 100%; }

.roster-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--grafito);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.roster-icon svg {
  width: 26px;
  height: 26px;
  color: var(--rojo);
}

.roster-card h3 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  text-transform: none;
  letter-spacing: 0.02em;
}

.roster-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ——— Timeline Cards ——— */
.timeline {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: var(--space-lg);  /* 27px — φ card gap */
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-slow) var(--ease-spring),
              box-shadow var(--duration-slow) var(--ease-out);
}

.timeline-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--rojo) 0 50%, var(--verde) 50%);
}

.timeline-card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--rojo) 0 50%, var(--verde) 50%);
  transition: width 0.45s var(--ease-spring);
}

.timeline-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.timeline-card:hover::after { width: 100%; }

.timeline-date {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--rojo);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  letter-spacing: 0.02em;
}

.timeline-card h3 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  text-transform: none;
  letter-spacing: 0.02em;
}

.timeline-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ——— News Cards ——— */
.news-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: var(--space-lg);  /* 27px — φ card gap */
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--duration-slow) var(--ease-spring),
              box-shadow var(--duration-slow) var(--ease-out);
  position: relative;
}

.news-card::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--rojo) 0 50%, var(--verde) 50%);
  transition: width 0.45s var(--ease-spring);
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.news-card:hover::after { width: 100%; }

.news-card img.news-photo {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out), filter 0.5s ease;
}

.news-card:hover img.news-photo {
  transform: scale(1.05);
  filter: brightness(1.05);
}

.news-body {
  padding: var(--space-lg) var(--space-lg) var(--space-xl);
}

.news-date {
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rojo);
  font-weight: 600;
  display: block;
  margin-bottom: var(--space-sm);
}

.news-card h3 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  text-transform: none;
  letter-spacing: 0.02em;
}

.news-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.news-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--rojo);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--duration-base) var(--ease-out);
}

.news-link:hover {
  gap: 8px;
}

/* ——— Involve Cards ——— */
.involve-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);  /* 27px — φ card gap */
  margin-top: var(--space-2xl);  /* 72px — φ major break */
}

.involve-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  transition: transform var(--duration-slow) var(--ease-spring),
              box-shadow var(--duration-slow) var(--ease-out);
}

.involve-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--rojo) 0 50%, var(--verde) 50%);
}

.involve-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.ic-ico {
  width: 58px;
  height: 58px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--grafito-800), var(--acero));
  color: var(--marfil);
  margin-bottom: var(--space-lg);
}

.ic-ico svg {
  width: 28px;
  height: 28px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.involve-card h3 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: 0.02em;
}

.involve-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.65;
}

#como-actuar {
  position: relative;
  background: var(--negro-carbono);
  isolation: isolate;
}

#como-actuar::before {
  display: none;
  z-index: -1;
}

#como-actuar > .container {
  position: relative;
  z-index: 1;
}

.involve-card.glass-card {
  background: linear-gradient(135deg, rgba(18, 22, 28, 0.76), rgba(17, 20, 24, 0.52));
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.involve-card.glass-card::before {
  height: 4px;
  background: linear-gradient(90deg, rgba(206, 43, 55, 0.95) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(0, 146, 70, 0.95) 100%);
}

.involve-card.glass-card .ic-ico {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.involve-card.glass-card h3,
.involve-card.glass-card p,
.involve-card.glass-card .btn {
  color: var(--marfil);
  position: relative;
  z-index: 1;
}

.involve-card.glass-card h3 {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.involve-card.glass-card p {
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.involve-card.glass-card .btn {
  background: linear-gradient(135deg, rgba(206, 43, 55, 0.82), rgba(168, 31, 41, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.involve-card.glass-card .btn:hover {
  box-shadow: 0 12px 28px rgba(206, 43, 55, 0.28);
}

.involve-card.glass-card .btn::after {
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.28), transparent);
}

/* ——— Missing Cards ——— */
.missing-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: var(--space-lg);  /* 27px — φ card gap */
}

.missing-card {
  background: color-mix(in srgb, var(--bg-card) 60%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform var(--duration-slow) var(--ease-spring),
              box-shadow var(--duration-slow) var(--ease-out);
}

.missing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.missing-card h3 {
  font-size: var(--text-xl);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  text-transform: none;
  letter-spacing: 0.02em;
}

.missing-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.missing-tag {
  display: inline-block;
  margin-bottom: var(--space-md);
  font-size: var(--text-2xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--verde);
}

/* ==================================================================
   10. GALLERY — Professional Lightbox Ready
   ================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 220px);
  gap: var(--space-md);  /* 17px — φ component gap */
}

.gallery-grid figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  position: relative;
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition: outline-color 0.5s ease, box-shadow 0.5s ease;
}

/* Gradient overlay */
.gallery-grid figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.5));
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: 1;
}

.gallery-grid figure:hover::after { opacity: 1; }

.gallery-grid figure:hover {
  outline-color: rgba(206, 43, 55, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

/* Corner bracket */
.gallery-grid figure::before {
  content: '';
  position: absolute;
  bottom: 14px;
  left: 14px;
  width: 18px;
  height: 18px;
  border-left: 2px solid rgba(255, 255, 255, 0.6);
  border-bottom: 2px solid rgba(255, 255, 255, 0.6);
  opacity: 0;
  transform: translate(4px, 4px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  z-index: 2;
  pointer-events: none;
}

.gallery-grid figure:hover::before {
  opacity: 1;
  transform: translate(0, 0);
}

.gallery-grid figure .gallery-expand {
  position: absolute;
  bottom: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(206, 43, 55, 0.9);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-spring);
  z-index: 2;
  cursor: pointer;
}

.gallery-grid figure:hover .gallery-expand {
  opacity: 1;
  transform: translateY(0);
}

.gallery-grid figure .gallery-expand svg {
  width: 16px;
  height: 16px;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s var(--ease-out);
}

.gallery-grid figure:hover img {
  transform: scale(1.06);
}

.g1 { grid-column: 1/3; grid-row: 1/3; }
.g2 { grid-column: 3/4; grid-row: 1/2; }
.g3 { grid-column: 4/5; grid-row: 1/2; }
.g4 { grid-column: 3/4; grid-row: 2/3; }
.g5 { grid-column: 4/5; grid-row: 2/3; }

/* ——— Lightbox ——— */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2xl);
  transform: scale(0.95);
  transition: transform var(--duration-slow) var(--ease-spring);
}

.lightbox.is-open .lightbox-content img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-spring);
  z-index: 2001;
}

.lightbox-close:hover {
  background: var(--rojo);
  transform: scale(1.1);
}

.lightbox-close svg {
  width: 22px;
  height: 22px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-spring);
  z-index: 2001;
}

.lightbox-nav:hover {
  background: var(--rojo);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-nav svg {
  width: 22px;
  height: 22px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.08em;
}

/* ==================================================================
   11. CAROUSEL
   ================================================================== */
.carousel-section {
  background: var(--negro-carbono);
  padding: var(--space-3xl) 0;  /* 116px — φ section spacing */
  position: relative;
  overflow: hidden;
}

.carousel-section .section-head { margin-bottom: var(--space-2xl); }

.carousel-wrap { position: relative; }

.carousel-track {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 14px 4px 28px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar { display: none; }

.carousel-slide {
  flex: 0 0 clamp(280px, 38vw, 440px);
  scroll-snap-align: start;
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform var(--duration-slow) var(--ease-spring),
              box-shadow var(--duration-slow) var(--ease-out);
  background: var(--acero-600);
}

.carousel-slide:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-2xl);
}

.carousel-slide img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
  transition: transform 1.2s var(--ease-out), filter 0.5s var(--ease-out);
  filter: saturate(0.95) contrast(1.04);
}

.carousel-slide:hover img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.08);
}

.carousel-caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 60px 22px 22px;
  background: linear-gradient(180deg, transparent, rgba(13, 13, 13, 0.88));
  color: var(--blanco);
}

.carousel-caption .tag {
  margin-bottom: var(--space-sm);
}

.carousel-caption h3 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  letter-spacing: 0.02em;
  color: var(--blanco);
  margin: 0 0 4px;
  text-transform: uppercase;
}

.carousel-caption p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.carousel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-sm);
  gap: var(--space-md);
}

.carousel-arrows {
  display: flex;
  gap: var(--space-sm);
}

.car-arrow {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--plata-300);
  background: var(--bg-primary);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-base) var(--ease-out);
  cursor: pointer;
}

.car-arrow:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: var(--blanco);
  transform: translateY(-2px);
  box-shadow: var(--shadow-rojo);
}

.car-arrow svg {
  width: 18px;
  height: 18px;
}

.carousel-dots {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.car-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--plata-300);
  transition: all var(--duration-slow) var(--ease-spring);
  cursor: pointer;
  border: none;
  padding: 0;
}

.car-dot.is-active {
  width: 28px;
  border-radius: var(--radius-full);
  background: var(--rojo);
}

/* ==================================================================
   12. SCROLL REVEAL SYSTEM
   ================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity var(--duration-reveal) var(--ease-out),
              transform var(--duration-reveal) var(--ease-out);
}

.reveal-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* ==================================================================
   13. SCROLL PROGRESS BAR
   ================================================================== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rojo), var(--verde));
  z-index: 1001;
  transition: width 0.1s linear;
  will-change: width;
}

/* ==================================================================
   14. FOOTER
   ================================================================== */
.site-footer {
  background: var(--negro-carbono);
  color: var(--plata-300);
  padding: var(--space-4xl) 0 var(--space-xl);
  border-top: 1px solid rgba(206, 43, 55, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--space-2xl);
  margin-bottom: var(--space-3xl);
}

.footer-brand .brand { margin-bottom: var(--space-md); }

.footer-brand p {
  font-size: var(--text-sm);
  max-width: 640px;
  color: var(--plata-500);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--marfil);
  margin-bottom: var(--space-lg);
}

.footer-col--social h4 {
  text-align: center;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-col--social ul {
  align-items: center;
}

.footer-col a {
  font-size: var(--text-sm);
  color: #d5d9dd;
  transition: color var(--duration-base) var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.footer-col a:hover {
  color: var(--rojo-texto-oscuro);
}

.footer-col--social a {
  justify-content: center;
}

.footer-col--social {
  text-align: center;
}

.footer-bottom {
  border-top: 1px solid rgba(206, 43, 55, 0.08);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
  font-size: var(--text-xs);
  color: #b8bcc0;
}

.social-row {
  display: flex;
  gap: var(--space-sm);
  margin-top: 4px;
}

.footer-col--social .social-row {
  justify-content: center;
}

.social-row a {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(107, 19, 27, 0.3), rgba(107, 19, 27, 0.7), rgba(107, 19, 27, 0.3));
  box-shadow: 0 0 0 4px rgba(107, 19, 27, 0.2);
  overflow: hidden;
  transition: opacity 0.2s;
  border: none;
  cursor: pointer;
  color: #fef2f2;
}

.social-row a::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(254, 242, 242, 0.1), transparent);
  filter: blur(12px);
  pointer-events: none;
}

.social-row a:hover {
  opacity: 0.9;
}

.social-row svg {
  width: 16px;
  height: 16px;
  position: relative;
  z-index: 1;
}

/* ==================================================================
   15. FLOATING SOCIAL & EMERGENCY
   ================================================================== */
.floating-social {
  position: fixed;
  right: max(22px,env(safe-area-inset-right));
  bottom: max(22px,env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.fab {
  position: relative;
  isolation: isolate;
  display: flex;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  overflow: visible;
  border: 1px solid rgba(255,255,255,.22);
  color: var(--blanco);
  box-shadow: 0 9px 20px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.24);
  transition: transform var(--duration-base) var(--ease-spring),box-shadow var(--duration-slow) var(--ease-out),border-color var(--duration-base) var(--ease-out),filter var(--duration-base) var(--ease-out);
  animation: fabIn 0.5s var(--ease-out) backwards;
}

.fab svg {
  position: relative;
  z-index: 2;
  width: 21px;
  height: 21px;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,.2));
  transition: transform var(--duration-base) var(--ease-spring);
}

.fab:hover {
  border-color: rgba(255,255,255,.62);
  box-shadow: 0 14px 28px rgba(0,0,0,.34),0 0 0 4px rgba(255,255,255,.08),inset 0 1px 0 rgba(255,255,255,.3);
  filter: saturate(1.12) brightness(1.05);
  transform: translateY(-3px) scale(1.05);
}

.fab:hover svg { transform: scale(1.08); }
.fab:active { transform: translateY(-1px) scale(.96); }
.fab:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.fab--wa { background: #25d366; }
.fab--ig { background: radial-gradient(circle at 31% 104%,#ffd36b 0 18%,#f04b48 40%,#b932a8 68%,#6046d8 100%); }
.fab--fb { background: #f0f2f5; border-color: rgba(0,0,0,.08); box-shadow: 0 9px 20px rgba(0,0,0,.12),inset 0 1px 0 rgba(255,255,255,.9); }
.fab--fb svg { color: #1877f2; filter: drop-shadow(0 2px 3px rgba(24,119,242,.2)); }
.fab--fb:hover { border-color: rgba(24,119,242,.3); box-shadow: 0 14px 28px rgba(24,119,242,.18),0 0 0 4px rgba(24,119,242,.08),inset 0 1px 0 rgba(255,255,255,1); }

.fab:nth-child(2) { animation-delay: 0.07s; }
.fab:nth-child(3) { animation-delay: 0.14s; }

.fab::before {
  content: attr(data-tip);
  position: absolute;
  right: 64px;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%) translateX(8px) scale(.97);
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 9px;
  background: rgba(13,15,16,.93);
  color: var(--blanco);
  font-family: var(--font-body);
  font-size: var(--text-2sm);
  font-weight: 700;
  letter-spacing: .06em;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 24px rgba(0,0,0,.3);
  backdrop-filter: blur(12px);
  transition: opacity var(--duration-base) var(--ease-out),transform var(--duration-base) var(--ease-out);
}

.fab:hover::before,
.fab:focus-visible::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

.fab::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: 1;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: inherit;
  pointer-events: none;
}

.fab--wa::after {
  box-shadow: 0 0 0 0 rgba(37,211,102,.55);
  animation: fabPulse 2.4s infinite;
}

@keyframes fabPulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.48); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

@keyframes fabIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ——— Emergency badge fijo ——— */
body > a.emergency-badge {
  position: fixed;
  left: max(22px,env(safe-area-inset-left));
  bottom: max(22px,env(safe-area-inset-bottom));
  z-index: 95;
  width: auto;
  min-height: 48px;
  padding: 7px 18px 7px 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  background: #6B131B;
  color: var(--blanco);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: var(--text-2xs);
  letter-spacing: .11em;
  text-transform: uppercase;
  white-space: nowrap;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(80,0,18,.4);
  box-shadow: 0 10px 24px rgba(107,19,27,.34),inset 0 1px 0 rgba(255,255,255,.15);
  transition: background .2s ease,box-shadow .25s ease,transform .2s ease,border-color .2s ease;
}

body > a.emergency-badge:hover {
  border-color: rgba(255,255,255,.45);
  background: linear-gradient(135deg, rgba(107, 19, 27, 0.45), rgba(107, 19, 27, 0.85), rgba(107, 19, 27, 0.45));
  box-shadow: 0 14px 30px rgba(107,19,27,.42),0 0 0 4px rgba(139,26,43,.12),inset 0 1px 0 rgba(255,255,255,.18);
}

body > a.emergency-badge:hover::before {
  animation: sh02 0.5s 0s linear;
}

body > a.emergency-badge::before {
  content: '';
  display: block;
  width: 0px;
  height: 86%;
  position: absolute;
  top: 7%;
  left: 0%;
  opacity: 0;
  background: #fff;
  box-shadow: 0 0 50px 30px #fff;
  transform: skewX(-20deg);
  pointer-events: none;
}

@keyframes sh02 {
  from { opacity: 0; left: 0%; }
  50% { opacity: 1; }
  to { opacity: 0; left: 100%; }
}

body > a.emergency-badge:active {
  box-shadow: 0 9px 20px rgba(107,19,27,.3);
  transform: translateY(0) scale(.97);
}

body > a.emergency-badge svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  background: rgba(255,255,255,.13);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}

body > a.emergency-badge:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ==================================================================
   16. KEYFRAMES
   ================================================================== */
@keyframes sirenPulse {
  0% { box-shadow: 0 0 0 0 rgba(206, 43, 55, 0.55), 0 0 0 0 rgba(0, 146, 70, 0); }
  60% { box-shadow: 0 0 0 12px rgba(206, 43, 55, 0), 0 0 0 18px rgba(0, 146, 70, 0); }
  100% { box-shadow: 0 0 0 0 rgba(206, 43, 55, 0), 0 0 0 0 rgba(0, 146, 70, 0); }
}

@keyframes sirenWobble {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
}

@keyframes sosFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(206, 43, 55, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(206, 43, 55, 0); }
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--rojo);
  margin-right: 2px;
}

.eyebrow-ico svg { width: 100%; height: 100%; }

.divider-flag {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.divider-flag::before,
.divider-flag::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.3), transparent);
}

.divider-flag svg {
  width: 42px;
  height: 42px;
  color: var(--rojo);
  opacity: 0.85;
}

.divider-flag img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  opacity: 0.85;
}

/* ==================================================================
   18. CONTACT PAGE
   ================================================================== */
.join {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.join-panel {
  padding: 90px 64px;
}

.contact-full {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}

.contact-full .join-panel {
  padding: 90px max(64px, calc((100vw - var(--container))/2 + 24px));
}

.contact-full .join-panel--navy {
  background: var(--negro-carbono);
}

.contact-list {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-row {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.contact-row > svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 50%;
  background: rgba(206, 43, 55, 0.12);
  color: var(--rojo);
  border: 1px solid rgba(206, 43, 55, 0.3);
  box-sizing: border-box;
  flex-shrink: 0;
}

.contact-row strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--marfil);
  margin-bottom: 2px;
}

.contact-row span {
  font-size: var(--text-sm);
  color: var(--plata-300);
}

.final-note {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  border-left: 4px solid var(--rojo);
  background: rgba(255, 255, 255, 0.04);
  color: var(--plata-300);
  max-width: 720px;
  font-size: var(--text-sm);
}

/* ==================================================================
   19. IMAGE PLACEHOLDER
   ================================================================== */
.img-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 1.5px dashed rgba(206, 43, 55, 0.4);
  border-radius: var(--radius-md);
  background:
    repeating-linear-gradient(135deg, rgba(206, 43, 55, 0.06) 0 2px, transparent 2px 14px),
    linear-gradient(160deg, var(--marfil-100), var(--marfil-200));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 18px;
  color: var(--text-primary);
  overflow: hidden;
}

.img-placeholder svg { width: 34px; height: 34px; opacity: 0.5; }
.img-placeholder .ph-label {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--rojo);
}

.img-placeholder .ph-sub {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  max-width: 220px;
}

.about-image-frame {
  aspect-ratio: 4/5;
  min-height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--acero-600);
  position: relative;
  transition: box-shadow 0.5s ease;
}

.about-image-frame:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.about-image-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.3));
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.about-image-frame:hover::after {
  opacity: 1;
}

.about-photo,
.unit-photo,
.news-photo,
.gallery-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==================================================================
   21. ABOUT GRID
   ================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4xl);
  align-items: center;
}

.about-text p {
  margin-bottom: var(--space-md);
}

.about-text .pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.pillar {
  border-left: 2px solid var(--verde);
  padding-left: var(--space-md);
}

.pillar strong {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.pillar span {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* ==================================================================
   22. RESPONSIVE
   ================================================================== */
@media (min-width: 981px) {
  .container { padding: 0 var(--space-2xl); }

  .hero { min-height: 820px; }

  .hero .container {
    display: grid;
    grid-template-columns: minmax(560px, 720px) 1fr;
    align-items: center;
  }

  .hero-content {
    max-width: 720px;
    width: 100%;
    padding: 170px 0 130px;
    text-align: left;
    margin: 0;
  }

  .hero-emblem {
    width: 138px;
    margin-left: 0;
    margin-right: 0;
  }

  .hero-content h1 {
    max-width: 700px;
    font-size: var(--text-3xl);
    line-height: 0.96;
  }

  .hero-content p.lead {
    max-width: 640px;
    font-size: var(--text-md);
  }

  .hero-ctas { justify-content: flex-start; }

  .hero::before {
    background: linear-gradient(90deg,
      rgba(5, 5, 5, 0.82) 0%,
      rgba(5, 5, 5, 0.56) 40%,
      rgba(5, 5, 5, 0.14) 72%,
      rgba(5, 5, 7, 0.04) 100%);
  }

  .section { padding: var(--space-6xl) 0; }
  .carousel-section { padding: var(--space-6xl) 0; }
  .carousel-section .section-head { margin-bottom: var(--space-3xl); }
  .section-head { max-width: 860px; margin-bottom: var(--space-3xl); }
  .section-head h1,
  .section-head h2 { max-width: 820px; }
  .section-head p { max-width: 780px; }

  .about-grid {
    grid-template-columns: minmax(560px, 0.95fr) minmax(480px, 0.85fr);
    gap: var(--space-4xl);
  }

  .about-image-frame { min-height: 560px; }

  .gallery-grid {
    grid-template-columns: 1.45fr 0.85fr 0.85fr;
    grid-template-rows: 260px 260px;
    gap: var(--space-lg);
  }

  .g1 { grid-column: 1/2; grid-row: 1/3; }
  .g2 { grid-column: 2/3; grid-row: 1/2; }
  .g3 { grid-column: 3/4; grid-row: 1/2; }
  .g4 { grid-column: 2/3; grid-row: 2/3; }
  .g5 { grid-column: 3/4; grid-row: 2/3; }
}

@media (max-width: 980px) {
  .main-nav { display: none; }
  .site-header .header-left { justify-content: space-between; }
  .header-actions .emergency-badge { padding: 10px; gap: 0; }
  .header-actions .emergency-badge .badge-label { display: none; }
  .header-actions .emergency-badge svg { width: 20px; height: 20px; }

  .nav-toggle { display: flex; }
  .mobile-menu { display: flex; }
  .mobile-overlay { display: block; }

  .hero::before {
    background: linear-gradient(90deg,
      rgba(5, 5, 5, 0.8) 0%,
      rgba(5, 5, 5, 0.5) 55%,
      rgba(5, 5, 5, 0.16) 100%);
  }

  .hero-content h1 {
    font-size: var(--text-2xl);
  }

  .about-grid { grid-template-columns: 1fr; gap: var(--space-2xl); }
  .stagger-grid { --cols: 2; }
  .units-grid { --cols: 3; }
  .roster-grid { --cols: 2; }
  .timeline { --cols: 2; }
  .news-grid { grid-template-columns: 1fr; }
  .involve-grid { grid-template-columns: 1fr; }
  .missing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: none; }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto;
    gap: var(--space-sm);
  }

  .g1 { grid-column: 1/3; grid-row: auto; min-height: 300px; }
  .g2 { grid-column: 1/2; grid-row: auto; }
  .g3 { grid-column: 2/3; grid-row: auto; }
  .g4 { grid-column: 1/2; grid-row: auto; }
  .g5 { grid-column: 2/3; grid-row: auto; }

  .fab { width: 44px; height: 44px; animation: none; }
  .floating-social { right: max(12px,env(safe-area-inset-right)); bottom: max(12px,env(safe-area-inset-bottom)); gap: 6px; padding: 0; }
  body > a.emergency-badge { left: max(12px,env(safe-area-inset-left)); bottom: max(12px,env(safe-area-inset-bottom)); min-height: 44px; padding: 6px 14px 6px 7px; font-size: var(--text-xs); }
  body > a.emergency-badge svg { width: 28px; height: 28px; }

  .contact-full .join-panel {
    padding: var(--space-4xl) var(--space-lg);
  }
}

@media (max-width: 760px) {
  .stagger-grid { --cols: 1; }
  .units-grid { --cols: 1; }
  .roster-grid { --cols: 1; }
  .timeline { --cols: 1; }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .g1 { grid-column: 1/3; grid-row: auto; }
  .g2 { grid-column: 1/2; grid-row: auto; }
  .g3 { grid-column: 2/3; grid-row: auto; }
  .g4 { grid-column: 1/2; grid-row: auto; }
  .g5 { grid-column: 2/3; grid-row: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-xl); }

  .footer-col,
  .footer-brand {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-brand p {
    max-width: 100%;
  }

  .footer-col ul {
    align-items: center;
  }

  .footer-bottom {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .stats .container { grid-template-columns: 1fr 1fr; }
  .stat { padding: var(--space-2xl) var(--space-md); }
  .section { padding: var(--space-4xl) 0; }
  .hero { min-height: 70vh; }
  .hero-bg-photo img { object-position: center 30%; }
  .hero-content { padding: 120px 0 80px; }
  .hero-emblem { width: 100px; }
  .hero-content .emblem-frame { --emblem-size: 100px; width: 100px; height: 100px; }
  .hero-content h1 { font-size: var(--text-2xl); }
  .stat .num { font-size: var(--text-2xl); }
  .btn { padding: 14px 24px; font-size: var(--text-xs); }
  .stat-ico { width: 28px; height: 28px; }
  .gallery-grid figure {
    min-height: 160px;
  }
  .carousel-slide {
    flex: 0 0 260px;
  }
  .contact-full .join-panel {
    padding: var(--space-3xl) var(--space-md);
  }
}

@media (max-width: 480px) {
  .hero { min-height: 62vh; }
  .hero-bg-photo img { object-position: center 25%; }
  .hero-content { padding: 100px 0 60px; }
  .hero-content .emblem-frame { --emblem-size: 88px; width: 88px; height: 88px; }
  .hero-content h1 { font-size: var(--text-2xl); }
  .hero-flag { display: none; }
  .stats .container { grid-template-columns: 1fr 1fr; gap: 0; }
  .stat { padding: var(--space-xl) var(--space-sm); }
  .stat .num { font-size: var(--text-xl); }
  .stat .label { font-size: var(--text-xs); }
  .footer-grid { gap: var(--space-lg); }
  .gallery-grid { gap: 6px; }
  .gallery-grid figure { min-height: 120px; border-radius: var(--radius-md); }
  .carousel-slide { flex: 0 0 220px; }
  .lightbox-nav { width: 36px; height: 36px; }
  .lightbox-nav svg { width: 16px; height: 16px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { width: 36px; height: 36px; top: 12px; right: 12px; }
  .lightbox-close svg { width: 16px; height: 16px; }
}

@media (min-width: 981px) and (max-width: 1160px) {
  .container { padding: 0 var(--space-lg); }

  .hero .container {
    grid-template-columns: minmax(500px, 620px) 1fr;
  }

  .hero-content h1 {
    font-size: var(--text-xl);
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .main-nav a {
    font-size: var(--text-xs);
    padding: 6px 10px;
  }

  .emergency-badge {
    padding: 8px 16px;
    font-size: var(--text-3sm);
    gap: 6px;
  }

  .emergency-badge::before {
    width: 60px;
    height: 60px;
    top: 10px;
  }

  .emergency-badge svg {
    width: 14px;
    height: 14px;
  }
}

/* ==================================================================
   23. ACCESSIBILITY
   ================================================================== */
:focus-visible {
  outline: 2px solid var(--rojo);
  outline-offset: 3px;
  border-radius: 2px;
}

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

  .fab--wa::after { animation: none !important; }
  .emergency-badge::before,
  body > a.emergency-badge,
  body > a.emergency-badge::after,
  .emergency-badge svg,
  .btn--outline::before,
  .hero-ambient::before,
  .hero-ambient::after,
  .unit-status .status-dot { animation: none !important; }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ==================================================================
    MICRO DETAILS — Institutional Colors
   ================================================================== */

/* Selection color */
::selection {
  background: var(--rojo);
  color: var(--blanco);
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--negro-carbono); }
::-webkit-scrollbar-thumb {
  background: var(--acero);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--rojo-700);
}

/* Subtle green accent on section headings */
.section-head h1::after,
.section-head h2::after {
  content: '';
  display: block;
  width: 32px;
  height: 2px;
  background: var(--verde);
  margin-top: var(--space-md);
  opacity: 0.5;
}

/* Section heading right accent line */
.section-head {
  position: relative;
}

/* Red accent dot on page title sections */
.section-head .eyebrow::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--rojo);
  margin-left: 4px;
  vertical-align: middle;
}

/* Card accent: subtle colored top border */
.unit-card,
.news-card,
.roster-card,
.timeline-card,
.involve-card,
.missing-card {
  border-top: 2px solid transparent;
  transition: border-top-color 0.4s ease;
}

.unit-card:hover,
.news-card:hover {
  border-top-color: rgba(206, 43, 55, 0.15);
}

/* Green accent on secondary cards */
.roster-card:hover,
.involve-card:hover {
  border-top-color: rgba(0, 146, 70, 0.15);
}

/* Timeline cards get gold accent */
.timeline-card:hover {
  border-top-color: rgba(201, 169, 78, 0.1);
}

/* Form focus ring */
input:focus,
textarea:focus,
select:focus {
  border-color: var(--rojo) !important;
  box-shadow: 0 0 0 3px rgba(206, 43, 55, 0.15) !important;
  outline: none;
}

/* Subtle divider accent */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(206, 43, 55, 0.15), transparent);
}



/* Text shadow on floating emergency badge */
body > a.emergency-badge {
  text-shadow: 0 2px 12px rgba(80, 80, 80, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* ── CONTACT SECTION (ref: bomberosvoluntariostpm.org) ── */
.ctc-section {
  padding: var(--space-3xl) var(--space-lg);
}

.s-head {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.s-tag {
  display: inline-block;
  background: var(--rojo);
  color: var(--blanco);
  padding: 6px 20px;
  border-radius: 3px;
  font-size: var(--text-3sm);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-family: var(--font-body);
}

.s-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--texto);
  line-height: 1.2;
  margin-bottom: 14px;
}

.s-title span {
  color: var(--rojo);
}

.s-bar {
  width: 56px;
  height: 3px;
  background: var(--rojo);
  margin: 0 auto 18px;
}

.ctc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
}

.ctc-info h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--texto);
  line-height: 1.4;
}

.ctc-info > p {
  color: var(--texto-muted);
  font-size: var(--text-3sm);
  line-height: 1.75;
  margin-bottom: 26px;
}

.ctc-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.ctc-item {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--tarjeta);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.25s, transform 0.25s;
}

.ctc-item:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.ctc-ico {
  width: 44px;
  height: 44px;
  background: var(--rojo);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ctc-ico svg {
  width: 20px;
  height: 20px;
  color: var(--blanco);
}

.ctc-item h4 {
  font-size: var(--text-3sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--texto-muted);
  margin-bottom: 2px;
}

.ctc-item p {
  font-size: var(--text-3sm);
  font-weight: 600;
  color: var(--texto);
}

.ctc-socials {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}

.ctc-soc {
  width: 44px;
  height: 44px;
  background: var(--rojo);
  border: none;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blanco);
  text-decoration: none;
  transition: all 0.28s;
}

.ctc-soc svg {
  width: 20px;
  height: 20px;
}

.ctc-soc:hover {
  background: var(--rojo-oscuro, #a11b1b);
  transform: translateY(-3px);
}

.ctc-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.ctc-map iframe {
  width: 100%;
  height: 420px;
  border: none;
  display: block;
}

@media (max-width: 960px) {
  .ctc-grid {
    grid-template-columns: 1fr;
  }

  .ctc-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .ctc-info h3 {
    text-align: center;
  }

  .ctc-info > p {
    text-align: center;
  }

  .ctc-items {
    width: 100%;
    align-items: center;
  }

  .ctc-item {
    width: 100%;
    max-width: 400px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
  }

  .ctc-item h4,
  .ctc-item p {
    text-align: center;
  }

  .ctc-socials {
    justify-content: center;
  }
}

/* ── INSCRIPTION FORM ── */
.inscription-form {
  max-width: 700px;
  margin: 0 auto;
  background: var(--tarjeta);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: var(--text-2sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--texto-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--borde, #e0e4ea);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--texto);
  background: var(--blanco);
  transition: border-color 0.25s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--rojo);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #aaa;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.inscription-form .btn {
  width: 100%;
  justify-content: center;
  padding: 14px 32px;
  font-size: var(--text-3sm);
  margin-top: 10px;
}

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: var(--text-base);
  font-weight: 500;
  text-align: center;
  display: none;
}

.form-status.success {
  display: block;
  color: var(--verde);
  background: rgba(0, 146, 70, 0.1);
  border: 1px solid rgba(0, 146, 70, 0.35);
}

.form-status.error {
  display: block;
  color: var(--rojo);
  background: rgba(206, 43, 55, 0.1);
  border: 1px solid rgba(206, 43, 55, 0.35);
}

.form-status.info {
  display: block;
  color: var(--azul-tecnico);
  background: rgba(27, 42, 74, 0.1);
  border: 1px solid rgba(27, 42, 74, 0.35);
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .inscription-form {
    padding: 24px;
  }
}

/* Historia page — readable long-form content */
#historia .container {
  max-width: 780px;
}

#historia h1,
#historia h2 {
  color: var(--text-primary);
}

#historia h3 {
  font-size: var(--text-xl);
  color: var(--rojo);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(206, 43, 55, 0.15);
}

#historia h3:first-of-type {
  margin-top: var(--space-2xl);
}

#historia p {
  font-size: var(--text-base);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

#historia ul {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

#historia ul li {
  position: relative;
  padding-left: 20px;
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--text-secondary);
}

#historia ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rojo);
  opacity: 0.7;
}

#historia .eyebrow {
  margin-bottom: var(--space-sm);
}

@media (max-width: 760px) {
  #historia h3 {
    margin-top: var(--space-2xl);
    font-size: var(--text-xl);
  }

  #historia p {
    font-size: var(--text-sm);
  }

  #cuerpo-social h3 {
    margin-top: var(--space-2xl);
    font-size: var(--text-xl);
  }

  #cuerpo-social p {
    font-size: var(--text-sm);
  }
}

/* Cuerpo Social page — readable long-form content */
/* max-width removed: the hero (id="cuerpo-social" + .container) must stay
   full-width and left-aligned like Cómo Actuar; the legacy 780px limit
   was centering the hero content. */
#cuerpo-social .container {
}

#cuerpo-social h1,
#cuerpo-social h2 {
  color: var(--text-primary);
}

#cuerpo-social h3 {
  font-size: var(--text-xl);
  color: var(--rojo);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(206, 43, 55, 0.15);
}

#cuerpo-social p {
  font-size: var(--text-base);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
}

#cuerpo-social .eyebrow {
  margin-bottom: var(--space-sm);
}

/* ==================================================================
   CÓMO ACTUAR — MANUAL OPERATIVO
   ================================================================== */
#como-actuar {
  background: var(--negro-carbono);
  color: var(--marfil);
}

#como-actuar .container {
  position: relative;
  z-index: 1;
}

/* Hero Cómo Actuar — la frase (instrucción fundamental) destaca sobre el título */
.act-lead {
  max-width: 780px;
}
.act-lead h1 {
  margin: 0 0 var(--space-lg);
  color: var(--plata-300);
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.6vw, 1.3rem);
  font-weight: 500;
  letter-spacing: .16em;
  line-height: 1.1;
  text-transform: uppercase;
}
.act-lead .act-lead__statement {
  margin: 0;
  max-width: 840px;
  color: var(--marfil);
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.4vw, 4.1rem);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
}
.act-lead .act-lead__statement .act-lead__emphasis {
  color: #ff6572;
  font-weight: 700;
}

/* Hero Cómo Actuar — fondo estilo Cuerpo Social (profundidad oscura + mancha roja de acento)
   El bombero recortado flota sobre el fondo; la frase "ponete a salvo" predomina en primer plano */
.act-hero-deep {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(420px, 58vh, 540px);
  display: flex;
  align-items: center;
  margin-bottom: 44px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(circle at 80% 20%, rgba(206, 43, 55, .3), transparent 32%),
    linear-gradient(125deg, #090909 0%, #17191b 58%, #090909 100%);
}
.act-hero-deep::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: min(34vw, 320px);
  height: 4px;
  background: var(--rojo);
}
.act-hero-deep .act-lead {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 52px 44px;
}
.act-hero-deep .act-lead__statement {
  text-wrap: balance;
}
.act-hero-deep .act-lead__statement .act-lead__emphasis {
  color: #ff6572;
}

.act-hero {
  position: relative;
  margin-bottom: 58px;
  border-radius: 14px;
  overflow: hidden;
}

.act-hero::before {
  display: none;
}

.act-hero__copy {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0;
  color: #fff;
}

.act-hero__copy::before {
  display: none;
}

.act-hero h1 {
  max-width: 900px;
  margin: 0 0 28px;
  color: var(--marfil);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: .12em;
  line-height: .95;
  text-transform: uppercase;
}

.act-hero__copy > p:not(.eyebrow) {
  max-width: 700px;
  margin: 0;
  color: #fff;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 800;
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 24px rgba(0,0,0,.6);
}

.act-dispatch {
  display: grid;
  grid-template-columns: 260px 1fr;
  margin-bottom: 0;
  overflow: hidden;
  background: rgba(30,33,36,.62);
  box-shadow: 0 22px 46px rgba(13,18,20,.2);
  font-family: var(--font-display);
}

.act-dispatch__head {
  display: flex;
  align-items: center;
  padding: 36px 28px;
  background: var(--bordeaux);
}

.act-dispatch__head h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.1rem,3vw,3.2rem);
  line-height: .94;
}

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

.act-dispatch__numbers a {
  display: flex;
  min-height: 158px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-left: 1px solid rgba(255,255,255,.2);
  color: #fff;
}

.act-dispatch__numbers strong {
  font-family: var(--font-display);
  font-size: clamp(4rem,6vw,6rem);
  line-height: 1;
}

.act-dispatch__numbers span {
  margin-top: 8px;
  font-size: var(--text-2xs);
  font-weight: 800;
  text-transform: uppercase;
}

.act-dispatch__note {
  grid-column: 1/-1;
  margin: 0;
  padding: 11px 20px;
  border-top: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  text-align: center;
}

.act-first-response {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  margin: 0 0 76px;
  padding: 0;
  border-top: 5px solid transparent;
  border-image: linear-gradient(90deg,#c8062d 0 33.333%,#fff 33.333% 66.666%,#16884a 66.666% 100%) 1;
  background: rgba(30,33,36,.62);
  box-shadow: 0 18px 38px rgba(0,0,0,.3);
  list-style: none;
  font-family: var(--font-display);
}

.act-first-response li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  min-height: 112px;
  padding: 28px 26px;
  border-right: 1px solid rgba(255,255,255,.12);
}

.act-first-response li:last-child { border-right: 0; }
.act-first-response li > span { color: #c8062d; font-family: var(--font-mono); font-size: var(--text-3xs); font-weight: 800; }
.act-first-response strong { display: block; margin-bottom: 8px; color: #e8e9e6; font-size: var(--text-base); text-transform: uppercase; }
.act-first-response p { margin: 0; color: #9aa0a3; font-size: var(--text-3sm); line-height: 1.5; }

.act-jump {
  display: grid;
  grid-template-columns: 125px 1fr;
  align-items: center;
  gap: 26px;
  margin-bottom: 94px;
  padding: 30px 34px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(30,33,36,.55);
  box-shadow: 0 14px 32px rgba(0,0,0,.3);
}

.act-jump > p {
  margin: 0;
  color: #e8e9e6;
  font-family: var(--font-display);
  font-size: var(--text-3sm);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.act-jump > div { display: flex; flex-wrap: wrap; gap: 12px; }
.act-jump a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .95rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #f3f4f2;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: .03em;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}
.act-jump a:hover,
.act-jump a:focus-visible {
  background: #c8062d;
  border-color: #c8062d;
  color: #fff;
}
.act-jump__num {
  color: #c8062d;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 800;
  letter-spacing: .05em;
}
.act-jump a:hover .act-jump__num,
.act-jump a:focus-visible .act-jump__num { color: #fff; }

.act-section-head {
  display: grid;
  grid-template-columns: 220px 1fr;
  align-items: end;
  padding: 40px 38px 36px;
  border: 1px solid rgba(255,255,255,.12);
  border-bottom: 8px solid var(--marfil);
  background: rgba(30,33,36,.55);
  box-shadow: 0 18px 36px rgba(0,0,0,.3);
  font-family: var(--font-display);
}

.act-section-head h2,.act-never h2 {
  margin: 0;
  color: #e8e9e6;
  font-size: var(--text-2xl);
  line-height: .95;
}

.act-grid { margin-bottom: 110px; }

.act-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px,.4fr) minmax(0,1fr);
  align-items: center;
  gap: 0 48px;
  margin-top: 46px;
  padding: 48px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  scroll-margin-top: 110px;
  background: var(--bg-card);
  box-shadow: 0 26px 58px rgba(0,0,0,.3),0 8px 20px rgba(0,0,0,.15);
  font-family: var(--font-display);
}

.act-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: none;
  pointer-events: none;
}

.act-card > * { position: relative; z-index: 1; }

.act-card__head {
  position: relative;
  display: flex;
  grid-column: 1;
  grid-row: 1/span 4;
  min-height: 440px;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 78px 24px 48px;
  overflow: hidden;
  background-color: var(--grafito);
  text-align: center;
  box-shadow: 0 18px 38px rgba(12,15,16,.2);
}

.act-card__protocol {
  display: flex;
  width: 100%;
  max-width: 260px;
  align-items: center;
  justify-content: center;
  margin-bottom: 26px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.36);
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  font-weight: 800;
  letter-spacing: .1em;
  text-align: center;
  text-transform: uppercase;
}

.act-card__category {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.act-card__category::before { content: ''; width: 26px; height: 2px; background: var(--rojo); }

.act-card__head h3 {
  display: grid;
  width: 100%;
  max-width: 300px;
  min-height: 144px;
  place-items: center;
  margin: 0;
  padding: 16px 18px 18px;
  border-radius: 12px;
  background: var(--bordeaux);
  color: #fff;
  font-size: var(--text-xl);
  line-height: .94;
  overflow-wrap: break-word;
  text-wrap: balance;
  text-shadow: 0 2px 7px rgba(0,0,0,.26);
  box-shadow: 0 10px 22px rgba(0,0,0,.23),inset 0 1px 0 rgba(255,255,255,.18);
}

#act-inconsciente .act-card__head h3 {
  grid-template-rows: repeat(2,auto);
  align-content: center;
  gap: .04em;
  font-size: clamp(1.75rem,2.35vw,2.7rem);
  text-wrap: initial;
}

#act-inconsciente .act-card__head h3 > span:not(.act-card__component-handle) {
  display: block;
  white-space: nowrap;
}
#act-herida .act-card__head h3 { font-size: clamp(1.85rem,2.45vw,2.85rem); }
#act-electrica .act-card__head h3 { font-size: clamp(1.9rem,2.55vw,2.95rem); }

.act-card ol,.act-alert,.act-call-row,.act-card__foot {
  grid-column: 2;
  width: 100%;
  max-width: 760px;
  justify-self: center;
}

.act-card > .act-call { grid-column: 2; }

.act-card ol {
  margin: 0;
  padding: 30px 30px 8px;
  counter-reset: act-step;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
}

.act-card ol::before {
  content: attr(aria-label);
  display: block;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: #c8062d;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.act-card ol li {
  position: relative;
  padding: 0 0 23px 44px;
  color: #d0d3d5;
  font-size: var(--text-base);
  line-height: 1.72;
}

.act-card ol li::before {
  counter-increment: act-step;
  content: counter(act-step,decimal-leading-zero);
  position: absolute;
  top: 2px;
  left: 0;
  color: #c8062d;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 800;
}

.act-card ol li + li { padding-top: 23px; border-top: 1px solid rgba(255,255,255,.1); }
.act-card ol li + li::before { top: 25px; }
.act-card strong { color: #fff; }

.act-alert {
  margin: 18px 0 0;
  padding: 20px 22px;
  border-left: 5px solid #c8062d;
  background: rgba(30,33,36,.64);
  color: #d0d3d5;
  line-height: 1.6;
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
  backdrop-filter: blur(8px);
}

.act-alert__label {
  display: block;
  margin-bottom: 8px;
  color: #c8062d;
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.act-call-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: linear-gradient(145deg,rgba(255,255,255,.075),rgba(255,255,255,.025));
  box-shadow: 0 16px 34px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
}

.act-call,
.act-video {
  position: relative;
  display: inline-flex;
  min-width: 0;
  min-height: 64px;
  flex: 1 1 210px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 13px 18px;
  overflow: hidden;
  border-radius: 11px;
  color: #fff;
  font-family: var(--font-body);
  font-size: var(--text-2sm);
  font-weight: 800;
  letter-spacing: .055em;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
  box-shadow: 0 9px 22px rgba(0,0,0,.2),inset 0 1px 0 rgba(255,255,255,.15);
  transition: border-color .2s ease,background .2s ease,box-shadow .2s ease,color .2s ease,transform .2s ease;
}

.act-call {
  border: 1px solid rgba(255,108,124,.46);
  background: linear-gradient(135deg,#d10a33 0%,#a80025 100%);
  text-shadow: 0 1px 3px rgba(75,0,15,.35);
}

.act-call::before {
  content: '';
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.act-call:hover {
  border-color: rgba(255,255,255,.68);
  background: linear-gradient(135deg,#eb143f 0%,#bf002a 100%);
  box-shadow: 0 13px 28px rgba(200,6,45,.34),inset 0 1px 0 rgba(255,255,255,.2);
  color: #fff;
  transform: translateY(-2px);
}

.act-call--secondary {
  border-color: rgba(255,255,255,.34);
  background: linear-gradient(145deg,rgba(38,42,44,.96),rgba(20,23,24,.96));
  color: #f2f3ef;
  text-shadow: none;
}

.act-call--secondary:hover {
  border-color: rgba(255,255,255,.68);
  background: linear-gradient(145deg,#3b3f41,#252829);
  box-shadow: 0 13px 28px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.17);
}

.act-video {
  border: 1px solid rgba(218,229,218,.76);
  background: linear-gradient(135deg,#f5f4ef 0%,#dce4dd 100%);
  color: #172019;
  box-shadow: 0 9px 22px rgba(0,0,0,.18),inset 0 1px 0 #fff;
}

.act-video svg {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  padding: 10px;
  border-radius: 50%;
  background: #287a35;
  color: #fff;
  fill: currentColor;
  box-shadow: 0 5px 12px rgba(40,122,53,.3);
  transition: background .2s ease,color .2s ease,transform .2s ease;
}

.act-video:hover {
  border-color: #4da55b;
  background: linear-gradient(135deg,#318840 0%,#216a2d 100%);
  box-shadow: 0 13px 28px rgba(40,122,53,.3),inset 0 1px 0 rgba(255,255,255,.18);
  color: #fff;
  transform: translateY(-2px);
}

.act-video:hover svg {
  background: #fff;
  color: #287a35;
  transform: scale(1.05);
}

.act-call:focus-visible,
.act-video:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.act-card__foot {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  color: var(--plata-300);
  font-family: var(--font-mono);
  font-size: var(--text-3xs);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.act-never {
  margin-top: var(--space-3xl);
  padding: clamp(3rem, 6vw, 5rem);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}

.act-never h2 { color: var(--marfil); }
.act-never ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 22px; margin: 0; padding: 0; list-style: none; }
.act-never li { padding: 12px 0; border-bottom: 1px solid var(--border-color); color: var(--marfil); }

@media (max-width: 840px) {
  .act-card,.act-never { grid-template-columns: 1fr; }
  .act-card { gap: 32px; padding: 38px; }
  .act-card__head,.act-card ol,.act-alert,.act-call-row,.act-card__foot,.act-card > .act-call { grid-column: 1; }
  .act-card__head { grid-row: auto; min-height: 390px; padding: 82px 38px 48px; }
}

@media (max-width: 600px) {
  #como-actuar { padding: 124px 0 92px; }
  .act-jump { display: block; margin-bottom: 86px; padding: 26px 22px; }
  .act-jump > p { margin: 0 0 18px; }
  .act-jump > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .act-jump a { font-size: var(--text-3sm); padding: .5rem .7rem; }
  .act-jump__num { font-size: var(--text-3xs); }
  .act-card { gap: 28px; margin-top: 34px; padding: 24px 24px 48px; }
  .act-card__head { min-height: 360px; padding: 74px 24px 42px; }
  .act-card__protocol { margin-bottom: 26px; }
  .act-card__head h3 { max-width: 330px; min-height: 138px; padding: 15px 16px 17px; font-size: clamp(2.2rem,9.2vw,3rem); }
  #act-inconsciente .act-card__head h3 { font-size: clamp(1.95rem,8.2vw,2.65rem); }
  #act-herida .act-card__head h3 { font-size: clamp(2rem,8.5vw,2.72rem); }
  #act-electrica .act-card__head h3 { font-size: clamp(2.05rem,8.7vw,2.78rem); }
  .act-card ol { padding: 26px 22px 6px; background: rgba(30,33,36,.68); }
  .act-card ol li { padding-left: 36px; font-size: var(--text-base); line-height: 1.72; }
  .act-alert { padding: 19px 20px; }
  .act-call-row { display: grid; grid-template-columns: 1fr; padding: 8px; border-radius: 15px; }
  .act-call,.act-video { width: 100%; min-height: 60px; padding: 12px 16px; }
  .act-call-row > a + a { margin-top: 0; }
  .act-card__foot { justify-content: center; flex-wrap: wrap; text-align: center; }
  .act-never { gap: 34px; padding: 44px 28px; }
  .act-never ul { grid-template-columns: 1fr; }
  .act-hero-deep { min-height: 0; align-items: flex-start; }
  .act-hero-deep .act-lead { padding: 34px 24px; }
}

@media print {
  .site-header,.mobile-menu,.floating-social,.act-jump { display: none !important; }
  #como-actuar { padding: 0; background: #fff; }
  .act-card { break-inside: avoid; box-shadow: none; }
}

/* ——— Fase 4: Cómo Actuar como proceso visual ——— */
.act-process {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin: 0 0 42px;
}

.act-process__step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 150px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(206, 43, 85, 0.16), rgba(206, 43, 85, 0.05));
}

.act-process__step span {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: #ff7180;
}

.act-process__step b {
  font-family: 'Barlow Condensed', 'Bebas Neue', sans-serif;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #f5efe4;
}

.act-process__step::after {
  content: '→';
  position: absolute;
  right: -14px;
  color: #ce2b55;
  font-size: var(--text-md);
  font-weight: 700;
  z-index: 1;
}

.act-process__step:last-child::after { content: none; }

.act-card .act-flow {
  position: relative;
  display: grid;
  gap: 0;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.act-flow .act-step {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.act-flow .act-step:last-child { border-bottom: 0; }

.act-step__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #ce2b55;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: #ff7180;
  background: rgba(206, 43, 85, 0.12);
}

.act-flow .act-step:not(:last-child) .act-step__num::after {
  content: '↓';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 46px;
  color: #ce2b55;
  font-size: var(--text-base);
  font-weight: 700;
}

.act-step__body { flex: 1; }

.act-step__label {
  display: block;
  margin-bottom: 0.25rem;
  font-family: 'Barlow Condensed', 'Bebas Neue', sans-serif;
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #f5efe4;
}

.act-step__body p {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.6;
}

@media (max-width: 640px) {
  .act-process { flex-direction: column; }
  .act-process__step { flex: 1 1 auto; }
  .act-process__step::after { content: '↓'; right: auto; left: 24px; top: 100%; height: 10px; }
  .act-process__step:last-child::after { content: none; }
  .act-flow .act-step:not(:last-child) .act-step__num::after { margin-top: 52px; }
}


/* ==================================================================
   HERO CARRUSEL DE IMÁGENES
   ================================================================== */
.hero-carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-carousel .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
  will-change: opacity;
}

.hero-carousel .slide.is-active {
  opacity: 1;
}

.hero-carousel .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  opacity: 0.78;
  filter: saturate(0.9) contrast(1.08);
  /* ——— Ken Burns: reposo en ligero zoom + transición suave de regreso ——— */
  transform: scale(1.02);
  transition: transform 1.4s ease;
}

/* El zoom lento corre sobre la slide activa y se reinicia en cada activación
   (la clase .is-active se quita/agrega por goTo() en js/hero-carousel.js). */
.hero-carousel .slide.is-active img {
  animation: kenburns 9s ease-out forwards;
}

@keyframes kenburns {
  0%   { transform: scale(1.02); }
  100% { transform: scale(1.1); }
}

/* ——— Indicadores del carrusel ——— */
.hero-carousel__dots {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}

.hero-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

.hero-carousel__dot.is-active {
  background: var(--marfil);
  transform: scale(1.25);
}

.hero-carousel__dot:hover {
  background: var(--marfil);
}

/* ==================================================================
   IDENTIDAD — Sistema tricolore + escudo + placeholders
   Agregado en sesión de rediseño: tricolore italiano (rojo/marfil/verde),
   marco de escudo, y bloques de imagen pendiente para contenido
   fotográfico aún no definido por el cliente.
   ================================================================== */

/* ——— Divisor tricolore ———
   Reemplaza el divider-flag genérico entre secciones. Referencia directa
   al origen italiano del fundador (Francisco Carbonari, Génova 1867). */
.tricolore-divider {
  display: flex;
  height: 4px;
  width: 100%;
}
.tricolore-divider span { flex: 1; }
.tricolore-divider__rojo  { background: var(--rojo); }
.tricolore-divider__marfil { background: var(--marfil); }
.tricolore-divider__verde { background: var(--verde); }

/* ——— Marco de escudo ———
   Trata el escudo como sello institucional: fondo circular oscuro que
   resuelve el halo de recorte del PNG original. Estilo sobrio: borde
   neutro finísimo y sombra suave — sin anillos de color ni glow. */
.emblem-frame {
  width: var(--emblem-size, 96px);
  height: var(--emblem-size, 96px);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--grafito) 0%, var(--negro-carbono) 100%);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  flex-shrink: 0;
}
.emblem-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.emblem-frame--sm { --emblem-size: 46px; border-width: 1px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
.emblem-frame--lg { --emblem-size: 150px; }

/* ——— Placeholder de imagen pendiente ———
   Bloque visual para espacios donde la foto real (autobombas, personal,
   K9, DIM) todavía no fue provista por el cliente. Mantiene proporción
   y layout intactos para que el reemplazo final sea directo: solo hay
   que cambiar el div.img-pending por una <img>. */
.img-pending {
  position: relative;
  width: 100%;
  aspect-ratio: var(--pending-ratio, 4 / 3);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.03) 0px,
      rgba(255, 255, 255, 0.03) 10px,
      transparent 10px,
      transparent 20px
    ),
    var(--acero-600);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-lg, 12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--plata-500);
  text-align: center;
  padding: 1rem;
}
.img-pending__icon {
  width: 28px;
  height: 28px;
  opacity: 0.5;
}
.img-pending__label {
  font-family: var(--font-body);
  font-size: var(--text-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  max-width: 220px;
  line-height: 1.4;
}

/* ——— Layout de detalle de unidad (K9 / DIM) ———
   Foto (o placeholder) + texto lado a lado en desktop, apilado en mobile. */
.unit-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-2xl);
  align-items: center;
  margin-top: var(--space-2xl);
}
.unit-detail-body .unit-code {
  font-family: var(--font-mono);
  font-size: var(--text-md);
  color: var(--rojo);
  margin-bottom: var(--space-sm);
}
.unit-detail-body h2 {
  margin: 0 0 var(--space-md);
}
.unit-detail-body p {
  color: var(--plata-300);
  line-height: 1.6;
  margin: 0 0 var(--space-sm);
}
@media (max-width: 860px) {
  .unit-detail-layout {
    grid-template-columns: 1fr;
  }
}

/* ——— Link inline dentro de missing-card (agregado con contenido real) ——— */
.missing-card p a {
  color: var(--rojo);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.missing-card p a:hover { text-decoration: underline; }
.history-flash { padding: 6px; margin: 6px 0; } .history-flash__kicker { font-size: 0.75rem; margin-bottom: 4px; } .history-flash h3 { font-size: 0.875rem; margin: 4px 0; } .history-flash p { font-size: 0.75rem; margin: 0; }
