/* =========================================================================
   Palliser Piano Directories — Shared Stylesheet
   ManitobaPiano.com + AlbertaPiano.com
   Mockup v1 — 2026-06-25
   ========================================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; }

/* ---------- Tokens (shared) ---------- */
:root {
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Source Serif 4', 'Source Serif Pro', Georgia, serif;

  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  --radius-sm: 6px;  --radius: 10px;  --radius-lg: 16px;  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12), 0 4px 8px rgba(15, 23, 42, 0.06);

  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text: #0F172A;
  --text-muted: #475569;
  --text-faint: #94A3B8;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #DC2626;
}

/* ---------- Theme: Manitoba (default — prairie sky) ---------- */
body.theme-mb {
  --primary: #1E5FBF;        /* saturated prairie-sky blue */
  --primary-dark: #173E80;
  --primary-light: #DBEAFE;
  --primary-soft: #EFF6FF;
  --accent: #F59E0B;         /* warm wheat-gold accent */
  --accent-dark: #B45309;
  --link: var(--primary);    /* MB blue passes AA at body size */
  --hero-gradient: linear-gradient(135deg, rgba(23, 62, 128, 0.20) 0%, rgba(30, 95, 191, 0.10) 100%);
  --province-name: "Manitoba";
  --province-tagline: "Prairie skies, warm classrooms.";
}

/* ---------- Theme: Alberta (foothills + sky) ---------- */
body.theme-ab {
  --primary: #C2570B;        /* saturated foothills-amber */
  --primary-dark: #8B3D08;
  --primary-light: #FED7AA;
  --primary-soft: #FFF7ED;
  --accent: #2563EB;         /* brighter sky-blue accent (was #1E40AF — too dim against amber) */
  --accent-dark: #1E40AF;
  --link: var(--primary-dark); /* AB amber #C2570B fails AA at body size; use darker shade for text-links */
  --hero-gradient: linear-gradient(135deg, rgba(139, 61, 8, 0.20) 0%, rgba(194, 87, 11, 0.10) 100%);
  --province-name: "Alberta";
  --province-tagline: "Foothills to flatlands, every keyboard.";
}

/* ---------- Base ---------- */
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; color: var(--text); }
h1 { font-size: 2rem; }
h2 { font-size: 1.625rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.0625rem; }

@media (min-width: 768px) {
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-4); }
@media (min-width: 768px) { .container { padding: 0 var(--sp-6); } }

/* ---------- Theme toggle (top-right floating) ---------- */
.theme-toggle {
  position: fixed; top: var(--sp-4); right: var(--sp-4); z-index: 1000;
  display: flex; gap: var(--sp-1); padding: var(--sp-1);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-pill); box-shadow: var(--shadow);
}
.theme-toggle button {
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-pill);
  font-size: 0.8125rem; font-weight: 600; color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.theme-toggle button.active { background: var(--primary); color: white; }
.theme-toggle button:not(.active):hover { color: var(--text); background: var(--bg); }

/* ---------- Header / Navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--card); border-bottom: 1px solid var(--border);
}
.site-header__inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-4); padding: var(--sp-3) 0;
}
.brand { display: flex; align-items: center; gap: var(--sp-3); }
.brand__icon {
  width: 40px; height: 40px; border-radius: var(--radius);
  background: var(--primary); color: white;
  display: grid; place-items: center; font-size: 1.25rem; font-weight: 700;
}
.brand__name { font-family: var(--font-heading); font-weight: 700; font-size: 1.125rem; color: var(--text); }
.brand__name::after { content: var(--province-name); }
.brand__sub { font-size: 0.75rem; color: var(--text-muted); display: block; margin-top: -2px; }

/* Search bar in header (sticky on inner pages) */
.header-search {
  display: none; flex: 1; max-width: 520px;
  align-items: center; gap: var(--sp-2);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: var(--sp-1) var(--sp-2);
}
@media (min-width: 1024px) { .header-search { display: flex; } }
.header-search input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: none;
  padding: var(--sp-2) var(--sp-3); font-size: 0.9375rem; color: var(--text);
}
.header-search button {
  padding: var(--sp-2) var(--sp-4); background: var(--primary); color: white;
  border-radius: var(--radius-pill); font-weight: 600; font-size: 0.875rem;
  transition: background 0.15s;
}
.header-search button:hover { background: var(--primary-dark); }

