/* ==========================================================================
   DOBCEL — Find a School
   Static desktop build. Figma: DOBCEL-DNA3
     5805:1351 landing modal · 5805:1553 map view
     5805:1413 list view     · 5807:51   detail modal
   Header is intentionally NOT implemented.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --fs-purple:        #391b76;
  --fs-navy:          #083059;
  --fs-lavender:      #d7d6e9;
  --fs-white:         #ffffff;
  --fs-black:         #000000;

  /* School-type keys (from Figma icon strokes) */
  --fs-primary:       #E4C237;
  --fs-secondary:     #61A4D7;
  /* Specialist has no swatch in Figma — the design only drew two filters.
     Brand purple is used so it reads distinctly against the gold/blue.
     Change here only: it drives the filter ring, the badge dot and the map pin. */
  --fs-specialist:    #391b76;

  /* Surfaces */
  --fs-scrim:         rgba(0, 0, 0, 0.4);
  --fs-track:         rgba(213, 213, 214, 0.45);
  --fs-shadow-panel:  12px 12px 22px 0 rgba(0, 0, 0, 0.2);
  --fs-shadow-card:   0 0 12px 0 rgba(0, 0, 0, 0.25);

  /* Type */
  --fs-head:          "Tenor Sans", "Times New Roman", serif;
  --fs-body:          "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Desktop metrics (Figma @1920) */
  /* The Figma frame is 1080 tall INCLUDING the 111.72px header bar. That header
     is not built here, so every y-coordinate taken from Figma is offset by it. */
  --fs-header-h:      111.72px;
  --fs-panel-w:       400.89px;
  --fs-panel-h:       913.639px;
  --fs-card-w:        400.423px;
  --fs-card-h:        345.432px;
  --fs-grid-gap:      34.35px;
  --fs-grid-max:      1704.75px;

  --fs-transition:    all 0.3s ease;

  /* Expo-out: fast to start, long soft landing — reads as "settling" rather than
     "stopping", which is what makes a panel feel considered instead of abrupt. */
  --fs-ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --fs-modal-in:      0.55s;
  --fs-modal-out:     0.3s;
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
.fs-page,
.fs-page *,
.fs-page *::before,
.fs-page *::after { box-sizing: border-box; }

.fs-page {
  margin: 0;
  font-family: var(--fs-body);
  color: var(--fs-navy);
  background: var(--fs-white);
  -webkit-font-smoothing: antialiased;
}

.fs-page img { max-width: 100%; }

/* Visually hidden but available to assistive tech */
.fs-sr {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   3. Shared atoms
   -------------------------------------------------------------------------- */

/* 3.1 Pill button ---------------------------------------------------------- */
.fs-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 100px;
  font-family: var(--fs-body);
  text-decoration: none;
  cursor: pointer;
  transition: var(--fs-transition);
}
.fs-pill--lav  { background: var(--fs-lavender); color: var(--fs-purple); }
.fs-pill--solid{ background: var(--fs-purple);   color: var(--fs-white); }
/*
.fs-pill--lav:hover,
.fs-pill--lav:focus-visible   { background: var(--fs-purple);   color: var(--fs-white); }
*/
.fs-pill--solid:hover,
.fs-pill--solid:focus-visible { background: var(--fs-lavender); color: var(--fs-purple); }

.fs-pill:focus-visible { outline: 2px solid var(--fs-purple); outline-offset: 3px; }

/* 3.2 Radio control (view toggle + type filters) --------------------------- */
/* Figma draws these as 17.494px rings; the selected view has a 10px inner dot. */
.fs-radio {
  display: inline-flex;
  align-items: center;
  gap: 8.05px;              /* label left 109 − (ring left 83.45 + ring 17.494) */
  cursor: pointer;
  user-select: none;
}
.fs-radio input {
  position: absolute;
  opacity: 0;
  width: 0; height: 0;
}
.fs-radio__dot {
  position: relative;
  flex: 0 0 auto;
  width: 17.494px;
  height: 17.494px;
  border: 1px solid var(--fs-ring, var(--fs-purple));
  border-radius: 50%;
  transition: var(--fs-transition);
}
.fs-radio__dot::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--fs-ring, var(--fs-purple));
  transform: translate(-50%, -50%) scale(0);
  transition: var(--fs-transition);
}
.fs-radio input:checked + .fs-radio__dot::after { transform: translate(-50%, -50%) scale(1); }
.fs-radio input:focus-visible + .fs-radio__dot  { outline: 2px solid var(--fs-purple); outline-offset: 2px; }
.fs-radio:hover .fs-radio__dot                   { border-color: var(--fs-ring, var(--fs-purple)); }

