/* AFS_DIRECTORY_CSS_V7 — asset version marker, paired with the same marker in
   js/afs-services-directory.js. The PHP checks for both and warns an
   administrator if a stale copy of either is still being served. */

/* ==========================================================================
   AFS — Services Directory
   Look based on afs-resources.html; icons from the AFS Service Icons design.
   Loaded by includes/afs-functions/afs-services-directory.php

   Rules are scoped to .afs-directory so the theme is untouched — except the
   modal, which is moved to <body> on load and so is scoped to
   .afs-modal-overlay instead.
   ========================================================================== */

.afs-directory,
.afs-modal-overlay{
  --purple:#834E9C;
  --purple-dark:#6E3C80;
  --purple-deep:#5A2F6B;
  --purple-light:#A575C9;
  --purple-pale:#F2EBF6;
  --purple-mist:#F5EFFB;  /* modal badges / close button */
  --orange:#FF9253;
  --orange-deep:#E8823F;
  --ink:#4A4A4A;
  --ink-dark:#2D2A32;
  --ink-soft:#6E6A75;
  --ink-light:#7A7A7A;
  --ink-faint:#8A8A8A;
  --green-pale:#EBF5F0;
  --green:#2E7D32;
  --radius:10px;
  --shadow:2px 2px 20px rgba(0,0,0,.12);
  --ctl-h:52px; /* shared height: search box and both dropdown buttons */
  --cyc:2.4s; /* icon draw-in duration */
  --sw:1.6;   /* icon stroke weight */

  /* Per-service icon colours (circle background / glyph), from the Figma
     "Updated version" frame. Keyed by taxonomy term slug via the
     .svc-icon--{slug} classes below. */
  --cat-community-bg:#F0E4F5;   --cat-community-fg:#834E9C;
  --cat-parenting-bg:#DCF1F7;   --cat-parenting-fg:#3193B5;
  --cat-afterschool-bg:#FCF6CC; --cat-afterschool-fg:#B89B1D;
  --cat-counselling-bg:#FBE3E3; --cat-counselling-fg:#DB4343;
  --cat-food-bg:#DFF3DF;        --cat-food-fg:#2FA047;
  --cat-employment-bg:#FCEBD7;  --cat-employment-fg:#EE8A20;
}

/* Pastel service-icon circles — shared by cards, filter chips and the modal.
   The border picks up the glyph colour automatically via currentColor. */
.afs-directory .svc-ico-circle,
.afs-modal-overlay .svc-ico-circle{
  width:41px;height:41px;flex:0 0 auto;border-radius:50%;
  display:flex;align-items:center;justify-content:center;padding:7px;
  background:var(--purple-pale);color:var(--purple);
  border:1px solid currentColor;
}
.svc-ico-circle.svc-icon--community-connection-programs{background:var(--cat-community-bg);color:var(--cat-community-fg);}
.svc-ico-circle.svc-icon--parenting-programs{background:var(--cat-parenting-bg);color:var(--cat-parenting-fg);}
.svc-ico-circle.svc-icon--after-school-childrens-programs{background:var(--cat-afterschool-bg);color:var(--cat-afterschool-fg);}
.svc-ico-circle.svc-icon--culturally-responsive-counselling{background:var(--cat-counselling-bg);color:var(--cat-counselling-fg);}
.svc-ico-circle.svc-icon--food-security-community-meals{background:var(--cat-food-bg);color:var(--cat-food-fg);}
.svc-ico-circle.svc-icon--employment-readiness-skills{background:var(--cat-employment-bg);color:var(--cat-employment-fg);}
.afs-directory{color:var(--ink);line-height:1.6;}
.afs-directory *{box-sizing:border-box;}
.afs-directory a{color:var(--purple);text-decoration:none;}
.afs-directory .afs-directory-data{display:none;}
.afs-directory .screen-reader-text{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}

/* ==========================================================================
   ANIMATED SERVICE ICONS
   Markup comes from includes/afs-functions/afs-service-icons.php.
   Keyframes below are the ones the design file uses.
   ========================================================================== */
/* The design file loops this and erases the stroke at 100%. In a directory
   people are reading, an icon that rubs itself out every few seconds is noise —
   so the icons draw in once (animation-fill-mode:both in the markup) and hold
   the finished state. Secondary motion (pulse/steam/lift/beat) keeps looping. */
@keyframes afs-draw{
  0%{stroke-dashoffset:1;}
  60%{stroke-dashoffset:0;}
  100%{stroke-dashoffset:0;}
}
@keyframes afs-steam{
  0%,100%{transform:translateY(0);opacity:.35;}
  45%{transform:translateY(-3px);opacity:1;}
}
@keyframes afs-pulse{0%,100%{transform:scale(1);} 50%{transform:scale(1.12);}}
@keyframes afs-beat{0%,100%{transform:scale(1);} 40%{transform:scale(1.1);}}
@keyframes afs-lift{0%,100%{transform:translateY(0);} 50%{transform:translateY(-2px);}}

.afs-ico{width:100%;height:100%;display:block;overflow:visible;stroke-width:var(--sw);color:inherit;}

/* Respect the visitor's motion preference — icons still draw, just static. */
@media (prefers-reduced-motion: reduce){
  .afs-ico *{animation:none !important;stroke-dashoffset:0 !important;}
}

/* ==========================================================================
   THE PURPLE BAND
   One section holding the animated service header and the view toggle.

   Full-bleed: the background spans the whole viewport while the content
   inside sits in Salient's own .container, so it lines up with the rest of
   the page. --afs-vw is set by the JS from documentElement.clientWidth —
   that excludes the scrollbar, which 100vw does not, so this can't cause a
   horizontal scrollbar. 100vw is only the fallback if the JS hasn't run.

   The margin trick assumes the band's parent is horizontally centred in the
   page, which is true inside a Salient container. Add full_width="0" to the
   shortcode to keep the band inside the column instead.
   ========================================================================== */
.afs-directory .afs-band{
  background:linear-gradient(120deg,var(--purple-deep),var(--purple) 55%,var(--purple-light));
  color:#fff;padding:2.4rem 0 3.4rem;
}
.afs-directory .afs-band.is-fullbleed{
  width:var(--afs-vw,100vw);
  max-width:var(--afs-vw,100vw);
  margin-left:calc(50% - (var(--afs-vw,100vw) / 2));
  margin-right:calc(50% - (var(--afs-vw,100vw) / 2));
}
/* Content row, positioned from the measured container so the heading lines up
   with the cards below. --afs-cl / --afs-cw are set by the JS from the live
   layout, so this follows Salient's container width without hardcoding it. */
.afs-directory .afs-band-inner{
  display:flex;align-items:center;gap:2rem;flex-wrap:wrap;
  width:var(--afs-cw,100%);
  margin-left:var(--afs-cl,0);
}
/* Not full-bleed? Then the band already sits in the container. */
.afs-directory .afs-band:not(.is-fullbleed) .afs-band-inner{width:100%;margin-left:0;}
.afs-directory .afs-band-inner > .view-toggle{margin-left:auto;}

