/* =========================
   NAVBAR BASE
========================= */

.navbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: auto;
  padding: 12px 20px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================
   LOGO
========================= */

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 40px;
  width: auto;
  transition: 0.3s ease;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  color: #1e293b;
  transition: 0.3s ease;
}

/* Hover logo */
.logo-wrapper:hover .logo-img {
  transform: scale(1.05);
}

.logo-wrapper:hover .logo-text {
  color: #2563eb;
}

/* =========================
   MENÚ DESKTOP
========================= */

nav {
  display: flex;
  gap: 22px;
}

nav a {
  color: #1e293b;
  font-size: 14px;
  transition: 0.2s ease;
}

nav a:hover {
  color: #2563eb;
}

/* =========================
   ACCIONES
========================= */

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =========================
   BOTÓN MENÚ (HAMBURGUESA)
========================= */

.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
}

/* =========================
   BOTÓN CERRAR
========================= */

.menu-close {
  display: none;
}

/* =========================
   OVERLAY
========================= */

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  background: rgba(0,0,0,0.5);

  opacity: 0;
  visibility: hidden;

  transition: 0.3s ease;
  z-index: 998;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =========================
   MOBILE MENU
========================= */

@media (max-width: 768px) {

  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    height: 100vh;

    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    gap: 25px;

    transition: 0.4s ease;
    z-index: 999;
  }

  nav.active {
    right: 0;
  }

  /* Links */
  nav a {
    color: white;
    font-size: 18px;
    font-weight: 500;
  }

  nav a:hover {
    color: #60a5fa;
  }

  /* Botón abrir */
  .menu-toggle {
    display: block;
  }

  /* Botón cerrar */
  .menu-close {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 26px;
    color: white;
    cursor: pointer;
  }

  .menu-close:hover {
    color: #60a5fa;
  }

  /* Botones más compactos */
  .nav-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  /* Logo */
  .logo-img {
    height: 34px;
  }

  .logo-text {
    font-size: 16px;
  }
}

/* =========================
   TABLET (COMO DESKTOP)
========================= */

@media (min-width: 769px) and (max-width: 1024px) {

  nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

}

/* =========================
   BLOQUEAR SCROLL CUANDO ABRE
========================= */

body.menu-open {
  overflow: hidden;
}