

/* Base navbar styling */
.navbar {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  max-width: 100%;
  width: 100%;
  z-index: 1030;
  padding: 10px 0;
}

/* Navbar style when scrolled */
.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.9) !important; /* White with 90% opacity */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 5px 0;
}

/* Logo styling */
.navbar-brand {
  padding: 0.5rem 0;
  margin-right: 1rem;
  display: flex;
  align-items: center;
}

.navbar-brand img {
  max-height: 50px;
  width: auto;
  transition: all 0.3s ease;
}

/* Navigation items styling */
.navbar-nav {
  margin-left: auto;
  align-items: center;
}

.nav-link {
  color: #212529 !important;
  font-weight: 500;
  transition: color 0.2s ease, opacity 0.2s ease;
  opacity: 0.9;
  padding: 0.5rem 1rem !important;
  position: relative;
}

.nav-link:hover,
.nav-link.active:hover {
  opacity: 1;
  color: #1f15af !important;
  font-weight: 700;
}

.nav-link.active {
  color: #1f15af !important;
  opacity: 1;
}

/* Dropdown styling */
.dropdown-toggle::after {
  border: none;
  content: "\f107";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  vertical-align: middle;
  margin-left: 8px;
}

/* Dropdown menu styling */
.dropdown-menu {
  background-color: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
  transition: all 0.3s ease;
}

.dropdown-item {
  color: #212529;
  padding: 0.5rem 1.5rem;
  transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(0, 0, 0, 0.05);
  color: #000000;
}

.dropdown-item.active {
  background-color: rgba(31, 21, 175, 0.1);
  color: #1f15af !important;
  font-weight: 600;
}

/* Mobile toggle button */
.navbar-toggler {
  border-color: rgba(0, 0, 0, 0.3);
  padding: 0.25rem 0.5rem;
  outline: none;
  box-shadow: none !important;
  transition: all 0.3s ease;
  background-color: transparent !important;
}

.navbar-toggler:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Hamburger icon */
.navbar-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Desktop dropdown animations (992px and above) */
@media (min-width: 992px) {
  .navbar .py-lg-0 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
  
  .navbar .px-lg-5 {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
  }
  
  /* Dropdown animations for desktop */
  .dropdown-menu {
    display: block;
    visibility: hidden;
    top: 100%;
    transform: rotateX(-75deg);
    transform-origin: 0% 0%;
    transition: 0.3s ease;
    opacity: 0;
  }

  .dropdown-menu.show {
    transform: rotateX(0deg);
    visibility: visible;
    opacity: 1;
  }
  
  /* Hover effect for desktop dropdown */
  .nav-item.dropdown:hover .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    opacity: 1;
  }
  
  /* Dropdown toggle caret */
  .dropdown-toggle::after {
    display: inline-block;
  }
}

/* Tablet styles (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .navbar {
    padding: 8px 0;
  }
  
  .navbar.scrolled {
    padding: 5px 0;
  }
  
  .navbar-brand img {
    max-height: 45px;
  }
  
  .nav-link {
    padding: 0.4rem 0.8rem !important;
  }
  
  /* Show dropdown menu on click for tablets */
  .dropdown-menu {
    display: none;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
    padding-left: 1rem;
    background-color: rgba(245, 245, 245, 0.98);
  }
  
  .dropdown-menu.show {
    display: block;
  }
}

/* Mobile styles (below 768px) */
@media (max-width: 767.98px) {
  .navbar-brand img {
    max-height: 40px;
  }

  /* Mobile menu container */
  .navbar-collapse {
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 0 0 8px 8px;
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    max-height: 80vh;
    overflow-y: auto;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: none; /* Initially hidden */
  }
  
  /* When navbar is toggled/shown */
  .navbar-collapse.show {
    display: block; /* Make it visible when show class is present */
  }
  
  .navbar-nav {
    margin-left: 0;
    padding: 0;
    width: 100%;
  }
  
  .nav-link {
    padding: 0.5rem 1.5rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  .nav-item:last-child .nav-link {
    border-bottom: none;
  }
  
  /* Mobile dropdown menu styling */
  .dropdown-menu {
    border: none;
    box-shadow: none;
    background-color: rgba(245, 245, 245, 0.5);
    padding: 0;
    margin: 0;
    display: none; /* Initially hidden */
    transition: all 0.3s ease;
  }
  
  /* When dropdown menu is shown */
  .dropdown-menu.show {
    display: block;
    padding: 0.5rem 0;
  }
  
  .dropdown-item {
    padding: 0.5rem 2.5rem !important;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  }
  
  .dropdown-item:last-child {
    border-bottom: none;
  }
  
  /* Make dropdown toggles appear clickable */
  .dropdown-toggle {
    cursor: pointer;
  }
  
  /* Visual indicator for dropdowns on mobile */
  .dropdown-toggle::after {
    float: right;
    margin-top: 8px;
    transition: transform 0.3s ease;
  }
  
  /* Rotate caret when dropdown is open */
  .dropdown-toggle[aria-expanded="true"]::after {
    transform: rotate(180deg);
  }
  
  /* Utility classes for mobile */
  .ms-4 {
    margin-left: 1rem !important;
  }
  
  .me-4 {
    margin-right: 1rem !important;
  }
  
  .p-4 {
    padding: 0.5rem !important;
  }
}