/* ============================================================
   DISABILITY SERVICES — listing page
   Scoped to .ds-page. Inherits the .disability-page tokens
   (--ink / --blue / --green / --mist / --line / --muted) that
   custom.css defines, so this file only adds layout + motion.
   ============================================================ */

.ds-page {
  --ds-radius: 18px;
  --ds-shadow: 0 18px 46px rgba(13, 27, 42, 0.09);
  --ds-shadow-hi: 0 30px 70px rgba(13, 27, 42, 0.18);
  --ds-gutter: clamp(24px, 4.5vw, 84px);
  background: #fff;
}

.ds-page .container-fluid {
  padding-left: var(--ds-gutter);
  padding-right: var(--ds-gutter);
}

/* ------------------------------------------------------------
   HERO
   The hero uses the shared .pm-hero--photo / --light-overlay / --full-height
   treatment from custom.css — same banner height, scrim, Ken Burns zoom and
   copy colours as the 20 service pages. Nothing is overridden here on purpose:
   any change should be made in custom.css so every hero moves together.
   ------------------------------------------------------------ */

/* ------------------------------------------------------------
   TOOLBAR — search + filter chips
   ------------------------------------------------------------ */
/* `--ds-toolbar-top` is kept in sync with the theme's sticky header height
   by the page script; the literal is the pre-JS fallback. */
.ds-toolbar-wrap {
  position: sticky;
  top: var(--ds-toolbar-top, 96px);
  z-index: 40;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.ds-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  padding: 18px 0;
  flex-wrap: wrap;
}

.ds-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ds-chip {
  font-family: "Poppins", sans-serif;
  font-size: 13.5px;
  font-weight: 500;
  color: #48566f;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  line-height: 1.2;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease,
    box-shadow 0.18s ease, transform 0.18s ease;
}

.ds-chip:hover {
  color: var(--ink);
  border-color: #b7d7e9;
  background: var(--mist);
}

.ds-chip[aria-pressed="true"] {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(0, 137, 196, 0.3);
}

.ds-chip .ds-chip-n {
  font-size: 11px;
  opacity: 0.65;
  margin-left: 7px;
  font-variant-numeric: tabular-nums;
}

.ds-search {
  position: relative;
  flex: 0 1 320px;
  min-width: 240px;
}

.ds-search i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #93a4bd;
  font-size: 14px;
  pointer-events: none;
}

.ds-search input {
  width: 100%;
  font-family: "Poppins", sans-serif;
  font-size: 14.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 18px 11px 42px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ds-search input::placeholder {
  color: #9aa9bf;
}

.ds-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0, 137, 196, 0.13);
}

/* ------------------------------------------------------------
   GRID
   ------------------------------------------------------------ */
.ds-grid-section {
  padding: 66px 0 96px;
  background:
    radial-gradient(1200px 520px at 82% -6%, rgba(0, 137, 196, 0.07), transparent 62%),
    linear-gradient(180deg, #fff 0%, #f7fbfe 100%);
}

.ds-result-note {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 26px;
  min-height: 21px;
}

.ds-result-note b {
  color: var(--ink);
  font-weight: 600;
}

.ds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

/* ---- card ---- */
.ds-card {
  min-width: 0;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease var(--ds-delay, 0ms),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) var(--ds-delay, 0ms);
}

.ds-page:not(.ds-reveal) .ds-card,
.ds-card.ds-in {
  opacity: 1;
  transform: none;
}

.ds-card[hidden] {
  display: none;
}

.ds-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--ds-radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--ds-shadow);
  transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.34s ease, border-color 0.34s ease;
}

.ds-card-link:hover,
.ds-card-link:focus-visible {
  transform: translateY(-8px);
  box-shadow: var(--ds-shadow-hi);
  border-color: rgba(0, 137, 196, 0.35);
  text-decoration: none;
  color: inherit;
}

.ds-card-link:focus-visible {
  outline: 3px solid rgba(0, 137, 196, 0.45);
  outline-offset: 3px;
}

/* media */
.ds-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0d1b2a;
}

/* aspect-ratio fallback */
@supports not (aspect-ratio: 16 / 10) {
  .ds-card-media {
    height: 0;
    padding-bottom: 62.5%;
  }
}

.ds-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.ds-card-link:hover .ds-card-media img {
  transform: scale(1.09);
}

.ds-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 21, 36, 0.05) 0%,
      rgba(6, 21, 36, 0.12) 48%, rgba(6, 21, 36, 0.66) 100%);
  transition: opacity 0.4s ease;
}

.ds-card-link:hover .ds-card-media::after {
  opacity: 0.82;
}

