/* Top Bar Styling */
.top-bar {
  background-color: #212529;
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.top-bar a {
  color: white;
  text-decoration: none;
  margin-right: 20px;
}

.top-bar a:hover {
  color: var(--color-red-orange);
}

/* Navbar Sticky Styling */
.navbar {
  top: 0;
  z-index: 1020;
  background-color: white;
  border-bottom: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Navbar Branding */
.navbar-brand img {
  height: 40px;
  margin-right: 10px;
}

/* Navbar Links */
.navbar-nav .nav-link {
  font-weight: 600;
  margin-right: 20px;
  color: #000;
}

.navbar-nav .nav-link:hover {
  color: #E05B1D;
}

/* Dropdown Menu Styling */
.nav-item.dropdown:hover .dropdown-menu {
  padding: 1.5rem;
  display: block;
  visibility: visible;
  opacity: 1;
  margin-top: 0;
  margin-right: auto;
}

.dropdown-menu {
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 0;
  width: 100%;
  min-width: 0;
  z-index: 1050;
  transition: all 0.1s ease;
  opacity: 0;
  visibility: hidden;
  display: flex;
  flex-direction: column;
}

/* Dropdown Columns */
.dropdown-menu .d-flex {
  gap: 30px;
  justify-content: space-between;
  padding: 20px;
  width: 100%;
}

/* Headings */
.dropdown-menu h6 {
  font-weight: bold;
  margin-bottom: 10px;
  color: #E05B1D;
}

/* Lists */
.dropdown-menu ul {
  padding: 0;
  margin: 0;
}

.dropdown-menu li {
  list-style: none;
  margin-bottom: 5px;
}

/* Links in Dropdown List */
.dropdown-menu a {
  color: #000;
  text-decoration: none;
  display: block;
  padding: 5px 10px;
  border-radius: 5px;
  transition: color 0.3s ease, background-color 0.3s ease;
}

/* Hover State */
.dropdown-menu a:hover {
  color: #E05B1D;
  background-color: #f8f9fa;
  text-decoration: none;
}

/* Active State */
.dropdown-menu a:active {
  color: #fff;
  background-color: #E05B1D;
}

/* Focus State */
.dropdown-menu a:focus {
  outline: none;
  background-color: #E05B1D;
  color: #fff;
}

/* Responsive Design */
@media (max-width: 768px) {
  .dropdown-menu {
    flex-direction: column;
    width: auto;
  }
}

/* Desktop Dropdown Centering */
@media (min-width: 992px) {
  /* Make navbar items static to allow full-width dropdowns */
  .navbar .nav-item {
    position: static !important;
  }
  .close-btn {
    display: none !important;
  }
  /* Ensure dropdowns span full width and center */
  .navbar .dropdown-menu {
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    margin-top: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Specific width adjustments for each dropdown */
  #aboutDropdown .dropdown-menu {
    min-width: 900px !important;
  }

  #resourcesDropdown .dropdown-menu {
    min-width: 700px !important;
  }

  #servicesDropdown .dropdown-menu {
    min-width: 900px !important;
  }

  #researchDropdown .dropdown-menu {
    min-width: 500px !important;
  }

  #aiCornerDropdown .dropdown-menu {
    min-width: 300px !important;
  }

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

/* Mobile Responsive Styles */
@media (max-width: 991px) {
  .top-bar {
    display: none;
  }

  .navbar-collapse {
    background-color: white;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    height: 100vh;
    transform: translateX(-100%);
    /* transition: transform 0.1s ease-in-out; */
    overflow-y: auto;
    z-index: 1030;
  }

  .navbar-collapse.show {
    transform: translateX(0);
  }

  .close-btn {
    display: none !important;
  }

  .navbar-nav {
    margin-top: 40px;
  }

  .navbar-nav .nav-item {
    border-bottom: 1px solid #eee;
  }

  .navbar-nav .nav-link {
    padding: 12px 0;
    color: #333;
    position: relative;
  }

  .nav-link::after {
    content: '+';
    position: absolute;
    right: 15px;
    /* transition: transform 0.1s ease; */
  }

  .nav-link[aria-expanded="true"]::after {
    content: '-';
  }

  .dropdown-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    min-width: 100% !important;
    padding: 0 0 0 20px;
    margin: 0;
    border: none;
    box-shadow: none;
    background-color: transparent;
    display: none;
  }

  .dropdown-menu.show {
    display: block;
  }

  .dropdown-menu .d-flex {
    flex-direction: column;
  }

  .dropdown-menu div {
    margin-bottom: 15px;
  }

  .dropdown-menu h6 {
    margin: 10px 0;
    color: #666;
  }

  .dropdown-menu a {
    padding: 8px 0;
    color: #333;
  }

  .dropdown-menu ul {
    padding-left: 15px;
    margin-bottom: 10px;
  }

  .dropdown-menu li {
    margin-bottom: 5px;
  }
}