/* ============================================
   HEADER ÉPICO - DISEÑO MEJORADO
   ============================================ */

/* Header principal con glassmorphism */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  
  /* Glassmorphism effect */
  background: linear-gradient(135deg,
    rgba(10, 15, 25, 0.85),
    rgba(15, 20, 35, 0.9)
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  /* Borde inferior con gradiente */
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(90deg,
    transparent,
    rgba(30, 144, 255, 0.6),
    rgba(100, 255, 218, 0.6),
    rgba(30, 144, 255, 0.6),
    transparent
  ) 1;
  
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  
  z-index: 999999 !important;
  min-height: 80px;
  flex-wrap: wrap;
  gap: 1rem;
  overflow: visible !important;
  
  transition: all 0.3s ease;
}

/* Efecto de partículas en el header */
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(1px 1px at 10% 20%, rgba(100, 255, 218, 0.3), transparent),
    radial-gradient(1px 1px at 90% 80%, rgba(30, 144, 255, 0.3), transparent),
    radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0.5;
  pointer-events: none;
  animation: headerParticles 10s ease-in-out infinite;
}

@keyframes headerParticles {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

/* Header al hacer scroll - más compacto */
.site-header.scrolled {
  padding: 0.5rem 2rem;
  min-height: 65px;
  background: linear-gradient(135deg,
    rgba(10, 15, 25, 0.95),
    rgba(15, 20, 35, 0.98)
  );
}

/* ============================================
   LOGO Y TÍTULO
   ============================================ */

.logo-container { 
  display: flex;               
  align-items: center;       
  gap: 15px;                   
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

/* Logo con efecto glow */
.logo { 
  height: 50px;
  width: auto;                 
  flex-shrink: 0;
  filter: drop-shadow(0 0 5px rgba(100, 255, 218, 0.3));
  transition: all 0.3s ease;
}

.logo:hover {
  filter: drop-shadow(0 0 8px rgba(100, 255, 218, 0.5));
  transform: scale(1.05);
}



/* Título del sitio con gradiente */
.site-title {
  font-family: 'Space Grotesk', sans-serif; 
  font-weight: 700;            
  font-size: clamp(0.9rem, 2vw, 1.3rem);
  
  background: linear-gradient(135deg,
    #ffffff 0%,
    #64ffda 50%,
    #1e90ff 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}



/* ============================================
   NAVEGACIÓN
   ============================================ */

.navbar {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1000000 !important;
  overflow: visible !important;
}

/* Enlaces de navegación mejorados */
.navbar a,
.dropdown-toggle {
  position: relative;
  text-decoration: none;
  color: #e0e0e0;
  text-transform: uppercase;
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  font-weight: 500;
  letter-spacing: 1px;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  
  background: transparent;
  border: none;
  
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Efecto hover en enlaces */
.navbar a:hover,
.dropdown-toggle:hover {
  background: rgba(30, 144, 255, 0.1);
  transform: translateY(-2px);
  color: #64ffda;
}

/* Línea animada bajo el enlace (solo para enlaces normales) */
.navbar a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent,
    #64ffda,
    transparent
  );
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.navbar a:hover::after {
  width: 80%;
}

/* Enlace activo */
.navbar a.active {
  background: rgba(30, 144, 255, 0.2);
  color: #64ffda;
}

/* ============================================
   DROPDOWN
   ============================================ */

.dropdown {
  position: relative;
  display: inline-block;
  z-index: 1000001 !important;
  overflow: visible !important;
}

.dropdown-toggle {
  font-family: inherit;
  background: transparent;
  border: none;
}

/* Flecha indicadora en el botón dropdown */
.dropdown-toggle::after {
  content: ' ▾' !important;
  margin-left: 0.3rem;
  font-size: 0.8em;
  transition: transform 0.3s ease;
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  transform: none !important;
  display: inline !important;
}

.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg) !important;
}

.dropdown-content {
  display: none;
  position: fixed;
  top: 80px;
  left: auto;
  right: auto;
  transform: none;
  min-width: 180px;
  
  background: linear-gradient(135deg,
    rgba(15, 20, 35, 0.98),
    rgba(20, 25, 40, 0.98)
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  border: none;
  border-radius: 12px;
  
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.8),
    0 0 20px rgba(30, 144, 255, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  
  padding: 0.5rem;
  z-index: 99999999 !important;
  
  opacity: 0;
  visibility: hidden;
  margin-top: -10px;
  transition: all 0.3s ease;
  pointer-events: none;
}

/* Flecha del dropdown */
.dropdown-content::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid rgba(100, 255, 218, 0.3);
}

/* Mostrar dropdown en hover o cuando tiene clase open */
.dropdown:hover .dropdown-content,
.dropdown.open .dropdown-content {
  display: block !important;
  opacity: 1;
  margin-top: 0;
  pointer-events: all;
  visibility: visible;
}

.dropdown-content a {
  display: block;
  padding: 0.8rem 1rem;
  margin: 0.2rem 0;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
  
  background: transparent;
  border: none;
}

.dropdown-content a:hover {
  background: rgba(30, 144, 255, 0.2);
  transform: translateX(5px);
}

/* ============================================
   BOTÓN DE CALENDARIO
   ============================================ */

.calendar-link {
  background: transparent !important;
  border: none !important;
  position: relative;
  overflow: hidden;
}

.calendar-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(100, 255, 218, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.calendar-link:hover::before {
  left: 100%;
}

.calendar-link:hover {
  background: rgba(30, 144, 255, 0.15) !important;
}

/* ============================================
   SELECTOR DE IDIOMA
   ============================================ */

.lang-switcher {
  position: relative;
  z-index: 1;
}

.lang-switcher select {
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg,
    rgba(30, 144, 255, 0.1),
    rgba(100, 255, 218, 0.1)
  );
  color: #e0e0e0;
  border: 1px solid rgba(100, 255, 218, 0.3);
  border-radius: 8px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.lang-switcher select:hover {
  background: linear-gradient(135deg,
    rgba(30, 144, 255, 0.15),
    rgba(100, 255, 218, 0.1)
  );
  border-color: rgba(100, 255, 218, 0.4);
  box-shadow: 0 3px 8px rgba(30, 144, 255, 0.15);
}

.lang-switcher select:focus {
  border-color: #64ffda;
  box-shadow: 0 0 0 3px rgba(100, 255, 218, 0.2);
}

.lang-switcher select option {
  background: #1a1f30;
  color: #e0e0e0;
  padding: 0.5rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
  .navbar {
    gap: 0.3rem;
  }
  
  .navbar a,
  .dropdown-toggle {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 968px) {
  .site-header {
    padding: 1rem 1.5rem;
  }
  
  .logo {
    height: 40px;
  }
  
  .site-title {
    font-size: 1rem;
    letter-spacing: 1px;
  }
}

@media (max-width: 768px) {
  .site-header {
    padding: 0.8rem 1rem;
  }
  
  .logo {
    height: 35px;
  }
  
  .site-title {
    font-size: 0.85rem;
  }
}

/* Mejora de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .site-header,
  .logo,
  .site-title,
  .navbar a,
  .dropdown-toggle,
  .dropdown-content,
  .site-header::before {
    animation: none;
    transition: none;
  }
}
