/* ==========================================================================
   Cystography.com — Healthcare Directory
   style.css — single production stylesheet (mobile-first)
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Palette */
  --ink:        #0f2b34;   /* deep teal-ink — primary text / headers */
  --ink-soft:   #38525b;   /* secondary text */
  --muted:      #6b8189;   /* tertiary text / captions */
  --line:       #e2eaec;   /* hairline borders */
  --line-strong:#cdd9dc;
  --bg:         #ffffff;
  --bg-alt:     #f5f9fa;   /* section wash */
  --bg-tint:    #eef6f7;   /* card wash / hover */

  --brand:      #0a7d8c;   /* teal — primary brand */
  --brand-dark: #075e6a;
  --brand-tint: #d9eef0;

  --accent:     #ff6a5b;   /* warm coral — primary CTA */
  --accent-dark:#e8503f;

  --ok:         #1a9d6b;   /* open now / success */
  --ok-tint:    #dff3ea;
  --warn:       #c9791a;
  --danger:     #d23f3f;
  --star:       #f2a03d;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Radii & shadow */
  --r-sm: 8px;
  --r:    14px;
  --r-lg: 22px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(15,43,52,.06), 0 1px 3px rgba(15,43,52,.05);
  --shadow:    0 4px 16px rgba(15,43,52,.08);
  --shadow-lg: 0 14px 40px rgba(15,43,52,.14);

  /* Layout */
  --wrap: 1200px;
  --gutter: 20px;
  --header-h: 64px;
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,*::before,*::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
h1,h2,h3,h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.15; margin: 0 0 .4em; font-weight: 600; }
h1 { font-size: clamp(2rem, 6vw, 3.4rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.3rem); letter-spacing: -.015em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* ---------- Utilities ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(44px, 7vw, 84px); }
.section--alt { background: var(--bg-alt); }
.eyebrow {
  font-family: var(--font-body); font-weight: 600; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
  margin: 0 0 .6rem;
}
.lead { font-size: 1.08rem; color: var(--ink-soft); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.visually-hidden {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.skip-link {
  position:absolute; left:8px; top:-48px; background:var(--ink); color:#fff;
  padding:10px 16px; border-radius:var(--r-sm); z-index:2000; transition:top .18s;
}
.skip-link:focus { top:8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: var(--r-pill); border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; line-height: 1; text-decoration: none;
  transition: transform .12s ease, background .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn--accent:hover { background: var(--accent-dark); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-dark); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--bg-tint); border-color: var(--brand); }
.btn--block { width: 100%; }
.btn--sm { padding: .55rem .9rem; font-size: .86rem; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 1rem; justify-content: space-between;
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-display); font-weight: 600; font-size: 1.28rem;
  color: var(--ink); text-decoration: none; letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; flex: none; border-radius: 9px;
  background: linear-gradient(140deg, var(--brand), var(--brand-dark));
  display: grid; place-items: center; color: #fff;
}
.brand-mark svg { width: 17px; height: 17px; }

