/* Navbar alineado a la izquierda */
.navbar {
  width: 100%;
  padding: 0.7rem 1.5rem;
  background-color: #000;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-container {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  width: 100%;
}

.nav-logo img {
  height: 36px;
  transition: filter 0.3s;
  filter: drop-shadow(0 0 4px #7700ff);
}

/* Menu horizontal en desktop */
.nav-menu {
  display: flex;
  gap: 1rem;
  list-style: none;
  margin-left: 1rem;
  transition: none;
}

.nav-menu li a {
  text-decoration: none;
  color: white;
  font-weight: 600;
  font-size: 15px;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  position: relative;
  transition: color 0.3s;
}

/* Animación subrayado morado al hacer hover o activo */
.nav-menu li a::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #7700ff 60%, #b491f6 100%);
  border-radius: 2px;
  transition: width 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: #7700ff;
}

.nav-menu li a:hover::after,
.nav-menu li a.active::after {
  width: 100%;
}

/* Toggle solo visible en móviles */
.nav-toggle {
  display: none;
  font-size: 1.6rem;
  color: #fff;
  cursor: pointer;
  margin-left: 0.5rem;
  background: #050505;
  border-radius: 8px;
  padding: 0.2rem 0.7rem;
  transition: background 0.3s;
}
.nav-toggle:hover {
  background: #7700ff;
  color: #fff;
}

/* Botón cerrar sidebar */
.nav-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  margin-left: auto;
  margin-top: 1rem;
  padding: 0.2rem 0.7rem;
  border-radius: 8px;
  transition: background 0.3s;
  display: none;
}

/* Sidebar menu en móvil: sale de la izquierda */
@media (max-width: 700px) {
  .navbar-container {
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    gap: 0.7rem;
  }
  .nav-logo {
    margin-right: 0.5rem;
  }
  .nav-toggle {
    display: block;
    order: 2;
    margin-left: 0;
    margin-right: 0.5rem;
    align-self: flex-start;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100vw; /* Sidebar sale de la izquierda */
    height: 100vh;
    width: 70vw;
    max-width: 320px;
    background: #000000;
    flex-direction: column;
    gap: 1.2rem;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    box-shadow: 4px 0 24px #7700ff44;
    transition: left 0.4s cubic-bezier(.77,0,.18,1);
    z-index: 2002;
  }
  .nav-menu.show {
    left: 0;
  }
  .nav-menu li {
    margin-bottom: 0.5rem;
  }
  .nav-menu li a {
    font-size: 1.2rem;
    padding: 0.7rem 1rem;
    border-radius: 10px;
  }
  .nav-menu li a::after {
    bottom: 6px;
    height: 3px;
  }
  .nav-close {
    display: block;
  } }