/* =====================================================
   CONGRESO GLOBAL DE SALUD MENTAL Y SOSTENIBILIDAD 2026
   custom.css — Animaciones, patrones y efectos especiales
   (Tailwind CDN maneja el resto de utilidades)
   ===================================================== */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ── RESET BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background-color: #0A2535;
  color: #ffffff;
  overflow-x: hidden;
}

/* ── PATRÓN DE CIRCUITOS (fondo global) ── */
.circuit-bg {
  background-color: #0A2535;
  background-image:
    /* líneas horizontales */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(0, 200, 212, 0.06) 59px,
      rgba(0, 200, 212, 0.06) 60px
    ),
    /* líneas verticales */
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 59px,
      rgba(0, 200, 212, 0.06) 59px,
      rgba(0, 200, 212, 0.06) 60px
    );
}

/* Nodos de circuito (puntos en las intersecciones) */
.circuit-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,200,212,0.12) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── KEYFRAME ANIMATIONS ── */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.5; }
  50%       { transform: translateY(-18px) rotate(180deg); opacity: 0.9; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0,200,212,0.2); }
  50%       { box-shadow: 0 0 45px rgba(0,200,212,0.55); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes countdown-pulse {
  0%, 100% { color: #00C8D4; }
  50%       { color: #1ABFBF; }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── CLASES DE ANIMACIÓN (activadas por JS con IntersectionObserver) ── */
.fade-up         { opacity: 0; transform: translateY(28px); }
.fade-up.visible { animation: fade-in-up 0.75s ease forwards; }

.fade-in         { opacity: 0; }
.fade-in.visible { animation: fade-in 0.75s ease forwards; }

/* Stagger delays */
.delay-100 { animation-delay: 0.1s !important; }
.delay-200 { animation-delay: 0.2s !important; }
.delay-300 { animation-delay: 0.3s !important; }
.delay-400 { animation-delay: 0.4s !important; }

/* ── HEADER ── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}

header.scrolled {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 37, 53, 0.92);
  box-shadow: 0 1px 0 rgba(0,200,212,0.15);
}

/* Mobile nav overlay */
#mobile-nav {
  display: none; /* oculto por defecto en desktop */
}

@media (max-width: 1023px) {
  #mobile-nav {
    display: flex;
    position: fixed;
    inset: 0;
    background: #071820;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    padding-top: 80px; /* espacio para el header del overlay */
    padding-bottom: 2rem;
    overflow-y: auto;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    z-index: 200;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  #mobile-nav.open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
  }
  #mobile-nav > a {
    font-size: 1.2rem;
    width: 100%;
    text-align: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  #mobile-nav > a:last-child { border-bottom: none; }
  #mobile-nav .btn-primary {
    margin-top: 1.5rem;
    width: calc(100% - 4rem);
    text-align: center;
    justify-content: center;
  }

  #mobile-nav-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    height: 72px;
    background: #071820;
    border-bottom: 1px solid rgba(0, 200, 212, 0.15);
    z-index: 201;
  }

  #mobile-nav-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
  }
  #mobile-nav-close:hover { background: rgba(0,200,212,0.12); }
}

/* Hamburger → X cuando menú está abierto */
.menu-toggle span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: white;
  transition: transform 0.3s ease, opacity 0.2s ease;
  transform-origin: center;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── HERO — partículas flotantes ── */
.particle {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(0, 200, 212, 0.6);
  animation: float linear infinite;
}
.particle:nth-child(1)  { top: 15%; left: 10%; animation-duration: 6s; width: 4px; height: 4px; background: rgba(46,204,138,0.65); }
.particle:nth-child(2)  { top: 25%; left: 80%; animation-duration: 8s; animation-delay: 1s; background: rgba(139,92,246,0.55); }
.particle:nth-child(3)  { top: 60%; left: 20%; animation-duration: 7s; animation-delay: 2s; width: 8px; height: 8px; background: rgba(0,200,212,0.5); }
.particle:nth-child(4)  { top: 40%; left: 65%; animation-duration: 9s; animation-delay: 0.5s; width: 5px; height: 5px; background: rgba(46,204,138,0.45); }
.particle:nth-child(5)  { top: 75%; left: 45%; animation-duration: 6.5s; animation-delay: 3s; width: 3px; height: 3px; background: rgba(139,92,246,0.5); }
.particle:nth-child(6)  { top: 50%; left: 90%; animation-duration: 10s; animation-delay: 1.5s; background: rgba(0,200,212,0.4); }

