/* =============================================
   SSVP BOGOTÁ — Sistema de Gestión Web
   Design System · Variables · Global Styles
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  /* Brand Colors */
  --color-primary:     #1A3A5C;   /* azul oscuro institucional */
  --color-primary-lt:  #2E5D8E;
  --color-accent:      #C8992A;   /* dorado cálido */
  --color-accent-lt:   #E5B84A;
  --color-warm:        #D94F3D;   /* rojo solidaridad */
  --color-white:       #FDFAF6;
  --color-bg:          #F5F1EA;
  --color-surface:     #FFFFFF;
  --color-text:        #1C1C1C;
  --color-text-2:      #4A4A4A;
  --color-text-3:      #7A7A7A;
  --color-border:      #E0D9CE;
  --color-danger:      #C0392B;
  --color-success:     #1A7A4A;

  /* Typography */
  --font-display:  'Playfair Display', Georgia, serif;
  --font-body:     'DM Sans', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --sp-xs:   4px;
  --sp-sm:   8px;
  --sp-md:   16px;
  --sp-lg:   24px;
  --sp-xl:   40px;
  --sp-2xl:  64px;
  --sp-3xl:  96px;

  /* Layout */
  --nav-h:        68px;
  --topbar-h:     38px;
  --max-w:        1180px;
  --radius-sm:    6px;
  --radius-md:    12px;
  --radius-lg:    20px;
  --radius-pill:  100px;

  /* Shadows */
  --shadow-sm:  0 1px 4px rgba(0,0,0,.08);
  --shadow-md:  0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:  0 12px 40px rgba(0,0,0,.14);

  /* Transitions */
  --ease:       cubic-bezier(.4,0,.2,1);
  --dur-fast:   180ms;
  --dur-med:    300ms;
  --dur-slow:   500ms;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; }
ul, ol { list-style: none; }

/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-h);
  background: var(--color-primary);
  color: rgba(255,255,255,.85);
  font-size: 13px;
  display: flex;
  align-items: center;
}
.topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}
.topbar-contact { display: flex; align-items: center; gap: var(--sp-lg); flex-wrap: wrap; }
.topbar-contact a {
  display: flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,.8);
  transition: color var(--dur-fast) var(--ease);
}
.topbar-contact a:hover { color: var(--color-accent-lt); }
.topbar-social { display: flex; align-items: center; gap: 12px; }
.topbar-social a {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: rgba(255,255,255,.7);
  transition: all var(--dur-fast) var(--ease);
  font-size: 13px;
}
.topbar-social a:hover { background: rgba(255,255,255,.15); color: #fff; }

/* ---- Main Nav ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-med) var(--ease);
}
.site-nav.scrolled { box-shadow: var(--shadow-md); }
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary);
  flex-shrink: 0;
}
.nav-logo .logo-icon {
  width: 38px; height: 38px;
  background: var(--color-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
}
.nav-logo span { line-height: 1.2; }
.nav-logo .logo-sub { display: block; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 1;
  justify-content: center;
}
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 3px;
  padding: 6px 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-2);
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: var(--color-bg); color: var(--color-primary); }
.nav-link .chevron { font-size: 10px; transition: transform var(--dur-fast) var(--ease); }
.nav-item:hover .chevron { transform: rotate(180deg); }

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 230px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all var(--dur-med) var(--ease);
  /* padding-top reemplaza el gap de 8px: el menú queda
     visualmente separado pero el hover es continuo */
  padding: 8px 6px 6px;
}
.nav-item:hover .dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
.dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--color-text-2);
  border-radius: var(--radius-sm);
  transition: all var(--dur-fast) var(--ease);
}
.dropdown a:hover { background: var(--color-bg); color: var(--color-primary); }
.dropdown a .dd-icon { font-size: 15px; width: 20px; text-align: center; }

.nav-cta {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
/* Botones dentro del nav más compactos sin alterar el resto de la app */
.nav-cta .btn {
  padding: 8px 8px;
  font-size: 13px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 22px;
  font-size: 14px; font-weight: 600;
  border: none; border-radius: var(--radius-pill);
  transition: all var(--dur-fast) var(--ease);
  cursor: pointer;
}
.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(200,153,42,.35);
}
.btn-primary:hover { background: var(--color-accent-lt); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(200,153,42,.45); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-login {
  background: var(--color-primary);
  color: #fff;
  font-size: 13px;
  padding: 7px 8px;
}
.btn-login:hover { background: var(--color-primary-lt); transform: translateY(-1px); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  border: none; background: none;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: all var(--dur-med) var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Page Wrapper ---- */
.page { display: none; }
.page.active { display: block; }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 560px;
  display: flex; align-items: center;
  overflow: hidden;
  background-color: var(--color-primary);
}
/* ── Hero slider ─────────────────────────────────────────────── */
.hero-slider {
  position: absolute; inset: 0;
  overflow: hidden;
}

/* Cada diapositiva ocupa todo el contenedor */
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  /* Ken Burns individual por diapositiva */
  transform: scale(1.06);
  transition:
    opacity 1.1s cubic-bezier(.4,0,.2,1),
    transform 8s ease;
  will-change: opacity, transform;
}
.hero-slide.active {
  opacity: 1;
  transform: scale(1.01);
}
/* Salida suave de la diapositiva anterior */
.hero-slide.leaving {
  opacity: 0;
  transform: scale(1.08);
  transition:
    opacity 1.1s cubic-bezier(.4,0,.2,1),
    transform 1.1s ease;
}

/* ── Overlay de legibilidad ── */
.hero-pattern {
  position: absolute; inset: 0;
  background:
    linear-gradient(
      105deg,
      rgba(10, 26, 50, 0.82) 0%,
      rgba(14, 36, 64, 0.72) 45%,
      rgba(14, 36, 64, 0.40) 100%
    ),
    radial-gradient(circle at 72% 50%, rgba(200,153,42,.10) 0%, transparent 55%);
  pointer-events: none;
}

/* ── Flechas de navegación ── */
.hero-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.45);
  background: rgba(10,26,50,.35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all var(--dur-fast) var(--ease);
}
.hero-arrow:hover {
  background: rgba(10,26,50,.70);
  border-color: rgba(255,255,255,.85);
  transform: translateY(-50%) scale(1.08);
}
.hero-arrow-prev { left: 20px; }
.hero-arrow-next { right: 20px; }

/* ── Dots indicadores ── */
.hero-dots {
  position: absolute;
  bottom: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex; gap: 10px; align-items: center;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.7);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all var(--dur-fast) var(--ease);
}
.hero-dot.active {
  background: #fff;
  border-color: #fff;
  width: 28px;
  border-radius: 5px;
}
.hero-dot:hover:not(.active) {
  background: rgba(255,255,255,.45);
}

/* ── Responsive del slider ── */
@media (max-width: 768px) {
  .hero-slide { background-position: center top; }
  .hero-arrow { width: 38px; height: 38px; font-size: 20px; }
  .hero-arrow-prev { left: 10px; }
  .hero-arrow-next { right: 10px; }
}
@media (max-width: 480px) {
  /* Ocultar flechas en pantallas muy pequeñas, los dots son suficientes */
  .hero-arrow { display: none; }
  .hero-dots { bottom: 14px; }
}

