/*
 * HARDWORKING global header navigation
 * Desktop: one calm 78px row with the approved horizontal brand lockup.
 * Mobile navigation takes over at 1120px.
 */

html {
  scroll-padding-top: 78px;
}

#masthead.site-header,
.ast-theme-transparent-header #masthead.site-header {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 999;
}

body.admin-bar #masthead.site-header {
  top: 32px;
}

.site-content [id] {
  scroll-margin-top: 94px;
}

#masthead .ast-primary-header-bar {
  padding-block: 0 !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

@media (min-width: 1121px) {
  #ast-desktop-header {
    display: block !important;
  }

  #ast-mobile-header {
    display: none !important;
  }

  #ast-desktop-header .ast-primary-header-bar,
  #ast-desktop-header .site-primary-header-wrap,
  #ast-desktop-header .ast-builder-grid-row,
  #ast-desktop-header .site-header-primary-section-left,
  #ast-desktop-header .site-header-primary-section-right {
    min-height: 78px !important;
  }

  #ast-desktop-header .ast-primary-header-bar {
    padding: 0 !important;
  }

  #ast-desktop-header .site-primary-header-wrap {
    padding-inline: 20px !important;
  }

  #ast-desktop-header .ast-builder-grid-row {
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 28px;
  }

  #ast-desktop-header .site-header-primary-section-left {
    flex: 0 0 auto;
    align-items: center;
  }

  #ast-desktop-header .site-header-primary-section-right {
    min-width: 0;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
  }

  #ast-desktop-header .site-branding,
  #ast-desktop-header .ast-site-identity {
    padding: 0 !important;
  }

  #ast-desktop-header .custom-logo-link {
    display: flex;
    align-items: center;
    width: max-content;
    max-width: none;
    gap: 10px;
    line-height: 1;
  }

  #ast-desktop-header .custom-logo-link::after {
    content: "HARDWORKING";
    color: #062c5b;
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0.045em;
    line-height: 1;
    white-space: nowrap;
  }

  #ast-desktop-header .custom-logo {
    width: 44px !important;
    max-width: 44px !important;
    height: auto !important;
    flex: 0 0 auto;
  }

  #ast-desktop-header .ast-builder-menu-1,
  #ast-desktop-header .ast-main-header-bar-alignment,
  #ast-desktop-header .main-header-bar-navigation,
  #ast-desktop-header .main-navigation {
    min-width: 0;
    height: 78px;
  }

  #ast-desktop-header #ast-hf-menu-1 {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    height: 78px;
  }

  #ast-desktop-header #ast-hf-menu-1 > .menu-item {
    flex: 0 0 auto;
  }

  #ast-desktop-header #ast-hf-menu-1 > .menu-item > .menu-link {
    display: flex;
    align-items: center;
    min-height: 78px;
    height: 78px;
    padding: 0 14px !important;
    color: #062c5b;
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0;
    white-space: nowrap;
  }

  #ast-desktop-header #ast-hf-menu-1 > .menu-item > .menu-link:hover,
  #ast-desktop-header #ast-hf-menu-1 > .current-menu-item > .menu-link,
  #ast-desktop-header #ast-hf-menu-1 > .current-menu-ancestor > .menu-link {
    color: #c98743;
  }

  #ast-desktop-header .ast-header-navigation-arrow {
    margin-left: 7px;
  }

  #ast-desktop-header .ast-header-button-1 {
    flex: 0 0 auto;
    margin-left: 2px;
  }

  #ast-desktop-header .ast-builder-button-wrap,
  #ast-desktop-header .ast-custom-button-link,
  #ast-desktop-header .ast-custom-button {
    white-space: nowrap !important;
  }

  #ast-desktop-header .ast-custom-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 154px;
    height: 46px;
    padding: 0 20px !important;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1 !important;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 1120px) {
  html {
    scroll-padding-top: 72px;
  }

  .site-content [id] {
    scroll-margin-top: 88px;
  }

  #ast-desktop-header {
    display: none !important;
  }

  #ast-mobile-header {
    display: block !important;
  }

  #ast-mobile-header .ast-primary-header-bar,
  #ast-mobile-header .ast-builder-grid-row,
  #ast-mobile-header .site-header-section {
    min-height: 72px !important;
  }

  #ast-mobile-header .ast-primary-header-bar {
    padding: 0 18px !important;
  }

  #ast-mobile-header .site-branding,
  #ast-mobile-header .ast-site-identity {
    padding: 0 !important;
  }

  #ast-mobile-header .custom-logo-link {
    display: flex;
    align-items: center;
    width: max-content;
    max-width: none;
    gap: 8px;
    line-height: 1;
  }

  #ast-mobile-header .custom-logo-link::after {
    content: "HARDWORKING";
    color: #062c5b;
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.025em;
    line-height: 1;
    white-space: nowrap;
  }

  #ast-mobile-header .custom-logo {
    width: 40px !important;
    max-width: 40px !important;
    height: auto !important;
    flex: 0 0 auto;
  }

  #ast-mobile-header .menu-toggle {
    display: inline-flex;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
  }

  #ast-mobile-header .ast-mobile-header-content {
    max-height: calc(100vh - 72px);
    overflow-x: hidden;
    overflow-y: auto;
    background: #ffffff;
  }

  #ast-mobile-header .main-header-menu,
  #ast-mobile-header .main-header-menu .sub-menu {
    width: 100%;
  }

  #ast-mobile-header .main-header-menu > .menu-item > .menu-link {
    min-height: 50px;
    padding: 13px 20px;
    color: #25313a;
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.35;
  }

  #ast-mobile-header .main-header-menu .sub-menu .menu-link {
    padding: 12px 20px 12px 34px;
    font-size: 15px;
    line-height: 1.35;
  }
}

@media (max-width: 480px) {
  html {
    scroll-padding-top: 68px;
  }

  .site-content [id] {
    scroll-margin-top: 84px;
  }

  #ast-mobile-header .ast-primary-header-bar,
  #ast-mobile-header .ast-builder-grid-row,
  #ast-mobile-header .site-header-section {
    min-height: 68px !important;
  }

  #ast-mobile-header .ast-primary-header-bar {
    padding: 0 14px !important;
  }

  #ast-mobile-header .custom-logo {
    width: 38px !important;
    max-width: 38px !important;
  }

  #ast-mobile-header .ast-mobile-header-content {
    max-height: calc(100vh - 68px);
  }
}

@media (min-width: 601px) and (max-width: 782px) {
  body.admin-bar #masthead.site-header {
    top: 46px;
  }
}

@media (max-width: 600px) {
  body.admin-bar #masthead.site-header {
    top: 0;
  }
}
