/* ШАПКА */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: color-mix(in srgb, var(--header-bg) 20%, transparent);
  transition: background-color 0.3s ease;
}

.header--scrolled {
  background-color: var(--cards);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  height: var(--header-h);
}

/* ---- Навигация ---- */

.header__menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link:hover,
.header__menu .current-menu-item > .nav-link {
  opacity: 0.7;
}

/* ---- Телефоны ---- */

.header__phones {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 4px;
  margin-left: auto;
}

.header__phone {
  white-space: nowrap;
}

.header__phone:hover {
  opacity: 0.7;
}

/* ---- Кнопки трубки и бургера ---- */

.header__actions {
  display: none;
  align-items: center;
  gap: 10px;
}

.header__action {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.header__action svg {
  display: block;
  width: 44px;
  height: 44px;
}

.header__action:hover {
  opacity: 0.7;
}

/* МОБИЛЬНОЕ МЕНЮ */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: none;
  overflow-y: auto;
  background-color: color-mix(in srgb, var(--primary) 50%, transparent);
}

.mobile-menu.open {
  display: block;
}

body:has(.mobile-menu.open) {
  overflow: hidden;
}

.mobile-menu__panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: max-content;
  width: 100%;
  max-width: 360px;
  margin-left: auto;
  padding: 12px 10px 40px;
  background-color: var(--primary);
}

.mobile-menu__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.mobile-menu__bg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-menu__head,
.mobile-menu__nav,
.mobile-menu__contacts {
  position: relative;
  z-index: 1;
}

/* ---- Шапка панели ---- */

.mobile-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.mobile-menu__close {
  display: flex;
  flex-shrink: 0;
  cursor: pointer;
  width: 44px;
  height: 44px;
}

.mobile-menu__close svg {
  display: block;
  width: 44px;
  height: 44px;
}

.mobile-menu__close:hover {
  opacity: 0.7;
}

/* ---- Навигация ---- */

.mobile-menu__nav {
  margin-top: 50px;
}

.mobile-menu__menu {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---- Контакты ---- */

.mobile-menu__contacts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  margin-top: 40px;
  padding-left: 20px;
  border-left: 1px solid var(--text-primary);
}

a.mobile-menu__contact:hover {
  opacity: 0.7;
}

.mobile-menu__divider {
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--text-primary);
  margin-top: -10px;
}

@media (max-width: 1280px) {
  .header__inner {
    gap: 16px;
  }
}

/* ============================================
   ПЛАНШЕТ И МОБАЙЛ ≤ 1080px
   ============================================ */

@media (max-width: 1080px) {

  .header__nav,
  .header__phones {
    display: none;
  }

  .header__actions {
    display: flex;
  }
}

@media (min-width: 1081px) {

  .mobile-menu.open {
    display: none;
  }
}

/* ============================================
   МОБАЙЛ ≤ 768px
   ============================================ */

