/**
 * ProSoft CoS P0 — Center header cluster sitewide
 * Logo + menu sit together mid-page (not logo far-left / menu far-right).
 * Keeps opaque dark washout bar + logo lockup; soft claims / prices / phone untouched.
 * Surfaces: Astra HFB #masthead + Modern Operator .mo-header (body.mo-live).
 */

/* -------------------------------------------------------------------------- */
/* 1) Astra HFB desktop — collapse left/right slots into one centered cluster */
/* -------------------------------------------------------------------------- */
@media (min-width: 922px) {
  body:not(.mo-live) #masthead .ast-builder-grid-row.ast-builder-grid-row-has-sides,
  body:not(.mo-live) #masthead .ast-primary-header-bar .ast-builder-grid-row,
  body:not(.mo-live) #ast-desktop-header .ast-builder-grid-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 28px !important;
    grid-template-columns: none !important;
    width: 100% !important;
  }

  body:not(.mo-live) #masthead .site-header-primary-section-left,
  body:not(.mo-live) #masthead .site-header-primary-section-right,
  body:not(.mo-live) #masthead .site-header-primary-section-center,
  body:not(.mo-live) #masthead .site-header-section {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: center !important;
  }

  /* Right slot was end-justified; keep menu flush to logo in the cluster */
  body:not(.mo-live) #masthead .ast-grid-right-section,
  body:not(.mo-live) #masthead .site-header-section-right {
    justify-content: flex-start !important;
    margin-left: 0 !important;
  }

  body:not(.mo-live) #masthead .ast-builder-menu,
  body:not(.mo-live) #masthead .main-header-bar-navigation,
  body:not(.mo-live) #masthead .ast-main-header-bar-alignment {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body:not(.mo-live) #masthead .site-branding,
  body:not(.mo-live) #masthead .ast-site-identity {
    margin-right: 0 !important;
  }
}

/* -------------------------------------------------------------------------- */
/* 2) Astra HFB mobile — logo + hamburger as a tight centered pair            */
/* -------------------------------------------------------------------------- */
@media (max-width: 921px) {
  body:not(.mo-live).ast-header-break-point #masthead .ast-builder-grid-row.ast-builder-grid-row-has-sides,
  body:not(.mo-live) #ast-mobile-header .ast-builder-grid-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    grid-template-columns: none !important;
    width: 100% !important;
  }

  body:not(.mo-live).ast-header-break-point #masthead .site-header-primary-section-left,
  body:not(.mo-live).ast-header-break-point #masthead .site-header-primary-section-right,
  body:not(.mo-live) #ast-mobile-header .site-header-section {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: center !important;
  }

  body:not(.mo-live).ast-header-break-point #masthead .ast-grid-right-section {
    justify-content: flex-start !important;
  }
}

/* -------------------------------------------------------------------------- */
/* 3) Modern Operator desktop — remove nav push; center logo+nav+CTA cluster  */
/* -------------------------------------------------------------------------- */
@media (min-width: 901px) {
  body.mo-live .mo-header__inner {
    justify-content: center !important;
  }

  body.mo-live .mo-nav {
    margin-left: 0 !important;
  }
}

/* -------------------------------------------------------------------------- */
/* 4) Modern Operator mobile — keep hamburger usable; no empty mid void       */
/* -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  body.mo-live .mo-header__inner {
    justify-content: center !important;
  }

  body.mo-live .mo-header__cta {
    margin-left: 0 !important;
  }

  body.mo-live .mo-nav {
    margin-left: 0 !important;
  }
}
