/* ── шапка — общая для всех страниц сайта ────────────────────────────
   Файл самодостаточен: переменные объявлены локально, чтобы шапка
   выглядела одинаково и на главной (style.css), и на самостоятельных
   страницах (услуги, контакты, юрстраницы). */
.header {
  --h-panel: #17191c;
  --h-border: #1f2125;
  --h-border-2: #25282c;
  --h-accent: #aee659;
  --h-bg: #0f1012;
  --h-text: #eeeeea;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(15, 16, 18, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--h-border);
}
.header__inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 3.3vw, 48px);
}
.header__logo {
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex: none;
  color: inherit;
  text-decoration: none;
}
.header__logo:hover { color: var(--h-text); }
.header__logo-img { height: 44px; width: auto; display: block; }
.header__nav {
  display: flex;
  gap: 4px;
  padding: 5px;
  background: var(--h-panel);
  border-radius: 999px;
  font-size: 15px;
}
.header__nav a {
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}
.header__nav a:hover { background: var(--h-border-2); }
.header__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: 100%;
  background: var(--h-accent);
  transform-origin: left;
  transform: scaleX(0);
}
.btn { display: inline-block; white-space: nowrap; }
.btn--cta {
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--h-accent);
  color: var(--h-bg);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.btn--cta:hover { color: var(--h-bg); transform: translateY(-1px); }

/* ── мега-меню «Возможности» ──────────────────────────── */
.header__drop-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}
.header__drop-btn svg { transition: transform .2s; opacity: .55; }
.header__drop-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.header__mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 5;
  background: rgba(20, 22, 25, .97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--h-border);
  box-shadow: 0 28px 56px rgba(0, 0, 0, .5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .22s var(--h-ease, ease), transform .22s var(--h-ease, ease), visibility .22s;
  pointer-events: none;
}
.header__mega.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}
.header__mega-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px clamp(20px, 3.3vw, 48px) 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px 44px;
}
.header__mega-cat {
  font: 500 12px/1 var(--font-mono, 'IBM Plex Mono', monospace);
  color: var(--h-accent);
  margin: 0 0 10px;
}
.header__mega-col a {
  display: block;
  padding: 6px 0;
  color: var(--h-text-dim, #a3a4a0);
  font-size: 14.5px;
  line-height: 1.4;
  text-decoration: none;
  transition: color .15s, transform .15s;
}
.header__mega-col a:hover { color: var(--h-text); transform: translateX(4px); }
.header__mega-foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px clamp(20px, 3.3vw, 48px) 20px;
  border-top: 1px solid var(--h-border);
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--h-text-dim, #a3a4a0);
}
.header__mega-foot a { color: var(--h-accent); text-decoration: none; }
.header__mega-foot a:hover { text-decoration: underline; }

/* ── бургер и мобильное меню (≤1023px) ─────────────────── */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--h-border-2);
  border-radius: 12px;
  background: var(--h-panel);
  cursor: pointer;
  flex: none;
}
.header__burger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--h-text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.header__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.header__burger.is-open span:nth-child(2) { opacity: 0; }
.header__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.header__mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 6;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: rgba(18, 20, 22, .98);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--h-border);
  box-shadow: 0 28px 56px rgba(0, 0, 0, .55);
  padding: 14px 18px 22px;
}
.hmob-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 6px;
  color: var(--h-text);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--h-border);
}
button.hmob-link {
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--h-border);
  font: 600 17px/1.2 'Golos Text', system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}
.hmob-link:active { color: var(--h-accent); }
.hmob-link--acc { color: var(--h-accent); }
.hmob-link--acc svg { transition: transform .25s ease; opacity: .7; flex: none; }
.hmob-link--acc.is-open svg { transform: rotate(180deg); }
.hmob-count { font: 500 12px/1 'IBM Plex Mono', monospace; color: #7d7e7a; margin-right: auto; }
.hmob-groups { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.hmob-groups.is-open { max-height: 1600px; }
.hmob-group { border-bottom: 1px solid var(--h-border); }
.hmob-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 13px 6px;
  background: none;
  border: 0;
  color: var(--h-text);
  font: 600 15px/1.2 'Golos Text', system-ui, sans-serif;
  cursor: pointer;
  text-align: left;
}
.hmob-cat svg { transition: transform .2s; opacity: .5; flex: none; }
.hmob-group.is-open .hmob-cat { color: var(--h-accent); }
.hmob-group.is-open .hmob-cat svg { transform: rotate(180deg); }
.hmob-list { display: none; padding: 2px 0 10px; }
.hmob-group.is-open .hmob-list { display: block; }
.hmob-list a {
  display: block;
  padding: 9px 6px 9px 16px;
  color: #a3a4a0;
  font-size: 15px;
  text-decoration: none;
  border-left: 2px solid var(--h-border);
  margin-left: 4px;
}
.hmob-list a:active { color: var(--h-text); }
.hmob-all {
  display: block;
  padding: 14px 6px;
  color: var(--h-accent);
  font-size: 14.5px;
  text-decoration: none;
}
.hmob-cta {
  display: block;
  margin-top: 18px;
  padding: 16px;
  border-radius: 999px;
  background: var(--h-accent);
  color: var(--h-bg);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

@media (max-width: 1023px) {
  .header__nav { display: none; }
  .header__mega { display: none; }
  .header__burger { display: flex; }
  .header__mobile { display: block; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .22s ease, transform .22s ease, visibility .22s; pointer-events: none; }
  .header__mobile.is-open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; }
}
@media (max-width: 640px) { .header .btn--cta { display: none; } }