/* ── Respeta movimiento reducido ── */
@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide.active,
  .hero-slide.leaving {
    transition: opacity .4s ease;
    transform: none !important;
  }
}
.hero-inner {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-3xl) var(--sp-xl);
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3xl);
  align-items: center;
}
.hero-content { color: #fff; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(200,153,42,.2);
  border: 1px solid rgba(200,153,42,.4);
  color: var(--color-accent-lt);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: var(--sp-lg);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.18;
  margin-bottom: var(--sp-lg);
  color: #fff;
}
.hero-title span { color: var(--color-accent-lt); }
.hero-desc {
  font-size: 17px;
  color: rgba(255,255,255,.78);
  margin-bottom: var(--sp-xl);
  max-width: 480px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--sp-md);
}
.stat-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  padding: var(--sp-lg);
  text-align: center;
  color: #fff;
  transition: all var(--dur-med) var(--ease);
}
.stat-card:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.stat-num {
  font-family: var(--font-display);
  font-size: 36px; font-weight: 700;
  color: var(--color-accent-lt);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label { font-size: 13px; color: rgba(255,255,255,.65); }

/* ---- Section ---- */
.section { padding: var(--sp-3xl) var(--sp-xl); max-width: var(--max-w); margin: 0 auto; }
.section-header { text-align: center; margin-bottom: var(--sp-2xl); }
.section-tag {
  display: inline-block;
  font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--sp-sm);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
  margin-bottom: var(--sp-md);
}
.section-desc {
  font-size: 16px;
  color: var(--color-text-2);
  max-width: 580px;
  margin: 0 auto;
}

/* ---- Program Cards ---- */
.programs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-lg);
}
.program-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--dur-med) var(--ease);
  cursor: pointer;
}
.program-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--color-accent); }
.card-img {
  height: 180px;
  display: flex; align-items: center; justify-content: center;
  font-size: 60px;
}
.card-body { padding: var(--sp-lg); }
.card-tag {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--color-accent);
  margin-bottom: var(--sp-sm);
}
.card-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--sp-sm);
  line-height: 1.3;
}
.card-desc { font-size: 14px; color: var(--color-text-2); line-height: 1.65; }
.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: var(--sp-md);
  font-size: 14px; font-weight: 600;
  color: var(--color-primary);
  transition: gap var(--dur-fast) var(--ease);
}
.card-link:hover { gap: 10px; color: var(--color-accent); }

/* ---- Donation Banner ---- */
.donation-banner {
  background:
    linear-gradient(
      105deg,
      rgba(10, 26, 50, 0.82) 0%,
      rgba(14, 36, 64, 0.72) 45%,
      rgba(14, 36, 64, 0.40) 100%
    ),
    url('../img/hogarterceraedad.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding: var(--sp-3xl) var(--sp-xl);
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.donation-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(200,153,42,.15) 0%, transparent 60%);
  pointer-events: none;
}
.donation-banner-inner { position: relative; max-width: 700px; margin: 0 auto; }
.donation-banner h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 38px); font-weight: 700; margin-bottom: var(--sp-md); }
.donation-banner p { color: rgba(255,255,255,.78); margin-bottom: var(--sp-xl); font-size: 17px; }

/* ---- Footer ---- */
.site-footer {
  background: #0e2440;
  color: rgba(255,255,255,.7);
  padding: var(--sp-3xl) var(--sp-xl) var(--sp-xl);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-2xl);
  padding-bottom: var(--sp-2xl);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: var(--sp-md); }
.footer-brand .logo-icon { width: 38px; height: 38px; background: rgba(255,255,255,.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.footer-brand .brand-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: #fff; }
.footer-brand p { font-size: 14px; line-height: 1.7; margin-bottom: var(--sp-lg); }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); font-size: 14px; transition: all var(--dur-fast) var(--ease); }
.footer-social a:hover { background: var(--color-accent); color: #fff; }
.footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.4); margin-bottom: var(--sp-md); }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,.65); margin-bottom: 10px; transition: color var(--dur-fast) var(--ease); }
.footer-col a:hover { color: var(--color-accent-lt); }
.footer-col address { font-style: normal; font-size: 14px; line-height: 1.8; }
.footer-bottom { max-width: var(--max-w); margin: 0 auto; padding-top: var(--sp-lg); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: rgba(255,255,255,.35); flex-wrap: wrap; gap: var(--sp-md); }
.footer-bottom a { color: rgba(255,255,255,.45); transition: color var(--dur-fast) var(--ease); }
.footer-bottom a:hover { color: rgba(255,255,255,.8); }

/* ---- WhatsApp Float ---- */
.wa-fab {
  position: fixed;
  /* REUBICADO 2026-09: antes bottom/right. Ahora abajo a la IZQUIERDA para
     dejar la esquina derecha al QR de donaciones. La burbuja se alinea a
     flex-start para que se despliegue hacia la derecha y no se salga. */
  bottom: 28px; left: 28px;
  z-index: 999;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
}
.wa-bubble {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-md);
  width: 260px;
  font-size: 13px;
  opacity: 0;
  transform: translateY(8px) scale(.97);
  pointer-events: none;
  transition: all var(--dur-med) var(--ease);
  border: 1px solid var(--color-border);
}
.wa-bubble.open { opacity: 1; transform: none; pointer-events: all; }
.wa-bubble-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}
.wa-bubble-head .wa-avatar { width: 36px; height: 36px; background: #25D366; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; flex-shrink: 0; }
.wa-bubble-head .wa-name { font-weight: 600; color: var(--color-text); font-size: 14px; }
.wa-bubble-head .wa-status { font-size: 11px; color: var(--color-success); }
.wa-bubble p { color: var(--color-text-2); margin-bottom: 12px; }
.wa-chat-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.wa-chat-btn:hover { background: #1ebe5d; }
.wa-btn {
  width: 58px; height: 58px;
  background: #25D366;
  border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
  animation: wa-pulse 2.5s ease-in-out infinite;
  color: #fff;
}
.wa-btn:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,.6); }
@keyframes wa-pulse {
  0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,.45); }
  50% { box-shadow: 0 4px 28px rgba(37,211,102,.7), 0 0 0 12px rgba(37,211,102,.08); }
}

/* ---- Page Inner Content ---- */
.page-hero {
  background:
    linear-gradient(
      105deg,
      rgba(10, 26, 50, 0.82) 0%,
      rgba(14, 36, 64, 0.72) 45%,
      rgba(14, 36, 64, 0.40) 100%
    ),
    url('../img/ssvpfondo.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  padding: var(--sp-2xl) var(--sp-xl);
  text-align: center;
  color: #fff;
  position: relative;
}

/* ── page-hero alto (igual al Slider Hero) para páginas internas ── */
#page-quienes-somos .page-hero,
#page-como-ayudar   .page-hero,
#page-noticias      .page-hero,
#page-permanencia   .page-hero,
#page-contacto      .page-hero {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Imagen propia de cada sección */
#page-quienes-somos .page-hero {
  background-image:
    linear-gradient(105deg, rgba(10,26,50,.82) 0%, rgba(14,36,64,.72) 45%, rgba(14,36,64,.40) 100%),
    url('../img/ssvpfondo.jpg');
}
#page-como-ayudar .page-hero {
  background-image:
    linear-gradient(105deg, rgba(10,26,50,.82) 0%, rgba(14,36,64,.72) 45%, rgba(14,36,64,.40) 100%),
    url('../img/ayuda.jpg');
}
#page-noticias .page-hero {
  background-image:
    linear-gradient(105deg, rgba(10,26,50,.82) 0%, rgba(14,36,64,.72) 45%, rgba(14,36,64,.40) 100%),
    url('../img/noticias.jpg');
}
#page-permanencia .page-hero {
  background-image:
    linear-gradient(105deg, rgba(10,26,50,.82) 0%, rgba(14,36,64,.72) 45%, rgba(14,36,64,.40) 100%),
    url('../img/direcciongeneral.jpg');
}
#page-contacto .page-hero {
  background-image:
    linear-gradient(105deg, rgba(10,26,50,.82) 0%, rgba(14,36,64,.72) 45%, rgba(14,36,64,.40) 100%),
    url('../img/contacto.jpg');
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  margin-bottom: var(--sp-md);
}
.page-hero p { color: rgba(255,255,255,.75); font-size: 17px; max-width: 600px; margin: 0 auto; }

