/* PAND - site search: header button + panel, and the results page (search.php).
   Loaded on every page after nav.css. 16 Oct 2026. */

/* ---------- room for the button in the header ----------
 * Between 1024px and 1180px the menu had ~14px to spare (see nav.css). The
 * search button needs ~46px, so the menu items lose 3px of padding a side
 * here. Measured at 1024px: everything still on one line. */
@media (max-width:1180px){
  .pn-link{padding:0 10px}
  .pn-has>.pn-top{padding:0 3px 0 10px}
  .pn-caret{padding:0 10px 0 3px}
  .pn-menu{gap:2px}
  .pn-donate{margin-left:6px}
}

/* ---------- the button ---------- */
.pn-sbtn{display:grid; place-items:center; flex:none; width:44px; height:44px; margin-left:4px; border-radius:50%; transition:background .35s var(--ease)}
.pn-sbtn svg{width:21px; height:21px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round}
.pn-sbtn:hover,.pn-sbtn[aria-expanded="true"]{background:rgba(255,255,255,.14)}
.pn.is-solid .pn-sbtn:hover,.pn.is-solid .pn-sbtn[aria-expanded="true"],.pn.is-open .pn-sbtn:hover{background:rgba(18,41,63,.07)}
.pn-sbtn:focus-visible{outline:2px solid currentColor; outline-offset:2px}
@media (max-width:1023px){ .pn-sbtn{margin-left:0} }

/* While searching, the hover menus stay shut so they can't cover the results. */
.pn.is-searching .pn-panel{display:none}

/* ---------- the panel ---------- */
.pns{pointer-events:auto; position:absolute; left:50%; top:calc(100% + 10px); transform:translateX(-50%); width:min(calc(100vw - 32px), 1180px);
  max-height:calc(100vh - 120px); max-height:calc(100dvh - 120px); overflow:auto; overscroll-behavior:contain;
  border-radius:24px; padding:18px 22px 22px; color:var(--ink); text-align:left;
  background:#fff;   /* solid: the page must not show through behind results */
  border:1px solid rgba(18,41,63,.08); box-shadow:0 30px 70px -30px rgba(18,41,63,.5)}
.pns[hidden]{display:none}
@media (max-width:1023px){ .pns{max-height:calc(100dvh - 170px); padding:14px 14px 18px} }

.pns-form{display:flex; align-items:center; gap:10px; padding:6px 6px 6px 16px; border-radius:999px; background:#fff; border:1.5px solid var(--line);
  transition:border-color .25s, box-shadow .25s}
