/* ================================================
   NOCHE DE LAS ESTRELLAS · BUAP 2026
   Sistema de Diseño Cósmico Premium
   ================================================ */

/* --- VARIABLES Y FUENTES --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

html {
  scroll-behavior: smooth;
}

:root {
  /* Paleta cósmica */
  --bg-deep:       #050b1a;
  --bg-space:      #08112a;
  --bg-card:       rgba(15, 25, 55, 0.6);
  --bg-card-hover: rgba(20, 35, 75, 0.75);

  --accent-star:   #f0c040;
  --accent-nebula: #8b5cf6;
  --accent-glow:   #60a5fa;
  --accent-nova:   #e879f9;
  --accent-green:  #34d399;

  --text-primary:  #e8edf8;
  --text-secondary:#94a3b8;
  --text-muted:    #4a5a7a;

  --border-glass:  rgba(139, 92, 246, 0.2);
  --border-bright: rgba(139, 92, 246, 0.5);

  --glow-purple:   0 0 20px rgba(139, 92, 246, 0.4), 0 0 60px rgba(139, 92, 246, 0.15);
  --glow-gold:     0 0 20px rgba(240, 192, 64, 0.5), 0 0 50px rgba(240, 192, 64, 0.2);
  --glow-blue:     0 0 20px rgba(96, 165, 250, 0.4), 0 0 50px rgba(96, 165, 250, 0.15);

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  22px;
  --radius-xl:  32px;

  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

h1, h2, h3, h4, h5, h6,
.section-title,
.hero-title,
.brand-title {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 800 !important; /* ExtraBold */
}

/* --- RESET Y BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Outfit', 'Space Grotesk', sans-serif;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.65;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* --- CANVAS DE ESTRELLAS (FONDO ANIMADO) --- */
#stars-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* --- PARTÍCULAS FLOTANTES --- */
.particles-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.particle {
  position: absolute;
  border-radius: 50%;
  animation: float-particle linear infinite;
  opacity: 0.6;
}
@keyframes float-particle {
  0%   { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* --- GLASSMORPHISM CARD --- */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}
.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-bright);
}

/* --- NAVBAR --- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 14px 0;
  transition: var(--transition);
}
.navbar.scrolled {
  background: rgba(5, 11, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: var(--glow-purple);
}
.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 8px rgba(240,192,64,0.8));
  animation: pulse-star 2.5s ease-in-out infinite;
}
@keyframes pulse-star {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 8px rgba(240,192,64,0.8)); }
  50%       { transform: scale(1.15); filter: drop-shadow(0 0 16px rgba(240,192,64,1)); }
}
.brand-title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}
.brand-sub {
  display: block;
  font-size: 0.68rem;
  color: var(--accent-nebula);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(139, 92, 246, 0.15);
}
.nav-link.btn-glow {
  background: linear-gradient(135deg, var(--accent-nebula), var(--accent-nova));
  color: white;
  font-weight: 600;
  box-shadow: 0 0 18px rgba(139,92,246,0.5);
}
.nav-link.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(139,92,246,0.7);
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- SECCIONES GENERALES --- */
section { position: relative; z-index: 2; }
.section { padding: 100px 0; }
.section-dark {
  background: linear-gradient(180deg, transparent 0%, rgba(10, 5, 30, 0.7) 50%, transparent 100%);
}
.section-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
}
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 100px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-nebula);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}
.accent { color: var(--accent-star); }

