/* Desktop Navigation Styles */
#navbarNavDropdown > .navbar-nav > .nav-item > a.nav-link:hover {
  box-shadow: inset 0 -3px 0 #2aa454;
  transition: box-shadow 0.3s ease;
}

#navbarNavDropdown .navbar-nav .nav-item .dropdown-menu li a.dropdown-item:hover {
  background-color: #bbf6e2;
  transition: background-color 0.3s ease;
}

.dropdown-header.odd {
  background: #005a57;
  color: white;
  font-weight: 600;
  padding: 0.5rem 1rem; /* Reduced padding */
}

#navbarNavDropdown > .navbar-nav .nav-link.active { 
  background-color: #bbf6e2; 
  color: #005a57;
}

.dropdown-2-industries .nav-item.active, .dropdown-2-teams .nav-item.active, .dropdown-2-roles .nav-item.active {
 background-color: #bbf6e2; 
  color: #005a57;
}

/* Mega Menu Styling - Centered and Reduced Padding */
.mega-menu.show {
  display: flex !important;
  flex-direction: row;
  width: 60vw; /* Reduced from 80vw */
  max-width: 1000px; /* Reduced from 1400px */
  left: 17vw !important;
  right: auto !important; 
  transform: translateX(-50%) !important;
  bottom: -110%;
  position: absolute;
  z-index: 1050;
  background: white;
/*   border-radius: 8px; */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid #e9ecef;
}

ul.dropdown-menu.dropdown-2-roles {
  grid-template-columns: repeat(4, 1fr)!important;
  width: 90vw!important;          /* increase from 60vw → 80vw */

  grid-auto-flow: column;
    grid-template-rows: repeat(21, auto);
  
}
ul.dropdown-menu.dropdown-2-industries {
  grid-template-columns: repeat(2, 1fr)!important;
  width: 50vw!important;          /* increase from 60vw → 80vw */
/*   max-width: 1400px!important;    /* bump up the max-width */ */
  
}
ul.dropdown-menu.dropdown-2-teams {
  grid-template-columns: repeat(2, 1fr)!important;
  width: 50vw!important;          /* increase from 60vw → 80vw */
/*   max-width: 1400px!important;    /* bump up the max-width */ */
  
}
.mega-menu>li.nav-item.active>ul.dropdown-menu.dropdown-2-roles{
  left: 55%!important;
}

.mega-menu > .dropdown-submenu {
  width: 33.33%;
  padding: 0.5rem; /* Reduced from 1.5rem */
}

.mega-menu > .dropdown-submenu > a {
  font-weight: 600;
  color: #fff;
  padding: 0.5rem 0.75rem; /* Reduced padding */
  border-radius: 0px;
  transition: all 0.3s ease;
  font-size: 0.95rem; /* Slightly smaller font */
}

.mega-menu > .dropdown-submenu > a:after {
  content: "";
}
.mega-menu > .nav-item{
  background: #005a57; 
  color: white;
/*   width: 25%; */
  display: flex;
  align-items: center;
}
.mega-menu > .nav-item.active {
  background: unset;  
  color: #005a57;  
  border-radius: 0px;
}

.mega-menu > .dropdown-menu .nav-item.active:hover {
  background: unset;  
   color: #005a57;  
}

.mega-menu > .dropdown-menu .nav-item.active:hover a {   
   color: #005a57;  
}

.mega-menu > .nav-item.active > a {  
  color: #005a57;
}

/* Inner Dropdown Menu (Industries, Teams, Roles) - Centered and Adjusted */
.mega-menu > li.nav-item.active > ul.dropdown-menu {
  width: 80vw; /* Match parent mega menu width */
  max-width: 1300px; /* Match parent max-width */
  left: 41.5% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  top: 105%;
  border-radius: 8px;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr); /* Changed to 3 columns for better balance */
/*   gap: 1rem 1.5rem; /* Reduced gaps */ */
  padding: 1.5rem; 
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border: 1px solid #e9ecef;
  z-index: 1060;
}

/* Dropdown Items Styling - Reduced Padding */
.mega-menu .dropdown-menu .dropdown-item {
  padding: 0.5rem 0.75rem; /* Reduced padding */
  border-radius: 6px;
  transition: background-color 0.3s ease;
  border-bottom: 1px solid #f8f9fa;
  font-size: 0.9rem; /* Smaller font size */
  line-height: 1.3;
}