.fs-radio--primary    { --fs-ring: var(--fs-primary); }
.fs-radio--secondary  { --fs-ring: var(--fs-secondary); }
.fs-radio--specialist { --fs-ring: var(--fs-specialist); }

/* 3.3 View toggle ---------------------------------------------------------- */
.fs-toggle { display: flex; align-items: center; gap: 31.51px; }  /* 224 − (109 + label) */

.fs-toggle__label {
  font-size: 16px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.48px;
  line-height: normal;
  color: var(--fs-navy);
  transition: var(--fs-transition);
}
.fs-radio input:checked ~ .fs-toggle__label { color: var(--fs-purple); }
.fs-radio:hover .fs-toggle__label            { color: var(--fs-purple); }

/* 3.4 School-type badge ---------------------------------------------------- */
.fs-type {
  display: inline-flex;
  align-items: center;
  gap: 5.75px;              /* label 33.71 − (dot 20.25 + 7.714) */
  font-size: 12px;
  line-height: normal;
  color: var(--fs-black);
}
.fs-type__dot {
  flex: 0 0 auto;
  width: 7.714px;
  height: 7.714px;
  border-radius: 50%;
  background: var(--fs-dot, var(--fs-primary));
}
.fs-type--primary    { --fs-dot: var(--fs-primary); }
.fs-type--secondary  { --fs-dot: var(--fs-secondary); }
.fs-type--specialist { --fs-dot: var(--fs-specialist); }

/* 3.5 Scrollbar ------------------------------------------------------------ */
.fs-scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--fs-lavender) var(--fs-track); }
.fs-scroll::-webkit-scrollbar               { width: 9.036px; }
.fs-scroll::-webkit-scrollbar-track         { background: var(--fs-track); border-radius: 10px; }
.fs-scroll::-webkit-scrollbar-thumb         { background: var(--fs-lavender); border-radius: 10px; }
.fs-scroll::-webkit-scrollbar-thumb:hover   { background: var(--fs-purple); }

/* --------------------------------------------------------------------------
   4. Stage — holds map, list and both overlays
   -------------------------------------------------------------------------- */
/* Fills the space the header leaves. At a 1080px-tall viewport this resolves to
   968.28px — exactly the Figma frame minus its header bar. */
.fs-stage {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--fs-header-h));
  min-height: 620px;
  overflow: hidden;
}
.fs-stage--list { height: auto; max-height: none; overflow: visible; }

/* --------------------------------------------------------------------------
   5. Map view                                              Figma 5805:1553
   -------------------------------------------------------------------------- */
.fs-map { position: absolute; inset: 0; }
.fs-map__canvas { width: 100%; height: 100%; background: #e8e6e1; }

/* Map pin — AdvancedMarkerElement content is real DOM, so it takes CSS.
   Figma Group 543: 24.638 × 30.113, colour keyed to school type. */
.fs-pin {
  display: block;
  line-height: 0;
  transform-origin: 50% 100%;      /* anchor is the pin tip */
  transition: transform 0.2s ease;
  cursor: pointer;
}
.fs-pin:hover { transform: scale(1.18); }
.fs-pin svg   { display: block; }

/* Google InfoWindow — Figma "Component 2" 169.965 × 52.32, 15.108px copy.
   `headerDisabled: true` on the InfoWindow removes Google's close-button row;
   these rules strip the leftover chrome padding so the bubble hugs the text. */
.fs-iw {
  font-family: var(--fs-body);
  font-size: 15.108px;
  line-height: 1.25;
  color: var(--fs-black);
  text-align: center;
  width: 169.965px;
  max-width: 100%;
  padding: 0 6px;
  cursor: pointer;
}

/* Google's own wrappers — class names are stable across the v3 releases we target,
   and every rule here degrades gracefully to Google's defaults if they change. */
.fs-page .gm-style-iw.gm-style-iw-c {
  padding: 13px 4px !important;
  max-width: 190px !important;
  border-radius: 6px;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.25);
}
.fs-page .gm-style-iw-d {
  padding: 0 !important;
  overflow: visible !important;
  max-height: none !important;
}
.fs-page .gm-style-iw-ch { padding: 0 !important; }   /* header row, now empty */
.fs-page .gm-style-iw-chr { display: none !important; }