.nav { display: none; }
.nav ul { display: flex; align-items: center; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .5rem .7rem; border-radius: var(--r-sm);
  color: var(--ink-soft); font-weight: 500; font-size: .94rem; text-decoration: none;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--bg-tint); }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line-strong);
  background: #fff; border-radius: var(--r-sm); color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Mobile drawer */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 899;
  background: #fff; padding: 1rem var(--gutter) 2rem;
  transform: translateX(100%); transition: transform .24s ease;
  overflow-y: auto; border-top: 1px solid var(--line);
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav ul { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.mobile-nav a {
  display: block; padding: .95rem .4rem; font-size: 1.05rem; font-weight: 500;
  color: var(--ink); border-bottom: 1px solid var(--line); text-decoration: none;
}
.mobile-nav a[aria-current="page"] { color: var(--brand); }

@media (min-width: 900px) {
  .nav { display: block; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 78% -8%, var(--brand-tint) 0%, transparent 60%),
    linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  padding-block: clamp(40px, 8vw, 92px);
  border-bottom: 1px solid var(--line);
}
.hero h1 { max-width: 16ch; }
.hero .lead { font-size: 1.14rem; margin-bottom: 1.8rem; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1.2rem;
  padding: .4rem .85rem; border-radius: var(--r-pill);
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  font-size: .82rem; font-weight: 600; color: var(--ink-soft);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

/* Search box */
.searchbox {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 1rem; max-width: 720px; margin-top: 1.6rem;
}
.searchbox-row { display: flex; flex-direction: column; gap: .7rem; }
.search-field {
  position: relative; display: flex; align-items: center; flex: 1;
}
.search-field svg { position: absolute; left: 14px; width: 20px; height: 20px; color: var(--muted); pointer-events: none; }
.search-field input {
  width: 100%; padding: .95rem 1rem .95rem 44px; font-size: 1rem;
  border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--bg-alt);
  color: var(--ink); font-family: inherit;
}
.search-field input:focus { background: #fff; border-color: var(--brand); outline: none; }
.searchbox .btn { padding-block: .95rem; }
.autocomplete {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-lg); overflow: hidden; display: none;
}
.autocomplete.open { display: block; }
.autocomplete button {
  display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left;
  padding: .75rem 1rem; background: #fff; border: 0; border-bottom: 1px solid var(--line);
  color: var(--ink); font-size: .95rem;
}
.autocomplete button:last-child { border-bottom: 0; }
.autocomplete button:hover, .autocomplete button.active { background: var(--bg-tint); }
.autocomplete svg { width: 16px; height: 16px; color: var(--muted); flex: none; }

.quicklinks { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.quicklinks span { font-size: .84rem; color: var(--muted); align-self: center; margin-right: .2rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .45rem .85rem; border-radius: var(--r-pill);
  background: #fff; border: 1px solid var(--line-strong);
  color: var(--ink-soft); font-size: .84rem; font-weight: 500; text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-tint); text-decoration: none; }

@media (min-width: 720px) {
  .searchbox-row { flex-direction: row; align-items: stretch; }
  .searchbox-row .btn { flex: none; }
}

/* Hero location status */
.loc-status {
  margin-top: 1rem; font-size: .9rem; color: var(--ink-soft);
  display: none; align-items: center; gap: .5rem;
}
.loc-status.show { display: flex; }
.loc-status.error { color: var(--danger); }
.spinner {
  width: 16px; height: 16px; border: 2px solid var(--brand-tint);
  border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Category cards
   ========================================================================== */
.cat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(2, 1fr);
}
.cat-card {
  display: flex; flex-direction: column; gap: .5rem;
  padding: 1.2rem; border-radius: var(--r); background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  color: var(--ink); text-decoration: none;
  transition: transform .14s, box-shadow .18s, border-color .18s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-tint); text-decoration: none; }
.cat-ico {
  width: 44px; height: 44px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: var(--brand-tint); color: var(--brand-dark);
}
.cat-ico svg { width: 24px; height: 24px; }
.cat-card h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 0; }
.cat-card p { font-size: .84rem; color: var(--muted); margin: 0; }

@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }

.cat-group { margin-bottom: 2.2rem; }
.cat-group h3.cat-group-title {
  font-family: var(--font-body); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: .9rem;
}

/* specialty pill grid */
.pill-grid { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ==========================================================================
   Focus band (urology/diagnostics)
   ========================================================================== */
.focus-band {
  background: linear-gradient(140deg, var(--ink) 0%, var(--brand-dark) 100%);
  color: #eef6f7; border-radius: var(--r-lg); padding: clamp(1.6rem, 4vw, 3rem);
}
.focus-band h2 { color: #fff; }
.focus-band .lead { color: #cbe4e7; }
.focus-band .eyebrow { color: #7fd0d8; }
.focus-links { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.focus-links a {
  padding: .5rem 1rem; border-radius: var(--r-pill);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
  color: #fff; font-size: .88rem; font-weight: 500; text-decoration: none;
  transition: background .16s;
}
.focus-links a:hover { background: rgba(255,255,255,.2); text-decoration: none; }

/* ==========================================================================
   How it works
   ========================================================================== */
.steps { display: grid; gap: 18px; grid-template-columns: 1fr; counter-reset: step; }
.step {
  position: relative; padding: 1.4rem 1.2rem 1.2rem; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r);
}
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 1.5rem; color: var(--brand);
  font-weight: 600; display: block; margin-bottom: .4rem;
}
.step h3 { font-family: var(--font-body); font-size: 1.02rem; margin-bottom: .3rem; }
.step p { font-size: .9rem; color: var(--ink-soft); margin: 0; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3,1fr); } }
@media (min-width: 1000px) { .steps { grid-template-columns: repeat(5,1fr); } }

/* feature list */
.features { display: grid; gap: 16px; grid-template-columns: 1fr; }
.feature { display: flex; gap: .9rem; align-items: flex-start; }
.feature .f-ico {
  width: 40px; height: 40px; flex: none; border-radius: 11px;
  background: var(--brand-tint); color: var(--brand-dark); display: grid; place-items: center;
}
.feature .f-ico svg { width: 21px; height: 21px; }
.feature h3 { font-family: var(--font-body); font-size: 1rem; margin-bottom: .2rem; }
.feature p { font-size: .9rem; color: var(--ink-soft); margin: 0; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3,1fr); } }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { max-width: 820px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; text-align: left; background: none; border: 0;
  padding: 1.15rem 2.5rem 1.15rem 0; position: relative;
  font-size: 1.05rem; font-weight: 600; color: var(--ink); font-family: var(--font-body);
}
.faq-q::after {
  content: ""; position: absolute; right: .4rem; top: 50%;
  width: 12px; height: 12px; margin-top: -6px;
  border-right: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(45deg); transition: transform .2s;
}
.faq-q[aria-expanded="true"]::after { transform: rotate(-135deg); }
.faq-a { display: none; padding: 0 0 1.2rem; color: var(--ink-soft); font-size: .96rem; }
.faq-a.open { display: block; }
.faq-a p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Ad slots
   ========================================================================== */
