/* Navigation Menu Styling */
.navbar {
  background-color: #000000 !important;
  border-bottom: 1px solid #374151;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

/* Ensure navbar sits on top of hero section */
.navbar.fixed-top {
  z-index: 1030;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

/* Brand styling */
.navbar-brand {
  color: #ffffff !important;
  font-weight: 600;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  color: #45b06cff !important;
  transform: scale(1.02);
}

.navbar-brand h3 {
  color: #ffffff !important;
  font-family: "Gontserratshow", sans-serif;
  font-weight: 600;
}

/* Navigation links */
.navbar-nav .nav-link {
  color: #d1d5db !important;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.75rem 1rem;
}

.navbar-nav .nav-link:hover {
  color: #45b06cff !important;
  background-color: #1f2937;
  border-radius: 6px;
}

/* Dropdown menu styling */
.dropdown-menu {
  background-color: #1f2937 !important;
  border: 1px solid #374151;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  margin-top: 8px;
  padding: 8px 0;
  min-width: 160px;
  max-width: 300px;
  width: auto;
  /* Center dropdown on the toggle button centerline */
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  right: auto !important;
  /* Add smooth transition and proper z-index */
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 1050;
}

/* Ensure dropdown doesn't clip off the page - adjust positioning based on screen space */
.dropdown-menu.dropdown-menu-end {
  right: 0 !important;
  left: auto !important;
  transform: translateX(0) !important;
}

.dropdown-menu.dropdown-menu-start {
  left: 0 !important;
  right: auto !important;
  transform: translateX(0) !important;
}

/* Ensure proper centering relative to the nav item */
.nav-item.dropdown {
  position: relative;
}

.nav-item.dropdown .dropdown-menu {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  right: auto !important;
  top: 100% !important;
  margin: 0 !important;
}

/* Hover persistence - keep dropdown open while hovering */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* Ensure proper hover behavior */
.nav-item.dropdown:hover .dropdown-menu {
  display: block !important;
  opacity: 1;
  visibility: visible;
}

/* Create hover bridge between toggle and dropdown to prevent disappearing */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 0;
  right: 0;
  height: 18px;
  background: transparent;
  z-index: 1;
}

/* Ensure dropdown stays open when hovering over the bridge area */
.dropdown:hover .dropdown-menu::before,
.dropdown-menu:hover::before {
  background: transparent;
}


/* Horizontal dropdown layout */
.dropdown-horizontal {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

  /* Remove list indentation */
.dropdown-menu ul,
.dropdown-menu li {
  margin: 0;
  padding: 0;
  list-style: none;
}


.dropdown-item {
  color: #d1d5db !important;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 12px 20px;
  margin: 2px 0;
  border-radius: 6px;
  min-height: 40px;
  display: flex;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  line-height: 1.4;
  justify-content: center;
  text-align: center;
}

.dropdown-item:hover {
  color: #45b06cff !important;
  background-color: #374151 !important;
  transform: none;
}

.dropdown-item:focus {
  color: #45b06cff !important;
  background-color: #374151 !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(69, 176, 108, 0.2);
}

/* Improve dropdown positioning for different screen sizes */
@media (max-width: 1200px) {
  .dropdown-menu {
    min-width: 140px;
    max-width: 250px;
  }
}


/* Toggler button styling */
.navbar-toggler {
  border: 1px solid #374151;
  border-radius: 6px;
  padding: 6px 10px;
  transition: all 0.3s ease;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 2px rgba(69, 176, 108, 0.2);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28209, 213, 219, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: #1f2937 !important;
    border-radius: 8px;
    margin-top: 10px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.4);
    border: 1px solid #374151;
    max-height: 70vh; /* Limit height to 70% of viewport */
    overflow: hidden; /* Hide overflow from navbar-collapse */
  }
  
  /* Mobile navigation scrollable container */
  .mobile-nav-scroll-container {
    max-height: 60vh; /* Slightly less than navbar-collapse to account for padding */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px; /* Space for scrollbar */
    margin-right: -8px; /* Offset the padding */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    scroll-behavior: smooth; /* Smooth scrolling */
  }
  
  /* Custom scrollbar styling for mobile navigation */
  .mobile-nav-scroll-container::-webkit-scrollbar {
    width: 6px;
  }
  
  .mobile-nav-scroll-container::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 3px;
  }
  
  .mobile-nav-scroll-container::-webkit-scrollbar-thumb {
    background: #45b06cff;
    border-radius: 3px;
    transition: background 0.2s ease;
  }
  
  .mobile-nav-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #3a9a5a;
  }
  
  /* Firefox scrollbar styling */
  .mobile-nav-scroll-container {
    scrollbar-width: thin;
    scrollbar-color: #45b06cff #374151;
  }
  
  /* Responsive adjustments for different mobile screen sizes */
  @media (max-height: 600px) {
    .navbar-collapse {
      max-height: 65vh; /* Smaller height for short screens */
    }
    
    .mobile-nav-scroll-container {
      max-height: 55vh; /* Smaller scrollable area */
    }
  }
  
  @media (max-height: 500px) {
    .navbar-collapse {
      max-height: 60vh; /* Even smaller for very short screens */
    }
    
    .mobile-nav-scroll-container {
      max-height: 50vh;
    }
  }
  
  /* Ensure mobile nav list takes full width */
  .mobile-nav-list {
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  /* Add subtle gradient fade at bottom to indicate more content */
  .mobile-nav-scroll-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 8px; /* Account for scrollbar space */
    height: 20px;
    background: linear-gradient(transparent, rgba(31, 41, 55, 0.8));
    pointer-events: none;
    z-index: 1;
  }
  
  /* Ensure the container has relative positioning for the gradient */
  .mobile-nav-scroll-container {
    position: relative;
  }
  
  /* Hide dropdown functionality on mobile */
  .navbar-nav .dropdown-toggle {
    display: none !important;
  }
  
  .navbar-nav .dropdown-menu {
    display: none !important;
  }
  
  /* Mobile navigation list styling */
  .mobile-nav-list {
    width: 100%;
  }
  
  .mobile-nav-category {
    margin-top: 20px;
    margin-bottom: 8px;
  }
  
  .mobile-nav-category:first-child {
    margin-top: 0;
  }
  
  .mobile-category-title {
    color: #45b06cff !important;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    padding: 8px 0;
    border-bottom: 2px solid #45b06cff;
    margin-bottom: 8px;
  }
  
  .mobile-nav-link {
    color: #d1d5db !important;
    padding: 12px 16px !important;
    margin: 4px 0 !important;
    border-radius: 6px;
    background-color: #374151;
    border: 1px solid #4b5563;
    transition: all 0.2s ease;
    display: block;
    text-decoration: none !important;
  }
  
  .mobile-nav-link:hover {
    background-color: #4b5563 !important;
    color: #45b06cff !important;
    border-color: #45b06cff;
    transform: translateX(4px);
  }
  
  .mobile-nav-link:active,
  .mobile-nav-link:focus {
    background-color: #45b06cff !important;
    color: #ffffff !important;
    border-color: #45b06cff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(69, 176, 108, 0.2);
  }
}

/* Clean minimal text styling */
.navbar-brand,
.navbar-nav .nav-link,
.dropdown-item {
  text-shadow: none;
  font-weight: 500;
}

.navbar-brand {
  font-weight: 600;
}

/* Logo styling */
.navbar-brand img {
  transition: all 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.1);
}
