.site-header .container {
  position: relative;
}

.nav {
  height: 100%;
  gap: 2px;
}

.nav-item {
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.nav-item > .nav-link {
  height: 100%;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  position: relative;
  color: var(--ink);
  border-radius: 0;
}

.nav-item > .nav-link:hover {
  background: #f3f7ef;
}

.nav-item > .nav-link.active::before {
  content: "";
  width: 5px;
  height: 5px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--plum));
}

.nav-caret {
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  opacity: .55;
  transition: transform .2s ease, margin-top .2s ease;
}

.has-dropdown:hover .nav-caret,
.has-dropdown:focus-within .nav-caret,
.has-dropdown.open .nav-caret {
  margin-top: 4px;
  transform: rotate(225deg);
}

.dropdown {
  position: absolute;
  top: calc(100% - 6px);
  left: 50%;
  z-index: 90;
  width: 284px;
  padding: 10px;
  border: 1px solid rgba(21,52,55,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 26px 70px rgba(6,30,36,.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 11px;
  height: 11px;
  border-top: 1px solid rgba(21,52,55,.09);
  border-left: 1px solid rgba(21,52,55,.09);
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

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

.dropdown-mega {
  width: 760px;
  padding: 13px;
  display: flex;
  gap: 10px;
}

.dropdown-links {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dropdown-mega .dropdown-links {
  flex: 1;
  grid-template-columns: 1fr 1fr;
}

.dropdown-link {
  min-height: 64px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: transparent;
}

.dropdown-link:hover {
  background: linear-gradient(90deg, #f1f7eb, #f8f9f5);
}

.dropdown-index {
  color: #9bb989;
  font: 700 11px/1 Georgia, serif;
}

.dropdown-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.dropdown-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.dropdown-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  white-space: nowrap;
}

.dropdown-arrow {
  color: var(--orange-dark);
  font-size: 14px;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity .18s ease, transform .18s ease;
}

.dropdown-link:hover .dropdown-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

.dropdown-aside {
  width: 218px;
  flex: 0 0 auto;
  padding: 22px;
  border-radius: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 0, rgba(151,203,106,.22), transparent 36%),
    linear-gradient(145deg, #0b2b34, #10464b);
}

.dropdown-aside-label {
  color: #b7d99b;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1.2px;
}

.dropdown-aside strong {
  display: block;
  margin-top: 26px;
  font-size: 18px;
  line-height: 1.5;
}

.dropdown-aside p {
  margin: 10px 0 18px;
  color: rgba(255,255,255,.55);
  font-size: 10px;
  line-height: 1.75;
}

.dropdown-aside a {
  display: flex;
  justify-content: space-between;
  padding-top: 13px;
  border-top: 1px solid rgba(255,255,255,.15);
  color: #d7ebc4;
  font-size: 11px;
  font-weight: 700;
}

.header-cta {
  position: relative;
  z-index: 2;
}

@media (max-width: 1080px) {
  .nav-item > .nav-link {
    padding: 0 9px;
    font-size: 13px;
  }

  .dropdown-mega {
    width: 690px;
  }
}

@media (max-width: 980px) {
  .site-header .container {
    position: relative;
  }

  .nav.mobile-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 80;
    height: auto;
    max-height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    overflow-y: auto;
    padding: 9px;
    border: 1px solid rgba(20,53,57,.09);
    border-radius: 18px;
    background: rgba(255,255,255,.99);
    box-shadow: 0 25px 65px rgba(6,30,36,.2);
  }

  .nav.mobile-open .nav-item {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid rgba(20,53,57,.08);
  }

  .nav.mobile-open .nav-item:last-child {
    border-bottom: 0;
  }

  .nav.mobile-open .nav-item > .nav-link {
    width: 100%;
    height: auto;
    padding: 15px 10px;
    justify-content: space-between;
    border-radius: 10px;
  }

  .nav.mobile-open .dropdown {
    width: 100%;
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    padding: 2px 5px 10px 25px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #f6f8f3;
  }

  .nav.mobile-open .dropdown::before,
  .nav.mobile-open .dropdown-aside {
    display: none;
  }

  .nav.mobile-open .has-dropdown.open > .dropdown {
    display: block;
  }

  .nav.mobile-open .dropdown-mega .dropdown-links,
  .nav.mobile-open .dropdown-links {
    display: grid;
    grid-template-columns: 1fr;
  }

  .nav.mobile-open .dropdown-link {
    min-height: 54px;
    grid-template-columns: 22px minmax(0, 1fr) 14px;
    padding: 8px;
  }

  .nav.mobile-open .dropdown-copy strong {
    white-space: normal;
  }

  .nav.mobile-open .dropdown-copy small {
    white-space: normal;
  }
}