/* Mobile header-search toggle (icon button shown below 1024px) */
.header-search-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg); color: var(--text); font-size: 1.0625rem;
  margin-left: auto;
}
.header-search-toggle:hover { background: var(--primary-soft); }
@media (min-width: 1024px) { .header-search-toggle { display: none; } }

/* When toggled open on mobile, header-search becomes a slide-down panel */
@media (max-width: 1023px) {
  .header-search.is-open-mobile {
    display: flex; flex-wrap: wrap;
    position: absolute; top: 100%; left: 0; right: 0;
    margin: 0; padding: var(--sp-3) var(--sp-4);
    background: var(--card); border: 0; border-bottom: 1px solid var(--border);
    border-radius: 0; box-shadow: var(--shadow);
    z-index: 99;
  }
  .header-search.is-open-mobile input { flex: 1 1 100%; padding: var(--sp-3); background: var(--bg); border-radius: var(--radius); margin-bottom: var(--sp-2); }
  .header-search.is-open-mobile button { flex: 1 1 100%; padding: var(--sp-3); }
}

.nav-links { display: none; align-items: center; gap: var(--sp-5); }
@media (min-width: 768px) { .nav-links { display: flex; } }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 0.9375rem; transition: color 0.15s; }
.nav-links a:hover { color: var(--link); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5); border-radius: var(--radius);
  font-weight: 600; font-size: 0.9375rem; transition: all 0.15s;
  border: 2px solid transparent;
}
.btn--primary { background: var(--primary); color: white; }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn--outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn--ghost { background: transparent; color: var(--primary); padding: var(--sp-2) var(--sp-3); }
.btn--ghost:hover { background: var(--primary-soft); }
.btn--accent { background: var(--accent); color: white; }
.btn--accent:hover { background: var(--accent-dark); }
.btn--sm { padding: var(--sp-2) var(--sp-3); font-size: 0.8125rem; }
.btn--lg { padding: var(--sp-4) var(--sp-6); font-size: 1.0625rem; }
.btn--full { width: 100%; }

/* ---------- Badges & Pills ---------- */
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 4px var(--sp-2); border-radius: var(--radius-pill);
  font-size: 0.75rem; font-weight: 600;
  white-space: nowrap; flex-shrink: 0;
}
.badge--verified { background: #DCFCE7; color: #166534; }
.badge--partner { background: var(--primary-soft); color: var(--primary-dark); }
.badge--neutral { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
.badge--accent { background: #FEF3C7; color: #92400E; }

.pill {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-pill);
  font-size: 0.8125rem; font-weight: 500;
  background: var(--bg); color: var(--text-muted);
  border: 1px solid var(--border);
}

/* ---------- Stars ---------- */
.stars { display: inline-flex; gap: 2px; color: var(--accent); font-size: 0.9375rem; }
.stars--lg { font-size: 1.125rem; }
.rating-text { color: var(--text-muted); font-size: 0.875rem; margin-left: var(--sp-2); }

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-strong); }

/* ---------- HERO (home page) ---------- */
.hero {
  position: relative; min-height: 560px;
  display: flex; align-items: center;
  background-image: var(--hero-gradient), url('images/hero-piano.jpg');
  background-size: cover; background-position: center bottom;
  color: white; padding: var(--sp-8) 0;
}
.hero__inner { text-align: center; max-width: 760px; margin: 0 auto; }
.hero__eyebrow {
  display: inline-block; padding: var(--sp-1) var(--sp-3);
  background: rgba(255, 255, 255, 0.18); border-radius: var(--radius-pill);
  font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: var(--sp-4);
}
.hero h1 { color: white; font-size: 2.25rem; line-height: 1.15; margin-bottom: var(--sp-4); }
@media (min-width: 768px) { .hero h1 { font-size: 3.25rem; } }
.hero__sub { font-size: 1.0625rem; opacity: 0.92; margin-bottom: var(--sp-6); max-width: 580px; margin-left: auto; margin-right: auto; }
@media (min-width: 768px) { .hero__sub { font-size: 1.1875rem; } }

