/* Navbar container */
.navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #1f2937, #111827); /* Dark gradient background */
    border-radius: 16px;
    position: relative;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Subtle shadow */
    transition: background 0.4s ease-in-out, box-shadow 0.4s ease-in-out;
  }
  
  /* When navbar is active (responsive or toggled) */
  .navbar.active {
    background: linear-gradient(135deg, #374151, #1f2937);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  }
  
  /* Nav links */
  .nav-link {
    position: relative;
    color: #d1d5db; /* Zinc-300 text color */
    font-size: 1.2rem;
    font-weight: 600;
    padding: 10px 15px;
    margin: 0 12px;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.4s ease, transform 0.3s ease;
  }
  
  /* Hover and focus state for links */
  .nav-link:hover,
  .nav-link:focus {
    color: #60a5fa; /* Sky-400 on hover */
    transform: translateY(-3px); /* Slight lift on hover */
  }
  
  /* Active link styling */
  .nav-link.active {
    color: #3b82f6; /* Sky-500 for active links */
    text-shadow: 0 3px 10px rgba(59, 130, 246, 0.5); /* Active link glow */
  }
  
  /* Active box animation */
  .active-box {
    position: absolute;
    background-color: #3b82f6; /* Sky-500 for active box */
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.5); /* Glow effect for active box */
    transition: all 0.4s ease-in-out; /* Smooth transition */
    z-index: -1; /* Behind the nav links */
  }
  
  /* Responsive styles */
  @media (max-width: 768px) {
    .navbar {
      flex-direction: column;
      padding: 15px;
    }
  
    .nav-link {
      margin-bottom: 15px;
    }
  
    .nav-link:last-child {
      margin-bottom: 0;
    }
  }
  
  /* Hamburger Menu */
  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    cursor: pointer;
    transition: all 0.4s ease-in-out;
  }
  
  .bar {
    width: 100%;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
  }
  
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  /* Navigation links animations */
  .nav-item {
    position: relative;
    transition: color 0.3s;
  }
  
  .nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3b82f6;
    transition: width 0.3s ease;
  }
  
  .nav-item:hover::after,
  .nav-item.active::after {
    width: 100%;
  }
  
  /* Logo animation */
  @keyframes logo-pulse {
    0%, 100% {
      box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
    }
    50% {
      box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    }
  }
  
  .logo-box {
    animation: logo-pulse 2s infinite;
  }
  
  /* Mobile menu animations */
  .mobile-nav-item {
    transform: translateX(20px);
    opacity: 0;
    transition: all 0.5s ease;
  }
  
  .mobile-nav-item.visible {
    transform: translateX(0);
    opacity: 1;
  }
  
  /* Fixed mobile menu slide-in effect */
  @media (max-width: 768px) {
    /* Fix the mobile menu transition to slide from side rather than top */
    .navbar {
      padding: 15px;
    }
    
    .mobile-nav-item {
      margin-bottom: 10px;
    }
  }
  
  /* Improved animation for the fixed navbar when scrolling */
  .navbar-glass {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateY(0);
    transition: transform 0.3s ease, backdrop-filter 0.4s ease, background-color 0.4s ease;
  }
  
  /* Slide-up animation when navbar appears */
  .navbar:not(.navbar-glass) {
    transform: translateY(0);
    transition: transform 0.3s ease;
  }
  
  /* Ensure the mobile menu has a more subtle entry */
  .mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Add a more elegant animation for the active indicator */
  @keyframes indicator-pulse {
    0%, 100% {
      opacity: 0.8;
      transform: scaleX(1);
    }
    50% {
      opacity: 1;
      transform: scaleX(0.9);
    }
  }
  
  .active-indicator {
    position: absolute;
    bottom: -4px;
    left: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 2px;
    animation: indicator-pulse 2s infinite;
    transform-origin: center;
  }
  