/* Preview-only header adjustments. The original Desktop folder is untouched. */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  width: 100%;
}

.brand-text {
  flex-direction: column-reverse;
}

.brand-text strong {
  font-size: clamp(18px, 1.55vw, 22px);
}

.brand-text small {
  margin-top: 0;
  margin-bottom: 4px;
}

.header-phone-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: max-content;
}

.header-hours {
  color: var(--hd-gold);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .06em;
  white-space: nowrap;
}

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

.header-nav {
  gap: clamp(8px, 1.1vw, 18px);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown summary {
  position: relative;
  padding: 8px 15px 8px 2px;
  color: var(--hd-menu);
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color .2s ease;
}

.nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown summary::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 2px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
  transition: transform .2s ease;
}

.nav-dropdown[open] summary,
.nav-dropdown:hover summary,
.nav-dropdown:focus-within summary {
  color: #fff;
}

.nav-dropdown[open] summary::after {
  transform: translateY(-30%) rotate(225deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 20;
  display: grid;
  width: max-content;
  min-width: 245px;
  max-width: 310px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 18px;
  background: rgba(1, 38, 28, .98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.nav-dropdown[open] .nav-dropdown-menu,
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.header-nav .nav-dropdown-menu a {
  padding: 11px 13px;
  border-radius: 11px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
  white-space: normal;
}

.header-nav .nav-dropdown-menu a::after {
  display: none;
}

.header-nav .nav-dropdown-menu a:hover,
.header-nav .nav-dropdown-menu a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}

.header-nav > .nav-direct {
  font-size: 12px;
  letter-spacing: .08em;
}

/* Если обычная навигация не помещается, показываем единое мобильное меню. */
.site-header.is-compact-menu .header-nav {
  display: none;
}

.site-header.is-compact-menu .header-actions {
  flex: 0 0 auto;
}

.site-header.is-compact-menu .header-burger {
  display: inline-flex;
}

.site-header.is-compact-menu .mobile-menu.is-open {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.mobile-nav-group {
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.mobile-nav-group summary {
  position: relative;
  padding: 14px 42px 14px 16px;
  color: var(--hd-menu);
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mobile-nav-group summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-group summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 17px;
  color: var(--hd-gold);
  font-size: 22px;
  font-weight: 400;
  transform: translateY(-50%);
}

.mobile-nav-group[open] summary::after {
  content: "−";
}

.mobile-nav-links {
  display: grid;
  gap: 2px;
  padding: 0 7px 10px 18px;
}

.mobile-menu .mobile-nav-links a {
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  text-transform: none;
}

.mobile-menu > .mobile-nav-direct {
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

@media (max-width: 1024px) {
  .header-phone {
    display: inline-flex;
  }
}

@media (max-width: 860px) {
  .site-header {
    padding: 14px 6px;
  }

  .header-bar {
    min-height: 66px;
    padding: 9px 9px 9px 14px;
    gap: 7px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-text {
    display: flex;
    flex-direction: column-reverse;
  }

  .brand-text strong {
    font-size: clamp(14px, 3.8vw, 17px);
    line-height: 1.05;
  }

  .brand-text small {
    display: none;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 8px;
  }

  .header-actions > .header-messengers {
    display: none;
  }

  .header-phone-block {
    align-items: center;
  }

  .header-phone {
    font-size: clamp(13px, 3.65vw, 16px);
  }

  .header-hours {
    font-size: clamp(9px, 2.6vw, 11px);
  }

  .mobile-menu.is-open {
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }

  .mobile-menu-messengers {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    padding: 12px 16px 4px;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }

  .mobile-menu-messengers .header-tg,
  .mobile-menu-messengers .header-max {
    display: inline-flex;
    width: 42px;
    height: 42px;
    padding: 0;
  }

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

@media (max-width: 390px) {
  .site-header {
    padding-inline: 4px;
  }

  .header-bar {
    min-height: 64px;
    padding-left: 11px;
    gap: 5px;
  }

  .header-phone {
    font-size: 12.5px;
  }

  .header-hours {
    font-size: 8.5px;
  }

  .header-burger {
    width: 38px;
    height: 38px;
  }
}