/* Hero overlay search */
.hero-search {
  background: white; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--sp-3);
  display: grid; grid-template-columns: 1fr; gap: var(--sp-2);
  max-width: 720px; margin: 0 auto;
}
@media (min-width: 768px) {
  .hero-search { grid-template-columns: 1.6fr 1.1fr 1.1fr auto; padding: var(--sp-2); }
}
.hero-search__field { display: flex; flex-direction: column; padding: var(--sp-2) var(--sp-3); text-align: left; }
.hero-search__label { font-size: 0.6875rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.hero-search__field input, .hero-search__field select {
  border: 0; outline: none; padding: var(--sp-1) 0; font-size: 0.9375rem; color: var(--text); background: transparent;
}
.hero-search button {
  background: var(--primary); color: white; padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius); font-weight: 600; font-size: 0.9375rem;
  transition: background 0.15s;
}
.hero-search button:hover { background: var(--primary-dark); }

/* ---------- Section wrappers ---------- */
.section { padding: var(--sp-8) 0; }
@media (min-width: 768px) { .section { padding: var(--sp-9) 0; } }
.section--alt { background: var(--card); }
.section__head { text-align: center; margin-bottom: var(--sp-7); }
.section__head h2 { margin-bottom: var(--sp-3); }
.section__head p { color: var(--text-muted); font-size: 1.0625rem; max-width: 580px; margin: 0 auto; }

/* ---------- Stat strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); text-align: center; max-width: 720px; margin: var(--sp-7) auto 0; }
.stat-strip__num { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: var(--primary); display: block; }
.stat-strip__label { color: var(--text-muted); font-size: 0.875rem; }

/* ---------- City tiles (browse-by-city) ---------- */
.city-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 600px) { .city-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .city-grid { grid-template-columns: repeat(3, 1fr); } }

.city-tile {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-lg);
  overflow: hidden; cursor: pointer; isolation: isolate;
}
.city-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s, filter 0.3s; }
.city-tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(15, 23, 42, 0.85) 100%);
  transition: background 0.3s;
}
.city-tile__label {
  position: absolute; left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-4); z-index: 2; color: white;
}
.city-tile__name { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; }
.city-tile__count { font-size: 0.875rem; opacity: 0.85; }
.city-tile__cta {
  position: absolute; left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-4); z-index: 3;
  background: var(--primary); color: white; padding: var(--sp-3); border-radius: var(--radius);
  text-align: center; font-weight: 600; font-size: 0.9375rem;
  transform: translateY(150%); transition: transform 0.3s;
}
.city-tile:hover img { transform: scale(1.05); }
.city-tile:hover::after { background: linear-gradient(180deg, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.9) 100%); }
.city-tile:hover .city-tile__label { opacity: 0; }
.city-tile:hover .city-tile__cta { transform: translateY(0); }

/* ---------- Teacher card (featured + search-result list view) ---------- */
.teacher-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
@media (min-width: 600px) { .teacher-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .teacher-grid { grid-template-columns: repeat(3, 1fr); } }