/* ── SEPARADORES DIAGONALES ── */
.diagonal-bottom {
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
  padding-bottom: 8%;
}
.diagonal-top {
  clip-path: polygon(0 4%, 100% 0, 100% 100%, 0 100%);
  padding-top: 6%;
}
.diagonal-both {
  clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
  padding-top: 6%;
  padding-bottom: 6%;
}

/* ── GLASSMORPHISM CARDS ── */
.glass-card {
  background: rgba(13, 45, 62, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 200, 212, 0.18);
  border-radius: 12px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 200, 212, 0.5);
  box-shadow: 0 12px 40px rgba(0,200,212,0.15);
}

/* ── BOTONES ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #00C8D4;
  color: #071820;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  border-radius: 50px;
  padding: 0.875rem 2rem;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn-primary:hover {
  background: #1ABFBF;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,200,212,0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #ffffff;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  border-radius: 50px;
  padding: 0.875rem 2rem;
  text-decoration: none;
  transition: color 0.25s, border-color 0.25s;
  border: 1px solid rgba(255,255,255,0.35);
  cursor: pointer;
  font-size: 1rem;
}
.btn-ghost:hover {
  color: #00C8D4;
  border-color: #00C8D4;
}

/* ── LOGOS MARQUESINA (mobile) ── */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
}
.marquee-track:hover { animation-play-state: paused; }

/* ── ACORDEÓN EJES TEMÁTICOS ── */
.eje-item .eje-body {
  max-height: 0;
  overflow: hidden;
  /* sin padding aquí — el padding va en el div interior */
  transition: max-height 0.45s ease;
}
.eje-item.open .eje-body {
  max-height: 600px;
}
.eje-item .eje-arrow {
  transition: transform 0.3s ease;
}
.eje-item.open .eje-arrow {
  transform: rotate(180deg);
}

/* ── COUNTDOWN ── */
.countdown-digit {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  color: #00C8D4;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1;
  animation: countdown-pulse 2s ease-in-out infinite;
}
.countdown-label {
  font-size: 0.7rem;
  color: #8EC8D8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

/* ── TARIFA ACTIVA ── */
.tarifa-card {
  border: 1px solid rgba(0,200,212,0.15);
  border-radius: 12px;
  transition: all 0.3s;
}
.tarifa-card.activa {
  border-color: #00C8D4;
  box-shadow: 0 0 30px rgba(0,200,212,0.25), inset 0 0 30px rgba(0,200,212,0.04);
  animation: pulse-glow 3s ease-in-out infinite;
}

/* ── PONENTES — fotos hexagonales ── */
.hex-img {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  width: 140px;
  height: 140px;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.3s;
}
.hex-img:hover { transform: scale(1.05); }

/* ── STATS COUNTER ── */
.stat-number {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  color: #00C8D4;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1;
}

/* ── HEADINGS GLOBALES ── */
h1, h2, h3, h4 { font-family: 'Sora', sans-serif; }

.section-title {
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: #ffffff;
  line-height: 1.15;
}

.section-subtitle {
  color: #8EC8D8;
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 640px;
  margin: 0 auto;
}

.problem-section {
  overflow: hidden;
}

.problem-layout {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.problem-header {
  width: 100%;
}

.problem-title {
  max-width: 12ch;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.02;
}

.problem-copy {
  display: grid;
  gap: 1rem;
  max-width: 960px;
  color: #8EC8D8;
  font-size: 1.05rem;
  line-height: 1.8;
}

.problem-questions {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.problem-question-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  min-height: 100%;
  padding: 2rem;
  border-radius: 24px;
  border: 1px solid rgba(0, 200, 212, 0.24);
  background:
    radial-gradient(circle at top right, rgba(0, 200, 212, 0.18), transparent 38%),
    linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(8,28,38,0.92) 100%);
  box-shadow: 0 18px 45px rgba(3, 12, 19, 0.24);
  overflow: hidden;
}

.problem-question-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #00C8D4 0%, #2ECC8A 55%, #8B5CF6 100%);
}

