/* ============================================
   TOP NAVBAR - Modern & Responsive
   public/css/navbar.css
   ============================================ */

.top-navbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transition: all 0.3s ease;
}

.top-navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

.navbar-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  position: relative;
}

/* ============================================
   LOGO
   ============================================ */

.navbar-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  z-index: 1001;
}

.navbar-brand .logo {
  height: 45px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-brand:hover .logo {
  transform: scale(1.05);
}

/* ============================================
   HAMBURGER MENU (Hidden on Desktop)
   ============================================ */

.navbar-toggler {
  display: none; /* Oculto en desktop */
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
  transition: all 0.3s ease;
}

.hamburger-line {
  width: 28px;
  height: 3px;
  background: #FF1F66;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.navbar-toggler.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.navbar-toggler.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

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

/* ============================================
   NAVIGATION MENU - DESKTOP (por defecto)
   ============================================ */

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  position: static;
  flex-direction: row; /* Horizontal en desktop */
  width: auto;
  height: auto;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
  flex-direction: row; /* ✅ Horizontal en desktop */
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: auto;
}

.nav-item {
  position: relative;
  width: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
  width: auto;
}

.nav-link i {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.nav-link:hover {
  color: #FF1F66;
  background: rgba(255, 31, 102, 0.08);
  text-decoration: none;
}

.nav-link:hover i {
  transform: scale(1.15);
}

/* Active state */
.nav-link.active {
  color: #FF1F66;
  background: rgba(255, 31, 102, 0.12);
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 16px;
  right: 16px;
  height: 3px;
  background: #FF1F66;
  border-radius: 3px 3px 0 0;
}

/* ============================================
   CTA BUTTON - DESKTOP
   ============================================ */

.navbar-cta {
  width: auto;
  margin-top: 0;
}

.navbar-cta .btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #FF1F66 0%, #FF592A 100%);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(255, 31, 102, 0.3);
  transition: all 0.3s ease;
  white-space: nowrap;
  width: auto;
}

.navbar-cta .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 31, 102, 0.4);
  color: white;
  text-decoration: none;
}

.navbar-cta .btn-primary:active {
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE - TABLET & MOBILE
   ============================================ */

@media (max-width: 991px) {
  
  /* ✅ Mostrar hamburger en móvil */
  .navbar-toggler {
    display: flex !important;
  }

  /* ✅ Sidebar móvil */
  .navbar-menu {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 320px !important;
    max-width: 85% !important;
    height: 100vh !important;
    background: #ffffff !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 100px 32px 32px !important;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15) !important;
    overflow-y: auto !important;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    gap: 24px !important;
    z-index: 1002 !important;
  }

  .navbar-menu.active {
    right: 0 !important;
  }

  /* ✅ Items en COLUMNA para móvil */
  .navbar-nav {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    width: 100% !important;
    gap: 4px !important;
  }

  .nav-item {
    width: 100% !important;
  }

  .nav-link {
    width: 100% !important;
    padding: 14px 16px !important;
    font-size: 16px !important;
  }

  .nav-link i {
    font-size: 18px;
  }

  .nav-link.active::after {
    display: none; /* Ocultar barra inferior en móvil */
  }

  /* ✅ Botón al fondo en móvil */
  .navbar-cta {
    width: 100% !important;
    margin-top: auto !important;
  }

  .navbar-cta .btn-primary {
    width: 100% !important;
    justify-content: center !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
  }

  /* ✅ Overlay en el body */
  body.menu-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    animation: fadeIn 0.3s ease;
    pointer-events: auto;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  /* ✅ Prevenir scroll del body */
  body.menu-open {
    overflow: hidden;
  }
}

/* ============================================
   RESPONSIVE - MOBILE SMALL
   ============================================ */

@media (max-width: 480px) {
  .navbar-wrapper {
    padding: 12px 0;
  }

  .navbar-brand .logo {
    height: 38px;
  }

  .navbar-menu {
    width: 280px !important;
    padding: 80px 24px 24px !important;
  }
}

/* ============================================
   SCROLL BEHAVIOR
   ============================================ */

.top-navbar.scrolled {
  padding: 4px 0;
}

.top-navbar.scrolled .navbar-wrapper {
  padding: 12px 0;
}

.top-navbar.scrolled .navbar-brand .logo {
  height: 40px;
}

@media (max-width: 991px) {
  .top-navbar.scrolled .navbar-brand .logo {
    height: 35px;
  }
}