.teacher-card { padding: var(--sp-5); }
.teacher-card__top { display: flex; gap: var(--sp-4); margin-bottom: var(--sp-4); align-items: flex-start; }
.teacher-card__avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid var(--primary-soft); }
.teacher-card__avatar img { width: 100%; height: 100%; object-fit: cover; }
.teacher-card__name { font-weight: 700; font-size: 1.0625rem; color: var(--text); margin-bottom: 2px; }
.teacher-card__city { color: var(--text-muted); font-size: 0.875rem; }
.teacher-card__rating { display: flex; align-items: center; margin-top: var(--sp-2); }
.teacher-card__bio { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.5; margin-bottom: var(--sp-3); }
.teacher-card__tags { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.teacher-card__cta { display: flex; gap: var(--sp-2); }
.teacher-card__cta .btn { flex: 1; }

/* ---------- Search-result row (horizontal list view) ---------- */
.result-row {
  display: grid; grid-template-columns: 1fr; gap: var(--sp-4);
  padding: var(--sp-5); background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); margin-bottom: var(--sp-4); transition: border-color 0.2s, box-shadow 0.2s;
}
@media (min-width: 768px) { .result-row { grid-template-columns: 1fr auto; } }
.result-row:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.result-row__main { display: flex; gap: var(--sp-4); align-items: flex-start; }
.result-row__avatar { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; flex-shrink: 0; border: 2px solid var(--primary-soft); }
.result-row__avatar img { width: 100%; height: 100%; object-fit: cover; }
.result-row__content { flex: 1; min-width: 0; }
.result-row__name {
  display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap;
  font-size: 1.125rem; font-weight: 700; color: var(--text); margin-bottom: var(--sp-1);
}
.result-row__name a { color: var(--link); }
.result-row__meta { display: flex; align-items: center; gap: var(--sp-3); color: var(--text-muted); font-size: 0.875rem; margin-bottom: var(--sp-2); flex-wrap: wrap; }
.result-row__bio { color: var(--text-muted); font-size: 0.9375rem; line-height: 1.55; margin: var(--sp-2) 0 var(--sp-3); }
.result-row__tags { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.result-row__cta { display: flex; flex-direction: row; gap: var(--sp-2); align-items: flex-start; }
@media (min-width: 768px) {
  .result-row__cta { flex-direction: column; min-width: 160px; }
  .result-row__cta .btn { width: 100%; }
}

/* Mobile: break bio + tags out of the avatar column so they use full row width */
@media (max-width: 767px) {
  .result-row { padding: var(--sp-4); }
  .result-row__main {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--sp-3);
    row-gap: var(--sp-2);
    align-items: start;
  }
  .result-row__avatar {
    width: 56px; height: 56px;
    grid-column: 1; grid-row: 1 / span 2;
    align-self: start;
  }
  .result-row__content { display: contents; }
  .result-row__name { grid-column: 2; grid-row: 1; margin-bottom: 0; }
  .result-row__meta { grid-column: 2; grid-row: 2; margin-bottom: 0; }
  .result-row__bio { grid-column: 1 / -1; grid-row: 3; margin: var(--sp-3) 0 0; }
  .result-row__tags { grid-column: 1 / -1; grid-row: 4; }
  .result-row__cta { width: 100%; }
  .result-row__cta .btn { flex: 1; }
}

/* ---------- Filter sidebar (search page) ---------- */
.search-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); padding-top: var(--sp-6); padding-bottom: var(--sp-8); }
@media (min-width: 900px) { .search-layout { grid-template-columns: 280px 1fr; gap: var(--sp-6); } }

/* Mobile filter drawer */
.filter-sidebar__header { display: none; }
.mobile-filter-toggle { display: none; }
@media (max-width: 899px) {
  .mobile-filter-toggle {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-4);
    background: var(--card); border: 1px solid var(--border-strong);
    border-radius: var(--radius-pill); color: var(--text); font-weight: 600;
    box-shadow: var(--shadow-sm); cursor: pointer;
  }
  .mobile-filter-toggle__badge {
    background: var(--primary); color: white;
    padding: 2px var(--sp-2); border-radius: var(--radius-pill);
    font-size: 0.75rem; font-weight: 700;
  }
  .filter-sidebar {
    position: fixed; inset: 0; z-index: 200;
    background: var(--bg);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    padding: 0 var(--sp-4) var(--sp-5);
    transform: translateY(100%);
    transition: transform 0.25s ease;
  }
  .filter-sidebar.is-open { transform: translateY(0); }
  .filter-sidebar__header {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1;
    margin: 0 calc(-1 * var(--sp-4)) var(--sp-3);
    padding: var(--sp-4); background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .filter-sidebar__title { font-weight: 700; font-size: 1.0625rem; }
  .filter-sidebar__close {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--card); border: 1px solid var(--border);
    font-size: 1rem; color: var(--text); cursor: pointer;
  }
  body.drawer-open { overflow: hidden; }
}
.filter-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--sp-5); margin-bottom: var(--sp-4); }
.filter-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: var(--sp-3); font-family: var(--font-body); }
.filter-group { margin-bottom: var(--sp-4); }
.filter-group label { display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--sp-2); }
.filter-group select, .filter-group input {
  width: 100%; padding: var(--sp-2) var(--sp-3); background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.9375rem; color: var(--text); outline: none; transition: border-color 0.15s;
}
.filter-group select:focus, .filter-group input:focus { border-color: var(--primary); }
.filter-checks { display: flex; flex-direction: column; gap: var(--sp-2); }
.filter-checks label { display: flex; align-items: center; gap: var(--sp-2); font-size: 0.9375rem; color: var(--text); text-transform: none; letter-spacing: normal; cursor: pointer; font-weight: 400; margin: 0; }
.filter-checks input { width: auto; padding: 0; }

