:root{
  --txt-hex:#e9e9e9;   /* текст шапки */
  --btn-hex:#7c92a0;   /* фон кнопки */
  --btn-txt:#0B1221;   /* текст на кнопке */
}

/* гарантированное скрытие по атрибуту hidden */
[hidden]{ display:none !important; }
.mobile-menu[hidden]{ display:none !important; }

/* ===== ШАПКА ===== */
/* стартовый фон ДО баннера: #404040 */
.site-header{
  position:fixed; inset:0 0 auto 0; z-index:1000;
  background: linear-gradient(to right, #404040 0%, #404040 100%);
  color:var(--txt-hex);
  border-bottom:1px solid rgba(255,255,255,.08);
  transition: background .25s ease, box-shadow .25s ease,
              border-color .25s ease, backdrop-filter .25s ease;
}

/* матовый вид ПОСЛЕ касания баннера */
.site-header.matte{
  background: linear-gradient(to right, rgba(32,32,32,.30) 0%, rgba(32,32,32,.30) 100%);
  box-shadow:0 6px 18px rgba(0,0,0,.18);
  border-bottom-color:rgba(255,255,255,.06);
  backdrop-filter:blur(10px) saturate(120%);
  -webkit-backdrop-filter:blur(10px) saturate(120%);
}

/* ↓ Опционально: анти-перебитие, если где-то остались старые .scrolled */
.site-header:not(.matte){
  background: linear-gradient(to right, #404040 0%, #404040 100%) !important;
}
.site-header.scrolled:not(.matte){
  background: linear-gradient(to right, #404040 0%, #404040 100%) !important;
  box-shadow:none;
  border-bottom-color:rgba(255,255,255,.08);
}

/* контейнер в шапке */
.site-header .container{
  max-width:1200px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 20px; gap:16px;
}

/* Бренд */
.brand{ display:flex; flex-direction:column; text-decoration:none; color:var(--txt-hex); line-height:1.1; }
.brand-line1{ font-weight:800; font-size:14px; letter-spacing:.06em; opacity:.95; }
.brand-line2{ font-weight:500; font-size:13px; opacity:.9; }

/* Навигация */
.nav{ display:flex; align-items:center; gap:16px; }
.nav-list{ display:flex; list-style:none; gap:22px; margin:0; padding:0; }
.nav-link{
  color:var(--txt-hex); text-decoration:none; font-weight:600; font-size:15px;
  padding:8px 2px; border-radius:6px; outline-offset:3px;
  transition:opacity .2s ease, color .2s ease;
  text-shadow:0 1px 1px rgba(0,0,0,.25);
}
.nav-link:hover,.nav-link:focus{ color:#fff; opacity:.9; }

/* Кнопка CTA */
.btn-cta{
  display:inline-block; text-decoration:none;
  background:linear-gradient(to right, var(--btn-hex) 0%, var(--btn-hex) 100%);
  color:var(--btn-txt);
  font-weight:700; padding:10px 16px; border-radius:10px;
  transition:transform .15s ease, filter .2s ease, box-shadow .2s ease;
  white-space:nowrap;
  box-shadow:0 2px 6px rgba(0,0,0,.12) inset, 0 2px 10px rgba(0,0,0,.08);
}
.btn-cta:hover{ filter:brightness(.96); transform:translateY(-1px); }
.btn-cta:active{ transform:translateY(0); }

/* Бургер */
.burger{ display:none; background:transparent; border:0; cursor:pointer; width:40px; height:40px; border-radius:10px; }
.burger-bar{ display:block; width:22px; height:2px; background:var(--txt-hex); margin:4px auto; transition:transform .2s ease, opacity .2s ease; }
.burger.active .burger-bar:nth-child(1){ transform:translateY(6px) rotate(45deg); }
.burger.active .burger-bar:nth-child(2){ opacity:0; }
.burger.active .burger-bar:nth-child(3){ transform:translateY(-6px) rotate(-45deg); }

/* Мобильное меню */
.mobile-menu{
  background:rgba(32,32,32,.96);
  display:flex; flex-direction:column; padding:10px 20px 16px;
  border-bottom:1px solid rgba(255,255,255,.06);
  backdrop-filter:blur(8px) saturate(120%);
  -webkit-backdrop-filter:blur(8px) saturate(120%);
}
.mobile-link{
  color:#fff; text-decoration:none; padding:10px 0; font-weight:600; font-size:16px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.mobile-link:last-of-type{ border-bottom:0; }
.mobile-cta{
  margin-top:10px; display:inline-block; text-align:center;
  background:linear-gradient(to right, var(--btn-hex) 0%, var(--btn-hex) 100%);
  color:var(--btn-txt); text-decoration:none; font-weight:800;
  padding:12px 14px; border-radius:12px;
}

/* Адаптивы */
@media (max-width: 920px){
  .nav-list{ display:none; }
  .btn-cta{ display:none; }
  .burger{ display:inline-flex; align-items:center; justify-content:center; }
  .brand-line1{ font-size:13px; }
  .brand-line2{ font-size:12px; }
}
@media (max-width: 480px){
  .site-header .container{ padding:10px 14px; }
  .brand-line1{ font-size:12px; }
  .brand-line2{ font-size:11px; }
  .burger{ width:36px; height:36px; }
}

/* отступ под фикс-шапку (fallback) */
body.has-fixed-header{ padding-top:64px; }
@media (max-width: 920px){ body.has-fixed-header{ padding-top:56px; } }

/* якоря не прячутся под шапку */
#services, #patients, #workplace, #appointment, #banner { scroll-margin-top: 72px; }

/* доступность */
a:focus-visible,button:focus-visible{ outline:2px solid #ffffff; outline-offset:2px; border-radius:8px; }