.pns-form:focus-within{border-color:var(--blue); box-shadow:0 0 0 4px rgba(29,99,172,.12)}
.pns-ico{width:20px; height:20px; flex:none; fill:none; stroke:var(--muted); stroke-width:2; stroke-linecap:round}
.pns-form input{flex:1; min-width:0; height:44px; border:0; outline:0; background:none; font:500 17px/1.2 Montserrat,'Vazirmatn',system-ui,sans-serif; color:var(--ink)}
.pns-form input::placeholder{color:#8A97A6; font-weight:400}
.pns-form input::-webkit-search-cancel-button{display:none}
.pns-go{height:44px; padding:0 22px; border-radius:999px; font-weight:700; font-size:15px; color:#fff !important; background:linear-gradient(135deg,var(--blue),var(--blue-dk)) !important}
.pns-x{width:40px; height:40px; border-radius:50%; display:grid; place-items:center; flex:none}
.pns-x svg{width:18px; height:18px; stroke:var(--muted); stroke-width:2; stroke-linecap:round}
.pns-x:hover{background:rgba(18,41,63,.06)}
@media (max-width:600px){ .pns-go{display:none} .pns-form input{font-size:16px} }

.pns-start{margin-top:16px}
.pns.has-q .pns-start{display:none}
.pns-chips{display:flex; flex-wrap:wrap; gap:8px}
.pns-chip{display:inline-flex; align-items:center; min-height:38px; padding:0 14px; border-radius:999px; font-size:14.5px; font-weight:500; color:var(--blue-dk); background:rgba(29,99,172,.07);
  transition:background .25s}
.pns-chip:hover,.pns-chip:focus-visible{background:rgba(29,99,172,.14)}

.pns-results{margin-top:6px}
.pns-results:empty{display:none}
.pns-cols{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 28px; margin-top:12px}
@media (max-width:760px){ .pns-cols{grid-template-columns:1fr} }
.pns-group{min-width:0; padding-top:10px}
.pns-gh{display:flex; align-items:baseline; gap:8px; margin:0 0 4px; font-size:11px; letter-spacing:.18em; text-transform:uppercase; font-weight:700; color:var(--muted)}
.pns-gh span{letter-spacing:0; font-weight:600; color:#9AA6B2}
.pns-list{list-style:none; margin:0; padding:0}
.pns-item{display:block; padding:9px 10px; border-radius:12px; color:var(--ink); transition:background .2s}
.pns-item b{display:block; font-weight:600; font-size:15.5px; line-height:1.3; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.pns-item small{display:block; margin-top:2px; font-size:13px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.pns-item mark{background:rgba(73,166,71,.18); color:inherit; border-radius:3px; padding:0 1px}
.pns-item:hover,.pns-item:focus-visible,.pns-item.is-active{background:rgba(29,99,172,.08); outline:none}
.pns-item.is-past small::after{content:" · Past event"}
.pns-foot{display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-top:14px; padding-top:14px; border-top:1px solid rgba(18,41,63,.1); font-size:14px; color:var(--muted)}
.pns-all{font-weight:600; color:var(--blue) !important}
.pns-all::after{content:" →"}
.pns-msg{margin:16px 4px 4px; font-size:15px; color:#38495C; line-height:1.6}
.pns-msg a{color:var(--blue) !important; font-weight:500}
.pns-wait{opacity:.55; transition:opacity .2s}

/* ---------- results page ---------- */
.ps-hero{--ink:#12293F; color:#fff; padding:clamp(120px,17vh,170px) clamp(20px,6vw,48px) clamp(40px,6vh,64px);
  background-color:#12293F; background-image:radial-gradient(120% 90% at 50% 0%, #16345A 0%, #12293F 60%, #0F2A2E 100%)}
.ps-in{max-width:880px; margin:0 auto}
.ps-eyebrow{margin:0 0 10px; font-size:12px; letter-spacing:.24em; text-transform:uppercase; font-weight:700; color:#8BD48A}
.ps-hero h1{margin:0 0 22px; font-family:'Poppins',system-ui,sans-serif; font-weight:600; font-size:clamp(28px,4.2vw,42px); line-height:1.18; color:#fff}
.ps-hint{margin:14px 0 0; font-size:14.5px; line-height:1.6; color:rgba(255,255,255,.72)}

.psf{display:flex; align-items:center; gap:10px; padding:6px 6px 6px 18px; border-radius:999px; background:#fff; box-shadow:0 20px 45px -25px rgba(0,0,0,.6)}
.psf-ico{width:20px; height:20px; flex:none; fill:none; stroke:#5D6B7A; stroke-width:2; stroke-linecap:round}
.psf input{flex:1; min-width:0; height:48px; border:0; outline:0; background:none; font:500 17px/1.2 Montserrat,'Vazirmatn',system-ui,sans-serif; color:#12293F}
.psf input::-webkit-search-cancel-button{display:none}
.psf button{height:48px; padding:0 26px; border:0; border-radius:999px; cursor:pointer; font:700 15px Montserrat,system-ui,sans-serif; color:#fff; background:linear-gradient(135deg,#49A647,#1E9F49)}
.psf:focus-within{box-shadow:0 0 0 4px rgba(139,212,138,.45), 0 20px 45px -25px rgba(0,0,0,.6)}
@media (max-width:520px){ .psf button{padding:0 16px} }
.pand-shell .psf{margin-top:28px; border:1.5px solid #E2E8F0; box-shadow:none}   /* 404 page */

.ps-body{padding:28px clamp(20px,6vw,48px) clamp(64px,10vh,110px); background:#F6F8FB}
.ps-count{font-size:16.5px; color:#38495C}
.ps-count a,.ps-none a,.ps-help a{color:#1D63AC; font-weight:500}
.ps-tabs{display:flex; flex-wrap:wrap; gap:8px; margin:0 0 8px}
.ps-tabs a{display:inline-flex; align-items:center; gap:8px; min-height:40px; padding:0 16px; border-radius:999px; font-size:14.5px; font-weight:600; color:#12293F; text-decoration:none;
  background:#fff; border:1px solid #E2E8F0; transition:border-color .2s, background .2s}
.ps-tabs a span{font-weight:500; color:#8A97A6}
.ps-tabs a:hover{border-color:#1D63AC}
.ps-tabs a[aria-current="page"]{background:#12293F; border-color:#12293F; color:#fff}
.ps-tabs a[aria-current="page"] span{color:rgba(255,255,255,.7)}
.ps-group{margin-top:26px}
.ps-group h2{display:flex; align-items:baseline; gap:10px; margin:0 0 10px; font-family:'Poppins',system-ui,sans-serif; font-weight:600; font-size:21px; color:#12293F}
.ps-group h2 span{font-family:Montserrat,system-ui,sans-serif; font-size:14px; font-weight:600; color:#8A97A6}
.ps-list{list-style:none; margin:0; padding:0; display:grid; gap:8px}
.ps-list a{display:block; padding:14px 18px; border-radius:14px; background:#fff; border:1px solid #E2E8F0; text-decoration:none; transition:border-color .2s, box-shadow .2s, transform .2s}
.ps-list a:hover,.ps-list a:focus-visible{border-color:#1D63AC; box-shadow:0 14px 30px -22px rgba(18,41,63,.5); transform:translateY(-1px)}
.ps-list b{display:block; font-size:16.5px; font-weight:600; line-height:1.35; color:#12293F}
.ps-list small{display:block; margin-top:3px; font-size:14px; color:#5D6B7A}
.ps-more{display:inline-flex; margin-top:10px; font-weight:600; font-size:15px; color:#1D63AC; text-decoration:none}
.ps-more::after{content:" →"}
.ps-none{padding:26px; border-radius:18px; background:#fff; border:1px solid #E2E8F0}
.ps-none h2{margin:0 0 8px; font-family:'Poppins',system-ui,sans-serif; font-weight:600; font-size:22px; color:#12293F}
.ps-none p,.ps-none li,.ps-help{font-size:16px; line-height:1.7; color:#38495C}
.ps-help{margin-top:34px}