.afs-directory .afs-hero-art{display:flex;align-items:center;flex:0 0 auto;color:#fff;}
.afs-directory .afs-hero-art[hidden]{display:none;}
.afs-directory .afs-hero-icon{
  display:block;width:96px;height:96px;color:#fff;--sw:1.3;
  animation:afs-hero-in .45s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes afs-hero-in{from{opacity:0;transform:translateY(8px) scale(.94);}to{opacity:1;transform:none;}}

.afs-directory .afs-hero-copy{flex:1 1 340px;min-width:0;}
.afs-directory .afs-hero-kicker{
  font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:rgba(255,255,255,.72);margin:0 0 .3rem;
}
.afs-directory .afs-hero-title{
  color:#fff;font-size:clamp(1.3rem,2.4vw,1.9rem);font-weight:600;margin:0 0 .4rem;line-height:1.25;
  text-transform:uppercase;letter-spacing:.02em;
}
.afs-directory .afs-hero-desc{color:rgba(255,255,255,.9);font-size:.95rem;margin:0;max-width:60ch;}

@media (max-width:860px){
  .afs-directory .afs-band{padding:1.8rem 0 3rem;}
  .afs-directory .afs-band-inner{gap:1.2rem;}
  .afs-directory .afs-band-inner > .view-toggle{margin-left:0;width:100%;justify-content:center;}
  .afs-directory .afs-hero-icon{width:68px;height:68px;}
}

/* ==========================================================================
   VIEW TOGGLE  (text only — the icons that carry meaning are the service
   marks, not a grid/list glyph)
   ========================================================================== */
.afs-directory .view-toggle{
  display:flex;width:fit-content;flex:0 0 auto;
  background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.45);
  border-radius:40px;padding:.25rem;gap:.25rem;
}
.afs-directory .view-toggle button{
  border:0;cursor:pointer;font-family:inherit;font-size:.8rem;letter-spacing:.07em;text-transform:uppercase;
  padding:.5rem 1.4rem;border-radius:30px;background:transparent;color:#fff;transition:.2s;line-height:1;
}
.afs-directory .view-toggle button.active{background:#fff;color:var(--purple-dark);}
.afs-directory .view-toggle button:not(.active):hover{background:rgba(255,255,255,.15);}

/* ==========================================================================
   CONTROLS
   ========================================================================== */
.afs-directory .controls{margin-top:-1.7rem;position:relative;z-index:5;}
.afs-directory .controls.is-hidden .afs-filters,
.afs-directory .controls.is-hidden .afs-service-chips,
.afs-directory .controls.is-hidden .count-line,
.afs-directory .controls.is-hidden .afs-near{display:none;}

.afs-directory .search-box{
  background:#fff;border-radius:50px;box-shadow:var(--shadow);
  display:flex;align-items:center;gap:.8rem;padding:.55rem 1.5rem;margin:0 0 1.2rem;
  border:1.5px solid transparent;transition:border-color .2s;
}
/* Focus shows as a purple ring on the pill, not a grey fill on the input.
   Salient paints a grey background on focused inputs, so every state below is
   forced transparent — otherwise a grey block appears inside the white pill. */
.afs-directory .search-box:focus-within{border-color:var(--purple-light);}
.afs-directory .search-box svg{color:var(--purple);flex:0 0 auto;}
.afs-directory .search-box input,
.afs-directory .search-box input:focus,
.afs-directory .search-box input:hover,
.afs-directory .search-box input:active,
.afs-directory .search-box input:focus-visible{
  flex:1;font-size:.95rem;font-family:inherit;color:var(--ink);
  background:transparent !important;background-color:transparent !important;
  background-image:none !important;
  border:0 !important;outline:0 !important;box-shadow:none !important;
  height:auto;padding:0;margin:0;-webkit-appearance:none;appearance:none;
}
.afs-directory .search-box input::-webkit-search-decoration,
.afs-directory .search-box input::-webkit-search-cancel-button{-webkit-appearance:none;}

/* --- filter bar: wide search pill + "near me" dropdown, one row --- */
.afs-directory .afs-filters{
  position:relative;
  display:flex;align-items:stretch;justify-content:flex-start;gap:1rem;flex-wrap:wrap;margin-bottom:1.6rem;
}
.afs-directory .afs-filters .search-box{
  margin:0;flex:1 1 320px;max-width:none;
  min-height:var(--ctl-h);   /* same height as the dropdown button */
}

.afs-directory .afs-dd{position:relative;flex:0 0 auto;}
.afs-directory .afs-dd-btn{
  display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;font-family:inherit;
  background:#fff;color:var(--purple);border:1px solid transparent;
  border-radius:50px;padding:.6rem 1.4rem;box-shadow:var(--shadow);
  font-size:.95rem;letter-spacing:.01em;font-weight:500;line-height:1.3;transition:.2s;
  max-width:300px;min-height:var(--ctl-h);
}
.afs-directory .afs-dd-btn:hover{background:var(--purple-pale);color:var(--purple-dark);}
.afs-directory .afs-dd.is-filtered .afs-dd-btn:hover{background:#e9dcf0;color:var(--purple-dark);}
.afs-directory .afs-dd.is-open .afs-dd-btn{border-color:var(--purple-light);}
.afs-directory .afs-dd.is-filtered .afs-dd-btn{
  background:var(--purple-pale);color:var(--purple-dark);border-color:var(--purple-light);
}
.afs-directory .afs-dd-icon{width:24px;height:24px;flex:0 0 auto;display:block;--sw:2.1;}
.afs-directory .afs-dd-icon[hidden]{display:none;}
.afs-directory .afs-dd-icon svg{width:100%;height:100%;display:block;}
.afs-directory .afs-dd-label{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.afs-directory .afs-dd-caret{flex:0 0 auto;transition:transform .2s;opacity:.7;}
.afs-directory .afs-dd.is-open .afs-dd-caret{transform:rotate(180deg);}

/* popover shell (the "near me" panel) */
.afs-directory .afs-dd-panel{
  position:absolute;top:calc(100% + .5rem);left:0;z-index:30;
  background:#fff;border-radius:14px;box-shadow:0 18px 44px rgba(90,47,107,.22);
  border:1px solid rgba(90,47,107,.08);
  animation:afs-dd-in .18s ease both;
}
.afs-directory .afs-dd-panel[hidden]{display:none;}
@keyframes afs-dd-in{from{opacity:0;transform:translateY(-6px);}to{opacity:1;transform:none;}}

/* ==========================================================================
   SERVICE FILTER CHIPS
   Always-visible wrapping rows of service filters (Figma "Updated version"):
   each chip is a rounded tile with the animated service icon, the service
   name and a count badge. "All services" leads the row.
   ========================================================================== */
.afs-directory .afs-service-chips{
  list-style:none;margin:0 0 1.6rem;padding:0;
  display:flex;flex-wrap:wrap;gap:.75rem;align-items:stretch;
}
.afs-directory .afs-dd-opt{
  display:flex;align-items:center;gap:.8rem;cursor:pointer;
  background:#F7F7F7;border-radius:10px;margin:0;
  min-height:57px;padding:.5rem .9rem;
  font-size:.95rem;font-weight:600;color:var(--ink);line-height:1.3;
  transition:background .15s,box-shadow .15s;
}
.afs-directory .afs-dd-opt:hover,
.afs-directory .afs-dd-opt:focus{background:var(--purple-pale);outline:none;}
.afs-directory .afs-dd-opt.is-selected{background:var(--purple-pale);color:var(--ink);}
.afs-directory .afs-dd-opt[data-slug=""]{padding:.5rem .9rem .5rem 1rem;}
.afs-directory .afs-dd-opt-icon{flex:0 0 auto;--sw:2;}
.afs-directory .afs-dd-opt-icon:empty{display:none;}
.afs-directory .afs-dd-opt-icon svg{width:100%;height:100%;display:block;}
.afs-directory .afs-dd-opt-name{flex:0 1 auto;transition:color .15s;}
.afs-directory .afs-dd-opt-count{
  flex:0 0 auto;font-size:.8rem;color:var(--ink-faint);
  background:var(--purple-pale);border-radius:999px;padding:.15rem .65rem;line-height:1.4;
  transition:background .15s,color .15s;
}
.afs-directory .afs-dd-opt.is-selected .afs-dd-opt-count{background:var(--purple);color:#fff;}
/* hover mirrors the active state: purple count badge, purple name */
.afs-directory .afs-dd-opt:hover .afs-dd-opt-count,
.afs-directory .afs-dd-opt:focus .afs-dd-opt-count{background:var(--purple);color:#fff;}
.afs-directory .afs-dd-opt:hover .afs-dd-opt-name,
.afs-directory .afs-dd-opt:focus .afs-dd-opt-name{color:var(--purple);}

/* location panel */
.afs-directory .afs-dd-panel{padding:1rem;width:290px;}
.afs-directory .afs-dd--near .afs-dd-panel{left:auto;right:0;}
.afs-directory .afs-near-btn{
  display:flex;align-items:center;justify-content:center;gap:.45rem;width:100%;cursor:pointer;font-family:inherit;
  font-size:.78rem;letter-spacing:.04em;text-transform:uppercase;font-weight:600;
  padding:.6rem 1rem;border-radius:30px;border:1px solid var(--purple);
  background:#fff;color:var(--purple);transition:.2s;line-height:1.3;margin-bottom:.8rem;
}
.afs-directory .afs-near-btn:hover{background:var(--purple-pale);}
.afs-directory .afs-near-btn.is-active{background:var(--purple);color:#fff;}
.afs-directory .afs-near-btn.is-loading{opacity:.6;pointer-events:none;}
.afs-directory .afs-near-btn.is-loading svg{animation:afs-pulse 1s ease-in-out infinite;transform-box:fill-box;transform-origin:center;}

.afs-directory .afs-near-field{display:block;margin:0 0 .7rem;font-size:.78rem;color:var(--ink-light);}
.afs-directory .afs-near-field > span{display:block;margin-bottom:.25rem;}
.afs-directory .afs-near-field select,
.afs-directory .afs-near-field input[type="text"]{
  width:100%;font-family:inherit;font-size:.85rem;color:var(--ink);
  background:#fff !important;background-color:#fff !important;background-image:none !important;
  border:1.5px solid #e2dbe6;border-radius:8px;padding:.45rem .7rem;height:auto;
  box-shadow:none !important;margin:0;transition:border-color .2s;
}
.afs-directory .afs-near-field select:focus,
.afs-directory .afs-near-field input[type="text"]:focus{
  border-color:var(--purple-light);outline:0 !important;
  background:#fff !important;background-color:#fff !important;
}
.afs-directory .afs-near-status{
  font-size:.78rem;color:var(--ink-light);margin:.5rem 0 0;line-height:1.45;
}
.afs-directory .afs-near-status.is-ok{color:var(--purple);}
.afs-directory .afs-near-status.is-warn{color:var(--orange-deep);}
.afs-directory .afs-near-clear{
  background:none;border:0;cursor:pointer;font-family:inherit;font-size:.78rem;
  color:var(--orange-deep);text-decoration:underline;padding:.4rem 0 0;
}

/* "Results" line — left-aligned label above the grid */
.afs-directory .count-line{text-align:left;color:var(--ink);font-size:1rem;font-weight:500;margin-bottom:1.4rem;}

@media (max-width:620px){
  .afs-directory .afs-filters{flex-direction:column;align-items:stretch;}
  /* flex-basis becomes HEIGHT in a column container — reset it */
  .afs-directory .afs-filters .search-box{max-width:none;flex:0 0 auto;}
  .afs-directory .afs-dd-btn{width:100%;max-width:none;justify-content:flex-start;}
  .afs-directory .afs-dd-caret{margin-left:auto;}
  .afs-directory .afs-dd-panel{width:100%;left:0;right:auto;}
  .afs-directory .afs-dd-opt{width:100%;}
}

/* ==========================================================================
   CARD GRID
   ========================================================================== */
.afs-directory .svc-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(255px,1fr));gap:1.45rem;padding-bottom:1rem;}

/* Cards ease in with a small staggered rise whenever the FILTERS change
   (service chip, search, location) — but not when a modal opens/closes.
   fill-mode is "backwards" (not "both") on purpose: once the animation ends
   it stops applying, so the hover lift transition still works. */
@keyframes afs-card-in{
  from{opacity:0;transform:translateY(18px) scale(.97);}
}
.afs-directory .svc-grid.is-anim .svc-card{
  animation:afs-card-in .85s cubic-bezier(.2,.7,.3,1) backwards;
  animation-delay:var(--d,0ms);
}
@media (prefers-reduced-motion: reduce){
  .afs-directory .svc-grid.is-anim .svc-card{animation:none;}
}
.afs-directory .svc-card{
  background:#fff;border-radius:var(--radius);padding:0;cursor:pointer;overflow:hidden;
  display:flex;flex-direction:column;
  border:2px solid transparent;box-shadow:0 4px 14px rgba(0,0,0,.05);
  transition:transform .2s,border-color .2s,box-shadow .2s;
}
.afs-directory .svc-card:hover{transform:translateY(-4px);box-shadow:0 10px 30px rgba(90,47,107,.12);}
.afs-directory .svc-card.selected{border-color:var(--purple);box-shadow:0 10px 30px rgba(90,47,107,.12);}
.afs-directory .card-media{position:relative;height:154px;flex:0 0 auto;background:var(--purple-pale);}
.afs-directory .card-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;}
/* Salient's inline CSS has `.row .col img:not([srcset]){width:auto}`, which out-ranks the rule above.
   With the height fixed, width:auto shrinks the photo to its aspect ratio (768x411 at 154px tall = 287px),
   leaving the purple background showing on wider (mobile/tablet) cards. Force the cover sizing. */
.afs-directory .card-media img,
.afs-directory .card-media img:not([srcset]),
.afs-modal-overlay .svc-detail-media img{width:100% !important;max-width:none !important;height:100% !important;margin:0 !important;}
.afs-directory .afs-media-fallback{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(130deg,var(--purple-deep),var(--purple) 60%,var(--purple-light));
  color:#fff;padding:1.6rem;
}
.afs-directory .afs-media-fallback .afs-ico{width:74px;height:74px;--sw:1.5;}
/* category pill over the photo, top-left */
.afs-directory .svc-cat{
  position:absolute;top:.8rem;left:1.25rem;z-index:2;
  display:inline-block;font-size:.62rem;font-weight:500;letter-spacing:.04em;text-transform:uppercase;
  background:var(--purple-pale);color:var(--purple);border-radius:20px;padding:.3rem .65rem;line-height:1.2;
}
.afs-directory .svc-dist{
  position:absolute;bottom:.8rem;right:.8rem;z-index:2;
  font-size:.64rem;letter-spacing:.06em;text-transform:uppercase;
  background:var(--orange);color:#fff;border-radius:20px;padding:.18rem .7rem;
}
.afs-directory .svc-body{padding:0 1.25rem 1.3rem;display:flex;flex-direction:column;align-items:flex-start;flex:1;}

/* round animated service mark on its pastel disc, overlapping the photo */
.afs-directory .svc-icon{
  margin:-25px 0 .9rem;position:relative;z-index:2;
  transition:transform .25s ease;
}
.afs-directory .svc-icon .afs-ico{--sw:2.2;}
.afs-directory .svc-card:hover .svc-icon{transform:scale(1.06);}

.afs-directory .svc-card h3{font-size:1rem;color:var(--purple);margin:0 0 .35rem;font-weight:700;line-height:1.3;}
.afs-directory .svc-org-line{font-size:.66rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#5F5F5F;margin-bottom:.7rem;}
.afs-directory .svc-card p{font-size:.88rem;color:var(--ink-light);margin:0;line-height:1.5;}
.afs-directory .svc-suburb{
  display:flex;align-items:center;gap:.4rem;
  font-size:.88rem;color:var(--purple);margin-top:.9rem;
}
.afs-directory .svc-pin{
  width:20px;height:20px;flex:0 0 auto;display:block;
  fill:none;stroke:var(--purple);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
.afs-directory .svc-card .more{
  display:inline-block;margin-top:auto;padding-top:1.1rem;
  font-size:.88rem;color:var(--orange);letter-spacing:.02em;text-transform:uppercase;
}
.afs-directory .empty{text-align:center;color:var(--ink-light);padding:3rem 1rem;background:#fff;border-radius:var(--radius);}

/* ==========================================================================
   DIRECTORY / EXPLORER VIEW
   ========================================================================== */
.afs-directory .explorer{
  display:none;grid-template-columns:340px 1fr;gap:0;margin-top:.5rem;
  background:var(--purple-deep);border-radius:var(--radius);overflow:hidden;
  box-shadow:var(--shadow);min-height:620px;
}
.afs-directory .explorer.show{display:grid;animation:afsFadeIn .3s ease;}
.afs-directory .exp-side{background:rgba(0,0,0,.22);padding:1.4rem 0;overflow-y:auto;max-height:78vh;}
.afs-directory .exp-side h2{
  color:#fff;font-size:.85rem;letter-spacing:.14em;text-transform:uppercase;font-weight:600;
  padding:0 1.4rem .9rem;border-bottom:1px solid rgba(255,255,255,.15);margin:0 0 .4rem;
}
.afs-directory .exp-cat{border-bottom:1px solid rgba(255,255,255,.08);}
.afs-directory .exp-cat-head{
  width:100%;display:flex;align-items:center;gap:.6rem;
  background:none;border:0;cursor:pointer;font-family:inherit;
  color:var(--orange);font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;
  padding:.75rem 1.4rem;transition:.2s;line-height:1.4;text-align:left;
}
.afs-directory .exp-cat-icon{width:30px;height:30px;flex:0 0 auto;display:block;color:#fff;--sw:2;opacity:.95;}
.afs-directory .exp-cat-name{flex:1;}
.afs-directory .exp-cat-head:hover{background:rgba(255,255,255,.06);color:var(--orange);}
.afs-directory .exp-cat-head .arrow{transition:transform .25s;font-size:.7rem;color:rgba(255,255,255,.6);}
.afs-directory .exp-cat.open .exp-cat-head .arrow{transform:rotate(90deg);}
.afs-directory .exp-cat-list{list-style:none;overflow:hidden;max-height:0;transition:max-height .3s ease;margin:0;padding:0;}
.afs-directory .exp-cat.open .exp-cat-list{max-height:900px;}
.afs-directory .exp-cat-list li{margin:0;}
.afs-directory .exp-cat-list button{
  width:100%;text-align:left;background:none;border:0;cursor:pointer;font-family:inherit;
  color:rgba(255,255,255,.85);font-size:.88rem;padding:.55rem 1.4rem .55rem 3.1rem;transition:.15s;
  border-left:3px solid transparent;line-height:1.4;
}
.afs-directory .exp-cat-list button em{font-style:normal;color:var(--orange);font-size:.76rem;display:block;}
.afs-directory .exp-cat-list button:hover{background:rgba(255,255,255,.08);color:#fff;}
.afs-directory .exp-cat-list button.current{
  background:rgba(239,150,94,.14);border-left-color:var(--orange);color:#fff;font-weight:600;
}
.afs-directory .exp-main{position:relative;color:#fff;display:flex;flex-direction:column;}
.afs-directory .exp-hero{position:relative;height:280px;flex:0 0 auto;background:var(--purple);}
.afs-directory .exp-hero img{position:absolute;inset:0;width:100% !important;height:100%;object-fit:cover;}
.afs-directory .exp-hero .afs-media-fallback .afs-ico{width:120px;height:120px;}
.afs-directory .exp-hero::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(to top,var(--purple-deep) 4%,rgba(90,47,107,.15) 55%);
}
.afs-directory .exp-hero-cap{
  position:absolute;left:2.4rem;right:2rem;bottom:1.2rem;z-index:2;
}
.afs-directory .exp-hero .exp-kicker{
  display:block;font-size:.72rem;letter-spacing:.16em;line-height:1.4;
  text-transform:uppercase;color:var(--orange);margin-bottom:.25rem;
  text-shadow:0 1px 6px rgba(0,0,0,.45);
}
.afs-directory .exp-hero h3{
  font-size:1.7rem;font-weight:600;color:#fff;line-height:1.2;
  text-shadow:0 2px 8px rgba(0,0,0,.4);margin:0;
}
.afs-directory .exp-hero h3 small{
  display:block;font-size:.72rem;font-weight:400;letter-spacing:.1em;text-transform:uppercase;
  color:rgba(255,255,255,.8);margin-top:.15rem;
}
.afs-directory .exp-content{padding:1.6rem 2.4rem 2.2rem;display:grid;grid-template-columns:1.4fr 1fr;gap:2.2rem;flex:1;}
.afs-directory .exp-content p{font-size:.95rem;color:rgba(255,255,255,.92);}
.afs-directory .exp-links h4{font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--orange);margin:0 0 .7rem;}
.afs-directory .exp-links ul{list-style:none !important;margin:0;padding:0;}
.afs-directory .exp-links li{list-style:none !important;margin:0 0 .5rem;padding-left:0;}
.afs-directory .exp-links li::marker{content:"";}
.afs-directory .exp-links a,
.afs-directory .exp-links .plain{
  display:flex;align-items:center;gap:.5rem;color:#fff;font-size:.9rem;
  background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);border-radius:6px;
  padding:.55rem .8rem;transition:.2s;
}
.afs-directory .exp-links a:hover{background:rgba(239,150,94,.2);border-color:var(--orange);color:#fff;}
.afs-directory .exp-actions{margin-top:1.4rem;display:flex;gap:.8rem;align-items:center;flex-wrap:wrap;}
.afs-directory .exp-nav{display:flex;gap:.5rem;}
.afs-directory .exp-nav button{
  background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.25);color:#fff;width:38px;height:38px;
  border-radius:50%;cursor:pointer;font-size:1rem;transition:.2s;line-height:1;
}
.afs-directory .exp-nav button:hover{background:var(--orange);border-color:var(--orange);}
.afs-directory .exp-details .ref-table{margin-top:1.2rem;}
.afs-directory .exp-details .ref-chips{
  list-style:none !important;margin:0 0 .9rem;padding:0;display:flex;flex-wrap:wrap;gap:.4rem;
}
.afs-directory .exp-details .ref-chips li{
  list-style:none !important;margin:0;display:inline-flex;align-items:baseline;gap:.4rem;
  background:rgba(255,255,255,.12);border-radius:20px;padding:.26rem .75rem;font-size:.8rem;line-height:1.35;
}
.afs-directory .exp-details .ref-chip-k{color:rgba(255,255,255,.6);font-size:.72rem;}
.afs-directory .exp-details .ref-chip-v{color:#fff;font-weight:600;}
.afs-directory .exp-details .ref-chip.is-yes .ref-chip-v{color:#9ee6ad;}
.afs-directory .exp-details .ref-rows{margin:0;}
.afs-directory .exp-details .ref-rows > div{
  border-bottom:1px solid rgba(255,255,255,.12);padding:.35rem 0;font-size:.83rem;line-height:1.5;
}
.afs-directory .exp-details .ref-rows dt{
  display:flex;align-items:center;gap:.35rem;
  color:rgba(255,255,255,.6);font-weight:400;font-size:.72rem;letter-spacing:.05em;text-transform:uppercase;
  margin-bottom:.1rem;
}
.afs-directory .exp-details .ref-rows dd{padding-left:1.05rem;}
.afs-directory .exp-details .ref-rows dd{margin:0;color:#fff;text-align:left;}

@keyframes afsFadeIn{from{opacity:0;}to{opacity:1;}}

/* ==========================================================================
   DETAIL MODAL
   Lives on <body> (moved there by the JS) so it sits above Salient's sticky
   header and the footer, which create their own stacking contexts.
   ========================================================================== */
body.afs-modal-open{overflow:hidden;}

.afs-modal-overlay{
  position:fixed;inset:0;z-index:2147483000;   /* above Salient's header, admin bar and any sticky footer */
  display:flex;align-items:center;justify-content:center;padding:2.5rem 2rem;
  background:rgba(74,42,90,.62);backdrop-filter:blur(3px);
  opacity:0;transition:opacity .25s ease;
  font-family:inherit;color:var(--ink);line-height:1.6;
}
.afs-modal-overlay[hidden]{display:none;}
.afs-modal-overlay.open{opacity:1;}
.afs-modal-overlay *{box-sizing:border-box;}
.afs-modal-overlay a{color:var(--purple);text-decoration:none;}

/* Stacked layout (Figma): photo banner on top, details below. */
.afs-modal-overlay .svc-detail{
  width:min(1140px,100%);max-height:90vh;overflow:auto;
  background:#fff;border-radius:20px;box-shadow:0 25px 70px rgba(0,0,0,.35);
  display:block;position:relative;
  transform:translateY(14px);transition:transform .3s cubic-bezier(.2,.7,.3,1);
}
.afs-modal-overlay.open .svc-detail{transform:none;}

.afs-modal-overlay .svc-detail-media{
  position:relative;height:clamp(180px,24vw,260px);
  border-radius:20px 20px 0 0;overflow:hidden;background:var(--purple-pale);
}
.afs-modal-overlay .svc-detail-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;}
.afs-modal-overlay .afs-media-fallback{
  position:absolute;inset:0;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(130deg,var(--purple-deep),var(--purple) 60%,var(--purple-light));color:#fff;
}
.afs-modal-overlay .afs-media-fallback .afs-ico{width:120px;height:120px;--sw:1.2;}

.afs-modal-overlay .svc-detail-body{
  padding:1.75rem 3rem 3rem;
  display:flex;flex-direction:column;gap:1.6rem;align-items:flex-start;
}
.afs-modal-overlay .svc-detail-head{display:flex;align-items:center;gap:1rem;margin:0;width:100%;}
.afs-modal-overlay .svc-detail-head > div{max-width:560px;}
.afs-modal-overlay .svc-detail-icon .afs-ico{--sw:2.2;}

/* map toggle — labelled pill at the right of the header row.
   The ring is an inset box-shadow rather than a border: a border combined
   with a pill radius renders unevenly around the curve (visible seams at
   the ends, worse on retina); an inset shadow follows the radius exactly. */
.afs-modal-overlay .svc-map-toggle{
  margin-left:auto;flex:0 0 auto;cursor:pointer;font-family:inherit;
  display:inline-flex;align-items:center;gap:.5rem;
  min-height:41px;padding:.5rem 1.1rem;border-radius:999px;border:0;
  -webkit-appearance:none;appearance:none;
  background:var(--purple-mist);color:var(--purple);
  box-shadow:inset 0 0 0 1px var(--purple);
  transition:background .2s,color .2s;
  font-size:.8rem;font-weight:600;letter-spacing:.02em;line-height:1;white-space:nowrap;
}
.afs-modal-overlay .svc-map-toggle:hover{background:var(--purple);color:#fff;}
.afs-modal-overlay .svc-map-toggle.is-active{background:var(--purple);color:#fff;}
.afs-modal-overlay .svc-map-toggle[hidden]{display:none;}
.afs-modal-overlay .svc-map-toggle svg{width:18px;height:18px;flex:0 0 auto;display:block;}

/* embedded map inside the banner, tinted purple to match the design */
.afs-modal-overlay .svc-map-embed{position:absolute;inset:0;}
.afs-modal-overlay .svc-map-embed iframe{
  position:absolute;inset:0;width:100%;height:100%;border:0;display:block;
  filter:grayscale(.25);
}
.afs-modal-overlay .svc-map-embed::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(120deg,rgba(90,47,107,.45),rgba(131,78,156,.28) 55%,rgba(165,117,201,.22));
  mix-blend-mode:multiply;
}
.afs-modal-overlay .svc-map-open{
  position:absolute;left:50%;bottom:1rem;transform:translateX(-50%);z-index:2;
  display:inline-flex;align-items:center;gap:.45rem;
  background:#fff;color:var(--purple);border-radius:30px;padding:.5rem 1rem;
  font-size:.8rem;font-weight:600;letter-spacing:.02em;
  box-shadow:0 4px 16px rgba(0,0,0,.25);transition:.2s;white-space:nowrap;
}
.afs-modal-overlay .svc-map-open:hover{background:var(--purple);color:#fff;}
.afs-modal-overlay .svc-map-open svg{width:14px;height:14px;flex:0 0 auto;}
.afs-modal-overlay .kicker{
  font-size:.75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--purple);margin-bottom:.25rem;
}
.afs-modal-overlay .svc-detail-body h3{
  color:var(--ink-dark);font-size:2rem;font-weight:500;margin:0 0 .25rem;line-height:1.1;
}
.afs-modal-overlay .svc-org{font-size:.75rem;font-weight:500;letter-spacing:.04em;text-transform:uppercase;color:var(--ink-soft);}
.afs-modal-overlay .svc-desc{width:100%;font-size:.88rem;color:var(--ink-soft);line-height:1.6;margin:0;} /* full width: the body is a flex column with align-items:flex-start, so without this an accordion with no intro shrinks to its longest heading */
.afs-modal-overlay .svc-desc p{margin:0 0 .7rem;padding-bottom:0 !important;color:var(--ink-soft);} /* afs.css adds padding-bottom:1em to every p — cleared so the margin is the only spacing */
.afs-modal-overlay .svc-desc p:last-child{margin-bottom:0;}

/* divider + section title */
.afs-modal-overlay .svc-referral{width:100%;border-top:1px solid #ECECEC;padding-top:1.6rem;}
.afs-modal-overlay .svc-referral .ref-table h4{
  font-size:.75rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:var(--purple);margin:0 0 .9rem;
}
/* short answers as badges: "Label  Value" on a tinted rectangle */
.afs-modal-overlay .ref-chips{
  list-style:none !important;margin:0 0 1.6rem;padding:0;
  display:flex;flex-wrap:wrap;gap:.5rem;
}
.afs-modal-overlay .ref-chips li{
  list-style:none !important;margin:0;
  display:inline-flex;align-items:baseline;gap:.35rem;
  background:var(--purple-mist);border-radius:6px;padding:.4rem .65rem;font-size:.75rem;line-height:1.35;
}
.afs-modal-overlay .ref-chip-k{color:var(--ink-soft);font-weight:500;letter-spacing:.01em;}
.afs-modal-overlay .ref-chip-v{color:var(--purple);font-weight:700;}
.afs-modal-overlay .ref-chip.is-yes{background:var(--green-pale);}
.afs-modal-overlay .ref-chip.is-yes .ref-chip-v{color:var(--green);}
.afs-modal-overlay .ref-chip.is-no{background:#F4F1F5;}
.afs-modal-overlay .ref-chip.is-no .ref-chip-v{color:var(--ink-soft);}
/* long answers in a two-column checklist grid */
.afs-modal-overlay .ref-rows{
  margin:0;width:100%;
  display:grid;grid-template-columns:1fr 1fr;column-gap:1.5rem;row-gap:1rem;
}
.afs-modal-overlay .ref-rows > div{
  break-inside:avoid;padding:0;font-size:.82rem;line-height:1.4;
}
.afs-modal-overlay .ref-rows dt{
  display:flex;align-items:center;gap:.6rem;
  color:var(--ink-soft);font-weight:700;font-size:.69rem;letter-spacing:.05em;text-transform:uppercase;
  margin-bottom:.15rem;
}
.afs-modal-overlay .ref-rows dd{margin:0;padding-left:1.35rem;color:var(--ink-dark);text-align:left;}

/* footer: contact list left, CTA right */
.afs-modal-overlay .svc-detail-footer{
  width:100%;display:flex;align-items:flex-end;justify-content:space-between;gap:1.5rem;flex-wrap:wrap;
}
/* Salient styles list items globally; !important and a blank ::marker are
   needed to stop a bullet appearing next to the icons. */
.afs-modal-overlay .svc-links{list-style:none !important;margin:0;padding:0;flex:0 1 340px;}
.afs-modal-overlay .svc-links li{
  list-style:none !important;margin:0 0 .6rem;padding-left:0;
}
.afs-modal-overlay .svc-links li:last-child{margin-bottom:0;}
.afs-modal-overlay .svc-links li::marker{content:"";}
.afs-modal-overlay .svc-links a,
.afs-modal-overlay .svc-links .plain{font-size:.88rem;display:inline-flex;align-items:center;gap:.75rem;}
.afs-modal-overlay .svc-links a{color:var(--purple);text-decoration:underline;text-underline-offset:2px;}
.afs-modal-overlay .svc-links a:hover{color:var(--purple-dark);}
.afs-modal-overlay .svc-links a[href^="tel:"]{color:var(--ink-dark);text-decoration:none;}
.afs-modal-overlay .svc-links a[href^="tel:"]:hover{color:var(--purple);}
.afs-modal-overlay .svc-links .plain{color:var(--ink-dark);}

.afs-modal-overlay .close-btn{
  position:absolute;top:1.5rem;right:1.3rem;border:0;width:37px;height:37px;
  display:flex;align-items:center;justify-content:center;
  background:var(--purple-mist);border-radius:50%;font-size:.95rem;cursor:pointer;
  color:var(--purple);z-index:3;line-height:1;transition:.2s;
}
.afs-modal-overlay .close-btn:hover{background:var(--purple);color:#fff;}

/* Buttons (shared) */
.afs-directory .btn,
.afs-modal-overlay .btn{
  display:inline-block;padding:1rem 1.5rem;border-radius:20px;font-size:.82rem;font-weight:700;border:0;cursor:pointer;
  letter-spacing:.04em;text-transform:uppercase;background:var(--purple);color:#fff;transition:.2s;line-height:1.2;
  flex:0 0 auto;
}
.afs-directory .btn:hover,
.afs-modal-overlay .btn:hover{background:var(--purple-dark);color:#fff;}
.afs-directory .btn-orange{background:var(--orange);}
.afs-directory .btn-orange:hover{background:var(--orange-deep);}

/* contact icons — one per kind of link */
.afs-modal-overlay .svc-link-ico,
.afs-directory .svc-link-ico{
  width:16px;height:16px;flex:0 0 auto;display:block;
  fill:none;stroke:var(--purple);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;
}
.afs-modal-overlay .svc-links a:hover .svc-link-ico{stroke:var(--purple-dark);}
.afs-directory .exp-links .svc-link-ico{stroke:var(--orange);} /* stays orange on the dark explorer panel for contrast */

/* tick against each detail row */
.afs-modal-overlay .ref-tick,
.afs-directory .ref-tick{
  width:12px;height:12px;flex:0 0 auto;display:block;
  fill:none;stroke:var(--purple);stroke-width:3.2;stroke-linecap:round;stroke-linejoin:round;
}
.afs-directory .exp-details .ref-tick{stroke:var(--orange);}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width:840px){
  .afs-modal-overlay{padding:1rem;}
  .afs-modal-overlay .svc-detail{max-height:92vh;}
  .afs-modal-overlay .svc-detail-body{padding:1.4rem 1.6rem 1.8rem;gap:1.2rem;}
  .afs-modal-overlay .svc-detail-body h3{font-size:1.45rem;}
  .afs-modal-overlay .ref-rows{grid-template-columns:1fr;}
  .afs-modal-overlay .svc-detail-footer{flex-direction:column;align-items:stretch;}
  .afs-modal-overlay .svc-links{flex:0 0 auto;}
  .afs-modal-overlay .close-btn{top:1rem;right:1rem;}
  .afs-directory .explorer{grid-template-columns:1fr;}
  .afs-directory .exp-side{max-height:320px;}
  .afs-directory .exp-content{grid-template-columns:1fr;gap:1.2rem;padding:1.4rem 1.5rem 1.8rem;}
  .afs-directory .exp-hero .exp-kicker{left:1.5rem;}
  .afs-directory .exp-hero h3{left:1.5rem;font-size:1.3rem;}
  .afs-directory .afs-near input[type="text"]{width:100px;}
}

/* Bulleted lists in the program description use the same purple tick as the
   referral checklist (Waiting time, Interpreter support…) instead of bullets.
   Salient styles list items globally, hence the !important on the list resets. */
.afs-modal-overlay .svc-desc ul{
  list-style:none !important;margin:0 0 .7rem !important;padding:0 !important;
}
.afs-modal-overlay .svc-desc ul:last-child{margin-bottom:0 !important;}
.afs-modal-overlay .svc-desc ul li{
  list-style:none !important;position:relative;
  margin:0 0 .45rem !important;padding:0 0 0 1.35rem !important;
  color:var(--ink-dark);line-height:1.5;text-align:left;
}
.afs-modal-overlay .svc-desc ul li:last-child{margin-bottom:0 !important;}
.afs-modal-overlay .svc-desc ul li::marker{content:'';}
.afs-modal-overlay .svc-desc ul li::before{
  content:'';position:absolute;left:0;top:.42em;width:12px;height:12px;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23834E9C' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5 10-11'/%3E%3C/svg%3E") no-repeat center/contain;
}


/* ==========================================================================
   PROGRAM CONTENT — intro + accordion (ACF "Program sections" repeater)
   ========================================================================== */
.afs-modal-overlay .svc-intro{margin:0 0 1.4rem;}
.afs-modal-overlay .svc-intro p{color:var(--ink-dark);}

.afs-modal-overlay .svc-accordion{width:100%;border-top:1px solid #ECECEC;}
.afs-modal-overlay .svc-acc-item{border-bottom:1px solid #ECECEC;}
.afs-modal-overlay .svc-acc-heading{margin:0 !important;padding:0 !important;font-size:inherit;line-height:inherit;}
.afs-modal-overlay .svc-acc-btn{
  all:unset;box-sizing:border-box;cursor:pointer;
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:1rem;
  padding:.95rem .15rem;
  font-family:inherit;font-size:.95rem;font-weight:600;line-height:1.35;color:var(--ink-dark);
  text-align:left;transition:color .2s ease;
}
.afs-modal-overlay .svc-acc-btn:hover,
.afs-modal-overlay .svc-acc-item.is-open .svc-acc-btn{color:var(--purple);}
.afs-modal-overlay .svc-acc-btn:focus-visible{outline:2px solid var(--purple);outline-offset:2px;border-radius:4px;}
.afs-modal-overlay .svc-acc-ico{
  width:28px;height:28px;flex:0 0 auto;padding:7px;box-sizing:border-box;border-radius:50%;
  background:var(--purple-mist);
  fill:none;stroke:var(--purple);stroke-width:2.4;stroke-linecap:round;
  transition:background .2s ease,transform .25s ease;
}
.afs-modal-overlay .svc-acc-ico-v{transition:opacity .2s ease;}
.afs-modal-overlay .svc-acc-item.is-open .svc-acc-ico{background:var(--purple);stroke:#fff;transform:rotate(180deg);}
.afs-modal-overlay .svc-acc-item.is-open .svc-acc-ico-v{opacity:0;}   /* plus -> minus */
.afs-modal-overlay .svc-acc-panel{padding:0 .15rem 1.1rem;}
.afs-modal-overlay .svc-acc-panel[hidden]{display:none;}
.afs-modal-overlay .svc-acc-item.is-open .svc-acc-inner{animation:afsAccIn .25s ease;}
.afs-modal-overlay .svc-acc-inner p{margin:0 0 .7rem;padding-bottom:0 !important;color:var(--ink-soft);}
.afs-modal-overlay .svc-acc-inner p:last-child,
.afs-modal-overlay .svc-acc-inner ul:last-child{margin-bottom:0 !important;}
.afs-modal-overlay .svc-acc-inner strong{color:var(--ink-dark);font-weight:600;}
@keyframes afsAccIn{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}
@media (prefers-reduced-motion: reduce){
  .afs-modal-overlay .svc-acc-item.is-open .svc-acc-inner{animation:none;}
  .afs-modal-overlay .svc-acc-ico{transition:none;}
}

/* Spacing: paragraphs keep a gap between them, but a lead-in paragraph sits
   tight on the list it introduces ("…in Australia to:" -> ticks), with the same
   small gap as between list items. */
.afs-modal-overlay .svc-desc p:last-child{margin-bottom:0;}
.afs-modal-overlay .svc-desc p:has(+ ul){margin-bottom:.45rem;}


/* ==========================================================================
   SERVICE FILTER — dropdown on phones
   Desktop/tablet keep the always-visible tiles. At 620px and below the tiles
   collapse behind a toggle that shows the current service, icon and count,
   and open as a compact list.
   ========================================================================== */
.afs-directory .afs-svc-toggle{display:none;}
.afs-directory .afs-svc-toggle-icon[hidden]{display:none !important;} /* .svc-ico-circle sets display:flex, which would override [hidden] */

@media (max-width:620px){
  .afs-directory .afs-svc-filter{position:relative;margin:0 0 1.2rem;}
  .afs-directory .afs-svc-toggle{
    all:unset;box-sizing:border-box;cursor:pointer;
    display:flex;align-items:center;gap:.7rem;width:100%;min-height:58px;
    padding:.5rem .9rem;border-radius:12px;
    background:var(--purple-pale);border:1px solid transparent;
    font-family:inherit;color:var(--ink);transition:border-color .2s,background .2s;
  }
  .afs-directory .afs-svc-toggle:focus-visible{outline:2px solid var(--purple);outline-offset:2px;}
  .afs-directory .afs-svc-filter.is-open .afs-svc-toggle{border-color:var(--purple);background:#fff;}
  .afs-directory .afs-svc-toggle-icon{width:36px;height:36px;padding:6px;}
  .afs-directory .afs-svc-toggle-icon svg{width:100%;height:100%;display:block;}
  .afs-directory .afs-svc-toggle-text{display:flex;flex-direction:column;min-width:0;flex:1 1 auto;text-align:left;}
  .afs-directory .afs-svc-toggle-kicker{font-size:.66rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-soft);line-height:1.2;}
  .afs-directory .afs-svc-toggle-label{font-size:.98rem;font-weight:600;line-height:1.3;color:var(--purple);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .afs-directory .afs-svc-toggle .afs-dd-opt-count{background:var(--purple);color:#fff;}
  .afs-directory .afs-svc-toggle .afs-dd-caret{margin-left:.1rem;color:var(--purple);opacity:1;}
  .afs-directory .afs-svc-filter.is-open .afs-svc-toggle .afs-dd-caret{transform:rotate(180deg);}

  /* the list */
  .afs-directory .afs-svc-filter .afs-service-chips{
    display:none;flex-direction:column;flex-wrap:nowrap;gap:.2rem;
    margin:.45rem 0 0;padding:.4rem;
    background:#fff;border:1px solid #ECECEC;border-radius:12px;
    box-shadow:0 12px 28px rgba(45,42,50,.12);
  }
  .afs-directory .afs-svc-filter.is-open .afs-service-chips{display:flex;animation:afs-dd-in .2s ease;}
  .afs-directory .afs-svc-filter .afs-dd-opt{
    min-height:48px;padding:.35rem .6rem;gap:.7rem;border-radius:8px;
    background:transparent;font-size:.92rem;
  }
  .afs-directory .afs-svc-filter .afs-dd-opt[data-slug=""]{padding-left:.75rem;}
  .afs-directory .afs-svc-filter .afs-dd-opt.is-selected{background:var(--purple-pale);}
  .afs-directory .afs-svc-filter .afs-dd-opt-icon{width:34px;height:34px;padding:6px;}
  .afs-directory .afs-svc-filter .afs-dd-opt-count{margin-left:auto;}
}


/* ==========================================================================
   NDIS PANEL — right-hand side of the purple band
   ========================================================================== */
.afs-directory .afs-ndis{
  margin-left:auto;flex:0 1 380px;
  display:flex;align-items:center;gap:1rem;
  padding:1rem 1.15rem;border-radius:14px;
  background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.28);
  backdrop-filter:blur(2px);
}
.afs-directory .afs-ndis-logo{
  flex:0 0 auto;display:flex;align-items:center;justify-content:center;
  width:72px;height:72px;border-radius:12px;background:#fff;padding:8px;
}
.afs-directory .afs-ndis-logo img{max-width:100%;max-height:100%;width:auto !important;height:auto !important;margin:0 !important;display:block;}
.afs-directory .afs-ndis-badge{
  flex:0 0 auto;display:flex;align-items:center;justify-content:center;
  width:64px;height:64px;border-radius:50%;
  background:#fff;color:var(--purple-deep);
  font-size:.82rem;font-weight:800;letter-spacing:.06em;
}
.afs-directory .afs-ndis-body{min-width:0;}
.afs-directory .afs-ndis-text{margin:0 0 .7rem !important;padding:0 !important;color:#fff;font-size:.9rem;line-height:1.45;}
.afs-directory .afs-ndis-actions{display:flex;align-items:center;flex-wrap:wrap;gap:.5rem 1rem;}
.afs-directory .afs-ndis-btn{
  display:inline-flex;align-items:center;padding:.5rem 1.1rem;border-radius:999px;
  background:#fff;color:var(--purple-deep) !important;text-decoration:none !important;
  font-size:.74rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;line-height:1.2;
  transition:background .2s,transform .2s;
}
.afs-directory .afs-ndis-btn:hover{background:var(--purple-pale);transform:translateY(-1px);}
.afs-directory .afs-ndis-link{
  color:#fff !important;font-size:.8rem;font-weight:600;text-decoration:none !important;
  border-bottom:1px solid rgba(255,255,255,.5);line-height:1.3;
}
.afs-directory .afs-ndis-link:hover{border-bottom-color:#fff;}
.afs-directory .afs-ndis-btn:focus-visible,
.afs-directory .afs-ndis-link:focus-visible{outline:2px solid #fff;outline-offset:3px;}

@media (max-width:860px){
  .afs-directory .afs-ndis{margin-left:0;flex:1 1 100%;}
}
@media (max-width:420px){
  .afs-directory .afs-ndis{align-items:flex-start;}
  .afs-directory .afs-ndis-badge{width:52px;height:52px;font-size:.72rem;}
  .afs-directory .afs-ndis-logo{width:60px;height:60px;}
}

/* With a logo (e.g. the wide "Registered NDIS Provider" lockup): stack the
   panel — logo on a white strip at a readable size, then text, then actions.
   The logo is shown as supplied, on white, never recoloured or cropped. */
.afs-directory .afs-ndis.has-logo{flex-direction:column;align-items:stretch;gap:.9rem;padding:1rem 1.1rem 1.15rem;}
.afs-directory .afs-ndis.has-logo .afs-ndis-logo{
  width:auto;height:auto;padding:.2rem .35rem;border-radius:10px; /* the logo file carries its own white margin */
  justify-content:flex-start;align-self:flex-start;
}
.afs-directory .afs-ndis.has-logo .afs-ndis-logo img{height:84px !important;width:auto !important;max-width:100%;max-height:none;}
.afs-directory .afs-ndis.has-logo .afs-ndis-text{margin-bottom:.8rem !important;}
@media (max-width:420px){
  .afs-directory .afs-ndis.has-logo .afs-ndis-logo img{height:72px !important;}
}

/* Logo switched off: text + actions only. */
.afs-directory .afs-ndis.no-logo{padding:1rem 1.25rem;}