/* 5.1 Floating panel ------------------------------------------------------- */
.fs-panel {
  position: absolute;
  left: 51px;
  top: calc(130px - var(--fs-header-h));   /* Figma y=130 within the full frame */
  width: var(--fs-panel-w);
  height: var(--fs-panel-h);
  max-height: calc(100% - 60px);
  display: flex;
  flex-direction: column;
  background: var(--fs-white);
  box-shadow: var(--fs-shadow-panel);
  z-index: 2;

  /* Hidden until the visitor chooses Map View, so the landing overlay sits on a
     clean map. JS drops [hidden] and adds .is-open a frame later. */
  opacity: 0;
  -webkit-transform: translateX(-14px);
      -ms-transform: translateX(-14px);
          transform: translateX(-14px);
  -webkit-transition: opacity 0.45s ease, -webkit-transform 0.55s var(--fs-ease-out);
       -o-transition: opacity 0.45s ease, -o-transform 0.55s var(--fs-ease-out);
          transition: opacity 0.45s ease, transform 0.55s var(--fs-ease-out);
}

/* .fs-panel is display:flex, which beats the UA stylesheet's [hidden] rule. */
.fs-panel[hidden] { display: none; }

.fs-panel.is-open {
  opacity: 1;
  -webkit-transform: none;
      -ms-transform: none;
          transform: none;
}

.fs-panel__head { flex: 0 0 auto; padding: 24.8px 29.64px 0; }

.fs-panel__title {
  margin: 0 0 21.95px;
  font-family: var(--fs-head);
  font-size: 25px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: 0.75px;
  color: var(--fs-purple);
}

.fs-panel .fs-toggle { margin: 0 0 26.07px; padding-left: 2.81px; }

/* 5.2 Search --------------------------------------------------------------- */
.fs-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 21.48px;
  padding: 0 0 8px 2.33px;
  border-bottom: 1px solid var(--fs-lavender);
}
.fs-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 0;
  font-family: var(--fs-body);
  font-size: 13px;
  line-height: normal;
  color: var(--fs-black);
  background: transparent;
}
.fs-search__input::placeholder { color: var(--fs-black); opacity: 1; }
.fs-search__input:focus        { outline: 0; }
.fs-search:focus-within        { border-bottom-color: var(--fs-purple); }

.fs-search__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px; height: 17px;
  padding: 0; border: 0;
  background: transparent;
  cursor: pointer;
  transition: var(--fs-transition);
}
.fs-search__btn:hover { transform: scale(1.12); }
.fs-search__btn:focus-visible { outline: 2px solid var(--fs-purple); outline-offset: 2px; }
.fs-search__btn svg { display: block; width: 100%; height: 100%; }

/* Locality suggestions — postcode/suburb → distance origin, resolved locally */
.fs-suggest {
  position: absolute;
  left: 0; right: 0;
  top: calc(100% + 1px);
  z-index: 10;
  max-height: 232px;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  background: var(--fs-white);
  box-shadow: 0 6px 18px 0 rgba(0, 0, 0, 0.18);
}
.fs-suggest[hidden] { display: none; }

.fs-suggest li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px;
  font-size: 13px;
  line-height: 1.3;
  color: var(--fs-navy);
  cursor: pointer;
  transition: var(--fs-transition);
}
.fs-suggest li:hover,
.fs-suggest li[aria-selected="true"] { background: var(--fs-lavender); color: var(--fs-purple); }

.fs-suggest__pc { flex: 0 0 auto; font-size: 12px; opacity: 0.7; }

/* 5.3 Filters -------------------------------------------------------------- */
.fs-filter__label {
  margin: 0 0 12.15px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.39px;
  line-height: normal;
  text-transform: uppercase;
  color: var(--fs-purple);
}
.fs-filter__opts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 30.79px;
  padding-left: 2.81px;
}
.fs-filter__opts .fs-radio { font-size: 14px; color: var(--fs-navy); }