.result-header {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.result-header__count { color: var(--text-muted); font-size: 0.9375rem; }
.result-header__count strong { color: var(--text); }

/* ---------- Listing detail ---------- */
.breadcrumbs { font-size: 0.875rem; color: var(--text-muted); padding: var(--sp-4) 0; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs__sep { margin: 0 var(--sp-2); color: var(--text-faint); }

.listing-layout { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); padding-bottom: var(--sp-8); }
@media (min-width: 1024px) { .listing-layout { grid-template-columns: 1fr 340px; } }

.listing-hero {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-6); margin-bottom: var(--sp-5);
}
.listing-hero__top { display: flex; gap: var(--sp-5); align-items: flex-start; flex-wrap: wrap; }
.listing-hero__avatar {
  width: 120px; height: 120px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  border: 4px solid var(--primary-soft); box-shadow: var(--shadow);
}
.listing-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.listing-hero__info { flex: 1; min-width: 240px; }
.listing-hero__name { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; margin-bottom: var(--sp-1); }
.listing-hero__headline { color: var(--link); font-weight: 600; font-size: 1rem; margin-bottom: var(--sp-2); }
.listing-hero__location { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: var(--sp-3); }
.listing-hero__badges { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.listing-hero__rating { display: flex; align-items: center; margin-bottom: var(--sp-3); }
.listing-hero__quick-facts {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3);
  align-items: center; margin-bottom: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--primary-soft); border-radius: var(--radius);
  color: var(--text); font-size: 0.9375rem;
}
.listing-hero__quick-facts strong { color: var(--text); font-weight: 700; }
.quick-fact-sep { color: var(--text-faint); }
.listing-hero__cta { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

.tabs {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: var(--sp-5);
}
.tabs__nav {
  display: flex; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--bg);
}
.tabs__nav button {
  flex: 0 0 auto; padding: var(--sp-4) var(--sp-5); color: var(--text-muted);
  font-weight: 600; font-size: 0.9375rem; border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.tabs__nav button:hover { color: var(--text); background: var(--card); }
.tabs__nav button.active { color: var(--link); border-bottom-color: var(--primary); background: var(--card); }
.tabs__nav .tab-count { color: var(--text-faint); font-weight: 500; margin-left: var(--sp-1); }
.tabs__panel { padding: var(--sp-6); display: none; }
.tabs__panel.active { display: block; }

.pull-quote {
  font-family: var(--font-heading); font-style: italic; font-size: 1.25rem;
  color: var(--text); border-left: 4px solid var(--primary); padding: var(--sp-3) var(--sp-5);
  margin-bottom: var(--sp-5);
}
.detail-section { margin-bottom: var(--sp-6); }
.detail-section h3 { font-size: 1.125rem; margin-bottom: var(--sp-3); font-family: var(--font-body); font-weight: 700; }
.detail-section p { color: var(--text-muted); margin-bottom: var(--sp-3); }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table tr { border-bottom: 1px solid var(--border); }
.detail-table tr:last-child { border-bottom: 0; }
.detail-table th, .detail-table td { text-align: left; padding: var(--sp-3) 0; vertical-align: top; font-size: 0.9375rem; }
.detail-table th { color: var(--text-muted); font-weight: 600; width: 35%; padding-right: var(--sp-4); }
.detail-table td { color: var(--text); }

.service-areas { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* Reviews */
.review-card { padding: var(--sp-5); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: var(--sp-4); }
.review-card__head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-3); }
.review-card__avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); display: grid; place-items: center; font-weight: 600; color: var(--primary); }
.review-card__author { font-weight: 600; font-size: 0.9375rem; }
.review-card__date { color: var(--text-muted); font-size: 0.8125rem; }
.review-ratings { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3) var(--sp-5); margin-bottom: var(--sp-3); }
@media (min-width: 600px) { .review-ratings { grid-template-columns: repeat(3, 1fr); } }
.review-ratings__row { display: flex; flex-direction: column; gap: 2px; }
.review-ratings__label { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.review-card__body { color: var(--text); font-size: 0.9375rem; line-height: 1.6; }

/* Right sidebar contact form */
.contact-form-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-5);
}
.contact-form-card h3 { font-size: 1.125rem; margin-bottom: var(--sp-1); font-family: var(--font-body); font-weight: 700; }
.contact-form-card__sub { color: var(--text-muted); font-size: 0.875rem; margin-bottom: var(--sp-4); }
.contact-form-card input, .contact-form-card select, .contact-form-card textarea {
  width: 100%; padding: var(--sp-3); margin-bottom: var(--sp-3);
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 0.9375rem; color: var(--text); background: white; outline: none;
  transition: border-color 0.15s;
}
.contact-form-card input:focus, .contact-form-card select:focus, .contact-form-card textarea:focus { border-color: var(--primary); }
.contact-form-card textarea { resize: vertical; min-height: 90px; }