/* --- BOTONES --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-size: 0.96rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: var(--transition);
}
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-nebula) 0%, var(--accent-nova) 100%);
  color: white;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.45);
}
.btn-primary:hover { box-shadow: 0 8px 40px rgba(139, 92, 246, 0.7); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-bright);
  box-shadow: inset 0 0 20px rgba(139, 92, 246, 0.05);
}
.btn-outline:hover {
  border-color: var(--accent-star);
  color: var(--accent-star);
  box-shadow: 0 0 20px rgba(240, 192, 64, 0.3);
}
.btn-full { width: 100%; }
.btn-small { padding: 8px 20px; font-size: 0.82rem; }

/* --- HERO --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 120px 28px 80px;
  position: relative;
  overflow: hidden;

  /* 🌌 Imagen de Fondo con degradado de superposición */
  background-image: 
  linear-gradient(rgba(15, 12, 29, 0.7), rgba(15, 12, 29, 0.85));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed; /* Mantiene un efecto elegante de parallax al hacer scroll */
}
.hero-bg-nebula {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 40%, rgba(139, 92, 246, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(232, 121, 249, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(96, 165, 250, 0.1) 0%, transparent 55%);
  animation: nebula-drift 12s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 1;
}
@keyframes nebula-drift {
  0%   { opacity: 0.8; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.05); }
}
.hero-content {
  max-width: 820px;
  position: relative;
  z-index: 2;
  animation: fade-up 1s ease forwards;
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-badge {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 100px;
  background: rgba(240, 192, 64, 0.12);
  border: 1px solid rgba(240, 192, 64, 0.4);
  color: var(--accent-star);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 28px;
  letter-spacing: 0.04em;
}
.hero-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
  text-shadow: 0 0 60px rgba(139,92,246,0.4);
}
.title-line { display: block; }
.title-line.accent {
  background: linear-gradient(135deg, var(--accent-star) 0%, var(--accent-nova) 60%, var(--accent-glow) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.7;
}
.hero-meta {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: rgba(15, 25, 55, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  text-align: left;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
}
.meta-item:hover {
  border-color: var(--border-bright);
  transform: translateY(-3px);
}
.meta-icon { font-size: 1.5rem; }
.meta-item small { display: block; color: var(--text-muted); font-size: 0.78rem; margin-top: 2px; }
.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounce 2s ease-in-out infinite;
}
.scroll-arrow { font-size: 1.2rem; color: var(--accent-nebula); }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* Foto placeholder Hero */
.hero-photo-placeholder {
  position: absolute;
  right: 5%;
  bottom: 15%;
  width: 180px;
  height: 120px;
  background: rgba(15, 25, 55, 0.4);
  border: 2px dashed rgba(139, 92, 246, 0.4);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  animation: breathe 3s ease-in-out infinite;
  pointer-events: none;
}
.hero-photo-placeholder .placeholder-icon { font-size: 2rem; opacity: 0.5; }
@keyframes breathe {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 0.9; }
}

/* --- MAPA MÉXICO --- */
.map-mexico-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}
#mexico-map-container {
  background: rgba(8, 17, 42, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#mexico-map-container svg {
  width: 100%;
  height: auto;
  display: block;
}
#mexico-map-container svg path {
  fill: rgba(30, 50, 110, 0.8);
  stroke: rgba(139, 92, 246, 0.3);
  stroke-width: 0.5;
  transition: var(--transition);
  cursor: pointer;
}
#mexico-map-container svg path:hover {
  fill: rgba(139, 92, 246, 0.5);
  stroke: rgba(139, 92, 246, 0.8);
}
#mexico-map-container svg path.highlight {
  fill: rgba(240, 192, 64, 0.3);
  stroke: rgba(240, 192, 64, 0.9);
  stroke-width: 1.5;
  filter: drop-shadow(0 0 12px rgba(240, 192, 64, 0.7));
  animation: sede-pulse 2s ease-in-out infinite;
}
@keyframes sede-pulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(240,192,64,0.5)); }
  50%       { filter: drop-shadow(0 0 20px rgba(240,192,64,0.9)); }
}
.mexico-sede-dot {
  fill: var(--accent-star);
  animation: dot-pulse 2s ease-in-out infinite;
  cursor: pointer;
  filter: drop-shadow(0 0 5px rgba(240,192,64,0.8));
}
@keyframes dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.7; }
}
.mexico-info-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 90px;
}
.mexico-info-panel h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--accent-star);
}
.mexico-info-panel p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.7; }
.state-extra { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-glass); }
.state-extra .tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 600;
  margin: 3px 2px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: var(--accent-nebula);
}