/* 5.4 Results -------------------------------------------------------------- */
.fs-results {
  flex: 1 1 auto;
  min-height: 0;
  margin: 30.83px 0 0;
  padding: 0 15px 0 15px;
  list-style: none;
}
.fs-results__empty {
  padding: 24px 4px;
  font-size: 13px;
  line-height: 20px;
  color: var(--fs-navy);
}

/* 5.5 Result card ---------------------------------------------------------- */
.fs-result {
  position: relative;
  padding: 6.03px 0 31.4px 19.22px;
  cursor: pointer;
}
.fs-result::before {          /* active indicator — Figma 4.946 × 147.603 */
  content: "";
  position: absolute;
  left: 0; top: 6.03px;
  width: 4.946px;
  height: 147.603px;
  max-height: calc(100% - 37.43px);
  border-radius: 10px;
  background: var(--fs-purple);
  opacity: 0;
  transition: var(--fs-transition);
}
.fs-result:hover::before      { opacity: 0.35; }
.fs-result.is-active::before  { opacity: 1; }

.fs-result__suburb {
  margin: 0;
  font-family: "Poppins", sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: normal;
  text-transform: uppercase;
  color: var(--fs-black);
}
.fs-result__name {
  margin: 5.01px 0 0;
  max-width: 285.908px;
  font-size: 18px;
  font-weight: 400;
  line-height: normal;
  color: var(--fs-navy);
}
.fs-result__addr {
  margin: 7.08px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--fs-navy);
}
.fs-result__dist-label {
  margin: 13px 0 0;
  font-size: 14px;
  line-height: normal;
  color: var(--fs-purple);
}
.fs-result__dist {
  margin: -0.52px 0 0;
  font-size: 13px;
  line-height: 20px;
  color: var(--fs-black);
}
.fs-result__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 9px 0 0;
  padding-right: 3.22px;
}
.fs-result__more {
  flex: 0 0 auto;
  width: 90px; height: 24px;
  font-size: 12px;
  letter-spacing: 0.36px;
  text-transform: uppercase;
}

/* Directions icon, top-right of the card — Figma "icon pair" 53 × 22 */
/* A <button>, not a link: it frames the school on the map in place rather than
   navigating out to maps.google.com — hence the UA button reset. */
.fs-result__dir {
  position: absolute;
  top: 1.97px; right: 0;
  display: inline-flex;
  width: 22px; height: 22px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-transition: var(--fs-transition);
  -o-transition: var(--fs-transition);
  transition: var(--fs-transition);
}
.fs-result__dir:hover { transform: scale(1.1); }
.fs-result__dir:focus-visible { outline: 2px solid var(--fs-purple); outline-offset: 2px; }
.fs-result__dir svg { display: block; width: 100%; height: 100%; }

/* --------------------------------------------------------------------------
   6. List view                                             Figma 5805:1413
   -------------------------------------------------------------------------- */
.fs-list { padding: 154.7px 0 90px; background: var(--fs-white); }

.fs-list__head { text-align: center; }

.fs-list__title {
  margin: 0 0 28.39px;
  font-family: var(--fs-head);
  font-size: 46px;
  font-weight: 400;
  line-height: 34px;
  letter-spacing: 1.38px;
  color: var(--fs-purple);
}
.fs-list .fs-toggle    { justify-content: center; margin: 0 0 23.28px; }
.fs-list .fs-filter    { margin: 0 0 39.8px; }
.fs-list .fs-filter__opts { justify-content: center; }

/* 6.0 Tools row — the type filters with the postcode/suburb search beside them.
   Bottom-aligned so the box sits on the same line as the three options, to the
   right of Specialist School; it wraps beneath them when the row runs out. */
.fs-list__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 20px 30.79px;            /* column gap = the gap between the options */
  margin: 0 0 39.8px;
  padding: 0 24px;
}
.fs-list .fs-list__tools .fs-filter { margin: 0; }
.fs-list .fs-search {
  flex: 0 1 341.61px;           /* the map panel's box: 400.89 − 2 × 29.64 */
  margin: 0 0 -8.5px;           /* drops the underline below the row so the typed
                                   text lines up with the filter labels */
  text-align: left;
}