/* Ad slots collapse to nothing until a real ad fills them, so users and
   reviewers never see an empty "Advertisement" box. `is-filled` is added by
   app.js only once AdSense reports the unit as filled. The slot keeps its full
   block width even while collapsed so AdSense can measure availableWidth. */
.ad-slot { display: block; width: 100%; margin: 0; padding: 0; min-height: 0; max-height: 0; border: 0; overflow: hidden; }
.ad-slot .adsbygoogle { display: block; width: 100%; }
.ad-slot.is-filled {
  max-height: none; margin-block: 28px; padding: 12px; border: 1px dashed var(--line-strong);
  border-radius: var(--r); background: var(--bg-alt);
}
.muted { color: var(--muted); }

/* ==========================================================================
   Results page layout
   ========================================================================== */
.results-head {
  padding-block: 1.4rem; border-bottom: 1px solid var(--line); background: var(--bg-alt);
}
.results-head h1 { font-size: clamp(1.4rem, 4vw, 2rem); margin-bottom: .3rem; }
.results-head .sub { color: var(--ink-soft); font-size: .95rem; margin: 0; }

.results-toolbar {
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center;
  padding-block: .9rem; border-bottom: 1px solid var(--line);
  position: sticky; top: var(--header-h); background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px); z-index: 40;
}
.results-toolbar .count { font-size: .9rem; color: var(--ink-soft); margin-right: auto; }
.select {
  padding: .55rem .8rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: #fff; font-family: inherit; font-size: .88rem; color: var(--ink);
}

.results-layout { display: grid; grid-template-columns: 1fr; gap: 0; }
.results-list { padding-block: 1.2rem; }
.results-map-col { display: none; }

@media (min-width: 1000px) {
  .results-layout { grid-template-columns: 1fr 46%; gap: 24px; }
  .results-map-col {
    display: block; position: sticky; top: calc(var(--header-h) + 56px);
    height: calc(100vh - var(--header-h) - 76px); padding-top: 1.2rem;
  }
  #map { height: 100%; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
}

#map { height: 320px; width: 100%; background: var(--bg-tint); }
.leaflet-popup-content { font-family: var(--font-body); }
.map-popup strong { display: block; color: var(--ink); margin-bottom: 2px; }
.map-popup span { color: var(--muted); font-size: .82rem; }
.map-popup .map-popup-links { display: block; margin-top: 6px; font-size: .82rem; }
.map-popup .map-popup-links a { color: var(--brand); font-weight: 600; text-decoration: none; }
.map-popup .map-popup-links a:hover { text-decoration: underline; }