/* --- MAPA CU BUAP --- */
.cu-map-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}
.cu-map-wrapper {
  position: relative;
  background: rgba(5, 10, 28, 0.7);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.cu-map-legend {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  background: rgba(5, 10, 28, 0.75);
  backdrop-filter: blur(8px);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-workshop  { background: #34d399; box-shadow: 0 0 6px #34d399; }
.dot-talk      { background: #60a5fa; box-shadow: 0 0 6px #60a5fa; }
.dot-telescope { background: #f0c040; box-shadow: 0 0 6px #f0c040; }
.dot-culture   { background: #e879f9; box-shadow: 0 0 6px #e879f9; }

#cu-map-container {
  width: 100%;
  position: relative;
  overflow: auto;
  cursor: grab;
}
#cu-map-container:active { cursor: grabbing; }
#cu-map-container svg {
  display: block;
  width: 100%;
  height: auto;
}

.cu-zone {
  transition: var(--transition);
  cursor: pointer;
}
.cu-zone:hover rect, .cu-zone:hover polygon, .cu-zone:hover ellipse {
  filter: brightness(1.3);
}
.cu-zone.selected rect, .cu-zone.selected polygon, .cu-zone.selected ellipse {
  filter: brightness(1.5) drop-shadow(0 0 12px currentColor);
}

.cu-map-zoom-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}
.zoom-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(15, 25, 55, 0.85);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  cursor: pointer;
  font-family: inherit;
}
.zoom-btn:hover {
  background: rgba(139, 92, 246, 0.3);
  border-color: var(--border-bright);
}

.cu-info-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 90px;
  max-height: 80vh;
  overflow-y: auto;
}
.cu-info-panel::-webkit-scrollbar { width: 4px; }
.cu-info-panel::-webkit-scrollbar-track { background: transparent; }
.cu-info-panel::-webkit-scrollbar-thumb { background: var(--accent-nebula); border-radius: 4px; }

.cu-info-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-glass);
}
.cu-info-icon { font-size: 2rem; }
.cu-info-header h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 4px; }
.cu-info-subtitle { font-size: 0.82rem; color: var(--text-muted); }

.cu-empty-state {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted);
}
.empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.cu-empty-state p { font-size: 0.88rem; line-height: 1.6; }

