.site-header * {
  box-sizing: border-box;
}
.site-header a {
  color: inherit;
  text-decoration: none;
}
.site-header button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.site-header svg {
  display: block;
  width: 7px;
  height: 6px;
}

.site-header a:focus-visible,
.site-header button:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  font-family: "Montserrat", var(--font-main);
  transition: box-shadow var(--transition-base);
}
.site-header > #panel {
  width: 100%;
}
html.bx-panel-fixed .site-header {
  top: 39px;
}
.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.header__container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.header__topbar {
  position: relative;
  background: rgb(16 24 32 / 40%);
  backdrop-filter: blur(20px);
  color: white;
  font-size: var(--fs-topbar);
  z-index: 2;
  border-bottom: none;
  font-family: "Montserrat", var(--font-main);
}

.header__topbar::after {
    content:"";
    position:absolute;
    bottom:0;
    left:0;
    width:100%;
    height:1px;

    background: linear-gradient(
        90deg,
        transparent 0%,
        #B69259 50%,
        transparent 100%
    );
}

.header__topbar .header__container {
  height: var(--header-topbar-height);
  display: flex;
  align-items: center;
  gap: 35px;
  position: relative;
}
.topbar__group {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.topbar__group svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.topbar__divider {
  width: 1px;
  height: 12px;
  background: white;
  flex: 0 0 auto;
}
.topbar__icon {
  width: 22px;
  height: 22px;
  color: var(--color-accent);
  flex: 0 0 auto;
}
.topbar__link {
  transition: color var(--transition-fast);
}
.topbar__link:hover,
.topbar__link:focus-visible {
  color: var(--color-text-muted-hover);
}
.topbar__clock {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-variant-numeric: tabular-nums;
  color: white;
  white-space: nowrap;
}
.topbar__phones {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

@media (max-width: 992px) {
  .header__topbar {
    display: none;
  }
}

/* ===== Main nav ===== */
.header__nav {
  background: rgba(28, 36, 43, 1);
}
.header__nav .header__container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  height:86px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 0 0 auto;
  min-width: 0;
}

.header__logo svg {
  width: 206px;
  height: 47px;
  flex: 0 0 auto;
  margin-top: 10px;
}


.header__logo-text {
  font-size: var(--fs-logo);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-text);
  line-height: 1;
  font-family: var(--font-main);
}
.header__logo-divider {
  width: 1px;
  height: 19px;
  background: #B69259;
  flex: 0 0 auto;
}
.header__logo-tagline {
      font-size: 15px;
    line-height: 100%;
    color: white;
    max-width: 185px;
    margin-bottom: 10px;
}

/* Primary menu */
.header__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  border-left: 1px solid #101820;
  flex: 1 1 0;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.header__menu-item {
  position: relative;
  margin-left: 0;
  border-right: 1px solid #FFFFFF33;
  min-width: 0;
}

.header__menu-item:last-child{
  border-right: none;
}

.header__menu-link {
  display: flex;
  align-items: center;
  padding: 10px 17px;
  font-size: var(--fs-nav);
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  min-width: 0;
  white-space: nowrap;
  font-family: var(--font-main);
  text-transform: uppercase;
}
.header__menu-link:hover,
.header__menu-link:focus-visible {
  color: var(--color-accent-light);
  background: rgba(28, 36, 43, 1);
}
.header__menu-chevron {
  width: 7px;
  height: 6px;
  color: var(--color-text-muted);
  transition: transform var(--transition-fast), color var(--transition-fast);
  margin-left: 10px;
}
.header__menu-item.is-open > .header__menu-link .header__menu-chevron {
  transform: rotate(180deg);
  color: var(--color-accent-light);
}

/* Dropdown */
.header__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  background: var(--color-bg-nav);
  border: 1px solid var(--color-divider);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  z-index: var(--z-dropdown);

  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
}
.header__menu-item.is-open .header__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.header__dropdown-link {
  display: block;
  padding: 10px 17px;
  font-size: var(--fs-nav);
  color: var(--color-text-muted);
  border-radius: 6px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
  font-family: var(--font-main);
}
.header__dropdown-link:hover,
.header__dropdown-link:focus-visible {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
}

/* Burger button (mobile) */
.header__burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: auto;
  color: var(--color-text);
  border-radius: 6px;
  transition: background-color var(--transition-fast);
}
.header__burger:hover {
  background: rgba(255, 255, 255, 0.08);
}
.header__burger svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 992px) {
  .header__menu {
    display: none;
  }
  .header__logo-tagline {
    display: none;
  }
  .header__burger {
    display: flex;
  }
}

@media (max-width: 480px) {
  .header__logo-divider,
  .header__logo-tagline {
    display: none;
  }
  .header__logo-text {
    font-size: 16px;
  }
}

/* ===== Mobile panel ===== */
.header__mobile-panel {
  position: fixed;
  inset: 0;
  z-index: var(--z-mobile-panel);
  visibility: hidden;
}
.header__mobile-panel.is-open {
  visibility: visible;
}
.mobile-panel__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--transition-base);
}
.header__mobile-panel.is-open .mobile-panel__overlay {
  opacity: 1;
}
.mobile-panel__body {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 86vw);
  background: var(--color-bg-nav);
  padding: 20px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-base);
}
.header__mobile-panel.is-open .mobile-panel__body {
  transform: translateX(0);
}
.mobile-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.mobile-panel__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  border-radius: 6px;
  transition: background-color var(--transition-fast);
}
.mobile-panel__close:hover {
  background: rgba(255, 255, 255, 0.08);
}
.mobile-panel__close svg {
  width: 20px;
  height: 20px;
}

.mobile-menu {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  border-top: 1px solid var(--color-divider);
}
.mobile-menu-item {
  border-bottom: 1px solid var(--color-divider);
}
.mobile-menu__link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 18px 8px;
    gap: 16px;
    text-transform: uppercase;
}

.mobile-menu__link span {
    flex: 1;
    min-width: 0;
}

.mobile-menu__link .header__menu-chevron {
    margin-left: auto;
    margin-right: 0;
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
}


.mobile-menu-item.is-open .mobile-menu__link .header__menu-chevron {
  transform: rotate(180deg);
}
.mobile-submenu {
  list-style: none;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}
.mobile-menu-item.is-open .mobile-submenu {
  max-height: 400px;
}
.mobile-submenu a {
  display: block;
  padding: 8px 4px;
  font-size: 14px;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
}

.mobile-submenu a:last-child{
  padding-bottom: 17px;
}

.mobile-submenu a:hover {
  color: var(--color-text);
}

.mobile-panel__contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--color-text-muted);
}
.mobile-panel__contacts .topbar__group {
  gap: 10px;
}
.mobile-panel__contacts .topbar__icon {
  width: 16px;
  height: 16px;
}

@media (min-width: 993px) {
  .header__mobile-panel {
    display: none;
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .site-header,
  .header__dropdown,
  .header__menu-chevron,
  .mobile-panel__body,
  .mobile-panel__overlay,
  .mobile-submenu,
  .header__menu-link,
  .header__burger,
  .topbar__link {
    transition: none !important;
  }
}

.bx-context-toolbar,
.bx-core-popup-menu {
  z-index: 2000;
}