/* Provider cards */
.provider-list { display: grid; gap: 14px; }
.provider-card {
  display: block; padding: 1.1rem 1.2rem; border: 1px solid var(--line);
  border-radius: var(--r); background: #fff; box-shadow: var(--shadow-sm);
  transition: border-color .16s, box-shadow .16s; text-decoration: none; color: inherit;
}
.provider-card:hover, .provider-card.active { border-color: var(--brand); box-shadow: var(--shadow); text-decoration: none; }
.pc-top { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.pc-name { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin: 0 0 .2rem; color: var(--ink); }
.pc-cat { font-size: .82rem; color: var(--brand-dark); font-weight: 600; }
.pc-dist { font-size: .82rem; color: var(--muted); white-space: nowrap; flex: none; }
.pc-addr { font-size: .9rem; color: var(--ink-soft); margin: .5rem 0; display: flex; gap: .4rem; align-items: flex-start; }
.pc-addr svg { width: 15px; height: 15px; color: var(--muted); flex: none; margin-top: 3px; }
.pc-meta { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; margin: .5rem 0 .8rem; font-size: .85rem; }
.badge {
  display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .6rem;
  border-radius: var(--r-pill); font-size: .78rem; font-weight: 600;
}
.badge--open { background: var(--ok-tint); color: var(--ok); }
.badge--closed { background: #fbe6e6; color: var(--danger); }
.rating { display: inline-flex; align-items: center; gap: .25rem; color: var(--ink-soft); font-weight: 600; }
.rating svg { width: 15px; height: 15px; color: var(--star); }
.rating span { color: var(--muted); font-weight: 400; }
.pc-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* Skeleton */
.skeleton-card { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.sk { background: linear-gradient(90deg, var(--bg-tint) 25%, var(--bg-alt) 37%, var(--bg-tint) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 6px; }
.sk-line { height: 12px; margin-bottom: 10px; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; } .sk-line.w80 { width: 80%; }
.sk-title { height: 20px; width: 55%; margin-bottom: 14px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Empty / error states */
.state-msg { text-align: center; padding: 3rem 1rem; color: var(--ink-soft); }
.state-msg svg { width: 46px; height: 46px; color: var(--line-strong); margin-bottom: 1rem; }
.state-msg h3 { margin-bottom: .4rem; }

/* Mobile map toggle */
.map-fab {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 60; box-shadow: var(--shadow-lg);
}
@media (min-width: 1000px) { .map-fab { display: none; } }
.map-modal {
  position: fixed; inset: 0; z-index: 1000; background: #fff;
  display: none; flex-direction: column;
}
.map-modal.open { display: flex; }
.map-modal-head { display: flex; justify-content: space-between; align-items: center; padding: .9rem var(--gutter); border-bottom: 1px solid var(--line); }
.map-modal #map-mobile { flex: 1; }

/* ==========================================================================
   Filters (bottom sheet on mobile, sidebar on desktop)
   ========================================================================== */
.filter-fab {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  background: #fff; font-weight: 600; font-size: .86rem; color: var(--ink);
}
.filter-fab svg { width: 16px; height: 16px; }
.filter-sheet {
  position: fixed; inset: 0; z-index: 1000; display: none;
}
.filter-sheet.open { display: block; }
.filter-sheet .backdrop { position: absolute; inset: 0; background: rgba(15,43,52,.4); }
.filter-panel {
  position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
  border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 1.2rem var(--gutter) 1.6rem;
  max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg);
}
.filter-panel h3 { margin-bottom: 1rem; }
.filter-group { margin-bottom: 1.3rem; }
.filter-group > label.grp-label { display: block; font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .6rem; }
.check-row { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; font-size: .95rem; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.filter-actions { display: flex; gap: .6rem; margin-top: .5rem; }
.filter-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); }

@media (min-width: 1000px) {
  .filter-fab { display: none; }
}

/* ==========================================================================
   Provider detail page
   ========================================================================== */
.detail-hero { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding-block: 1.8rem; }
.breadcrumb { font-size: .84rem; color: var(--muted); margin-bottom: .8rem; }
.breadcrumb a { color: var(--brand-dark); }
.breadcrumb span { margin: 0 .35rem; }
.detail-grid { display: grid; grid-template-columns: 1fr; gap: 26px; padding-block: 2rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0; }
.info-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.info-table th, .info-table td { text-align: left; padding: .75rem 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .95rem; }
.info-table th { width: 40%; color: var(--muted); font-weight: 600; }
.hours-list { list-style: none; margin: 0; padding: 0; }
.hours-list li { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.hours-list li.today { font-weight: 700; color: var(--brand-dark); }
.detail-map { height: 300px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.report-link { display: inline-flex; align-items: center; gap: .4rem; font-size: .86rem; color: var(--muted); margin-top: 1rem; }
@media (min-width: 900px) { .detail-grid { grid-template-columns: 1.6fr 1fr; } }

/* ==========================================================================
   Content pages (about/contact/legal)
   ========================================================================== */
.prose { max-width: 760px; }
.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.4rem; }
.prose ul { padding-left: 1.2rem; color: var(--ink-soft); }
.prose li { margin-bottom: .4rem; }
.note {
  padding: 1rem 1.2rem; border-left: 4px solid var(--brand); background: var(--bg-tint);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .95rem; margin: 1.2rem 0;
}
.contact-form { display: grid; gap: 1rem; max-width: 560px; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .35rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: .8rem .9rem; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); font-family: inherit; font-size: 1rem; background: var(--bg-alt);
}
.field input:focus, .field textarea:focus { background: #fff; border-color: var(--brand); outline: none; }
.form-status { font-size: .92rem; padding: .7rem 0; }
.form-status.ok { color: var(--ok); }

/* 404 */
.notfound { text-align: center; padding-block: clamp(3rem, 12vw, 7rem); }
.notfound .big { font-family: var(--font-display); font-size: clamp(4rem, 18vw, 9rem); color: var(--brand-tint); line-height: .9; margin-bottom: .4rem; }
.notfound-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1.6rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--ink); color: #b9cdd2; padding-block: 3rem 1.5rem; margin-top: 0; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; }
.footer-grid .brand { color: #fff; }
.footer-brand p { font-size: .9rem; color: #90aab0; max-width: 32ch; margin-top: .8rem; }
.footer-col h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .55rem; }
.footer-col a { color: #b9cdd2; font-size: .92rem; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.2rem; padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; font-size: .82rem; color: #7f9aa0; }
.footer-disclaimer { font-size: .78rem; color: #7f9aa0; max-width: 70ch; margin-top: .8rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* section header helper */
.sec-head { margin-bottom: 1.8rem; }
.sec-head.center { text-align: center; }

/* ==========================================================================
   Corrections: clustering, small-screen hardening, local pages
   ========================================================================== */

/* Marker cluster bubbles — themed to match the brand. */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large { background: rgba(10,125,140,.25); }
.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: var(--brand); color: #fff; font-family: var(--font-body);
  font-weight: 700; font-size: .8rem;
}
.marker-cluster span { line-height: 30px; }

/* Local area page results spacing */
.local-results { margin-top: 1.4rem; }

/* Guard against any accidental horizontal overflow on narrow phones. */
html, body { max-width: 100%; }
*, *::before, *::after { min-width: 0; }
.wrap { width: 100%; }
img, svg, table, pre { max-width: 100%; }
.info-table { table-layout: fixed; }
.info-table td { word-break: break-word; }

/* Keep the floating map button clear of iOS home indicator. */
.map-fab { bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }

/* Very small screens (down to 320px). */
@media (max-width: 360px) {
  :root { --gutter: 14px; }
  .pc-actions .btn { flex: 1 1 auto; text-align: center; }
  .pc-top { gap: .5rem; }
  .pc-name { font-size: 1.05rem; }
  .results-toolbar { gap: .4rem; }
  .results-toolbar .select { font-size: .82rem; padding: .5rem .6rem; }
  .filter-actions { flex-direction: column; }
}

/* Tablet: show a comfortable two-column card grid before the desktop split. */
@media (min-width: 680px) and (max-width: 999px) {
  .results-list .provider-list { grid-template-columns: 1fr 1fr; }
  .results-list .provider-list .ad-slot { grid-column: 1 / -1; }
}

/* Honour reduced-data / reduced-motion for the shimmer. */
@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; }
}

/* ==========================================================================
   Backend integration: attribution + load-more
   ========================================================================== */
.attribution-note {
  font-size: .78rem; color: var(--muted); margin: 0 0 1rem;
  padding: .5rem .7rem; background: var(--bg-tint); border-radius: var(--r-sm);
}
.load-more-wrap { display: flex; justify-content: center; padding: 1.4rem 0 .4rem; }
.load-more-wrap .btn[disabled] { opacity: .6; cursor: default; }


/* ==========================================================================
   Cookie consent banner
   ========================================================================== */
.cookie-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  background: var(--ink, #0f2b34); color: #fff;
  box-shadow: 0 -4px 20px rgba(0,0,0,.25);
  padding: env(safe-area-inset-bottom, 0) 0 0;
  animation: cc-slide-up .3s ease-out;
}
@keyframes cc-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.cookie-consent__inner {
  max-width: 1100px; margin: 0 auto; padding: 1rem 1.2rem;
  display: flex; gap: 1rem; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
}
.cookie-consent__text { margin: 0; font-size: .9rem; line-height: 1.5; flex: 1 1 320px; }
.cookie-consent__text a { color: #7fd3dd; text-decoration: underline; }
.cookie-consent__actions { display: flex; gap: .6rem; flex-shrink: 0; }
.cookie-consent .btn--sm { padding: .5rem 1.1rem; font-size: .85rem; }
@media (max-width: 560px) {
  .cookie-consent__inner { flex-direction: column; align-items: stretch; }
  .cookie-consent__actions { justify-content: flex-end; }
}

/* Callout box — used for crisis/safety notices on mental-health pages */
.prose .callout {
  background: #fff4f4;
  border: 1px solid #f2c7c7;
  border-left: 4px solid #d64545;
  border-radius: 8px;
  padding: 1rem 1.15rem;
  margin: 1.5rem 0;
  color: #611a1a;
}
.prose .callout strong { color: #a01f1f; }
