.skip-link {
  position: absolute;
  z-index: 1100;
  top: -40px;
  left: 0;
  padding: 0.75rem 1.25rem;
  background: #0b1626;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
  left: 0 !important;
}

/* Keep the desktop navigation and Donate button together as one right-hand group. */
.nav {
  z-index: 1000 !important;
}

.nav-backdrop {
  position: fixed;
  z-index: 999;
  inset: 0;
  display: none;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
}

body.menu-open .nav-backdrop {
  display: block;
}

.nav__inner {
  justify-content: flex-start !important;
}

.nav__links {
  margin-left: auto;
  gap: clamp(0.9rem, 1.7vw, 2rem);
}

.nav__cta {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
  height: 32px;
  margin-left: 0.65rem;
  padding: 2px 0.8rem 0;
  align-items: center;
  justify-content: center;
  font-size: 0.71rem;
  line-height: 1;
  letter-spacing: 0.15em;
  text-indent: 0.15em;
}

.mobile-donate {
  display: none !important;
}

.nav__links > li {
  position: relative;
}

/* Keep the Initiatives label and its indicator on one line. */
.nav__links > li > a[href$="#initiatives"] {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  white-space: nowrap;
}

.nav__links > li > a[href$="#initiatives"]::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-top: 4px solid currentColor;
  border-right: 3px solid transparent;
  border-left: 3px solid transparent;
  opacity: 1;
  transform: translateY(1px);
}

.nav__links > li > a[href$="#initiatives"] .caret {
  display: none !important;
}

.has-dropdown::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  width: 260px;
  height: 20px;
  transform: translateX(-50%);
}

.has-dropdown > .dropdown {
  position: absolute !important;
  top: calc(100% + 18px) !important;
  left: 50% !important;
  z-index: 50;
  display: grid !important;
  width: 260px !important;
  min-width: 260px !important;
  margin: 0 !important;
  padding: 0.7rem !important;
  list-style: none;
  background: #0b1929 !important;
  border: 1px solid rgba(211, 182, 111, 0.22) !important;
  border-top: 2px solid #b58b3e !important;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.34) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px) !important;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
}

.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.has-dropdown.submenu-open > .dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) !important;
}

.has-dropdown > .dropdown li,
.has-dropdown > .dropdown a {
  width: 100% !important;
  margin: 0 !important;
}

.has-dropdown > .dropdown a {
  display: flex !important;
  min-height: 42px;
  padding: 0.78rem 0.9rem !important;
  align-items: center;
  color: rgba(245, 239, 228, 0.82) !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.13em !important;
  line-height: 1.35;
  text-align: left;
  transform: none !important;
}

.has-dropdown > .dropdown a::after {
  display: none !important;
}

.has-dropdown > .dropdown a:hover,
.has-dropdown > .dropdown a:focus-visible {
  padding: 0.78rem 0.9rem !important;
  background: rgba(211, 182, 111, 0.1) !important;
  color: #d3b66f !important;
  outline: none;
  transform: none !important;
}

@media (max-width: 980px) {
  .nav__links {
    position: absolute !important;
    top: calc(100% + 0.75rem) !important;
    right: 1rem !important;
    left: auto !important;
    display: none !important;
    width: min(270px, calc(100vw - 2rem)) !important;
    margin-left: 0;
    padding: 0.7rem !important;
    align-items: stretch !important;
    gap: 0 !important;
    flex-direction: column !important;
    background: rgba(11, 25, 41, 0.98) !important;
    border: 1px solid rgba(211, 182, 111, 0.18) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38) !important;
  }

  .nav__links.open {
    display: flex !important;
  }

  .nav__links > li,
  .nav__links > li > a {
    width: 100% !important;
  }

  .nav__links > li {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
  }

  .nav__links > .mobile-donate {
    display: block !important;
    margin-top: 0.35rem !important;
    padding-top: 0.35rem !important;
    border-top: 1px solid rgba(216, 185, 114, 0.2);
  }

  .nav__links > .mobile-donate > a {
    color: #d8b972 !important;
  }

  .nav__links > li > a {
    display: flex !important;
    min-height: 42px;
    margin: 0 !important;
    padding: 0.72rem 1rem !important;
    align-items: center;
    line-height: 1.2;
  }

  .nav__cta {
    display: none !important;
  }

  .nav__toggle {
    position: relative;
    z-index: 1002;
    display: inline-flex !important;
    width: 46px;
    height: 44px;
    margin-left: auto;
    padding: 10px;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: #f5efe4;
    cursor: pointer;
    pointer-events: auto !important;
  }

  .nav__toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    flex: 0 0 auto;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(2) {
    opacity: 0;
  }

  .nav__toggle[aria-expanded="true"] .nav__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .has-dropdown::before {
    display: none;
  }

  .has-dropdown > .dropdown {
    position: static !important;
    display: none !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0.15rem 0 0.35rem !important;
    padding: 0.2rem 0 0.2rem 0.7rem !important;
    border: 0 !important;
    border-left: 1px solid rgba(211, 182, 111, 0.34) !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto;
    transform: none !important;
  }

  .has-dropdown.submenu-open > .dropdown {
    display: grid !important;
    transform: none !important;
  }

  .has-dropdown > .dropdown a {
    min-height: 40px;
    padding: 0.65rem 1rem !important;
  }
}
