/* --- NAVBAR / HEADER --- */
.navbar {
  background-color: rgba(26, 39, 32, 0.98);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease; /* AÑADIDO: Transición suave */
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
}

.logo a {
  font-size: 1.6rem;
  font-weight: 700;
  color: #f0b90b;
  text-decoration: none;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.logo a:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 32px;
  height: 32px;
  margin-right: 0.5rem;
  filter: brightness(0) saturate(100%) invert(87%) sepia(64%) saturate(4545%) hue-rotate(359deg) brightness(102%) contrast(96%);
}

/* Contenedor de la navegación */
.nav-wrapper {
  display: flex;
  align-items: center;
  position: relative;
}

/* Enlaces de navegación */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: #f0b90b;
}

.nav-links a.active {
  color: #f0b90b;
  position: relative;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #f0b90b, #ffd700);
  border-radius: 1px;
  animation: slideIn 0.3s ease; /* AÑADIDO: Animación para indicador activo */
}

@keyframes slideIn {
  from {
    width: 0;
    left: 50%;
  }
  to {
    width: 100%;
    left: 0;
  }
}

.nav-signup {
  background: linear-gradient(135deg, #f0b90b 0%, #ffd700 100%);
  color: #000 !important;
  padding: 0.6rem 1.2rem !important;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.nav-links a.nav-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(240, 185, 11, 0.3);
}

/* Divisor */
.nav-divider {
  width: 1px;
  height: 24px;
  background-color: rgba(255, 255, 255, 0.2);
  margin: 0 1rem;
}

/* Usuario logueado */
.user-action {
  display: flex !important;
  align-items: center;
  gap: 0.8rem;
  color: #fff !important;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid rgba(240, 185, 11, 0.3);
  transition: all 0.3s ease;
}

.user-action:hover {
  background: rgba(240, 185, 11, 0.1);
  border-color: rgba(240, 185, 11, 0.5);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: #f0b90b;
  color: #000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  margin-left: 0.3rem;
}

.user-name {
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- MENU HAMBURGUESA --- */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.menu-toggle:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
}

.menu-icon {
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.menu-icon::before {
  top: -8px;
}

.menu-icon::after {
  bottom: -8px;
}

/* Animación del menú hamburguesa */
.menu-toggle.active .menu-icon {
  background: transparent;
}

.menu-toggle.active .menu-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-toggle.active .menu-icon::after {
  transform: rotate(-45deg);
  bottom: 0;
}

/* --- RESPONSIVE --- */
@media (max-width: 1200px) {
  .nav-links {
    gap: 1rem;
  }
  
  .nav-links a {
    font-size: 0.875rem;
  }
  
  .user-name {
    display: none;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
    margin-left: 1rem;
    order: -1;
  }

  .navbar-content {
    flex-direction: row-reverse;
  }
  
  .nav-links {
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    background: rgba(26, 39, 32, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    transform: translateY(-150%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    height: auto;
    max-height: calc(100vh - 75px);
    overflow-y: auto;
    z-index: 1000;
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
  }
  
  .nav-links a {
    width: 100%;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
  }
  
  .nav-links a:last-child {
    border-bottom: none;
  }
  
  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 0.5rem 0;
  }
  
  .user-action {
    width: 100%;
    justify-content: flex-start;
    padding: 1rem 0;
  }
  
  .user-name {
    display: inline;
  }
}

@media (max-width: 480px) {
  .logo a {
    font-size: 1.4rem;
  }
  
  .navbar {
    padding: 0.6rem 0;
  }
  
  .navbar-content {
    height: 50px;
  }
}