/* ============================================================
   ⚙️ NAVBAR INDUSTRIAL RESPONSIVE (Oscuro + Azul acero)
   ============================================================ */

:root {
  --nav-bg: linear-gradient(90deg, #0f1117, #151821);
  --nav-accent: #4ea8de;
  --nav-accent-hover: #7cd3ff;
  --nav-text: #eaeaea;
  --nav-text-muted: #9ca3af;
  --nav-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  background: var(--nav-bg);
  box-shadow: var(--nav-shadow);
  padding: 0.9rem 2rem;
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1300px;
  margin: 0 auto;
}

/* --- LOGO --- */
.navbar-logo {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--nav-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s ease;
}

.navbar-logo i {
  color: var(--nav-accent);
  font-size: 1.4rem;
  transition: transform 0.3s ease;
}

.navbar-logo:hover {
  color: var(--nav-accent-hover);
}
.navbar-logo:hover i {
  transform: rotate(-10deg) scale(1.15);
}

/* --- LINKS --- */
.navbar-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.navbar-links li a {
  color: var(--nav-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.25s ease, transform 0.25s ease;
}

.navbar-links li a:hover {
  color: var(--nav-accent-hover);
  transform: translateY(-2px);
}

/* --- BOTÓN HAMBURGUESA --- */
.navbar-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--nav-text);
  transition: color 0.3s ease;
}
.navbar-toggle:hover {
  color: var(--nav-accent-hover);
}

/* --- OVERLAY --- */
.navbar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 999;
}

.navbar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   📱 MODO MÓVIL
   ============================================================ */
@media (max-width: 768px) {
  .navbar-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    background: #0f1117;
    box-shadow: var(--nav-shadow);
    padding: 1rem 1.5rem;
    animation: fadeIn 0.3s ease;
    z-index: 1001;
  }

  .navbar-links.active {
    display: flex;
  }

  .navbar-links li {
    width: 100%;
    padding: 0.6rem 0;
  }

  .navbar-links li a {
    width: 100%;
    color: var(--nav-text-muted);
    font-size: 1rem;
  }

  .navbar-links li a:hover {
    color: var(--nav-accent-hover);
  }

  .navbar-toggle {
    display: block;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   🔽 MENÚ DESPLEGABLE DE CATEGORÍAS
   ============================================================ */

.dropdown {
  position: relative;
}

.dropdown > a {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown i.fa-caret-down {
  font-size: 0.7rem;
}

/* --- Submenú oculto --- */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #111827;
  border-radius: 6px;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  min-width: 180px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 999;
}

/* --- Mostrar menú al pasar el mouse --- */
.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  color: #cbd5e1;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu li a:hover {
  background: #2563eb;
  color: #fff;
  border-radius: 4px;
}

/* --- Adaptación móvil --- */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: none;
    padding: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .dropdown-menu li a {
    padding-left: 1.5rem;
  }
}

/* ============================================================
   🔽 MENÚ DESPLEGABLE DE CATEGORÍAS (CLICK ACTIVATION)
   ============================================================ */

.dropdown {
  position: relative;
}

.dropdown > a {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.dropdown i.fa-caret-down {
  font-size: 0.7rem;
}

/* --- Submenú --- */
.dropdown-menu {
  position: absolute;
  top: 120%;
  left: 0;
  background: #111827;
  border-radius: 6px;
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  min-width: 180px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 999;
}

/* Cuando está activo */
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Links del dropdown */
.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1rem;
  color: #cbd5e1;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.dropdown-menu li a:hover {
  background: #2563eb;
  color: #fff;
  border-radius: 4px;
}

/* --- Adaptación móvil --- */
@media (max-width: 768px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  .dropdown-menu.show {
    display: block;
  }

  .dropdown-menu li a {
    padding-left: 1.5rem;
  }
}
