/* Estilos para el menú hamburguesa móvil */

/* Botón hamburguesa - oculto en desktop */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 35px;
  height: 35px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1000002 !important;
  position: relative;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.hamburger:hover {
  background: rgba(30, 144, 255, 0.1);
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: #64ffda;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Animación del hamburguesa cuando está activo */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Menú móvil desplegable */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 75%;
  max-width: 320px;
  height: 100vh;
  
  /* Glassmorphism similar al header */
  background: linear-gradient(180deg,
    rgba(10, 15, 25, 0.95) 0%,
    rgba(15, 20, 35, 0.95) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  
  border-left: 2px solid transparent;
  border-image: linear-gradient(180deg,
    transparent,
    rgba(30, 144, 255, 0.6),
    rgba(100, 255, 218, 0.6),
    rgba(30, 144, 255, 0.6),
    transparent
  ) 1;
  
  box-shadow: 
    -5px 0 30px rgba(0, 0, 0, 0.6),
    inset 1px 0 0 rgba(255, 255, 255, 0.05);
  
  z-index: 1000001 !important;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding-top: 80px;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

/* Selector de idioma en el menú móvil - ahora al inicio */
.mobile-menu .lang-switcher {
  padding: 1rem 1.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(30, 144, 255, 0.2);
  margin-bottom: 0.5rem;
  order: -1;
}

.mobile-menu .lang-switcher select {
  width: 100%;
  padding: 0.8rem;
  font-size: 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;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.mobile-menu .lang-switcher select:hover {
  border-color: rgba(100, 255, 218, 0.5);
  background: rgba(30, 144, 255, 0.15);
}

/* Enlaces del menú móvil */
.mobile-menu a {
  display: block;
  padding: 1rem 1.5rem;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  position: relative;
}

.mobile-menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, #64ffda, #1e90ff);
  transition: width 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu a.active {
  background: rgba(30, 144, 255, 0.1);
  padding-left: 2rem;
  color: #64ffda;
}

.mobile-menu a:hover::before,
.mobile-menu a.active::before {
  width: 3px;
}

/* Dropdown en menú móvil */
.mobile-menu .dropdown {
  width: 100%;
  display: block;
}

.mobile-menu .dropdown-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  color: #e0e0e0;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  height: auto;
  position: relative;
}

.mobile-menu .dropdown-toggle::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, #64ffda, #1e90ff);
  transition: width 0.3s ease;
}

.mobile-menu .dropdown-toggle:hover,
.mobile-menu .dropdown.active .dropdown-toggle {
  background: rgba(30, 144, 255, 0.1);
  padding-left: 2rem;
  color: #64ffda;
}

.mobile-menu .dropdown-toggle:hover::before,
.mobile-menu .dropdown.active .dropdown-toggle::before {
  width: 3px;
}

.mobile-menu .dropdown-toggle::after {
  content: ' ▾';
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}

.mobile-menu .dropdown.active .dropdown-toggle::after {
  transform: rotate(180deg);
}

.mobile-menu .dropdown-content {
  position: static;
  display: none;
  background: rgba(10, 15, 25, 0.5);
  border: none;
  border-radius: 0;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.3);
  margin-top: 0;
  padding: 0;
  min-width: 100%;
}

.mobile-menu .dropdown.active .dropdown-content {
  display: block;
}

.mobile-menu .dropdown-content a {
  padding: 1rem 1.5rem 1rem 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  background: transparent;
}

.mobile-menu .dropdown-content a::before {
  left: 0.5rem;
}

.mobile-menu .dropdown-content a:hover {
  background: rgba(30, 144, 255, 0.15);
  padding-left: 2.8rem;
  transform: none;
}

.mobile-menu .dropdown-content a:hover::before {
  width: 3px;
  left: 0.5rem;
}

.mobile-menu .dropdown-content a.active {
  color: #1e90ff;
  background-color: rgba(30, 144, 255, 0.15);
}

/* Overlay oscuro cuando el menú está abierto */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right,
    rgba(30, 144, 255, 0.1),
    rgba(0, 0, 0, 0.85)
  );
  backdrop-filter: blur(5px);
  z-index: 1000000 !important;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* Media queries para mostrar el menú hamburguesa */
@media (max-width: 900px) {
  .hamburger {
    display: flex;
  }
  
  .navbar {
    display: none !important;
  }
  
  .site-header .lang-switcher {
    display: none;
  }
}

@media (max-width: 480px) {
  .mobile-menu {
    width: 85%;
  }
  
  .mobile-menu a {
    font-size: 0.95rem;
    padding: 1rem 1.5rem;
  }
}
