@media screen and (max-width: 1024px) {
  /* Only the Astra MOBILE builder. Do not affect desktop navigation. */
  body #masthead .ast-mobile-header-wrap {
    background: #111923 !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    min-height: 0 !important;
  }

  /* Eliminate unused Astra header rows. SOA's bottom navigation already
     provides the Account drawer, so its duplicate top-header avatar goes. */
  body #masthead .ast-mobile-header-wrap .ast-above-header-wrap,
  body #masthead .ast-mobile-header-wrap .ast-below-header-wrap,
  body #masthead .ast-mobile-header-wrap .ast-above-header-bar,
  body #masthead .ast-mobile-header-wrap .ast-below-header-bar {
    display: none !important;
  }

  /* Astra Account has TWO wrappers: .ast-header-account-wrap is the inner
     one, and .ast-header-account is the outer builder element. Hiding only
     the inner wrapper can leave a positioned/overlapping account component.
     Remove the WHOLE component, including customizer/Pro markup variants.
     Keep this limited to the site's top header; bottom navigation survives. */
  body #masthead .ast-header-account,
  body #masthead .ast-header-account-wrap,
  body #masthead [data-section="section-hb-account"],
  body #masthead .ast-header-account-link {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Logo already reads SOA Security Training. The theme's site-title
     duplicates the same name beside it, wasting mobile header width. */
  body #masthead .ast-mobile-header-wrap .site-title,
  body #masthead .ast-mobile-header-wrap .site-title a,
  body #masthead .ast-mobile-header-wrap .site-description {
    display: none !important;
  }

  /* Reset the mobile primary header itself rather than shrinking every
     nested bar independently (which caused the stacked/cut-off layout). */
  body #masthead .ast-mobile-header-wrap .ast-main-header-wrap,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar,
  body #masthead .ast-mobile-header-wrap .main-header-bar {
    background: #111923 !important;
    background-image: none !important;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
  }

  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-builder-grid-row-container,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-primary-header-wrap {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 12px !important;
    min-height: 0 !important;
    height: auto !important;
  }

  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-builder-grid-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    column-gap: 7px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 60px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    grid-template-columns: none !important;
  }

  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-header-primary-section-left,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-header-primary-section-center,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-header-primary-section-right {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    column-gap: 6px !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    position: static !important;
    transform: none !important;
  }

  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-header-primary-section-left {
    flex: 1 1 0% !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
  }
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-header-primary-section-center,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-header-primary-section-right {
    flex: 0 0 auto !important;
    justify-content: flex-end !important;
  }

  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-builder-layout-element,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-branding,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-site-identity {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center !important;
    position: static !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-branding,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-site-identity {
    flex: 1 1 auto !important;
    overflow: hidden !important;
    text-align: left !important;
    direction: ltr !important;
  }
  /* Deliberately do NOT re-enable .site-title (Astra shows it by default).
     The SOA logo is the sole visible branding in the mobile header. */
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .custom-logo-link img,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-branding img {
    display: block !important;
    max-width: 142px !important;
    max-height: 37px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
  }

  /* The logo is now the only left-hand header item. */
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .custom-logo-link {
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 1 auto !important;
    max-width: 100% !important;
  }

  /* Keep the original three interactive controls; no click rewriting. */
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-header-search,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-site-header-cart,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-button-wrap,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-header-woo-cart,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-search-menu-icon,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-cart-menu-wrap {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-button-wrap .menu-toggle,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-header-search .ast-search-menu-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    min-width: 38px !important;
    min-height: 38px !important;
    width: 38px !important;
    height: 38px !important;
    padding: 6px !important;
    margin: 0 !important;
    background: rgba(255,255,255,.065) !important;
    color: #f5d873 !important;
    border: 1px solid rgba(214,185,97,.42) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
  }
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-button-wrap .menu-toggle svg,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-header-search svg,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-cart-menu-wrap svg {
    color: #f5d873 !important;
    fill: currentColor !important;
    max-width: 21px !important;
    max-height: 21px !important;
  }
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-cart-menu-wrap .count,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-cart-menu-wrap .ast-cart-menu-wrap-count {
    font-size: 11px !important;
    font-weight: 800 !important;
  }
  /* Keep the actual hamburger button at the front of its cell. */
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-button-wrap {
    position: relative !important;
    z-index: 6 !important;
    isolation: isolate;
  }
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-button-wrap .menu-toggle {
    position: relative !important;
    z-index: 7 !important;
    cursor: pointer !important;
    pointer-events: auto !important;
  }

  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-button-wrap .menu-toggle:focus-visible,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-header-search a:focus-visible {
    outline: 2px solid #f5d873 !important;
    outline-offset: 2px !important;
  }

  /* Thin separator under the header, not on the slide-out menu or nav. */
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar {
    border-bottom: 1px solid rgba(214,185,97,.48) !important;
  }
}
@media screen and (max-width: 390px) {
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-builder-grid-row-container,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-primary-header-wrap {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .ast-builder-grid-row {
    column-gap: 4px !important;
  }
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-header-primary-section-left,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-header-primary-section-center,
  body #masthead .ast-mobile-header-wrap .ast-primary-header-bar .site-header-primary-section-right {
    column-gap: 4px !important;
  }
}
/* WordPress/Astra's autogenerated Home page heading is redundant on the landing page. */
body.home #primary article.page > .entry-header,
body.home #primary article.type-page > .entry-header {
  display: none !important;
}