/* 6.1 Grid ----------------------------------------------------------------- */
.fs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--fs-grid-gap);
  width: 100%;
  max-width: var(--fs-grid-max);
  margin: 0 auto;
  padding: 0 24px;
  list-style: none;
}

/* 6.2 Card ----------------------------------------------------------------- */
.fs-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: var(--fs-card-h);
  padding: 18.25px 39.19px 26.83px;
  background: var(--fs-white);
  box-shadow: var(--fs-shadow-card);
  text-align: center;
  cursor: pointer;
  transition: var(--fs-transition);
}
.fs-card:hover,
.fs-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.28);
}
.fs-card:focus-visible { outline: 2px solid var(--fs-purple); outline-offset: 2px; }

.fs-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 149.518px;
  margin: 0 0 31.86px;
}
.fs-card__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

.fs-card__suburb {
  margin: 0 0 10.89px;
  font-family: "Poppins", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--fs-purple);
}
.fs-card__name {
  margin: 0 0 auto;
  font-size: 20px;
  font-weight: 400;
  line-height: 26px;
  color: var(--fs-black);
}
.fs-card .fs-type { margin: 26px 0 0; }

/* --------------------------------------------------------------------------
   7. Overlays (landing + detail)
   -------------------------------------------------------------------------- */
/* In Figma the scrim spans the whole 1920x1080 frame — it covers the header too —
   so both overlays are viewport-fixed rather than confined to the stage. */
.fs-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--fs-scrim);
  z-index: 50;
}
.fs-overlay[hidden] { display: none; }

/* 7.1 Landing modal                                        Figma 5805:1351 */
.fs-intro {
  width: 100%;
  max-width: 1023.458px;
  min-height: 431.774px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  border-radius: 32px;
  background: var(--fs-purple);
  box-shadow: var(--fs-shadow-panel);
  text-align: center;
}
.fs-intro__title {
  margin: 0 0 11px;
  font-family: var(--fs-head);
  font-size: 46px;
  font-weight: 400;
  line-height: 58px;
  color: var(--fs-white);
}
.fs-intro__sub {
  margin: 0 0 40.03px;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.665;
  letter-spacing: 0.84px;
  color: var(--fs-white);
}
.fs-intro__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 34.39px; }
.fs-intro__btn {
  width: 148.989px;
  height: 52.974px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.48px;
  text-transform: uppercase;
}

/* 7.2 Detail modal                                         Figma 5807:51 */

/* Animated open/close. `hidden` still controls presence (so it stays inert for
   assistive tech and keyboard); `.is-open` drives the motion one frame later. */
.fs-overlay--animated {
  opacity: 0;
  background: rgba(0, 0, 0, 0);
  transition:
    opacity          var(--fs-modal-out) ease,
    background-color var(--fs-modal-out) ease,
    backdrop-filter  var(--fs-modal-out) ease;
}
.fs-overlay--animated.is-open {
  opacity: 1;
  background: var(--fs-scrim);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition-duration: var(--fs-modal-in);
}

/* The panel lifts and settles rather than simply appearing. */
.fs-overlay--animated .fs-detail {
  opacity: 0;
  transform: translateY(26px) scale(0.972);
  transition:
    opacity   var(--fs-modal-out) ease,
    transform var(--fs-modal-out) ease;
  will-change: transform, opacity;
}
.fs-overlay--animated.is-open .fs-detail {
  opacity: 1;
  transform: none;
  transition:
    opacity   var(--fs-modal-in) var(--fs-ease-out),
    transform var(--fs-modal-in) var(--fs-ease-out);
}

/* Contents arrive just behind the panel — a small stagger stops everything
   landing on the same frame, which is what makes it feel flat. */
.fs-overlay--animated .fs-detail__top,
.fs-overlay--animated .fs-detail__rule,
.fs-overlay--animated .fs-detail__name,
.fs-overlay--animated .fs-detail__body {
  opacity: 0;
  transform: translateY(12px);
}
.fs-overlay--animated.is-open .fs-detail__top,
.fs-overlay--animated.is-open .fs-detail__rule,
.fs-overlay--animated.is-open .fs-detail__name,
.fs-overlay--animated.is-open .fs-detail__body {
  opacity: 1;
  transform: none;
  transition:
    opacity   0.5s ease            var(--fs-delay, 0.10s),
    transform 0.55s var(--fs-ease-out) var(--fs-delay, 0.10s);
}
.fs-overlay--animated.is-open .fs-detail__rule { --fs-delay: 0.15s; }
.fs-overlay--animated.is-open .fs-detail__name { --fs-delay: 0.19s; }
.fs-overlay--animated.is-open .fs-detail__body { --fs-delay: 0.23s; }