/* ---- Content blocks ---- */
.content-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-lg);
}
.content-block h3 {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--sp-md);
}
.content-block p { color: var(--color-text-2); margin-bottom: var(--sp-md); }
.content-block ul { padding-left: var(--sp-lg); }
.content-block ul li { color: var(--color-text-2); margin-bottom: 8px; position: relative; }
.content-block ul li::before { content: '✦'; color: var(--color-accent); font-size: 10px; position: absolute; left: -18px; top: 4px; }

/* ---- Two-col layout ---- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-xl); align-items: start; }
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

/* ---- How to Help ---- */
.help-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-lg); }
.help-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl);
  text-align: center;
  transition: all var(--dur-med) var(--ease);
}
.help-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--color-primary); }
.help-card .hc-icon { font-size: 44px; margin-bottom: var(--sp-md); }
.help-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--color-primary); margin-bottom: var(--sp-sm); }
.help-card p { font-size: 14px; color: var(--color-text-2); margin-bottom: var(--sp-lg); }

/* ---- News ---- */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--sp-lg); }
.news-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--dur-med) var(--ease);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.news-card-img { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 52px; }
.news-card-body { padding: var(--sp-lg); }
.news-meta { font-size: 12px; color: var(--color-text-3); margin-bottom: 8px; }
.news-card-body h3 { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--color-primary); margin-bottom: 8px; line-height: 1.3; }
.news-card-body p { font-size: 14px; color: var(--color-text-2); }

/* ---- Gallery ---- */
/* Las reglas de .gallery-grid / .gallery-item se redefinen por completo en el
   bloque "GALERÍA POR MESES" al final de este archivo (rediseño 2026-08). */

/* ---- Contact ---- */
.contact-form { display: grid; gap: var(--sp-md); }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--color-text-2); }
.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 15px;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--dur-fast) var(--ease);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(26,58,92,.08); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
.form-group textarea { resize: vertical; min-height: 140px; }
.form-submit { margin-top: 8px; }

/* ---- Login Page ---- */
.login-wrapper {
  min-height: calc(100vh - var(--nav-h) - var(--topbar-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-xl);
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}
.login-wrapper::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26,58,92,.08) 0%, transparent 70%);
  top: -200px; right: -200px;
}
.login-wrapper::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,153,42,.06) 0%, transparent 70%);
  bottom: -100px; left: -100px;
}
.login-card {
  position: relative;
  width: 100%; max-width: 440px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-2xl) var(--sp-xl);
  box-shadow: var(--shadow-lg);
}
.login-header { text-align: center; margin-bottom: var(--sp-xl); }
.login-logo { width: 56px; height: 56px; background: var(--color-primary); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; margin: 0 auto var(--sp-md); }
.login-header h1 { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--color-primary); margin-bottom: 6px; }
.login-header p { font-size: 14px; color: var(--color-text-3); }
.login-form { display: flex; flex-direction: column; gap: var(--sp-md); }
.input-icon { position: relative; }
.input-icon input { padding-left: 46px; width: 100%; }
.input-icon .icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--color-text-3); font-size: 16px; pointer-events: none; }
.input-icon .toggle-pass { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); border: none; background: none; color: var(--color-text-3); cursor: pointer; font-size: 14px; }
.btn-full { width: 100%; padding: 13px; font-size: 15px; border-radius: var(--radius-sm); }
.login-footer { margin-top: var(--sp-xl); text-align: center; font-size: 13px; color: var(--color-text-3); }
.login-footer a { color: var(--color-primary); font-weight: 600; }
.login-divider { display: flex; align-items: center; gap: var(--sp-md); margin: var(--sp-md) 0; color: var(--color-border); font-size: 12px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }
.security-badge { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: var(--sp-lg); font-size: 12px; color: var(--color-text-3); }
.security-badge .lock { color: var(--color-success); }
.login-alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: var(--sp-md);
  display: none;
}
.login-alert.error { background: #fef2f2; border: 1px solid #fecaca; color: var(--color-danger); display: flex; align-items: center; gap: 8px; }
.login-alert.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--color-success); display: flex; align-items: center; gap: 8px; }
.forgot-link { text-align: right; font-size: 13px; margin-top: -8px; }
.forgot-link a { color: var(--color-primary-lt); }

/* ---- Multimedia ---- */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-lg); }
.video-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; transition: all var(--dur-med) var(--ease); }
.video-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.video-thumb { height: 160px; background: var(--color-primary); display: flex; align-items: center; justify-content: center; font-size: 48px; position: relative; cursor: pointer; }
.video-thumb::after { content: '▶'; position: absolute; width: 48px; height: 48px; background: rgba(255,255,255,.9); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--color-primary); }
.video-body { padding: var(--sp-md); }
.video-body h4 { font-weight: 600; color: var(--color-primary); margin-bottom: 4px; font-size: 15px; }
.video-body p { font-size: 13px; color: var(--color-text-3); }

/* ---- DIAN ---- */
.dian-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--sp-lg); }
.dian-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--sp-xl); display: flex; align-items: flex-start; gap: var(--sp-md); transition: all var(--dur-med) var(--ease); }
.dian-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-sm); }
.dian-icon { font-size: 32px; flex-shrink: 0; }
.dian-info h4 { font-weight: 600; color: var(--color-primary); margin-bottom: 4px; }
.dian-info p { font-size: 14px; color: var(--color-text-2); }
.dian-info a { color: var(--color-primary-lt); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; }

/* ---- Toast ---- */
.toast {
  position: fixed; top: 24px; right: 24px;
  z-index: 9999;
  background: var(--color-primary);
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  transform: translateX(120%);
  transition: transform var(--dur-med) var(--ease);
  max-width: 320px;
}
.toast.show { transform: none; }
.toast.success { background: var(--color-success); }
.toast.error { background: var(--color-danger); }

