/* Двухуровневая шапка.
   Верхняя строка: адрес, телефон, мессенджеры, язык — уезжает при прокрутке.
   Нижняя: логотип, меню и кнопка записи — липкая.
   На телефоне верхней строки нет: адрес и телефон в мобильном меню. */
:root { --topbar-height: 46px; --mainbar-height: 72px; }
@media (min-width: 761px) {
  :root { --header-height: calc(var(--topbar-height) + var(--mainbar-height)); }
  .header { top: calc(-1 * var(--topbar-height)); }
  html { scroll-padding-top: var(--mainbar-height); }
  .header-main .header-cta--main { flex: none; min-height: 42px; padding: 10px 22px; font-size: 13px; }
}

.header { display: block; height: auto; padding: 0; gap: 0; border-bottom: 0; }

.header-top {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--content-gutter, var(--page));
  background: #111111;
  font-size: 13px;
  color: #bcbeba;
}
.header-contacts { display: flex; align-items: center; gap: 28px; }
.header-top-actions { display: flex; align-items: center; gap: 20px; }

.header-address,
.header-phone { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: color .2s; }
.header-address svg,
.header-phone svg { flex: none; width: 15px; height: 15px; color: var(--accent); }
.header-address:hover,
.header-phone:hover { color: var(--accent); }
.header-contacts .header-address,
.header-contacts .header-phone,
.mobile-menu-contacts .header-address,
.mobile-menu-contacts .header-phone { font-size: 14px; font-weight: 600; color: var(--white); }
.header-contacts a:hover,
.mobile-menu-contacts a:hover { color: var(--accent); }

.header-social { display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.header-social a { display: grid; place-items: center; width: 32px; height: 32px; color: #bcbeba; transition: color .2s; }
.header-social a:hover { color: var(--accent); }
.header-social svg,
.header-social a[href*="t.me"] svg,
.header-social a[href*="max.ru"] svg { width: 18px; height: 18px; }
.header-social a[href*="vk.ru"] svg { width: 22px; height: 22px; }

.header-main {
  height: var(--mainbar-height);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 var(--content-gutter, var(--page));
}
.header-main .desktop-nav { margin: 0 0 0 auto; }

/* Мобильное меню: контакты внизу */
.mobile-menu-contacts { display: none; }

@media (min-width: 761px) and (max-width: 1000px) {
  .header-social { display: none; }
  .header-top-actions { gap: 16px; }
  .header-contacts { gap: 20px; }
  .header-main { gap: 16px; }
}
/* Узкий планшет: меню и кнопка в одну строку — компактнее */
@media (min-width: 761px) and (max-width: 900px) {
  .header-main .desktop-nav a[href$="/"]:first-child { display: none; }
  .header-main .desktop-nav { gap: 12px; font-size: 12.5px; }
  .header-main .header .brand-logo, .header-main .brand-logo { width: 118px; }
  .header-main .header-cta--main { padding-inline: 16px; }
}

@media (max-width: 760px) {
  .header-top { display: none; }
  .header {
    height: calc(var(--header-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 0 0;
  }
  .header-main { height: var(--header-height); gap: 12px; }

  .mobile-menu-contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    font-size: 16px;
    color: #bcbeba;
  }
  .mobile-menu .mobile-menu-contacts a { padding: 0; border: 0; font-size: inherit; }
  .mobile-menu .mobile-menu-contacts .header-phone,
  .mobile-menu .mobile-menu-contacts .header-address { font-size: 18px; }
  .mobile-menu-contacts .header-address svg,
  .mobile-menu-contacts .header-phone svg { width: 18px; height: 18px; }
  .mobile-menu .mobile-menu-contacts .header-social a { width: 44px; height: 44px; margin-left: -10px; margin-right: 6px; }
  .mobile-menu-contacts .header-social svg,
  .mobile-menu-contacts .header-social a[href*="t.me"] svg,
  .mobile-menu-contacts .header-social a[href*="max.ru"] svg { width: 24px; height: 24px; }
  .mobile-menu-contacts .header-social a[href*="vk.ru"] svg { width: 28px; height: 28px; }
}

/* Текущий раздел в меню */
.desktop-nav a[aria-current],
.mobile-menu a[aria-current] { color: var(--accent); }