/* Media column eases out of its own edge. Scaling the gallery wrapper rather than
   the images keeps this working once Slick nests them inside .slick-track. */
.fs-overlay--animated .fs-detail__gallery {
  transform: scale(1.06);
  transition: transform var(--fs-modal-out) ease;
}
.fs-overlay--animated.is-open .fs-detail__gallery {
  transform: none;
  transition: transform 0.9s var(--fs-ease-out);
height: 700px;
margin-top: 90px;
}

.fs-detail {
  position: relative;
  width: 100%;
  max-width: 1813px;
  height: 896px;
  max-height: calc(100% - 24px);
  display: grid;
  grid-template-columns: minmax(0, 924.9fr) minmax(0, 888.1fr);
  background: var(--fs-white);
  box-shadow: var(--fs-shadow-panel);
  overflow: hidden;
}

.fs-detail__close {
  position: absolute;
  top: 32px; right: 58px;       /* 1813 − 1649 − 106 */
  z-index: 2;
  width: 106px; height: 37px;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.36px;
  text-transform: uppercase;
  border-radius: 18.5px;
}
.fs-detail__close svg { width: 11.345px; height: 11.345px; }

/* The X must follow the label colour, or it vanishes on hover: .fs-pill--lav:hover
   swaps the background to the same purple the Figma export hardcodes on the stroke.
   Forcing currentColor here as well as in the markup means a fresh paste from Figma
   can't reintroduce the bug — a presentation attribute always loses to author CSS. */
.fs-detail__close svg path { stroke: currentColor; }

/* Left column */
.fs-detail__main { min-width: 0; padding: 44px 48px 40px 114px; overflow-y: auto; }

.fs-detail__top { display: flex; gap: 88.63px; }   /* 386.63 − (114 + 184) */

.fs-detail__crest { flex: 0 0 auto; width: 184px; height: 184px; }
/* Collapsed when the school has no logo, so the details take the full width
   instead of sitting beside a 184px hole. */
.fs-detail__crest[hidden] { display: none; }
.fs-detail__crest img { width: 100%; height: 100%; object-fit: contain; }

.fs-detail__info { flex: 1 1 auto; min-width: 0; max-width: 488.266px; padding-top: 13px; }

.fs-detail__meta { margin: 0; font-size: 18px; line-height: 1.5; color: var(--fs-navy); }
.fs-detail__meta dt { display: inline; font-weight: 700; }
.fs-detail__meta dd { display: inline; margin: 0; }
.fs-detail__meta dd::after { content: "\A"; white-space: pre; }
.fs-detail__meta a { color: inherit; text-decoration: none; transition: var(--fs-transition); }
.fs-detail__meta a:hover { color: var(--fs-purple); text-decoration: underline; }

.fs-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24.15px;
  margin: 22.83px 0 0;
}
/* A <button>, not a link: it switches to the map view in place rather than
   navigating out to maps.google.com — hence the UA button reset. */
.fs-detail__maplink {
  display: inline-flex;
  align-items: center;
  gap: 22.71px;
  padding: 0;
  border: 0;
  background: none;
  font-family: inherit;
  font-size: 13px;
  line-height: normal;
  text-align: left;
  text-transform: uppercase;
  color: var(--fs-navy);
  text-decoration: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: var(--fs-transition);
}
.fs-detail__maplink svg { width: 22px; height: 22px; }
.fs-detail__maplink:hover { color: var(--fs-purple); }
/* A wrapper only so JS has one node to fill. `display: contents` keeps the
   buttons as direct flex children of .fs-detail__actions, so the gap and wrap
   behaviour are exactly as they were when the anchors were hard-coded. */
.fs-detail__btns { display: contents; }

.fs-detail__btn {
  width: 131px; height: 37px;
  border-radius: 18.5px;
  font-size: 12px;
  letter-spacing: 0.36px;
  text-transform: uppercase;
}