.cu-activity-card {
  background: rgba(15, 25, 55, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.cu-activity-card:hover {
  border-color: var(--border-bright);
  transform: translateX(4px);
}
.cu-activity-card.type-taller  { border-left-color: #34d399; }
.cu-activity-card.type-conferencia { border-left-color: #60a5fa; }
.cu-activity-card.type-telescopio  { border-left-color: #f0c040; }
.cu-activity-card.type-cultura { border-left-color: #e879f9; }

.activity-type-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.badge-taller       { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.badge-conferencia  { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.badge-telescopio   { background: rgba(240, 192, 64, 0.15); color: #f0c040; }
.badge-cultura      { background: rgba(232, 121, 249, 0.15); color: #e879f9; }

.activity-name {
  white-space: pre-line; /* Hace que los \n se conviertan en saltos de línea reales en HTML */
}
.activity-time { font-size: 0.78rem; color: var(--text-muted); }

/* --- ITINERARIO --- */
.schedule-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  justify-content: center;
}
.filter-btn {
  padding: 9px 22px;
  border-radius: 100px;
  background: rgba(15, 25, 55, 0.5);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  font-family: inherit;
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--border-bright);
  color: var(--text-primary);
}
.schedule-search-wrapper {
  max-width: 540px;
  margin: 0 auto 44px;
}
.schedule-search {
  width: 100%;
  padding: 13px 20px;
  background: rgba(15, 25, 55, 0.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.schedule-search:focus { border-color: var(--border-bright); box-shadow: var(--glow-purple); }
.schedule-search::placeholder { color: var(--text-muted); }

.schedule-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.schedule-item {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  align-items: stretch;
  animation: fade-up 0.4s ease forwards;
}
.schedule-time {
  text-align: right;
  padding-top: 18px;
}
.schedule-time-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent-star);
  display: block;
}
.schedule-time-end {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.schedule-body {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  border-left: 3px solid transparent;
  transition: var(--transition);
}
.schedule-body:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}
.schedule-body.cat-conferencia { border-left-color: #60a5fa; }
.schedule-body.cat-taller      { border-left-color: #34d399; }
.schedule-body.cat-telescopio  { border-left-color: #f0c040; }
.schedule-body.cat-cultura     { border-left-color: #e879f9; }
.schedule-body.cat-general     { border-left-color: var(--accent-nebula); }

.schedule-body-header {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.schedule-title {
  font-size: 0.98rem;
  font-weight: 700;
  flex: 1;
}
.schedule-location {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
.schedule-item.hidden { display: none; }

/* --- REGISTRO --- */
.registro-layout {
  display: grid;
  grid-template-columns: 480px 1fr;
  gap: 28px;
  align-items: start;
}
.registro-form-card {
  padding: 36px;
}
.form-group { margin-bottom: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 120px; gap: 16px; }
.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.form-input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(8, 17, 42, 0.6);
  border: 1.5px solid var(--border-glass);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.93rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.form-input:focus {
  border-color: var(--accent-nebula);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.form-input.error { border-color: #f87171; }
.form-select option { background: var(--bg-space); color: var(--text-primary); }
.form-error { font-size: 0.78rem; color: #f87171; margin-top: 5px; min-height: 18px; }

/* Ticket de éxito */
.registro-ticket { margin-top: 0; }
.ticket-card {
  padding: 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ticket-card::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(240,192,64,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.ticket-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}
.ticket-header h3 { font-size: 1.1rem; font-weight: 700; }
.ticket-star { font-size: 1.3rem; animation: pulse-star 2s infinite; }
.ticket-body { text-align: left; margin-bottom: 20px; }
.ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-glass);
  gap: 12px;
}
.ticket-label { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.ticket-value { font-size: 0.9rem; font-weight: 600; text-align: right; }
.ticket-id-row { border-bottom: none; padding-top: 14px; }
.ticket-id {
  font-size: 1rem;
  font-weight: 800;
  color: var(--accent-star);
  letter-spacing: 0.12em;
  font-family: monospace;
}
.ticket-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 18px auto;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}
.qr-grid {
  width: 80px; height: 80px;
  border: 2px solid var(--accent-nebula);
  border-radius: 6px;
  background:
    repeating-conic-gradient(var(--accent-nebula) 0%, var(--accent-nebula) 25%, transparent 0%, transparent 50%) 0 0 / 10px 10px;
  opacity: 0.5;
}
.ticket-footer {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-glass);
}
.registro-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.info-card {
  padding: 22px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.info-card-icon { font-size: 1.8rem; flex-shrink: 0; }
.info-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 6px; }
.info-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* --- GALERÍA --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 220px;
  gap: 18px;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  background: #0f1937;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
  transition: transform 0.3s ease;
}

.gallery-item.featured {
  grid-column: span 2;
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--glow-purple);
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* --- CONSTANCIAS --- */
.cert-panel {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.cert-lock-icon, .cert-unlock-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  display: block;
}
.cert-lock-icon { filter: grayscale(0.3); }
.cert-panel h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.cert-panel > p {
  font-size: 0.96rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

/* Countdown */
.countdown-wrapper {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.countdown-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(15, 25, 55, 0.6);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 16px 22px;
  min-width: 80px;
}
.countdown-num {
  font-size: 2rem;
  font-weight: 800;
  font-family: monospace;
  color: var(--accent-star);
  display: block;
}
.countdown-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.countdown-sep {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-nebula);
  padding-bottom: 20px;
}

.debug-btn {
  margin-top: 20px;
  opacity: 0.5;
  font-size: 0.76rem;
}
.debug-btn:hover { opacity: 1; }

/* Formulario de búsqueda de constancia */
.cert-search-form { margin-bottom: 30px; }
.cert-input-wrapper {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto 16px;
}
.cert-input-wrapper .form-input { flex: 1; }

.cert-message {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-top: 12px;
}
.cert-message.success {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #34d399;
}
.cert-message.error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
}

/* Preview de constancia */
.cert-preview { text-align: left; }
.cert-document {
  margin-bottom: 18px;
  padding: 40px;
  text-align: center;
  position: relative;
  background: linear-gradient(135deg, rgba(10, 20, 50, 0.9), rgba(20, 10, 50, 0.9));
  border: 2px solid rgba(240, 192, 64, 0.3);
}
.cert-document::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(240, 192, 64, 0.15);
  border-radius: var(--radius-md);
  pointer-events: none;
}
.cert-doc-header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid rgba(240,192,64,0.2); }
.cert-logo {
  font-size: 2rem;
  font-weight: 900;
  color: var(--accent-star);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.cert-doc-header h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.cert-doc-subtitle { font-size: 0.82rem; color: var(--text-muted); }
.cert-doc-body { margin-bottom: 32px; }
.cert-doc-intro { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 10px; }
.cert-doc-type {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--accent-star);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.cert-doc-to { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; }
.cert-doc-name { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); margin-bottom: 20px; }
.cert-doc-detail { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; }
.cert-doc-id { font-size: 0.78rem; color: var(--text-muted); font-family: monospace; }
.cert-doc-footer {
  display: flex;
  justify-content: space-around;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(240,192,64,0.2);
}
.cert-sig-line { text-align: center; flex: 1; }
.sig-line-bar { height: 1px; background: rgba(240,192,64,0.4); margin-bottom: 8px; }
.cert-sig-line span { font-size: 0.75rem; color: var(--text-muted); }
.cert-notice {
  padding: 20px 24px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(52, 211, 153, 0.05) !important;
  border-color: rgba(52, 211, 153, 0.2) !important;
}
.notice-icon { font-size: 1.5rem; flex-shrink: 0; margin-top: 2px; }
.cert-notice p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.6; }
.cert-notice strong { color: #34d399; }

/* --- FOOTER --- */
.footer {
  position: relative;
  z-index: 2;
  background: rgba(3, 7, 18, 0.9);
  border-top: 1px solid var(--border-glass);
  padding: 48px 28px;
  text-align: center;
}
.footer-container {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}
.footer-logo { font-size: 2rem; filter: drop-shadow(0 0 8px rgba(240,192,64,0.6)); }
.footer-brand h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.footer-brand p { font-size: 0.82rem; color: var(--text-muted); }
.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  font-size: 0.84rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-links a:hover { color: var(--accent-nebula); }
.footer-copy { font-size: 0.78rem; color: var(--text-muted); }

/* --- UTILIDADES --- */
.hidden { display: none !important; }

/* --- SCROLLBAR GLOBAL --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--accent-nebula); border-radius: 3px; }

/* === RESPONSIVE === */
@media (max-width: 1080px) {
  .map-mexico-wrapper,
  .cu-map-layout,
  .registro-layout {
    grid-template-columns: 1fr;
  }
  .mexico-info-panel,
  .cu-info-panel {
    position: static;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-item.featured { grid-column: span 2; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(5, 11, 26, 0.97);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
    border-bottom: 1px solid var(--border-glass);
  }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .section { padding: 72px 0; }
  .hero-photo-placeholder { display: none; }
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }
  .gallery-item.featured { grid-column: span 1; }
  .form-row { grid-template-columns: 1fr; }
  .cert-input-wrapper { flex-direction: column; }
  .cert-document { padding: 24px 18px; }
  .countdown-wrapper { gap: 6px; }
  .countdown-block { padding: 12px 16px; min-width: 65px; }
  .countdown-num { font-size: 1.5rem; }
  .cert-doc-footer { flex-direction: column; gap: 16px; }
}

@media (max-width: 480px) {
  .hero-meta { flex-direction: column; align-items: center; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .schedule-item { grid-template-columns: 75px 1fr; gap: 10px; }
}
/* Corrección de inputs del formulario */
#formulario-registro input,
#formulario-registro select,
#formulario-registro textarea {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    padding: 0.75rem 1rem !important;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    box-sizing: border-box !important;
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
}

.grid-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.75rem !important;
}

.grid-2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
}

@media (max-width: 768px) {
    .grid-3, .grid-2 {
        grid-template-columns: 1fr !important;
    }
}

/* --- RESETEO Y BASE --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #05040a; /* Fondo oscuro espacial acoplado al cartel */
  color: #ffffff;
}

/* --- BARRA DE NAVEGACIÓN (NAVBAR) --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5, 4, 10, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.6rem 2rem;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Marca en Navbar utilizando el cartel en miniatura */
.navbar-poster-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.navbar-poster-brand:hover {
  transform: scale(1.02);
}

.poster-thumbnail {
  height: 48px;
  width: auto;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 10px rgba(118, 75, 162, 0.5);
}

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

.brand-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffffff;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #c084fc;
}

/* Enlaces del Nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #a855f7;
}

.btn-poster-trigger {
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-poster-trigger:hover {
  opacity: 0.9;
}

/* --- SECCIÓN HERO --- */
.hero-section {
  padding: 4rem 2rem;
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;

  /* 🌌 Capa oscura + Imagen de fondo */
  background-image: 
    linear-gradient(rgba(5, 4, 10, 0.75), rgba(5, 4, 10, 0.88)),
    url('../img/Fondo.jpg'); 
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.hero-container {
  max-width: 1100px;
  width: 100%;
  display: flex;
  flex-direction: row-reverse; 
  align-items: center;
  gap: 3.5rem;
  flex-wrap: wrap;
}

/* Contenedor de la Imagen del Cartel en el Hero */
.hero-poster-wrapper {
  position: relative;
  flex: 0 0 320px;
  max-width: 340px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-poster-wrapper:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 50px rgba(168, 85, 247, 0.5);
}

.hero-poster-img {
  width: 100%;
  height: auto;
  display: block;
}

.poster-overlay-hint {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 0.6rem;
  background: rgba(5, 4, 10, 0.8);
  text-align: center;
  font-size: 0.8rem;
  color: #c084fc;
  backdrop-filter: blur(4px);
}

/* Contenido Informativo */
.hero-details {
  flex: 1;
  min-width: 300px;
}

.badge-event {
  background: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.4);
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
}

.hero-details h1 {
  font-size: 2.8rem;
  margin: 1rem 0;
  line-height: 1.2;
  background: linear-gradient(135deg, #ffffff, #c084fc);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.1rem;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-main {
  background: linear-gradient(135deg, #9333ea, #6366f1);
  color: white;
  text-decoration: none;
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-secondary {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.8rem 1.8rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* --- MODAL LIGHTBOX (PANTALLA COMPLETA) --- */
.poster-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.poster-modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.full-modal-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}

.close-modal {
  position: absolute;
  top: -20px;
  right: -25px;
  color: white;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
}

/* --- RESPONSIVO --- */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column;
    text-align: center;
  }

  .hero-poster-wrapper {
    flex: none;
    width: 80%;
  }

  .nav-links {
    display: none; 
  }
}



/* Overlay que cubre la pantalla y los campos de registro */
.cultural-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(11, 15, 25, 0.82); /* Fondo semitransparente oscuro */
  backdrop-filter: blur(8px); /* Desenfoque de lo que está detrás */
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000; /* Asegura quedar por encima de todo */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Tarjeta flotante del modal */
.cultural-modal-card {
  background: #130a21;
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 18px;
  max-width: 440px;
  width: 100%;
  padding: 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(168, 85, 247, 0.2);
  animation: popInModal 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cultural-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cultural-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #f3e8ff;
  font-weight: 700;
}

.cultural-modal-icon {
  font-size: 1.6rem;
}

.cultural-modal-body p {
  font-size: 0.9rem;
  color: #cbd5e1;
  margin-bottom: 16px;
  line-height: 1.4;
}

.cultural-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Animación de entrada suave */
@keyframes popInModal {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Fondo oscuro translúcido que cubre toda la pantalla */
.modal {
    display: none; /* Se cambia a 'flex' o 'block' desde JS */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75); /* Fondo semitransparente */
    z-index: 9999; /* Asegura que quede por encima de todo */
    
    /* Centrado flexbox perfecto */
    justify-content: center;
    align-items: center;
}

/* Estado activo cuando la función openPosterModal() lo muestra */
.modal.active,
.modal[style*="display: block"],
.modal[style*="display: flex"] {
    display: flex !important; /* Usar flexbox para centrar contenido */
}

/* Contenido interno del modal (la imagen o tarjeta del cartel) */
.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    background: #1a1a2e; /* Color de fondo acorde al tema */
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    
    /* Asegurar que el contenido interno también se alinee bien */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Ajuste automático para la imagen del cartel */
.modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}