/* ============================================
   NAVBAR MEJORADA - CON MÁS ESPACIO
   ============================================ */

.navbar {
  background: #fff;
  box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0;
}

.navbar-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: auto;
  min-height: 80px;
  gap: 2rem;
}

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

.navbar-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-brand a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #222222;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
}

.navbar-brand a:hover {
  color: #106eea;
}

.navbar-brand .logo {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

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

/* ============================================
   MENU PRINCIPAL
   ============================================ */

.navbar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.navbar-menu li {
  position: relative;
  white-space: nowrap;
}

.navbar-menu li a {
  display: block;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #222222;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  border-radius: 6px;
}

.navbar-menu li a::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #106eea, #3b8af2);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.navbar-menu li a:hover {
  color: #106eea;
  background: rgba(16, 110, 234, 0.05);
}

.navbar-menu li a:hover::before {
  width: 100%;
}

.navbar-menu li a.active,
.navbar-menu li a.active:hover {
  color: #106eea;
  background: #e7f1fd;
  font-weight: 600;
}

/* ============================================
   CTA BUTTON
   ============================================ */

.navbar-cta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.navbar-cta a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 10px 20px;
  background: #106eea;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.navbar-cta a:hover {
  background: #0d5bb5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 110, 234, 0.3);
}

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

/* ============================================
   MOBILE MENU BUTTON
   ============================================ */

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: #222222;
  padding: 0;
  transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
  color: #106eea;
}

.mobile-menu-btn.bi-x {
  color: #106eea;
}

/* ============================================
   RESPONSIVE - TABLET (1024px)
   ============================================ */

@media (max-width: 1024px) {
  .navbar-container {
    min-height: 70px;
    gap: 1.5rem;
  }

  .navbar-menu {
    gap: 0.25rem;
  }

  .navbar-menu li a {
    padding: 6px 12px;
    font-size: 0.9rem;
  }

  .navbar-cta a {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

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

/* ============================================
   RESPONSIVE - MOBILE (768px)
   ============================================ */

@media (max-width: 768px) {
  .navbar-container {
    min-height: 65px;
    padding: 0 15px;
    gap: 1rem;
  }

  .mobile-menu-btn {
    display: block;
  }

  .navbar-menu {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }

  .navbar-menu.active {
    max-height: 100vh;
    padding: 15px 0;
  }

  .navbar-menu li {
    white-space: normal;
  }

  .navbar-menu li a {
    padding: 12px 15px;
    display: block;
    border-radius: 0;
    border-bottom: 1px solid #f0f4f9;
  }

  .navbar-menu li a::before {
    display: none;
  }

  .navbar-menu li a:hover {
    background: #e7f1fd;
    border-left: 4px solid #106eea;
    padding-left: 11px;
  }

  .navbar-cta {
    display: none;
  }

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

  .navbar-brand a {
    gap: 0.5rem;
    font-size: 1.1rem;
  }
}

/* ============================================
   RESPONSIVE - MOBILE PEQUEÑO (480px)
   ============================================ */

@media (max-width: 480px) {
  .navbar-container {
    min-height: 60px;
    padding: 0 10px;
  }

  .navbar-brand a {
    gap: 0.4rem;
    font-size: 1rem;
  }

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

  .mobile-menu-btn {
    font-size: 1.3rem;
  }

  .navbar-menu li a {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}

/* ============================================
   MOBILE MENU ANIMATION
   ============================================ */

.navbar-mobile {
  position: fixed;
  overflow: hidden;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  background: rgba(9, 9, 9, 0.9);
  transition: 0.3s;
  z-index: 999;
  display: none;
}

.navbar-mobile.active {
  display: block;
}

/* ============================================
   STICKY NAVBAR EFFECT
   ============================================ */

.navbar.scrolled {
  padding: 10px 0;
  box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar.scrolled .navbar-container {
  min-height: 70px;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.navbar-menu li a:focus,
.navbar-cta a:focus {
  outline: 2px solid #106eea;
  outline-offset: 2px;
}