.fs-detail__rule {
  width: 352px;
  max-width: 100%;
  height: 1px;
  margin: 32.17px 0 0 -114px;
  border: 0;
  background: var(--fs-lavender);
}

.fs-detail__name {
  margin: 26.83px 0 0;
  max-width: 100%;
  font-family: var(--fs-head);
  font-size: 46px;
  font-weight: 400;
  line-height: 58px;
  color: var(--fs-purple);
}
.fs-detail__body {
  max-width: 724px;
  margin: 43px 0 0;
  font-size: 16px;
  line-height: 1.665;
  letter-spacing: 0.56px;
  color: var(--fs-black);
}
.fs-detail__body p { margin: 0 0 1.665em; }
.fs-detail__body p:last-child { margin-bottom: 0; }

/* Right column */
.fs-detail__media { position: relative; min-width: 0; background: var(--fs-purple); }

/* ---- school image gallery ------------------------------------------------
   One image: .fs-detail__slide sits directly in the gallery and simply fills it.
   Two or more: Slick wraps the slides in .slick-list > .slick-track, so every
   level in that chain needs the full height or the fade collapses to zero.
   -------------------------------------------------------------------------- */
/* Absolutely filling the media box rather than relying on height:100% — the box
   is a stretched grid item at desktop but only a min-height row below 1199px,
   and a percentage height has nothing definite to resolve against there. */
.fs-detail__gallery {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
}
.fs-detail__slide { width: 100%; height: 100%; display:flex; align-items:center; }
.fs-detail__slide img { display: block; width: 100%; height: auto;max-height:700px; object-fit: cover; }

.fs-detail__gallery .slick-list,
.fs-detail__gallery .slick-track { height: 100%; }
.fs-detail__gallery .slick-slide > div { height: 100%; }

/* Slick's fade mode stacks the slides; without this the inactive ones sit on top
   of the dots and swallow the clicks meant for them. */
.fs-detail__gallery .slick-slide:not(.slick-active) { pointer-events: none; }
.fs-detail__gallery .slick-slide.slick-active { pointer-events: auto; }