/* registration-group badge */
.ds-card-code {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: #fff;
  background: rgba(6, 21, 36, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 11px;
  border-radius: 5px;
}

.ds-card-code::before {
  content: "NDIS ";
  opacity: 0.62;
  font-weight: 600;
}

/* icon medallion straddling the image / body seam */
.ds-card-icon {
  position: absolute;
  right: 20px;
  bottom: -25px;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  font-size: 21px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 12px 26px rgba(0, 137, 196, 0.4);
  transition: transform 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ds-card-link:hover .ds-card-icon {
  transform: translateY(-4px) rotate(-6deg);
}

/* body */
.ds-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 30px 26px 26px;
}

.ds-card-title {
  display: block;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 62px 12px 0;
  transition: color 0.25s ease;
}

.ds-card-link:hover .ds-card-title {
  color: var(--blue);
}

.ds-card-blurb {
  display: block;
  font-size: 14.5px;
  line-height: 1.68;
  color: #5c6b85;
  margin: 0 0 22px;
  flex: 1 1 auto;
}

.ds-card-more {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--blue);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ds-card-more i {
  transition: transform 0.28s ease;
}

.ds-card-link:hover .ds-card-more i {
  transform: translateX(6px);
}

/* empty state */
.ds-empty {
  display: none;
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--ds-radius);
  background: #fff;
}

.ds-empty.is-on {
  display: block;
}

.ds-empty i {
  font-size: 34px;
  color: #b7c6d8;
  margin-bottom: 16px;
  display: block;
}

.ds-empty h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 21px;
  color: var(--ink);
  margin: 0 0 8px;
}

.ds-empty p {
  color: var(--muted);
  margin: 0 0 20px;
}

/* ------------------------------------------------------------
   ASSURANCE STRIP
   ------------------------------------------------------------ */
.ds-assure {
  padding: 84px 0;
  background: #fff;
  border-top: 1px solid var(--line);
}

.ds-assure-head {
  max-width: 760px;
  margin: 0 auto 52px;
  text-align: center;
}

.ds-assure-head h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.1vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 16px;
  text-wrap: balance;
}

.ds-assure-head p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.ds-assure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 26px;
}

.ds-assure-item {
  position: relative;
  padding: 32px 28px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff, #f6fbfe);
  border: 1px solid var(--line);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ds-assure-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--ds-shadow);
}

.ds-assure-item i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 19px;
  color: var(--blue);
  background: rgba(0, 137, 196, 0.1);
  margin-bottom: 18px;
}

.ds-assure-item h4 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  margin: 0 0 9px;
}

.ds-assure-item p {
  font-size: 14.5px;
  line-height: 1.68;
  color: #5c6b85;
  margin: 0;
}

/* ------------------------------------------------------------
   CLOSING CTA
   ------------------------------------------------------------ */
.ds-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 92px 0;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #06182a 0%, #063f60 55%, #0089c4 100%);
}

.ds-cta::before {
  content: "";
  position: absolute;
  inset: auto auto -55% -12%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(closest-side, rgba(0, 168, 235, 0.4), transparent 70%);
  z-index: -1;
}

.ds-cta h3 {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.3vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 auto 16px;
  max-width: 18em;
  text-wrap: balance;
}

.ds-cta p {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  max-width: 42em;
  margin: 0 auto 34px;
}

.ds-cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.ds-cta .pm-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.36);
  color: #fff;
}

.ds-cta .pm-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #fff;
  color: #fff;
}

/* ------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------ */

@media (max-width: 991px) {
  .ds-toolbar {
    gap: 16px;
  }

  .ds-search {
    flex: 1 1 100%;
    order: -1;
  }
}

@media (max-width: 767px) {
  .ds-toolbar-wrap {
    position: static;
  }

  /* Chips become a single swipeable row. Kept inside the container (no
     negative-margin bleed) so the page can never scroll horizontally; the
     mask hints that there is more to swipe. */
  .ds-filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent 100%);
  }

  .ds-filters::-webkit-scrollbar {
    display: none;
  }

  .ds-chip {
    flex: 0 0 auto;
  }

  /* minmax(0, …) rather than a bare 1fr — a bare 1fr keeps the track's
     automatic min-content minimum, which lets the card push past the
     container and scroll the whole page sideways. */
  .ds-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .ds-grid-section {
    padding: 44px 0 66px;
  }

  .ds-assure,
  .ds-cta {
    padding: 62px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ds-card,
  .ds-card-link,
  .ds-card-media img,
  .ds-card-icon,
  .ds-card-more i,
  .ds-assure-item {
    transition: none !important;
  }

  .ds-card {
    opacity: 1 !important;
    transform: none !important;
  }
}
