.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(255 255 255 / 85%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-shell {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 90px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #7d6bf6, #6856ee);
  font-size: 22px;
  font-weight: 800;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 29px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex: 1 1 auto;
}

.nav-list {
  list-style: none;
  margin: 0 auto 0 28px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.nav-item {
  position: relative;
  flex: 0 0 auto;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 0 18px;
  border-radius: 18px;
  font-size: 1rem;
  font-weight: 700;
  color: #5f6883;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-link--button[aria-expanded="true"] {
  background: #eceef6;
  color: #202537;
}

.nav-link--button {
  border: 0;
  cursor: pointer;
  background: transparent;
}

.nav-caret {
  font-size: 14px;
  transition: transform .24s ease;
}

.nav-link--button[aria-expanded="true"] .nav-caret {
  transform: rotate(180deg);
}

.nav-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 250px;
  padding: 12px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-soft);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.nav-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-panel a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  font-weight: 600;
  color: #5f6883;
}

.nav-panel a:hover,
.nav-panel a.is-active {
  background: #f0f2f8;
  color: #1f2433;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.lang-link { min-width: 176px; }

.burger {
  display: none;
  width: 54px;
  height: 54px;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.burger span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #21283a;
  transition: transform .24s ease, opacity .24s ease;
}

.burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 1200px) {
  .header-shell { min-height: 90px; }
  .nav-list { margin-left: 8px; }
  .nav-link { padding-inline: 14px; font-size: 1rem; }
  .lang-link { min-width: auto; }
}

@media (max-width: 1024px) {
  .header-shell {
    min-height: 96px;
    gap: 20px;
    position: relative;
  }

  .brand-text { font-size: 18px; }
  .burger { display: inline-flex; }

  .main-nav {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    display: grid;
    gap: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
  }

  .main-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .nav-list {
    margin: 0;
    display: grid;
    gap: 8px;
  }

  .nav-link,
  .nav-link--button {
    width: 100%;
    justify-content: space-between;
  }

  .nav-panel {
    position: static;
    min-width: 0;
    max-height: 0;
    padding: 0 10px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    overflow: hidden;
    transform: none;
    background: #f6f8fc;
    transition: max-height .28s ease, padding .28s ease;
  }

  .nav-panel.is-open {
    max-height: 320px;
    padding: 10px;
    margin-top: 6px;
    border: 1px solid #e4e8f2;
  }

  .header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .header-actions .btn { width: 100%; }
}

@media (max-width: 640px) {
  .header-shell { min-height: 88px; }
  .brand-mark { width: 38px; height: 38px; font-size: 18px; }
  .brand-text { font-size: 16px; }
  .header-actions { grid-template-columns: 1fr; }
}