.mega-menu .dropdown-menu .dropdown-item:last-child {
  border-bottom: none;
}

.mega-menu .dropdown-menu .dropdown-item:hover {
  background-color: #bbf6e2;
  color: #005a57;
}

.mega-menu .nav-item.dropdown.dropdown-submenu > a {
  pointer-events: none;
  cursor: default;
}

/* .mega-menu .nav-item:hover, 
.dropdown-menu .nav-item:hover {
  background-color: #bbf6e2;
} */

.dropdown-menu.dropdown-1-about-us .nav-item:hover,
.dropdown-menu.dropdown-2-industries .nav-item:hover,
.dropdown-menu.dropdown-2-teams .nav-item:hover,
.dropdown-menu.dropdown-2-roles .nav-item:hover{
    background-color: #bbf6e2;
}

ul.dropdown-2-roles li.nav-item a.nav-link[href^="#"]{
  color: #00aa49;
  margin-top: 2vh;
}

ul.dropdown-2-roles li.nav-item:hover a.nav-link[href^="#"]{  
  background-color: none;
  cursor: default;
}



.dropdown-2-industries .nav-item,
.dropdown-2-teams .nav-item,
.dropdown-2-roles .nav-item{
    line-height: 1;
    display: flex;
    align-items: center;
    height: 5vh;
    padding: 0.4rem;
}


/* Only inside this dropdown, kill li:hover if its direct child <a> is "#" */
.dropdown-2-roles .nav-item:has(> a[href="#"]):hover {
  background: transparent !important;
  /* reset any other hover styles you set on .nav-item:hover */
}

/* Also neutralize any anchor styling that might be applied via li:hover rules */
.dropdown-2-roles .nav-item:has(> a[href="#"]):hover > a.nav-link,
.dropdown-2-roles .nav-item:has(> a[href="#"]) > a.nav-link:hover,
.dropdown-2-roles .nav-item:has(> a[href="#"]) > a.nav-link:focus {
  background: none !important;
  color: inherit !important;
  text-decoration: none !important;
  cursor: default;
}

/* Optional: make those label rows completely inert */
.dropdown-2-roles .nav-item:has(> a[href="#"]) {
  pointer-events: none;   /* remove if you still want them focusable/tabbable */
}


/* Responsive Constraints */
.mega-menu.show,
.mega-menu > li.nav-item.active > ul.dropdown-menu {
  max-width: calc(100vw - 2rem);
}



/* Standard Dropdown Styling */
@media (min-width: 992px) {
  .navbar-expand-lg .navbar-nav .dropdown-menu {
    position: absolute;
    min-width: 200px;
    padding: 0.75rem; 
    border-radius: 0;
  }
  
  .dropdown-menu .nav-item a.nav-link{font-size: 0.9vw;        line-height: 1.1;}
  .dropdown-menu.dropdown-2-industries,
  .dropdown-menu.dropdown-2-teams,
  .dropdown-menu.dropdown-2-roles,
  {
    gap: 0vw 2vw!important;
  }
  
    .navbar-brand img {
      height: auto;        
      width: 7vw;
    }
}

/* Desktop Hover Effects */
@media (min-width: 769px) { 
  .contact-menu {
    background-color: #bbf6e2; 
    border-radius: 5px;
    padding: 0.5rem 1rem;
  }

  /* Second-level submenu positioning */
  .dropdown-submenu {
    position: relative;
  }

  .dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 0.1rem;
    margin-top: -0.1rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  /* Arrow indicator */
  .dropdown-submenu > a::after {
    content: "▶";
    float: right;
    margin-left: 5px;
    font-size: 0.65rem;
    transform: translateY(2px);
    color: #005a57;
  }
    
  .dropdown-menu .dropdown-toggle::after {
    border-top: none;
  }

  /* Hover activation for submenus */
  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }

  .dropdown-menu > .dropdown-submenu > .dropdown-menu {
    display: none;
    position: absolute;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  nav.navbar{padding: 0; margin: 0;}
  .navbar-brand img {
    height: auto;        
    width: auto;
  }
  
  .mega-menu.show,
  .mega-menu > li.nav-item.active > ul.dropdown-menu {
    width: 100% !important;
    left: 0 !important;
    transform: none !important;
    position: static;
  }
}

/* Z-index management */
.mega-menu > li.nav-item.dropdown-submenu > ul.dropdown-menu {
  z-index: 1060;
  max-width: calc(100vw - 2rem);
  border-radius: 0;
}
