.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--dark-charcoal-bg);
  height: 97px;
  z-index: var(--z-header);
  text-wrap: wrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

div {
  color: unset !important;
}

.site-header .container {
  max-width: calc(100% - 240px);
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
}

.logo {
  margin-right: 60px;
  flex-shrink: 0;
  z-index: 1001; /* Ensure logo is above nav on mobile */
}

.logo img {
  width: 203px;
  display: block;
}

/* ==============================================
 * DESKTOP NAVIGATION & DARK DROPDOWN
 * ============================================== */
.main-nav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
}

.main-nav > ul {
  display: flex;
  gap: 44px;
  list-style: none;
  align-items: center;
  height: 100%;
}
.main-nav > ul > li {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s ease;
  font-family: "Alexandria", sans-serif;
}

.dropdown-toggle {
  text-wrap: nowrap;
  display: flex;
  align-items: center;
  gap: 13px;
}

.dropdown-toggle > .bi-caret-down-fill {
  font-size: 16px;
  color: var(--primary-blue);
}

ul,
ol {
  margin: 0 !important;
}

.dropdown {
  position: absolute;
  top: calc(100% + 0.6rem);
  min-width: 240px;
  background-color: var(--dark-gray-bg);
  border-radius: var(--radius-sm);
  padding: var(--space-xs) 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  overflow: hidden;
  box-shadow: inset 0 5px 5px -5px rgba(0, 0, 0, 0.5);
}

.dropdown li {
  display: block;
}

.dropdown a {
  color: var(--text-secondary);
  padding: var(--space-sm) var(--space-lg);
  display: block;
  font-size: 14px;
  transition: background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.dropdown a:hover {
  color: var(--primary-blue);
}

.has-dropdown:hover .dropdown {
  visibility: visible;
  opacity: 1;
}

.non-clickable {
  cursor: default;
}

/* Contact Button */
.btn-contact-us a {
  text-wrap: nowrap;
  color: var(--color-dark);
  background-color: var(--primary-blue);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-sm);
  transition: all 0.3s ease;
  height: 49px;
  width: 144px;
  align-items: center;
  display: flex;
  font-family: "Roboto", sans-serif;
  justify-content: center;
}

.btn-contact-us a:hover {
  outline: 1px solid var(--primary-blue);
  background-color: transparent;
}

.main-nav > ul > li:not(.has-dropdown) > a:hover {
  color: var(--primary-blue);
}

/* ==============================================
 * MOBILE NAVIGATION & HAMBURGER
 * ============================================== */
.mobile-menu-btn {
  display: none; /* Hidden on desktop */
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 10px;
  /* width: 44px; */
  /* height: 44px; */
  text-align: center;
  align-items: center;
  justify-content: center;
}

.mobile-menu-btn > i {
  color: white;
  font-size: 32px;
}

.bi-chevron-down,
.bi-chevron-up {
  display: none;
  color: var(--text-secondary);
}

.bi-caret-down-fill {
  display: block;
}

/* ==============================================
 * RESPONSIVE STYLES
 * ============================================== */

@media (max-width: 1440px) {
  .site-header .container {
    max-width: calc(100% - 180px);
  }
}

@media (max-width: 1277px) {
  .site-header .container {
    max-width: calc(100% - 120px);
  }
}

@media (max-width: 1217px) {
  .site-header .container {
    max-width: calc(100% - 100px);
  }
}

@media (max-width: 1197px) {
  .site-header .container {
    max-width: calc(100% - 80px);
  }
}

@media (max-width: 1168px) {
  .site-header .container {
    max-width: calc(100% - 30px);
  }
}

/* --- TABLET & LARGE MOBILE: MENU IS FIT-CONTENT (Breakpoint 1) --- */
@media (max-width: 1157px) {
  ul,
  ol {
    margin: 0 auto !important;
  }
  .site-header {
    position: sticky;
    top: 0;
    height: 72px;
    z-index: 1000;
  }

  .bi-chevron-down {
    display: block;
  }

  .bi-caret-down-fill {
    display: none;
  }

  .has-dropdown.active .bi-chevron-down {
    display: none;
  }

  .has-dropdown.active .bi-chevron-up {
    display: block;
  }

  .btn-contact-us a {
    text-wrap: nowrap;
    background-color: unset;
    color: var(--dark-gray-bg);
    font-weight: unset;
    font-size: unset;
    padding: unset;
    border-radius: unset;
    transition: unset;
    height: unset;
    width: unset;
    align-items: unset;
    display: unset;
    border-bottom: 1px solid var(--text-secondary);
  }

  .btn-contact-us a:hover {
    outline: none;
    background-color: unset;
    outline: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .btn-contact-us > a {
    width: 100%;
    justify-content: center;
  }

  .main-nav {
    position: fixed;
    top: 72px;
    right: 0;
    width: 30%;
    /* MODIFIED: Height is based on content at this screen size */
    height: calc(100% - 72px);
    background: var(--dark-charcoal-bg);
    opacity: 0;
    visibility: hidden;
    /* transition: opacity 0.4s ease, visibility 0.4s; */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 450px;
    overflow-y: auto;
  }

  .main-nav a {
    color: var(--text-gray);
  }

  .has-dropdown.active * {
    color: var(--text-secondary) !important;
  }

  .has-dropdown.active li {
    border-bottom: 0.5px solid var(--light-gray);
  }

  body.nav-open .main-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    align-items: start;
  }

  .main-nav ul {
    flex-direction: column;
    align-items: flex-start;
    max-width: calc(100% - 60px);
    width: 100%;
    margin: 0 auto;
    gap: 0;
  }

  .main-nav > ul > li {
    color: var(--light-gray);
    font-size: 18px;
    font-weight: 500;
    display: block;
    padding: var(--space-md);
    padding-left: 20px;
    width: 100%;
    height: fit-content;
    border-bottom: 0.5px solid var(--light-gray);
  }

  .main-nav > ul > li:last-child {
    border-bottom: none;
  }

  /* Mobile Dropdowns */
  .has-dropdown > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 0;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
  }

  .has-dropdown.active .dropdown {
    max-height: fit-content;
    padding-bottom: var(--space-sm);
  }

  .has-dropdown.active {
    border-bottom: none;
    background-color: var(--dark-gray-bg);
  }

  .has-dropdown.active > .dropdown-toggle {
    border-bottom: 1px solid var(--light-gray);
    padding-bottom: 16px;
  }

  .dropdown li {
    width: 100%;
  }

  .dropdown a {
    padding: 19px 16px;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dropdown li:last-child a {
    border-bottom: none;
  }

  .dropdown a:hover {
    background-color: transparent;
    color: var(--primary-blue);
  }

  .dropdown-toggle {
    justify-content: space-between;
  }

  .main-nav.active {
    visibility: visible;
    opacity: 1;
  }
}

/* --- SMALLER MOBILE: MENU IS FULL-HEIGHT (Breakpoint 2) --- */
@media (max-width: 768px) {
  /* Make the UL fill the nav container */
  .main-nav ul {
    height: 100%;
    display: flex; /* Ensure flex properties apply */
  }
}

@media (max-width: 480px) {
  .main-nav {
    min-width: unset;
    width: 100%;
  }

  .logo img {
    height: 22px;
  }
}

body.nav-open {
  overflow: hidden;
}