.problem-question-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #9FE5EA;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.problem-question-icon {
  position: relative;
  z-index: 1;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0.55rem;
  margin-top: 0.2rem;
  border-radius: 999px;
  background: rgba(0, 200, 212, 0.14);
  border: 1px solid rgba(0, 200, 212, 0.18);
}

.problem-question-card > span:last-child {
  position: relative;
  z-index: 1;
  display: block;
  font-family: 'Sora', sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
}

@media (min-width: 900px) {
  .problem-questions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .problem-layout {
    gap: 2rem;
  }

  .problem-question-card {
    padding: 1.5rem;
    border-radius: 20px;
  }
}

.badge {
  display: inline-block;
  background: rgba(0,200,212,0.12);
  border: 1px solid rgba(0,200,212,0.35);
  color: #00C8D4;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 50px;
  padding: 0.35rem 1.1rem;
}

/* ── FORMULARIO ── */
.form-input {
  background: rgba(13,45,62,0.8);
  border: 1px solid rgba(0,200,212,0.25);
  border-radius: 8px;
  color: #ffffff;
  padding: 0.85rem 1.1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  width: 100%;
  transition: border-color 0.25s;
  outline: none;
}
.form-input:focus {
  border-color: #00C8D4;
  box-shadow: 0 0 0 3px rgba(0,200,212,0.12);
}
.form-input::placeholder { color: #8EC8D8; }

/* ── SPONSOR LOGOS ── */
.sponsor-logo {
  filter: grayscale(1) brightness(0.65);
  opacity: 0.7;
  transition: filter 0.3s, opacity 0.3s;
  max-height: 56px;
  width: auto;
  object-fit: contain;
}
.sponsor-logo:hover {
  filter: grayscale(0) brightness(1);
  opacity: 1;
}

/* ── SCROLLBAR PERSONALIZADO ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #071820; }
::-webkit-scrollbar-thumb { background: #00C8D4; border-radius: 3px; }

/* ── SELECTION ── */
::selection { background: rgba(0,200,212,0.3); color: #fff; }

/* ── Z-INDEX (contenido sobre circuit-bg::before) ── */
main, footer, section { position: relative; z-index: 1; }

/* ── SECCIONES CLARAS (fondo blanco/gris) ── */
.section-white     { background: #ffffff; }
.section-gray-soft { background: #F0F7FA; }

/* Texto oscuro para secciones claras */
.on-light .section-title    { color: #071820; }
.on-light .section-subtitle { color: #3A6275; }
.on-light .badge {
  background: rgba(0,200,212,0.10);
  border-color: rgba(0,200,212,0.30);
  color: #007F88;
}
.on-light .label-upper { color: #3A6275; }

/* Cards para usar sobre fondo claro */
.card-light {
  background: #ffffff;
  border: 1px solid rgba(0,200,212,0.18);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(10,37,53,0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-light:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(10,37,53,0.13);
}

/* Sponsor logos sobre fondo claro — tamaño normalizado */
.logo-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  min-height: 100px;
  border-radius: 10px;
  border: 1px solid #EAF2F6;
  background: #fff;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.logo-cell:hover {
  box-shadow: 0 6px 24px rgba(0,200,212,0.12);
  border-color: rgba(0,200,212,0.30);
}
.sponsor-logo-dark {
  max-height: 64px;
  max-width: 140px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(0.28);
  opacity: 0.85;
  transition: filter 0.35s ease, opacity 0.35s ease;
}
.logo-cell:hover .sponsor-logo-dark {
  filter: grayscale(0) brightness(1);
  opacity: 1;
}

/* ── GRADIENTE MULTI-COLOR (headings especiales) ── */
.gradient-text {
  background: linear-gradient(90deg, #2ECC8A 0%, #00C8D4 45%, #8B5CF6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── SPEAKER BLOBS (glow de color detrás de la foto) ── */
.speaker-blob {
  position: relative;
  display: inline-block;
}
.speaker-blob::before {
  content: '';
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  filter: blur(24px);
  opacity: 0.45;
  z-index: 0;
}
.speaker-blob img,
.speaker-blob .hex-img { position: relative; z-index: 1; }
.blob-teal::before   { background: radial-gradient(circle, #00C8D4 0%, transparent 70%); }
.blob-green::before  { background: radial-gradient(circle, #2ECC8A 0%, transparent 70%); }
.blob-purple::before { background: radial-gradient(circle, #8B5CF6 0%, transparent 70%); }

/* ── VARIANTES DE STAT-NUMBER ── */
.stat-green  { color: #2ECC8A; }
.stat-purple { color: #8B5CF6; }
.stat-cyan   { color: #1ABFBF; }

/* ── CARD ICON VARIANTES DE COLOR ── */
.icon-green  { background: rgba(46, 204, 138, 0.10); border-color: rgba(46, 204, 138, 0.28); color: #2ECC8A; }
.icon-purple { background: rgba(139, 92, 246, 0.10); border-color: rgba(139, 92, 246, 0.28); color: #8B5CF6; }

/* ── BADGE VARIANTES ── */
.badge-green {
  background: rgba(46, 204, 138, 0.10);
  border: 1px solid rgba(46, 204, 138, 0.35);
  color: #2ECC8A;
}
.badge-purple {
  background: rgba(139, 92, 246, 0.10);
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #8B5CF6;
}

/* ── BORDER-TOP COLOREADO PARA AUDIENCE CARDS ── */
.border-top-teal   { border-top: 3px solid #00C8D4; }
.border-top-green  { border-top: 3px solid #2ECC8A; }
.border-top-purple { border-top: 3px solid #8B5CF6; }
.border-top-cyan   { border-top: 3px solid #1ABFBF; }

/* ── GALERÍA CONGRESO 2025 — Masonry de columnas ── */
.gallery-grid {
  columns: 2;
  column-gap: 6px;
  column-fill: balance;
}
@media (min-width: 640px)  { .gallery-grid { columns: 3; } }
@media (min-width: 1024px) { .gallery-grid { columns: 4; } }

.gallery-item {
  break-inside: avoid;
  display: block;
  margin-bottom: 6px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
  filter: brightness(0.88);
}
.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.05);
}

/* ── LIGHTBOX ── */
#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(4, 14, 22, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1.5rem;
}
#lightbox.lb-open {
  opacity: 1;
  pointer-events: all;
}
#lightbox .lb-img-wrap {
  position: relative;
  max-width: min(90vw, 1100px);
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#lb-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  transition: opacity 0.2s ease;
  display: block;
}
#lb-img.lb-fade { opacity: 0; }

.lb-btn {
  position: fixed;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}
.lb-btn:hover {
  background: rgba(0,200,212,0.25);
  border-color: rgba(0,200,212,0.5);
}
#lb-close { top: 1.25rem; right: 1.25rem; }
#lb-prev   { left: 1.25rem; top: 50%; transform: translateY(-50%); }
#lb-next   { right: 1.25rem; top: 50%; transform: translateY(-50%); }

#lb-counter {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  font-family: 'Sora', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  background: rgba(0,0,0,0.4);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  backdrop-filter: blur(6px);
}

#cb-input{
    color: #000 !important;
}