/* ---- Responsive ---- */
/* Compresión progresiva: entre 1280 y 1024 px el menú ajusta */
@media (max-width: 1280px) {
  .nav-link { padding: 6px 7px; font-size: 12.5px; }
  .nav-logo  { font-size: 15px; }
  .nav-cta .btn { padding: 7px 12px; font-size: 12.5px; }
}
@media (max-width: 1024px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .hero-inner { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .hero-stats { max-width: 480px; }
  /* Ocultar "Ingresar" para ganar espacio; queda solo "Donar" */
  .nav-cta .btn-login { display: none; }
  .nav-link { padding: 6px 6px; font-size: 12px; }
}
@media (max-width: 768px) {
  :root { --sp-xl: 24px; --sp-3xl: 60px; }
  .topbar-contact { display: none; }
  .nav-menu { display: none; flex-direction: column; position: fixed; inset: calc(var(--topbar-h) + var(--nav-h)) 0 0; background: var(--color-surface); padding: var(--sp-lg); overflow-y: auto; gap: 4px; }
  .nav-menu.open { display: flex; }
  .nav-item { width: 100%; }
  .nav-link { width: 100%; justify-content: space-between; padding: 14px 16px; }
  .dropdown { position: static; transform: none; opacity: 1; pointer-events: all; box-shadow: none; border: none; border-radius: 0; background: var(--color-bg); display: none; }
  .nav-item.open .dropdown { display: block; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-primary { display: none; }
  .two-col { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .wa-bubble { width: 240px; }
  .hero { min-height: 620px; }

  /* Desactivar parallax fijo en móvil (iOS/Android no lo soportan correctamente) */
  .donation-banner,
  .page-hero {
    background-attachment: scroll;
    background-position: center center;
  }
  /* Quiénes somos: alto igual al hero en móvil */
  #page-quienes-somos .page-hero,
  #page-como-ayudar   .page-hero,
  #page-noticias      .page-hero,
  #page-permanencia   .page-hero,
  #page-contacto      .page-hero { min-height: 620px; }
}
@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; max-width: 240px; margin: 0 auto; }
  .nav-cta { gap: 6px; }
  .section { padding: var(--sp-2xl) var(--sp-md); }
  .hero { min-height: 680px; }
  #page-quienes-somos .page-hero,
  #page-como-ayudar   .page-hero,
  #page-noticias      .page-hero,
  #page-permanencia   .page-hero,
  #page-contacto      .page-hero { min-height: 680px; }
}
@media (min-height: 900px) {
  .hero { min-height: 640px; }
  #page-quienes-somos .page-hero,
  #page-como-ayudar   .page-hero,
  #page-noticias      .page-hero,
  #page-permanencia   .page-hero,
  #page-contacto      .page-hero { min-height: 640px; }
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
.fade-in { animation: fadeInUp var(--dur-slow) var(--ease) both; }
.fade-in-d1 { animation-delay: .1s; }
.fade-in-d2 { animation-delay: .2s; }
.fade-in-d3 { animation-delay: .3s; }
.fade-in-d4 { animation-delay: .4s; }

/* ---- Utilities ---- */
.text-center { text-align: center; }
.mb-lg { margin-bottom: var(--sp-lg); }
.mb-xl { margin-bottom: var(--sp-xl); }
.mt-xl { margin-top: var(--sp-xl); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-md { gap: var(--sp-md); }
.accent { color: var(--color-accent); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ==========================================================================
   BLOQUE MIGRADO DESDE EL <style> INLINE DE index.html (corrección 2026-08)
   Se anexa al FINAL para conservar exactamente el mismo orden de cascada
   que tenia cuando estaba en el <head> despues de <link href=css/main.css>.
   ========================================================================== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Intro a pantalla completa */
        #videoModal {
            position: fixed;
            inset: 0;
            width: 100vw;
            height: 100vh;
            background: #000;
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            opacity: 1;
            transition: opacity 600ms ease;
        }
        /* Estado de salida: se desvanece antes de retirarse del DOM visible */
        #videoModal.is-hidden {
            opacity: 0;
            pointer-events: none;
        }

        /* Video del intro a pantalla completa */
        #introVideo {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        /* Botón "Saltar intro" */
        .intro-skip {
            position: absolute;
            bottom: clamp(20px, 5vh, 44px);
            right: clamp(20px, 5vw, 44px);
            z-index: 2;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            font-family: var(--font-body, 'DM Sans', sans-serif);
            font-size: 13px;
            font-weight: 600;
            letter-spacing: .04em;
            color: #fff;
            background: rgba(255, 255, 255, .12);
            border: 1px solid rgba(255, 255, 255, .35);
            border-radius: var(--radius-pill, 100px);
            cursor: pointer;
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            transition: background .25s ease, transform .25s ease, opacity .4s ease;
            opacity: 0;
            animation: introSkipIn .5s ease 1.4s forwards;
        }
        .intro-skip:hover { background: rgba(255, 255, 255, .22); transform: translateY(-1px); }
        .intro-skip:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
        @keyframes introSkipIn { to { opacity: 1; } }

        /* =============================================
           PAGE ACCESO — Fondo imagen con transparencia
           ============================================= */
        #page-acceso {
            position: relative;
            background-image: url('img/direcciongeneral.jpg');
            background-size: cover;
            background-position: center top;
            background-repeat: no-repeat;
            background-attachment: fixed;
        }
        /* Capa semitransparente blanca al 60% sobre la imagen */
        #page-acceso::before {
            content: '';
            position: absolute;
            inset: 0;
            background: rgba(255, 255, 255, 0.60);
            z-index: 0;
        }
        /* Wrapper posicionado sobre la capa */
        #page-acceso .login-wrapper {
            background: transparent;
            position: relative;
            z-index: 1;
        }
        /* Suprimir los círculos decorativos originales del wrapper */
        #page-acceso .login-wrapper::before,
        #page-acceso .login-wrapper::after {
            display: none;
        }
        /* Card con fondo blanco casi opaco y sombra reforzada */
        #page-acceso .login-card {
            background: rgba(255, 255, 255, 0.97);
            box-shadow: 0 24px 64px rgba(17, 42, 69, 0.22),
                        0 4px 16px rgba(17, 42, 69, 0.12);
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }
        /* En iOS, background-attachment:fixed causa bugs de render */
        @media (max-width: 600px) {
            #page-acceso {
                background-attachment: scroll;
            }
        }

        /* =============================================
           ORGANIGRAMA INSTITUCIONAL — Responsive v2
           Paleta: azules institucionales + dorado SSVP
           ============================================= */

        /* ── Paleta exclusiva del organigrama ── */
        :root {
            --org-l1:   #112A45;   /* Presidenta      – azul más oscuro   */
            --org-l2:   #1A3F64;   /* Dirección       – azul oscuro        */
            --org-l3:   #245480;   /* Asesoría        – azul medio         */
            --org-l4:   #2E6899;   /* Consejos        – azul más claro     */
            --org-gold: #C8992A;   /* Acento dorado                        */
            --org-gold-lt: #E5B84A;
            --org-text: #FFFFFF;   /* Texto principal sobre azul           */
            --org-text-sub: rgba(255,255,255,.75); /* Texto secundario    */
            --org-line: rgba(200,153,42,.6);       /* Líneas conectoras    */
        }

        /* ── Contenedor general ── */
        .org-wrap {
            padding: var(--sp-lg) var(--sp-md);
        }

        /* ── Árbol: columna centrada (desktop) ── */
        .org-tree {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
        }

        /* ── Línea vertical conectora ── */
        .org-vc {
            width: 2px;
            height: 32px;
            background: linear-gradient(to bottom, var(--org-gold), var(--org-gold-lt));
            flex-shrink: 0;
        }

        /* ── Fila horizontal de nodos ── */
        .org-hbar {
            display: flex;
            justify-content: center;
            align-items: flex-start;
            position: relative;
            width: 100%;
            gap: 12px;
        }
        /* Línea horizontal sobre los nodos */
        .org-hbar::before {
            content: '';
            position: absolute;
            top: 0;
            height: 2px;
            background: linear-gradient(to right,
                transparent,
                var(--org-gold) 20%,
                var(--org-gold) 80%,
                transparent);
        }
        .org-hbar-2::before { left: 25%; right: 25%; }
        .org-hbar-3::before { left: 16%; right: 16%; }

        /* ── Nodo individual ── */
        .org-node {
            display: flex;
            flex-direction: column;
            align-items: center;
            flex: 1;
            min-width: 0;       /* permite que flex shrink funcione */
            max-width: 260px;
        }
        .org-node-vc {
            width: 2px;
            height: 26px;
            background: var(--org-gold);
            flex-shrink: 0;
        }

        /* ── Tarjeta base ── */
        .org-card {
            width: 100%;
            border-radius: var(--radius-md);
            padding: 18px 14px;
            text-align: center;
            box-shadow: var(--shadow-md);
            transition: transform var(--dur-med) var(--ease),
                        box-shadow var(--dur-med) var(--ease);
            cursor: default;
            color: var(--org-text);
            border: 1px solid rgba(255,255,255,.10);
        }
        .org-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 16px 48px rgba(17,42,69,.35);
        }

        /* ── Nivel 1: Presidenta ── */
        .org-card-top {
            background: var(--org-l1);
            border: 2px solid var(--org-gold);
            max-width: 300px;
        }

        /* ── Nivel 2: Dirección ── */
        .org-card-mid {
            background: var(--org-l2);
            border-top: 3px solid var(--org-gold);
        }

        /* ── Nivel 3: Asesoría / Presidencia Saliente ── */
        .org-card-staff {
            background: var(--org-l3);
            border-top: 3px solid var(--org-gold-lt);
        }

        /* ── Nivel 4: Consejos Particulares ── */
        .org-card-low {
            background: var(--org-l4);
            border-top: 3px solid var(--org-gold-lt);
        }

        /* ── Textos ── */
        .org-label {                         /* etiqueta de categoría */
            display: inline-block;
            font-size: 9.5px;
            text-transform: uppercase;
            letter-spacing: 1.8px;
            color: var(--org-gold-lt);
            margin-bottom: 7px;
            font-family: var(--font-body);
            font-weight: 600;
        }
        .org-name {
            font-family: var(--font-display);
            font-size: 13.5px;
            font-weight: 700;
            line-height: 1.4;
            color: #FFFFFF;
            margin-bottom: 5px;
        }
        .org-role {
            font-size: 10.5px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--org-text-sub);
            font-family: var(--font-body);
            line-height: 1.35;
        }
        .org-council {
            margin-top: 6px;
            font-size: 11px;
            color: rgba(255,255,255,.65);
            font-style: italic;
            line-height: 1.35;
        }

        /* ── Separador de sección ── */
        .org-divider-label {
            font-family: var(--font-body);
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 2.5px;
            color: var(--color-text-3);
            background: var(--color-bg);
            padding: 5px 18px;
            border: 1px solid var(--org-gold);
            border-radius: var(--radius-pill);
            margin: 2px 0;
        }

        /* ══════════════════════════════════════════
           RESPONSIVE — TABLET  (≤ 860px)
        ══════════════════════════════════════════ */
        @media (max-width: 860px) {
            .org-node { max-width: 220px; }
            .org-card { padding: 14px 10px; }
            .org-name { font-size: 12px; }
            .org-role, .org-council { font-size: 10px; }
        }

        /* ══════════════════════════════════════════
           RESPONSIVE — MÓVIL  (≤ 580px)
           Árbol horizontal → lista vertical apilada
        ══════════════════════════════════════════ */
        @media (max-width: 580px) {

            /* El árbol se vuelve una columna centrada */
            .org-tree {
                gap: 0;
            }

            /* Filas horizontales se convierten en columnas */
            .org-hbar {
                flex-direction: column;
                align-items: center;
                gap: 0;
                width: 100%;
            }

            /* Ocultar la línea horizontal: no aplica en modo columna */
            .org-hbar::before { display: none; }

            /* Cada nodo ocupa todo el ancho */
            .org-node {
                width: 100%;
                max-width: 400px;
                flex: none;
                padding: 0;
            }

            /* Conector vertical entre cards del mismo nivel */
            .org-node-vc {
                height: 20px;
            }

            /* El primer nodo del grupo no lleva conector superior */
            .org-hbar > .org-node:first-child .org-node-vc {
                height: 0;
            }

            /* Cards a ancho completo en móvil */
            .org-card,
            .org-card-top {
                max-width: 100%;
                padding: 16px 18px;
                text-align: left;
                display: flex;
                flex-direction: column;
                gap: 3px;
            }

            .org-name { font-size: 14px; }
            .org-role { font-size: 11px; }
            .org-label { margin-bottom: 3px; }

            /* Línea de conector entre niveles más corta */
            .org-vc { height: 20px; }
        }

        /* =============================================
           MODALES — "Ver más" content-block
           ============================================= */

        /* Overlay de fondo */
        .cb-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(10, 22, 40, 0.75);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: var(--sp-md);
            opacity: 0;
            visibility: hidden;
            transition: opacity 400ms var(--ease), visibility 400ms var(--ease);
        }
        .cb-modal-overlay.is-open {
            opacity: 1;
            visibility: visible;
        }

        /* Panel del modal */
        .cb-modal {
            background: var(--color-surface);
            border-radius: var(--radius-lg);
            width: 85vw;
            max-width: 860px;
            max-height: 85vh;
            overflow-y: auto;
            overflow-x: hidden;
            box-shadow: 0 32px 80px rgba(10,22,40,.45);
            transform: translateY(36px) scale(0.97);
            transition: transform 400ms var(--ease);
            position: relative;
            scroll-behavior: smooth;
        }
        /* Scrollbar personalizada */
        .cb-modal::-webkit-scrollbar { width: 6px; }
        .cb-modal::-webkit-scrollbar-track { background: var(--color-bg); border-radius: 4px; }
        .cb-modal::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 4px; }

        .cb-modal-overlay.is-open .cb-modal {
            transform: translateY(0) scale(1);
        }

        /* Cabecera con imagen hero */
        .cb-modal-img {
            width: 100%;
            max-height: 320px;
            object-fit: cover;
            border-radius: var(--radius-lg) var(--radius-lg) 0 0;
            display: block;
        }

        /* Contenido principal del modal */
        .cb-modal-body {
            padding: var(--sp-xl) var(--sp-xl) var(--sp-2xl);
        }

        /* Etiqueta categórica */
        .cb-modal-tag {
            display: inline-block;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: .12em;
            text-transform: uppercase;
            color: var(--color-accent);
            margin-bottom: var(--sp-sm);
        }

        /* Título */
        .cb-modal-title {
            font-family: var(--font-display);
            font-size: clamp(22px, 2.8vw, 30px);
            font-weight: 700;
            color: var(--color-primary);
            line-height: 1.2;
            margin-bottom: var(--sp-md);
        }

        /* Divisor dorado */
        .cb-modal-divider {
            width: 56px;
            height: 3px;
            background: linear-gradient(90deg, var(--color-accent), var(--color-accent-lt));
            border-radius: 3px;
            margin-bottom: var(--sp-lg);
        }

        /* Texto explicativo */
        .cb-modal-text {
            font-size: 15px;
            line-height: 1.8;
            color: var(--color-text-2);
        }
        .cb-modal-text p { margin-bottom: var(--sp-md); }
        .cb-modal-text p:last-child { margin-bottom: 0; }

        /* Reproductor de audio */
        .cb-modal-audio-wrap {
            background: linear-gradient(135deg, var(--color-primary) 0%, #2E5D8E 100%);
            border-radius: var(--radius-md);
            padding: var(--sp-lg) var(--sp-xl);
            margin: var(--sp-xl) 0;
            display: flex;
            flex-direction: column;
            gap: var(--sp-sm);
        }
        .cb-modal-audio-label {
            font-size: 12px;
            font-weight: 600;
            letter-spacing: .1em;
            text-transform: uppercase;
            color: rgba(255,255,255,.6);
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .cb-modal-audio-label::before {
            content: '🎧';
            font-size: 16px;
        }
        .cb-modal-audio-title {
            font-family: var(--font-display);
            font-size: 16px;
            color: #fff;
            font-weight: 600;
        }
        .cb-modal-audio-wrap audio {
            width: 100%;
            height: 40px;
            border-radius: var(--radius-sm);
            accent-color: var(--color-accent);
            margin-top: 4px;
        }

        /* Botón cerrar */
        .cb-modal-close {
            position: sticky;
            top: var(--sp-md);
            float: right;
            margin: var(--sp-md) var(--sp-md) calc(-1 * var(--sp-md) - 44px) 0;
            z-index: 10;
            width: 40px; height: 40px;
            border-radius: 50%;
            background: rgba(255,255,255,.9);
            border: 1px solid var(--color-border);
            box-shadow: var(--shadow-md);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            color: var(--color-primary);
            cursor: pointer;
            transition: all var(--dur-fast) var(--ease);
            line-height: 1;
        }
        .cb-modal-close:hover {
            background: var(--color-primary);
            color: #fff;
            transform: rotate(90deg);
        }

        /* Botón "Ver más" dentro de content-block */
        .btn-ver-mas {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin-top: var(--sp-lg);
            padding: 10px 22px;
            background: linear-gradient(135deg, var(--color-primary), var(--color-primary-lt));
            color: #fff;
            font-family: var(--font-body);
            font-size: 14px;
            font-weight: 600;
            border-radius: var(--radius-pill);
            border: none;
            cursor: pointer;
            box-shadow: 0 4px 14px rgba(26,58,92,.30);
            transition: all var(--dur-med) var(--ease);
            letter-spacing: .03em;
        }
        .btn-ver-mas::after {
            content: '→';
            transition: transform var(--dur-fast) var(--ease);
        }
        .btn-ver-mas:hover {
            background: linear-gradient(135deg, var(--color-primary-lt), var(--color-accent));
            box-shadow: 0 6px 22px rgba(26,58,92,.40);
            transform: translateY(-2px);
        }
        .btn-ver-mas:hover::after { transform: translateX(4px); }

        /* Bloquear scroll del body cuando el modal está abierto */
        body.modal-open { overflow: hidden; }

        /* Responsive */
        @media (max-width: 600px) {
            .cb-modal { width: 92vw; max-height: 90vh; }
            .cb-modal-body { padding: var(--sp-lg); }
        }

        /* =============================================
           VIDEO EMBED — YouTube responsivo
           ============================================= */
        .video-embed-wrap {
            position: relative;
            width: 100%;
            padding-top: 56.25%; /* relación 16:9 */
            background: #000;
            border-radius: var(--radius-md) var(--radius-md) 0 0;
            overflow: hidden;
        }
        .video-embed-wrap iframe {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            border: none;
            display: block;
        }

        /* =============================================
           MODAL PUBLICITARIO — GRAN BINGO ANUAL
           Fondo: img/bingo.jpg  +  cuenta regresiva azul (#1E5A96)
           anclada en el recuadro "FALTAN:" (esquina inferior derecha).
           ============================================= */
        .wv-overlay {
            position: fixed;
            inset: 0;
            z-index: 10050;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: var(--sp-md);
            background: rgba(8, 18, 33, .82);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            opacity: 0;
            visibility: hidden;
            transition: opacity 420ms var(--ease, cubic-bezier(.22,1,.36,1)),
                        visibility 420ms var(--ease, cubic-bezier(.22,1,.36,1));
        }
        .wv-overlay.is-open { opacity: 1; visibility: visible; }

        /* Panel = lienzo con la relacion EXACTA de la imagen (2760x1536),
           limitado al 85% del ancho y del alto de la ventana.
           container-type habilita las unidades cqw del contador. */
        .wv-modal {
            position: relative;
            width: min(85vw, calc(85vh * 2760 / 1536));
            max-width: 1500px;
            aspect-ratio: 2760 / 1536;
            border-radius: var(--radius-lg, 20px);
            overflow: hidden;
            box-shadow: 0 40px 110px rgba(6, 14, 26, .65);
            container-type: size;
            transform: translateY(28px) scale(.975);
            opacity: 0;
            transition: transform 460ms var(--ease, cubic-bezier(.22,1,.36,1)),
                        opacity 460ms var(--ease, cubic-bezier(.22,1,.36,1));
        }
        .wv-overlay.is-open .wv-modal { transform: translateY(0) scale(1); opacity: 1; }

        /* Imagen de fondo del bingo */
        .wv-billboard-img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        /* Cuenta regresiva, dentro del recuadro verde "FALTAN:" */
        .wv-countdown {
            position: absolute;
            left: 80.5%;
            top: 82%;
            transform: translate(-50%, -50%);
            display: flex;
            align-items: flex-start;
            justify-content: center;
            gap: .6cqw;
            white-space: nowrap;
        }
        .wv-cd-cell {
            display: flex;
            flex-direction: column;
            align-items: center;
            line-height: 1;
        }
        .wv-cd-num {
            font-family: var(--font-display, 'Playfair Display', serif);
            font-weight: 700;
            font-size: 4.4cqw;
            color: #1E5A96;                 /* AZUL solicitado */
            font-variant-numeric: tabular-nums;
            text-shadow: 0 1px 0 rgba(255,255,255,.5);
        }
        .wv-cd-lab {
            margin-top: .3cqw;
            font-family: var(--font-body, 'DM Sans', sans-serif);
            font-weight: 700;
            font-size: 1.18cqw;
            letter-spacing: .12em;
            text-transform: uppercase;
            color: #1E5A96;
            opacity: .85;
        }
        .wv-cd-sep {
            font-family: var(--font-display, 'Playfair Display', serif);
            font-weight: 700;
            font-size: 3.2cqw;
            color: #1E5A96;
            opacity: .45;
            margin-top: .5cqw;
        }
        /* Al llegar la fecha: mensaje centrado en el recuadro */
        .wv-cd-done {
            font-family: var(--font-display, 'Playfair Display', serif);
            font-weight: 700;
            font-size: 3.4cqw;
            color: #1E5A96;
            text-align: center;
            line-height: 1.15;
            text-shadow: 0 1px 0 rgba(255,255,255,.5);
        }

        /* Boton cerrar */
        .wv-close {
            position: absolute;
            top: 14px;
            right: 14px;
            z-index: 5;
            width: 42px;
            height: 42px;
            border-radius: 50%;
            display: grid;
            place-items: center;
            font-size: 18px;
            color: #10233a;
            background: rgba(255, 255, 255, .82);
            border: 1px solid rgba(16, 35, 58, .18);
            box-shadow: 0 4px 16px rgba(0,0,0,.18);
            cursor: pointer;
            transition: background .25s ease, transform .25s ease, color .25s ease;
        }
        .wv-close:hover { background: #D94F3D; color: #fff; transform: rotate(90deg); }
        .wv-close:focus-visible { outline: 2px solid #1E5A96; outline-offset: 3px; }

        /* Fallback si el navegador no soporta container queries */
        @supports not (container-type: size) {
            .wv-cd-num  { font-size: clamp(20px, 4.4vw, 66px); }
            .wv-cd-lab  { font-size: clamp(9px, 1.2vw, 16px); }
            .wv-cd-sep  { font-size: clamp(15px, 3.2vw, 48px); }
            .wv-cd-done { font-size: clamp(16px, 3.4vw, 50px); }
        }

        /* En movil el modal ocupa casi todo el ancho (el contador escala solo) */
        @media (max-width: 700px) {
            .wv-modal { width: 94vw; max-width: 94vw; }
        }

        /* Respeto por reduced-motion */
        @media (prefers-reduced-motion: reduce) {
            .wv-overlay, .wv-modal, .intro-skip, #videoModal { transition: none; animation: none; }
            .intro-skip { opacity: 1; }
        }

/* ==========================================================================
   GALERÍA POR MESES + MODAL CON CARRUSEL          (rediseño 2026-08)
   Sustituye a las antiguas reglas .gallery-grid / .gallery-item.
   ========================================================================== */

/* ---- Contenedor de meses ------------------------------------------------ */
.gal-meses { display: flex; flex-direction: column; gap: 52px; }

.gal-empty {
  text-align: center;
  color: var(--color-text-3, #6B7280);
  padding: 48px 16px;
}

/* ---- Encabezado de cada mes --------------------------------------------- */
.gal-mes-title {
  display: flex;
  align-items: center;
  gap: var(--sp-md, 16px);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 var(--sp-lg, 24px);
}
/* Línea dorada que rellena el espacio sobrante a la derecha del título */
.gal-mes-title::after {
  content: "";
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg,
              var(--color-accent) 0%,
              rgba(200, 153, 42, 0.15) 100%);
}

/* ---- Grilla: 4 columnas (una por actividad del mes) --------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-md, 16px);
}

/* ---- Cada actividad es un <button> -------------------------------------- */
.gallery-item {
  /* Reset del botón */
  appearance: none;
  border: 1px solid var(--color-border, #E5E7EB);
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  background: var(--color-surface, #FFF);

  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: var(--radius-md, 14px);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-accent);
}
.gallery-item:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.gallery-item:active { transform: translateY(-1px); }

/* Miniatura */
.gal-thumb {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #EEF2FF 0%, #EEF5F0 100%);
  overflow: hidden;
}
.gal-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--dur-slow) var(--ease);
}
.gallery-item:hover .gal-thumb img { transform: scale(1.06); }

/* Emoji de respaldo si la foto de portada no existe todavía */
.gal-fallback {
  position: absolute; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  font-size: clamp(38px, 6vw, 54px);
}
.gal-thumb.is-fallback img { display: none; }
.gal-thumb.is-fallback .gal-fallback { display: flex; }

/* Velo inferior para que la insignia se lea sobre cualquier foto */
.gal-thumb::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 45%;
  background: linear-gradient(to top, rgba(0,0,0,.45), transparent);
  pointer-events: none;
}

/* Insignia "8 fotos" */
.gal-badge {
  position: absolute;
  right: 10px; bottom: 10px;
  z-index: 1;
  background: rgba(0, 0, 0, .62);
  color: #FFF;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 4px 9px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* Texto de la tarjeta */
.gal-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 15px 16px;
  flex: 1;
}
.gal-name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.35;
  color: var(--color-primary);
}
.gal-place,
.gal-date {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--color-text-3, #6B7280);
}
.gal-date { color: var(--color-accent); font-weight: 500; }

/* ==========================================================================
   MODAL — 80% de la pantalla
   ========================================================================== */
.gal-modal {
  position: fixed; inset: 0;
  z-index: 1200;
  display: none;                 /* el JS lo pasa a flex */
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(8, 15, 28, .82);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease);
}
.gal-modal.is-open { opacity: 1; }

