/**
 * Moshaverr 90.1 — global Builder header owner.
 * Loaded only when a Page Builder header/footer/mobile template part is active.
 */

.msh-theme-v25-header-stack,
.msh-builder-template-part--header,
.msh-builder-section--site_header {
  position: relative;
  z-index: 1000;
}

.msh-builder-site-header {
  position: relative;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,.10) !important;
  background: #071426 !important;
  color: #fff !important;
  isolation: isolate;
}

.msh-builder-site-header.is-sticky {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.admin-bar .msh-builder-site-header.is-sticky { top: 32px; }

.msh-builder-site-header__inner {
  width: min(1440px, calc(100% - 48px)) !important;
  min-height: 86px !important;
  margin-inline: auto !important;
  display: grid !important;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: clamp(20px, 3vw, 48px) !important;
  padding: 10px 0 !important;
}

.msh-builder-site-header__brand {
  display: inline-flex !important;
  align-items: center !important;
  min-width: 0;
  max-width: 240px;
  color: #fff !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.msh-builder-site-header__brand strong {
  color: inherit !important;
  font-size: clamp(15px, 1.2vw, 20px) !important;
  line-height: 1.5 !important;
}

.msh-builder-site-header__logo {
  display: block !important;
  width: auto !important;
  max-width: 230px !important;
  max-height: 62px !important;
  object-fit: contain !important;
}

.msh-builder-site-header__nav[data-menu-panel] {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: clamp(14px, 2vw, 30px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
}

.msh-builder-site-header__menu {
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  gap: clamp(10px, 1.45vw, 24px) !important;
  list-style: none !important;
}

.msh-builder-site-header__menu > li {
  position: relative !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.msh-builder-site-header__menu > li > a {
  min-height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  padding: 4px 2px !important;
  color: rgba(255,255,255,.90) !important;
  -webkit-text-fill-color: rgba(255,255,255,.90) !important;
  font-size: clamp(12px, .9vw, 15px) !important;
  font-weight: 650 !important;
  line-height: 1.5 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.msh-builder-site-header__menu > li > a:hover,
.msh-builder-site-header__menu > li > a:focus-visible,
.msh-builder-site-header__menu > li.current-menu-item > a,
.msh-builder-site-header__menu > li.current-menu-ancestor > a {
  color: #d8b42d !important;
  -webkit-text-fill-color: #d8b42d !important;
}

.msh-builder-site-header__menu .sub-menu {
  position: absolute !important;
  z-index: 1100 !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  width: min(310px, 82vw) !important;
  margin: 0 !important;
  padding: 10px !important;
  display: grid !important;
  gap: 3px !important;
  list-style: none !important;
  border: 1px solid rgba(10,26,48,.10) !important;
  border-radius: 17px !important;
  background: #fff !important;
  box-shadow: 0 24px 60px rgba(2,12,30,.22) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(8px) !important;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease !important;
}

.msh-builder-site-header__menu li:hover > .sub-menu,
.msh-builder-site-header__menu li:focus-within > .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: none !important;
}

.msh-builder-site-header__menu .sub-menu a,
.msh-builder-site-header__menu .sub-menu a * {
  display: block;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  color: #172038 !important;
  -webkit-text-fill-color: #172038 !important;
  font-size: 13px !important;
  line-height: 1.65 !important;
  text-decoration: none !important;
}

.msh-builder-site-header__menu .sub-menu a:hover,
.msh-builder-site-header__menu .sub-menu a:focus-visible {
  background: #f3f5f8 !important;
  color: #071426 !important;
}

.msh-builder-site-header__tools {
  min-width: max-content;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 9px !important;
}

.msh-builder-site-header__tool,
.msh-builder-site-header__tools .msh-builder-btn {
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 8px 14px !important;
  border: 1px solid rgba(255,255,255,.13) !important;
  border-radius: 13px !important;
  background: rgba(255,255,255,.04) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
}

.msh-builder-site-header__tools .msh-builder-btn--primary {
  border-color: #d8b42d !important;
  background: #d8b42d !important;
  color: #071426 !important;
  -webkit-text-fill-color: #071426 !important;
}

.msh-builder-site-header__toggle,
.msh-builder-site-header__close {
  display: none !important;
}

/* Hard desktop fail-safe: an old is-open/aria state may never turn the Builder
 * navigation into an overlay on a desktop viewport. */
@media (min-width: 1181px) {
  html body.msh-navigation-901 .msh-builder-site-header__nav[data-menu-panel],
  html body.msh-navigation-901 .msh-builder-site-header__nav[data-menu-panel].is-open,
  html body.msh-navigation-901 .msh-builder-site-header__nav[data-menu-panel][aria-hidden="true"],
  html body.msh-navigation-901 .msh-builder-site-header__nav[data-menu-panel][aria-hidden="false"] {
    position: static !important;
    inset: auto !important;
    display: grid !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
  }
  html body.msh-navigation-901.menu-is-open,
  html body.msh-navigation-901.msh-shell-open,
  html body.msh-navigation-901.msh-overlay-open { overflow: auto !important; }
}

@media (max-width: 1180px) {
  .msh-builder-site-header__inner {
    width: min(100% - 28px, 980px) !important;
    min-height: 76px !important;
    grid-template-columns: minmax(0, 1fr) 50px !important;
    gap: 12px !important;
  }
  .msh-builder-site-header__brand { max-width: min(260px, calc(100vw - 100px)); }
  .msh-builder-site-header__logo { max-height: 52px !important; }
  .msh-builder-site-header__toggle {
    display: inline-flex !important;
    width: 50px !important;
    height: 50px !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: 5px !important;
    padding: 0 !important;
    border: 1px solid rgba(255,255,255,.17) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.05) !important;
    color: #fff !important;
    cursor: pointer;
  }
  .msh-builder-site-header__toggle span {
    width: 21px !important;
    height: 2px !important;
    display: block !important;
    border-radius: 99px !important;
    background: currentColor !important;
  }
  .msh-builder-site-header__nav[data-menu-panel] {
    position: fixed !important;
    z-index: 1600 !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    display: none !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    align-items: stretch !important;
    gap: 14px !important;
    padding: max(16px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom)) !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: linear-gradient(180deg,#0d1b34,#061126) !important;
    box-shadow: none !important;
    color: #fff !important;
  }
  .msh-builder-site-header__nav[data-menu-panel].is-open:not([hidden]) {
    display: grid !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  .msh-builder-site-header__nav[data-menu-panel][hidden] { display: none !important; }
  .msh-builder-site-header__close {
    justify-self: end !important;
    display: grid !important;
    place-items: center !important;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    border: 1px solid rgba(255,255,255,.18) !important;
    border-radius: 14px !important;
    background: rgba(255,255,255,.05) !important;
    color: #fff !important;
    font-size: 28px !important;
    line-height: 1 !important;
  }
  .msh-builder-site-header__menu {
    min-height: 0 !important;
    width: min(100%, 760px) !important;
    margin-inline: auto !important;
    display: grid !important;
    align-content: start !important;
    justify-content: stretch !important;
    gap: 5px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding: 4px 0 22px !important;
  }
  .msh-builder-site-header__menu > li { width: 100% !important; }
  .msh-builder-site-header__menu > li > a {
    width: 100% !important;
    min-height: 52px !important;
    justify-content: flex-start !important;
    padding: 11px 14px !important;
    border-radius: 13px !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    font-size: 15px !important;
    white-space: normal !important;
  }
  .msh-builder-site-header__menu > li > a:hover,
  .msh-builder-site-header__menu > li > a:focus-visible {
    background: rgba(255,255,255,.07) !important;
  }
  .msh-builder-site-header__menu .sub-menu {
    position: static !important;
    width: 100% !important;
    margin: 0 0 4px !important;
    padding: 5px 10px 9px !important;
    display: grid !important;
    gap: 2px !important;
    border: 0 !important;
    border-radius: 13px !important;
    background: rgba(255,255,255,.055) !important;
    box-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
  }
  .msh-builder-site-header__menu .sub-menu a,
  .msh-builder-site-header__menu .sub-menu a * {
    color: rgba(255,255,255,.84) !important;
    -webkit-text-fill-color: rgba(255,255,255,.84) !important;
    background: transparent !important;
  }
  .msh-builder-site-header__tools {
    width: min(100%, 760px) !important;
    margin-inline: auto !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 8px !important;
  }
  .msh-builder-site-header__tools .msh-builder-btn {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 782px) {
  .admin-bar .msh-builder-site-header.is-sticky { top: 46px; }
}

@media (max-width: 560px) {
  .msh-builder-site-header__inner { width: calc(100% - 20px) !important; }
  .msh-builder-site-header__brand strong { font-size: 14px !important; white-space: normal; }
  .msh-builder-site-header__tools { grid-template-columns: 1fr !important; }
  .msh-builder-site-header__tools .msh-builder-btn { grid-column: auto !important; }
}