.sidebar-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-5); margin-top: var(--sp-4);
}
.sidebar-card h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; margin-bottom: var(--sp-3); }
.related-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.related-list a { color: var(--link); font-size: 0.9375rem; }
.related-list a:hover { text-decoration: underline; }

/* ---------- "How it works" 3-step ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: var(--sp-5); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { text-align: center; padding: var(--sp-5); }
.step__icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; margin: 0 auto var(--sp-4); font-size: 1.5rem; font-weight: 700;
  font-family: var(--font-heading);
}
.step h3 { margin-bottom: var(--sp-2); }
.step p { color: var(--text-muted); }

/* ---------- Trust strip ---------- */
.trust-strip {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-7);
  flex-wrap: wrap; padding: var(--sp-5); background: var(--card); border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.trust-strip__item { display: flex; flex-direction: column; align-items: center; gap: var(--sp-1); color: var(--text-muted); }
.trust-strip__num { font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem; color: var(--primary); }
.trust-strip__label { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- For Teachers panel ---------- */
.teacher-cta {
  background: var(--primary); color: white;
  border-radius: var(--radius-lg); padding: var(--sp-7) var(--sp-5);
  text-align: center;
}
.teacher-cta h2 { color: white; margin-bottom: var(--sp-3); }
.teacher-cta p { opacity: 0.92; margin-bottom: var(--sp-5); max-width: 520px; margin-left: auto; margin-right: auto; }
.teacher-cta .btn { background: white; color: var(--primary); }
.teacher-cta .btn:hover { background: var(--primary-soft); color: var(--primary-dark); }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: var(--sp-7) var(--sp-5); text-align: center;
}
.newsletter h2 { margin-bottom: var(--sp-2); }
.newsletter p { color: var(--text-muted); margin-bottom: var(--sp-5); }
.newsletter form { display: flex; gap: var(--sp-2); max-width: 480px; margin: 0 auto; flex-wrap: wrap; }
.newsletter input {
  flex: 1; min-width: 220px;
  padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-size: 0.9375rem; outline: none; transition: border-color 0.15s;
}
.newsletter input:focus { border-color: var(--primary); }

/* ---------- Footer ---------- */
.site-footer { background: #0F172A; color: #CBD5E1; margin-top: var(--sp-9); padding: var(--sp-8) 0 var(--sp-5); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-7); margin-bottom: var(--sp-7); }
@media (min-width: 600px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-col h4 { color: white; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--sp-4); font-family: var(--font-body); }
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col a { color: #94A3B8; font-size: 0.9375rem; transition: color 0.15s; }
.footer-col a:hover { color: white; }
.footer-about { font-size: 0.9375rem; line-height: 1.65; color: #94A3B8; max-width: 320px; }
.footer-about strong { color: white; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: var(--sp-5); border-top: 1px solid #1E293B; font-size: 0.8125rem; color: #64748B; flex-wrap: wrap; gap: var(--sp-3); }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; align-items: center; gap: var(--sp-2); margin-top: var(--sp-7); }
.pagination button {
  padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--card); color: var(--text); font-weight: 500; min-width: 40px;
  transition: all 0.15s;
}
.pagination button:hover { border-color: var(--primary); color: var(--primary); }
.pagination button.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ---------- Theme-scoped content (swap per province) ---------- */
body.theme-mb .ab-only { display: none !important; }
body.theme-ab .mb-only { display: none !important; }

/* ---------- Utility ---------- */
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--link); }
.mt-3 { margin-top: var(--sp-3); }
.mt-4 { margin-top: var(--sp-4); }
.mt-5 { margin-top: var(--sp-5); }
.flex { display: flex; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }
