/* NicheTally v0.9.181 — Astra desktop header anti-wrap fix.
   Only targets the header enhanced by NicheTally. The Astra mobile/offcanvas
   menu is untouched. Header search is not sacrificed unless it cannot fit.
   This stylesheet loads AFTER home/public CSS to avoid old flex conflicts. */
@media (min-width: 922px) {
  .site-header .ast-container.nt-header-enhanced,
  .site-header .ast-builder-grid-row.nt-header-enhanced {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex-flow: row nowrap !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 78px !important;
    height: auto !important;
    padding: 10px clamp(14px, 1.7vw, 30px) !important;
    gap: clamp(12px, 1.45vw, 22px) !important;
    overflow: visible !important;
  }
  .site-header .nt-header-enhanced > .site-header-primary-section-left,
  .site-header .nt-header-enhanced > .ast-site-identity,
  .site-header .nt-header-enhanced > .site-branding {
    flex: 0 0 auto !important;
    min-width: 0 !important;
  }
  .site-header .nt-header-enhanced .custom-logo-link,
  .site-header .nt-header-enhanced .site-logo-img {
    flex: 0 0 auto !important;
    max-width: 100% !important;
  }
  .site-header .nt-header-enhanced .custom-logo {
    max-width: clamp(175px, 15vw, 235px) !important;
    height: auto !important;
  }
  .site-header .nt-header-enhanced > .site-header-primary-section-right,
  .site-header .nt-header-enhanced > .ast-main-header-bar-alignment,
  .site-header .nt-header-enhanced > .main-header-bar-navigation {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
    width: auto !important;
    gap: 0 !important;
  }
  .site-header .nt-header-enhanced .ast-builder-menu,
  .site-header .nt-header-enhanced .main-header-bar-navigation,
  .site-header .nt-header-enhanced .ast-main-header-bar-alignment {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
    width: auto !important;
    gap: 0 !important;
  }
  .site-header .nt-header-enhanced .main-header-menu,
  .site-header .nt-header-enhanced .ast-builder-menu .main-header-menu {
    display: flex !important;
    flex-flow: row nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    gap: clamp(9px, .92vw, 15px) !important;
    margin: 0 !important;
    white-space: nowrap !important;
  }
  .site-header .nt-header-enhanced .main-header-menu > li,
  .site-header .nt-header-enhanced .ast-builder-menu .main-header-menu > li {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
  }
  .site-header .nt-header-enhanced .main-header-menu > li > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    line-height: 1.3 !important;
    padding: 8px 2px !important;
    font-size: clamp(12px, .85vw, 14px) !important;
    white-space: nowrap !important;
  }
  .site-header .nt-header-enhanced > .nt-header-tools {
    display: flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    flex-flow: row nowrap !important;
    min-width: 0 !important;
    margin: 0 0 0 auto !important;
    gap: 8px !important;
    white-space: nowrap !important;
  }
  .site-header .nt-header-enhanced > .nt-header-tools .nt-header-btn {
    flex: 0 0 auto !important;
    padding-left: 11px !important;
    padding-right: 11px !important;
  }
  /* The header is often constrained by the theme's inner container even when
     the browser viewport is wide. Search is progressively enhanced in JS only
     when its actual container has enough room. */
  .site-header .nt-header-enhanced > .nt-header-tools {position: relative !important;}
  .site-header .nt-header-enhanced > .nt-header-tools .nt-header-search-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    height: 38px !important;
    min-height: 38px !important;
    border: 1px solid #d6e2f3 !important;
    border-radius: 10px !important;
    padding: 0 !important;
    background: #fff !important;
    color: #1458ff !important;
    cursor: pointer !important;
    font-size: 16px !important;
    box-shadow: none !important;
  }
  .site-header .nt-header-enhanced.nt-header-search-fits > .nt-header-tools .nt-header-search-toggle {
    display: none !important;
  }
  .site-header .nt-header-enhanced > .nt-header-tools.nt-header-search-open .nt-header-search {
    display: flex !important;
    position: absolute !important;
    top: calc(100% + 14px) !important;
    right: 0 !important;
    z-index: 999 !important;
    width: min(300px, 80vw) !important;
    max-width: min(300px, 80vw) !important;
    height: 46px !important;
    padding: 0 12px !important;
    background: #fff !important;
    border: 1px solid #c8d8ec !important;
    box-shadow: 0 14px 32px rgba(15,35,80,.15) !important;
  }
  .site-header .nt-header-enhanced > .nt-header-tools .nt-header-search {
    display: none !important;
    width: min(260px, 19vw) !important;
    max-width: 260px !important;
  }
  .site-header .nt-header-enhanced.nt-header-search-fits > .nt-header-tools .nt-header-search {
    display: flex !important;
  }
}
@media (min-width: 922px) and (max-width: 1120px) {
  .site-header .nt-header-enhanced .custom-logo {max-width: 175px !important}
  .site-header .nt-header-enhanced .main-header-menu {gap: 8px !important}
  .site-header .nt-header-enhanced .main-header-menu > li > a {font-size: 12px !important}
  .site-header .nt-header-enhanced > .nt-header-tools {gap: 5px !important}
  .site-header .nt-header-enhanced > .nt-header-tools .nt-header-btn {padding: 0 8px !important}
}
