/* Unified Navigation Bar Styles */

/* Provide space for fixed navbar */
body {
  padding-top: 80px;
}

/* Main navbar container */
#header {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: fixed !important;
  top: 0;
  z-index: 1002;
}

/* Brand logo */
#header .navbar-brand {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

#header .navbar-brand-logo {
  height: 50px !important;
  width: auto !important;
  min-width: auto !important;
  max-width: 200px !important;
  object-fit: contain;
  transition: all 0.3s ease;
}

#header .navbar-brand:hover .navbar-brand-logo {
  transform: scale(1.05);
}

/* Nav links */
#header .nav-link {
  color: #2c3e50 !important;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.8rem 1rem !important;
  position: relative;
}

#header .nav-link:hover {
  color: #0066cc !important;
  transform: translateY(-1px);
}

/* Active link highlight */
#header .nav-link.active {
  color: #0066da !important;
  font-weight: 600;
}

#header .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, #0066da, #4a90e2);
  border-radius: 2px;
}

/* Dropdown styling */
.navbar .dropdown-menu {
  margin-top: 0;
  border: 1px solid rgba(0, 102, 204, 0.1);
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0, 102, 204, 0.15);
  border-radius: 8px;
  overflow: hidden;
  animation: dropdown-fade-in 0.2s ease-in-out both;
}

@keyframes dropdown-fade-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.navbar .dropdown-menu .dropdown-item {
  position: relative;
  padding: 12px 20px;
  color: #2c3e50;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(0, 102, 204, 0.08);
}

.navbar .dropdown-menu .dropdown-item:last-child {
  border-bottom: none;
}

.navbar .dropdown-menu .dropdown-item:hover {
  background: rgba(0, 102, 204, 0.1);
  color: #0066cc;
  transform: translateX(5px);
}

/* Dropdown on hover (desktop) */
.navbar-nav .dropdown:hover .dropdown-menu {
  display: block;
  margin-top: 0;
}

/* Mobile collapse adjustments */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 102, 204, 0.1);
  }
  
  .navbar-collapse .nav-link {
    color: #2c3e50 !important;
    padding: 12px 20px !important;
    border-bottom: 1px solid rgba(0, 102, 204, 0.08);
    transition: all 0.3s ease;
  }
  
  .navbar-collapse .nav-link:hover {
    background-color: rgba(0, 102, 204, 0.1);
    color: #0066cc !important;
  }
  
  .navbar-collapse .nav-link:last-child {
    border-bottom: none;
  }
  
  .navbar-collapse .dropdown-menu {
    background-color: rgba(0, 102, 204, 0.05);
    border: none;
    box-shadow: none;
    border-radius: 0;
    margin-left: 10px;
  }
  
  .navbar-collapse .dropdown-item {
    color: #2c3e50 !important;
    padding: 8px 20px;
    font-size: 0.9rem;
  }
  
  .navbar-collapse .dropdown-item:hover {
    background-color: rgba(0, 102, 204, 0.1);
    color: #0066cc !important;
  }
  
  .navbar-toggler {
    border-color: rgba(0, 102, 204, 0.3);
    color: #0066cc;
  }
  
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
  }
}

/* Adjustments for small screens */
@media (max-width: 768px) {
  body { 
    padding-top: 70px; 
  }
  
  #header { 
    padding: 0.5rem 0; 
  }
  
  #header .navbar-brand {
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
  }
  
  #header .navbar-brand-logo { 
    height: 40px !important; 
    max-width: 160px !important; 
    min-width: auto !important;
  }
}