.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  padding: 18px 0;
  transition: padding 240ms ease, background 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.site-header.is-scrolled,
.site-header.menu-open {
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border-glass);
  background: rgba(244, 247, 246, 0.82);
  box-shadow: 0 14px 40px rgba(30, 34, 41, 0.08);
  backdrop-filter: blur(22px) saturate(140%);
}

.nav-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 230px 1fr auto;
  gap: 24px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand img {
  width: 194px;
  height: auto;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  align-items: center;
}

.nav-link,
.dropdown-trigger {
  border: 0;
  color: rgba(30, 34, 41, 0.76);
  background: transparent;
  font-weight: 700;
  cursor: pointer;
}

.nav-link.active,
.dropdown-trigger.active,
.nav-link:hover,
.dropdown-trigger:hover {
  color: var(--anthracite);
}

.nav-link.active,
.dropdown-trigger.active {
  color: var(--brand-blue);
}

.dropdown {
  position: relative;
}

.dropdown::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 460px;
  height: 22px;
  content: "";
  transform: translateX(-50%);
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  width: 460px;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 300ms cubic-bezier(0.25, 1, 0.5, 1), opacity 220ms ease, transform 300ms ease;
}

.dropdown:hover .dropdown-panel,
.dropdown:focus-within .dropdown-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  clip-path: inset(0 0 0 0);
}

.dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dropdown-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  transition: background 180ms ease, transform 180ms ease;
}

.dropdown-item:hover {
  background: rgba(21, 94, 239, 0.1);
  transform: translateY(-2px);
}

.nav-icon {
  display: flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(21, 94, 239, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--brand-blue);
  line-height: 1;
}

.nav-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  margin: 0;
}

.dropdown-item strong {
  display: block;
  font-size: 0.93rem;
}

.dropdown-item > span:not(.nav-icon),
.dropdown-item > span:not(.nav-icon) span {
  display: block;
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(30, 34, 41, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--anthracite);
  transition: transform 220ms ease, opacity 220ms ease;
}

.menu-open .menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-open .menu-toggle span:nth-child(2) {
  opacity: 0;
}

.menu-open .menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 900px) {
  .site-header.menu-open {
    inset: 0;
    height: 100dvh;
    overflow: auto;
    padding: 18px 0 34px;
    background: rgba(18, 53, 91, 0.98);
    backdrop-filter: none;
  }

  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .brand img {
    width: 170px;
  }

  .menu-toggle {
    display: block;
    background: rgba(255, 255, 255, 0.72);
  }

  .nav-links,
  .header-cta {
    display: none;
  }

  .mobile-menu {
    position: static;
    display: none;
    align-content: start;
    gap: 12px;
    width: var(--container);
    margin: 44px auto 0;
    padding: 0;
    color: var(--pure-white);
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px);
    transition: opacity 220ms ease, transform 220ms ease;
  }

  .menu-open .mobile-menu {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-menu a {
    font-family: "Manrope", "DM Sans", system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(1.7rem, 8vw, 3.1rem);
    line-height: 1.08;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--pure-white);
  }

  .menu-open .brand img {
    filter: brightness(0) invert(1);
  }
}

@media (min-width: 901px) {
  .mobile-menu {
    display: none;
  }
}
