/* SOULTRIANGLE header: always-visible search box and a mobile menu that works on every page.
   Loaded after style.css, so these rules intentionally override the older fixed-height header. */

/* ---------- Header layout ---------- */
.site-header{height:auto}
.site-header .nav-wrap{height:auto;min-height:82px;justify-content:flex-start;gap:18px}
.site-header .brand{flex:none}
.site-header .brand-logo{width:200px}
.site-header .primary-nav{margin-left:auto;gap:22px;flex:none}

/* ---------- Search field ---------- */
.header-search{position:relative;flex:1 1 220px;max-width:340px;min-width:0}
.hs-field{display:flex;align-items:center;gap:9px;height:44px;padding:0 8px 0 15px;background:#fff;border:1.5px solid #cfe0d3;border-radius:999px;box-shadow:0 2px 10px rgba(63,84,104,.06);transition:border-color .15s,box-shadow .15s}
.hs-field:hover{border-color:#91b7a0}
.header-search:focus-within .hs-field{border-color:#3F5468;box-shadow:0 0 0 4px rgba(63,84,104,.13)}
.hs-icon{display:flex;flex:none;color:#3F5468}
.hs-input{flex:1;min-width:0;height:100%;padding:0;border:0;outline:0;background:transparent;font:inherit;font-size:14px;font-weight:500;color:#42291C;-webkit-appearance:none;appearance:none}
.hs-input::placeholder{color:#74858b;font-weight:400}
.hs-input::-webkit-search-cancel-button,.hs-input::-webkit-search-decoration{display:none;-webkit-appearance:none}
.hs-clear{display:flex;align-items:center;justify-content:center;flex:none;width:30px;height:30px;border:0;border-radius:50%;background:#eef4ee;color:#3F5468;cursor:pointer}
.hs-clear:hover{background:#E9FADD}
.hs-clear[hidden]{display:none}
.hs-kbd{flex:none;margin-right:2px;padding:1px 8px;font:600 11px/1.6 'Poppins',sans-serif;color:#65747a;background:#f7fbf5;border:1px solid #d5e3d6;border-bottom-width:2px;border-radius:7px}
.header-search.has-value .hs-kbd,.header-search:focus-within .hs-kbd{display:none}
@media(hover:none){.hs-kbd{display:none}}

/* ---------- Results panel ---------- */
.hs-panel{position:absolute;left:0;top:calc(100% + 10px);width:max(100%,430px);max-width:min(480px,calc(100vw - 34px));padding:10px;background:#fff;border:1px solid #dce8dc;border-radius:20px;box-shadow:0 24px 56px rgba(44,68,60,.2);z-index:60}
.hs-panel[hidden]{display:none}
.hs-label{margin:2px 10px 8px;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#57816a}
.hs-list{list-style:none;margin:0;padding:0;display:grid;gap:2px;max-height:min(60vh,420px);overflow-y:auto;overscroll-behavior:contain}
.hs-list li{margin:0}
.hs-list a{display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:13px;color:#3F5468}
.hs-list li.is-active a,.hs-list a:hover{background:#E9FADD}
.hs-badge{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:12px;background:#E9FADD;color:#3F5468;font-size:17px}
.hs-list li.is-active .hs-badge,.hs-list a:hover .hs-badge{background:#fff}
.hs-text{display:flex;flex-direction:column;min-width:0}
.hs-name{font-size:14px;font-weight:600;line-height:1.35;color:#2f4252;overflow-wrap:anywhere}
.hs-name mark{background:#cfeadb;color:inherit;border-radius:3px;padding:0 1px}
.hs-meta{font-size:12px;line-height:1.4;color:#65747a}
.hs-empty{padding:14px 12px 10px;font-size:13.5px;line-height:1.6;color:#51616b}
.hs-empty strong{color:#3F5468}
.hs-foot{margin:8px 0 0;padding:10px 10px 4px;border-top:1px solid #e8efe8;font-size:13px;font-weight:600}
.hs-foot a{color:#2f7955}
.hs-foot a:hover{text-decoration:underline}

/* ---------- Wide desktops: show the "Find a tool" button; narrower: the search replaces it ---------- */
@media(min-width:1180px){
  .site-header .brand-logo{width:230px}
  .site-header .nav-wrap{gap:24px}
  .site-header .primary-nav{gap:26px}
}
@media(min-width:1000px) and (max-width:1179px){
  .site-header .primary-nav .nav-cta{display:none}
}

/* ---------- Tablet and mobile: logo | search | menu button ---------- */
@media(max-width:999px){
  .site-header .nav-wrap{gap:12px;min-height:76px}
  .site-header .brand-logo{width:178px}
  .header-search{order:2;flex:1 1 auto;max-width:none}
  .hs-field{height:46px}
  .hs-input{font-size:16px}
  .hs-panel{width:100%;max-width:none;min-width:0}
  .hs-list a{padding:11px 10px}
  .site-header .menu-toggle{order:3;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;flex:none;width:46px;height:46px;padding:0;background:#fff;border:1px solid #d5e3d6;border-radius:12px;cursor:pointer}
  .site-header .menu-toggle span{display:block;width:21px;height:2px;background:#3F5468;border-radius:2px;transition:transform .2s,opacity .2s}
  .site-header .menu-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .site-header .menu-toggle[aria-expanded="true"] span:nth-child(2){opacity:0}
  .site-header .menu-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
  .site-header .primary-nav{display:none;position:absolute;left:22px;right:22px;top:calc(100% + 8px);margin:0;padding:12px;flex-direction:column;align-items:stretch;gap:0;background:#fff;border:1px solid #dce8dc;border-radius:18px;box-shadow:0 24px 50px rgba(44,68,60,.16)}
  .site-header .primary-nav.open{display:flex}
  .site-header .primary-nav>a{padding:13px 12px;font-size:15px;border-radius:10px}
  .site-header .primary-nav>a:not(.nav-cta):hover{background:#E9FADD}
  .site-header .primary-nav .nav-cta{display:block;text-align:center;margin-top:8px;padding:13px 17px;font-size:14px}
  html{scroll-padding-top:100px}
}

/* ---------- Small phones: logo and menu on the first row, search on its own full-width row ---------- */
@media(max-width:620px){
  .site-header .nav-wrap{flex-wrap:wrap;gap:0 12px;min-height:0;padding:9px 0 12px}
  .site-header .brand{order:1;min-height:46px}
  .site-header .brand-logo{width:172px}
  .site-header .menu-toggle{order:2;margin-left:auto}
  .header-search{order:3;flex:1 1 100%;margin-top:9px}
  .site-header .primary-nav{left:17px;right:17px}
  html{scroll-padding-top:138px}
}
@media(max-width:360px){.site-header .brand-logo{width:150px}}
@media(prefers-reduced-motion:reduce){.hs-field,.site-header .menu-toggle span{transition:none}}

/* Mobile navigation reliability: keep dropdown above page content and clickable. */
@media(max-width:999px){
  .site-header{position:sticky;z-index:100}
  .site-header .nav-wrap{position:relative;overflow:visible}
  .site-header .menu-toggle{position:relative;z-index:102;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
  .site-header .primary-nav{z-index:101;pointer-events:auto}
}