.gal-panel {
  width: 80vw;
  height: 80vh;
  max-width: 1180px;
  display: flex;
  flex-direction: column;
  background: var(--color-surface, #FFF);
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
  overflow: hidden;
  transform: translateY(18px) scale(.97);
  transition: transform var(--dur-med) var(--ease);
}
.gal-modal.is-open .gal-panel { transform: none; }

/* ---- Cabecera ----------------------------------------------------------- */
.gal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-md, 16px);
  padding: 16px 20px;
  background: var(--color-primary);
  color: #FFF;
  flex-shrink: 0;
}
.gal-head-txt { min-width: 0; }
.gal-head h3 {
  font-family: var(--font-display);
  font-size: clamp(16px, 2.2vw, 21px);
  font-weight: 700;
  margin: 0 0 2px;
  line-height: 1.25;
}
.gal-head p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .75);
}

.gal-close {
  appearance: none;
  flex-shrink: 0;
  width: 38px; height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #FFF;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.gal-close:hover { background: rgba(255, 255, 255, .28); transform: rotate(90deg); }
.gal-close:focus-visible { outline: 3px solid var(--color-accent-lt); outline-offset: 2px; }

/* ---- Área del carrusel -------------------------------------------------- */
.gal-viewport {
  position: relative;
  flex: 1;
  min-height: 0;                 /* imprescindible para que flex no desborde */
  overflow: hidden;
  background: #0E1520;
}

.gal-track {
  display: flex;
  height: 100%;
  transition: transform var(--dur-med) var(--ease);
  will-change: transform;
}

.gal-slide {
  flex: 0 0 100%;
  min-width: 0;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.gal-img-box {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.gal-img-box img {
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm, 8px);
}

/* Aviso si una foto no existe */
.gal-img-error {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .55);
  font-size: 13px;
}
.gal-img-error span { font-size: 40px; }
.gal-img-box.is-error img { display: none; }
.gal-img-box.is-error .gal-img-error { display: flex; }

/* Pie de foto: nombre, sitio y fecha */
.gal-caption {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 12px 20px 14px;
  background: rgba(0, 0, 0, .35);
  color: #FFF;
  font-size: 13px;
}
.gal-caption strong {
  flex-basis: 100%;
  font-size: 14.5px;
  font-weight: 600;
}
.gal-caption span { color: rgba(255, 255, 255, .72); }

/* ---- Flechas ------------------------------------------------------------ */
.gal-nav {
  appearance: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  color: #FFF;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background var(--dur-fast) var(--ease);
  z-index: 2;
}
.gal-nav:hover { background: rgba(255, 255, 255, .34); }
.gal-nav:focus-visible { outline: 3px solid var(--color-accent-lt); outline-offset: 2px; }
.gal-prev { left: 14px; }
.gal-next { right: 14px; }

/* ---- Contador ----------------------------------------------------------- */
.gal-counter {
  position: absolute;
  top: 14px; right: 16px;
  z-index: 2;
  background: rgba(0, 0, 0, .55);
  color: #FFF;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

/* ---- Puntos ------------------------------------------------------------- */
.gal-dots {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--color-surface, #FFF);
  border-top: 1px solid var(--color-border, #E5E7EB);
}
.gal-dot {
  appearance: none;
  width: 9px; height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-border, #D1D5DB);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.gal-dot:hover { background: var(--color-accent-lt); transform: scale(1.25); }
.gal-dot.active {
  background: var(--color-accent);
  width: 26px;
  border-radius: 999px;
}
.gal-dot:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

/* Portátiles pequeños: 4 → 3 columnas */
@media (max-width: 1080px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Tabletas: 3 → 2 columnas, modal más ancho */
@media (max-width: 860px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gal-meses    { gap: 40px; }
  .gal-panel    { width: 92vw; height: 86vh; }
  .gal-nav      { width: 40px; height: 40px; font-size: 22px; }
  .gal-prev     { left: 8px; }
  .gal-next     { right: 8px; }
}

/* Móviles: 2 columnas compactas y modal a pantalla casi completa */
@media (max-width: 560px) {
  .gallery-grid { gap: 12px; }
  .gal-meses    { gap: 34px; }

  .gal-name  { font-size: 13.5px; }
  .gal-place,
  .gal-date  { font-size: 11.5px; }
  .gal-meta  { padding: 11px 12px 13px; gap: 2px; }
  .gal-badge { font-size: 10px; padding: 3px 7px; right: 7px; bottom: 7px; }

  .gal-modal { padding: 0; }
  .gal-panel {
    width: 100vw;
    height: 100dvh;              /* dvh evita el salto por la barra del navegador */
    max-width: none;
    border-radius: 0;
  }
  .gal-head    { padding: 12px 14px; }
  .gal-caption { padding: 10px 14px 12px; font-size: 12px; gap: 4px 12px; }
  .gal-caption strong { font-size: 13px; }

  /* En móvil el gesto de deslizar sustituye a las flechas */
  .gal-nav     { display: none; }
  .gal-dots    { padding: 10px 8px; gap: 7px; }
  .gal-dot     { width: 8px; height: 8px; }
  .gal-dot.active { width: 22px; }
}

/* Una sola columna en pantallas muy estrechas */
@media (max-width: 380px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* Pantallas anchas: se limita el alto para que el modal no se estire de más */
@media (min-width: 1600px) {
  .gal-panel { max-height: 900px; }
}

/* Respeta la preferencia de menos animación del sistema */
@media (prefers-reduced-motion: reduce) {
  .gal-track,
  .gal-panel,
  .gal-modal,
  .gallery-item,
  .gal-thumb img { transition: none !important; }
  .gallery-item:hover { transform: none; }
  .gallery-item:hover .gal-thumb img { transform: none; }
}

/* ==========================================================================
   QR FLOTANTE DE DONACIONES                              (2026-09)
   El botón de WhatsApp se movió a la esquina inferior IZQUIERDA
   (ver .wa-fab más arriba en este mismo archivo).
   ========================================================================== */

:root {
  /* ------------------------------------------------------------------------
     TAMAÑO DEL QR — aquí se ajusta todo
     ------------------------------------------------------------------------
     --qr-fraccion : "un sexto de la pantalla".
                     Se usa vmin (el lado MENOR de la pantalla) para que el
                     cuadrado quepa siempre, tanto en horizontal como en
                     vertical. 100vmin / 6 = 16.6667vmin

     --qr-escala   : el "+120%" del encargo.
                     2.2  = un sexto AUMENTADO EN  120%  (lectura APLICADA)
                     1.2  = un sexto AUMENTADO AL  120%  (la otra lectura)

                     Para volver a la versión pequeña basta con poner 1.2.
                     Este es el único número que hay que tocar para cambiar
                     el tamaño; --qr-max sólo actúa como tope.

     --qr-min/max  : topes de seguridad. Sin el mínimo, en un móvil de 360 px
                     el QR quedaría en 72 px y sería inservible; sin el máximo,
                     en un monitor 4K taparía media pantalla.
     ------------------------------------------------------------------------ */
  --qr-fraccion: 16.6667vmin;
  --qr-escala:   2.2;
  --qr-min:      130px;
  --qr-max:      460px;

  --qr-size: clamp(var(--qr-min),
                   calc(var(--qr-fraccion) * var(--qr-escala)),
                   var(--qr-max));
}

/* ---- Tarjeta flotante --------------------------------------------------- */
.qr-fab {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 999;

  width: var(--qr-size);
  height: var(--qr-size);   /* alto y ancho iguales: la imagen es cuadrada */

  opacity: 0;
  transform: translateY(14px) scale(.94);
  transition: opacity var(--dur-med) var(--ease),
              transform var(--dur-med) var(--ease);
}
.qr-fab.is-visible { opacity: 1; transform: none; }

/* ---- El QR en sí (es un botón) ------------------------------------------ */
.qr-card {
  appearance: none;
  position: relative;          /* contexto para .qr-hint */
  display: block;
  width: 100%; height: 100%;
  padding: 0; margin: 0;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: var(--radius-md, 14px);
  background: #2B2B2B;         /* igual que el fondo del PNG: sin borde claro */
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .28);
  transition: transform var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.qr-card img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.qr-card:hover,
.qr-card:focus-visible {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 34px rgba(0, 0, 0, .38);
}
.qr-card:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }

/* Etiqueta "Toca para ampliar": aparece al pasar el ratón */
.qr-hint {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 6px 4px;
  background: rgba(0, 0, 0, .72);
  color: #FFF;
  font-size: 10.5px;
  font-weight: 600;
  text-align: center;
  letter-spacing: .01em;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
  pointer-events: none;
}
.qr-card:hover .qr-hint,
.qr-card:focus-visible .qr-hint { opacity: 1; }

/* ---- Botón de ocultar --------------------------------------------------- */
.qr-dismiss {
  appearance: none;
  position: absolute;
  top: -9px; right: -9px;
  z-index: 2;
  width: 26px; height: 26px;
  border: 2px solid #FFF;
  border-radius: 50%;
  background: var(--color-primary);
  color: #FFF;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  transition: background var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.qr-dismiss:hover { background: #C0392B; transform: rotate(90deg); }
.qr-dismiss:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* ==========================================================================
   MODAL DEL QR — para poder escanearlo con comodidad
   ========================================================================== */
.qr-modal {
  position: fixed; inset: 0;
  z-index: 1200;
  display: none;                /* el JS lo pasa a flex */
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 15, 28, .82);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--dur-med) var(--ease);
}
.qr-modal.is-open { opacity: 1; }

.qr-panel {
  position: relative;
  width: min(92vw, 430px);
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 24px 22px;
  text-align: center;
  background: var(--color-surface, #FFF);
  border-radius: var(--radius-lg, 20px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
  transform: translateY(18px) scale(.97);
  transition: transform var(--dur-med) var(--ease);
}
.qr-modal.is-open .qr-panel { transform: none; }

.qr-modal-close {
  appearance: none;
  position: absolute;
  top: 12px; right: 12px;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--color-bg, #F1F3F6);
  color: var(--color-text-2, #4B5563);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.qr-modal-close:hover { background: #E5E7EB; transform: rotate(90deg); }
.qr-modal-close:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.qr-panel h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 4px;
}
.qr-modal-sub {
  font-size: 13.5px;
  color: var(--color-text-3, #6B7280);
  margin: 0 0 18px;
}

.qr-big {
  width: 100%;
  max-width: 300px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: var(--radius-md, 14px);
  background: #2B2B2B;
  margin: 0 auto 18px;
  display: block;
}

/* ---- Llave + copiar ----------------------------------------------------- */
.qr-llave {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: var(--color-bg, #F1F3F6);
  border: 1px solid var(--color-border, #E5E7EB);
  border-radius: var(--radius-md, 14px);
  margin-bottom: 14px;
}
.qr-llave-lbl {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-3, #6B7280);
}
.qr-llave strong {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--color-primary);
  font-variant-numeric: tabular-nums;
}
.qr-copy {
  appearance: none;
  border: 0;
  border-radius: var(--radius-pill, 999px);
  background: var(--color-primary);
  color: #FFF;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 15px;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.qr-copy:hover { background: var(--color-primary-lt); }
.qr-copy:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.qr-legal {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--color-text-3, #6B7280);
  margin: 0;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */

/* Tabletas: se acercan un poco los flotantes a las esquinas */
@media (max-width: 860px) {
  .qr-fab { bottom: 20px; right: 20px; }
  .wa-fab { bottom: 20px; left: 20px; }
}

/* Móviles ---------------------------------------------------------------
   Aquí el QR se sube un poco: en pantallas estrechas la burbuja de WhatsApp
   ocupa casi todo el ancho al abrirse y llegaría a solaparse con él.
   ----------------------------------------------------------------------- */
@media (max-width: 560px) {
  .qr-fab {
    right: 14px;
    bottom: 96px;              /* por encima de la altura del botón de WA */
    /* Tope adicional en móvil: por ancha que sea la escala, el QR no pasa
       del 42% del ancho de pantalla, para no tapar el contenido. */
    --qr-max: 42vw;
  }
  .wa-fab { bottom: 18px; left: 18px; }

  /* La pista sobra: en táctil no hay "hover" */
  .qr-hint { display: none; }

  .qr-panel { padding: 24px 18px 18px; }
  .qr-panel h3 { font-size: 19px; }
  .qr-big { max-width: 240px; }
  .qr-llave strong { font-size: 17px; }
}

/* Pantallas muy bajas (móvil apaisado): el QR estorba, se oculta */
@media (max-height: 420px) {
  .qr-fab { display: none; }
}

/* Al abrir la burbuja de WhatsApp en móvil, el QR se atenúa para no competir */
@media (max-width: 560px) {
  body:has(.wa-bubble.open) .qr-fab { opacity: .25; pointer-events: none; }
}

/* Respeta la preferencia de menos animación */
@media (prefers-reduced-motion: reduce) {
  .qr-fab, .qr-card, .qr-panel, .qr-modal,
  .qr-dismiss, .qr-hint { transition: none !important; }
  .qr-card:hover { transform: none; }
  .qr-dismiss:hover { transform: none; }
}

/* No imprimir los flotantes */
@media print {
  .qr-fab, .wa-fab, .qr-modal { display: none !important; }
}