.fs-detail__gallery .slick-dots {
  position: absolute;
  right: 30.94px;
  bottom: 30px;
  z-index: 2;
  display: flex;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: auto;
}
.fs-detail__gallery .slick-dots li { width: auto; height: auto; margin: 0; }
.fs-detail__gallery .slick-dots li button {
  display: block;
  width: 9px; height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  text-indent: -9999px;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-transition: var(--fs-transition);
  -o-transition: var(--fs-transition);
  transition: var(--fs-transition);
}
.fs-detail__gallery .slick-dots li button::before { display: none; }
.fs-detail__gallery .slick-dots li.slick-active button {
  background: #fff;
  width: 22px;
  border-radius: 4.5px;
}
.fs-detail__watermark {
  position: absolute;
  height: auto;
  right: 30.94px;               /* 955.84 − 924.9 */
  bottom: 26.57px;             /* 868 − (781.44 + 64) → within 840 media box */
  width: 140.854px;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   8. Responsive
   The Figma frame is desktop-only; below 1400 the panel and grid reflow so
   nothing overlaps or clips. Type scales at the same ratios.
   -------------------------------------------------------------------------- */

/* 8.1 Large desktop — keep proportions, ease the gutters ------------------- */
@media (max-width: 1680px) {
  .fs-detail__main { padding-left: 72px; }
  .fs-detail__rule { margin-left: -72px; }
  .fs-detail__top  { gap: 56px; }
  .fs-detail__close { right: 40px; }
}

@media (max-width: 1440px) {
  .fs-list__title  { font-size: 40px; }
  .fs-detail__name { font-size: 40px; line-height: 50px; }
  .fs-detail__meta { font-size: 16px; }
  .fs-grid         { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 8.2 Detail modal stacks before the two columns get too narrow ------------ */
@media (max-width: 1199px) {
  .fs-detail {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    height: auto;
    max-height: calc(100% - 24px);
    overflow-y: auto;
  }
  .fs-detail__media { min-height: 320px; order: -1; }
  .fs-detail__main  { padding: 32px 32px 40px; overflow: visible; }
  .fs-detail__rule  { margin-left: -32px; }
  .fs-detail__close { top: 24px; right: 24px; }
  .fs-overlay--animated.is-open .fs-detail__gallery{
	height: auto;
    margin-top: 0;
    position: relative;
  }
  .fs-detail__body{max-width:100%;}
}

/* 8.3 Tablet — panel leaves the map and sits beneath it -------------------- */
@media (max-width: 991px) {
  .fs-stage {
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .fs-map { position: relative; inset: auto; height: 420px; }

  .fs-panel {
    position: relative;
    left: auto; top: auto;
    width: 100%;
    height: auto;
    max-height: none;
    box-shadow: none;
    border-bottom: 1px solid var(--fs-track);
  }
  .fs-panel__head { padding: 28px 24px 0; }
  .fs-results {
    max-height: 560px;
    margin-top: 24px;
    padding: 0 12px;
  }
  /* Overlays cover the viewport once the stage is no longer a fixed frame */
  .fs-overlay { position: fixed; }

  .fs-list        { padding: 64px 0 72px; }
  .fs-list__title { font-size: 34px; line-height: 42px; }
  .fs-grid        { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

  .fs-intro__title { font-size: 34px; line-height: 44px; }
  .fs-intro__sub   { font-size: 20px; margin-bottom: 32px; }
  .fs-intro        { min-height: 0; padding: 40px 24px; border-radius: 24px; }
}

/* 8.4 Mobile --------------------------------------------------------------- */
@media (max-width: 767px) {
  .fs-map { height: 320px; }

  .fs-panel__head { padding: 24px 18px 0; }
  .fs-panel__title { font-size: 22px; line-height: 30px; margin-bottom: 18px; }
  .fs-toggle { gap: 22px; }
  .fs-filter__opts { flex-wrap: wrap; gap: 12px 22px; }
  .fs-results { padding: 0 8px; max-height: none; }

  .fs-result { padding-bottom: 26px; }
  .fs-result__suburb { font-size: 19px; }
  .fs-result__name   { font-size: 16px; max-width: none; padding-right: 34px; }
  .fs-result__foot   { flex-wrap: wrap; }

  .fs-list        { padding: 48px 0 56px; }
  .fs-list__title { font-size: 28px; line-height: 36px; letter-spacing: 0.8px; }
  .fs-grid        { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 0 18px; }
  .fs-list__tools { padding: 0 18px; }
  .fs-list .fs-search { margin-bottom: 0; }   /* wrapped onto its own line here */
  .fs-card        { min-height: 0; padding: 20px 20px 24px; }
  .fs-card__logo  { height: 120px; margin-bottom: 20px; }
  .fs-card__name  { font-size: 17px; line-height: 23px; }
  .fs-card .fs-type { margin-top: 18px; }

  .fs-intro__title { font-size: 26px; line-height: 34px; }
  .fs-intro__sub   { font-size: 17px; letter-spacing: 0.4px; }
  .fs-intro__actions { gap: 16px; }
  .fs-intro__btn   { width: 136px; height: 46px; font-size: 14px; }

  .fs-detail__main   { padding: 24px 18px 32px; }
  .fs-detail__rule   { margin-left: -18px; }
  .fs-detail__top    { flex-direction: column; gap: 20px; }
  .fs-detail__crest  { width: 128px; height: 128px; }
  .fs-detail__info   { padding-top: 0; }
  .fs-detail__meta   { font-size: 15px; }
  .fs-detail__name   { font-size: 28px; line-height: 36px; }
  .fs-detail__body   { font-size: 15px; letter-spacing: 0.3px; }
  .fs-detail__actions{ gap: 14px; }
  .fs-detail__media  { min-height: auto;background:transparent; }
  .fs-detail__close  { top: 14px; right: 14px; width: 92px; height: 33px; }
  
  .fs-overlay--animated.is-open .fs-detail__gallery{
	  height:auto;
	  margin-top:0;
	  position:relative;
  }
  .fs-detail__watermark{
	right: 0;
    bottom: 20px;
    width: 100px;
  }
}

@media (max-width: 400px) {
  .fs-intro__actions { flex-direction: column; align-items: center; }
  .fs-result__foot   { gap: 10px; }
}

/* 8.5 Reduced motion ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .fs-page *, .fs-page *::before, .fs-page *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .fs-card:hover { transform: none; }
}
