/* ============================================================
   Fahrschulblick — Main Stylesheet
   Design tokens, layout, components
   Dark mode: add vars to html[data-theme="dark"] { }
   New styles: always use var(--token) for auto dark mode
   ============================================================ */

    /* ═══════════════════════════════════════════════════════════
       DESIGN TOKENS
       ─────────────────────────────────────────────────────────
       HOW DARK MODE WORKS:
       All colors use CSS custom properties (variables) defined
       here. Dark mode simply overrides these variables on the
       html[data-theme="dark"] selector — no other CSS changes
       needed. Any new styles added in the future just need to
       use var(--token-name) and dark mode is automatic.

       TO ADD A NEW COLOR:
         1. Add it to :root { } below (light value)
         2. Add the dark equivalent to html[data-theme="dark"] { }
         3. Use var(--your-token) in your CSS — done.
    ═══════════════════════════════════════════════════════════ */

    /* ── LIGHT MODE (default) ── */
    :root {
      --bg:          #F5F2EC;
      --bg-2:        #EDEAE2;
      --surface:     #FFFFFF;
      --text-dark:   #1A1814;
      --text-mid:    #6B6760;
      --text-subtle: #9E9B96;
      --accent:      #2B4C2E;
      --accent-light:#EBF2EC;
      --accent-mid:  #3d6b41;
      --border:      rgba(0,0,0,0.10);
      --shadow-sm:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
      --shadow-md:   0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
      --shadow-lg:   0 8px 24px rgba(0,0,0,0.10), 0 4px 8px rgba(0,0,0,0.05);
      --radius:      10px;
      --radius-sm:   6px;
      --font-serif:  'Lora', Georgia, serif;
      --font-sans:   'DM Sans', system-ui, sans-serif;
      --max-width:   1100px;
      --transition:  0.18s ease;
      --footer-bg:   #1A1814;
      --footer-text: rgba(255,255,255,0.6);
    }

    /* ── DARK MODE ── */
    /* Triggered by JS: document.documentElement.setAttribute('data-theme', 'dark') */
    html[data-theme="dark"] {
      --bg:          #0e0e0e;
      --bg-2:        #181818;
      --surface:     #1f1f1f;
      --text-dark:   #F0F0F0;
      --text-mid:    #A0A0A0;
      --text-subtle: #666666;
      --accent:      #4a7c4e;
      --accent-light:rgba(74,124,78,0.15);
      --accent-mid:  #5a9060;
      --border:      rgba(255,255,255,0.08);
      --shadow-sm:   0 1px 3px rgba(0,0,0,0.4), 0 1px 2px rgba(0,0,0,0.3);
      --shadow-md:   0 4px 12px rgba(0,0,0,0.5), 0 2px 4px rgba(0,0,0,0.3);
      --shadow-lg:   0 8px 24px rgba(0,0,0,0.6), 0 4px 8px rgba(0,0,0,0.4);
      --footer-bg:   #080808;
      --footer-text: rgba(255,255,255,0.45);
    }

    /* Smooth theme transition — applied to everything */
    *, *::before, *::after {
      transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    }

    /* ── DARK MODE TOGGLE BUTTON ── */
    .dark-mode-btn {
      width: 34px;
      height: 34px;
      border-radius: 50%;
      background: var(--bg-2);
      border: 1px solid var(--border);
      color: var(--text-mid);
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: background var(--transition), color var(--transition);
      flex-shrink: 0;
    }

    .dark-mode-btn:hover {
      background: var(--accent-light);
      color: var(--accent);
    }

    /* Star colors in dark mode */
    html[data-theme="dark"] .star { fill: #d4a520; }
    html[data-theme="dark"] .star.empty { fill: var(--bg-2); }

    /* Featured card gradient in dark mode */
    html[data-theme="dark"] .school-card.featured {
      background: linear-gradient(135deg, var(--surface) 0%, #1a2a1b 100%);
    }

    /* ═══════════════════════════════════════════════════════════
       RESET & BASE
    ═══════════════════════════════════════════════════════════ */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }

    html { scroll-behavior: smooth; }

    body {
      font-family: var(--font-sans);
      background: var(--bg);
      color: var(--text-dark);
      font-size: 15px;
      line-height: 1.6;
      -webkit-font-smoothing: antialiased;
    }

    img { display: block; max-width: 100%; }
    a { color: inherit; text-decoration: none; }
    button { cursor: pointer; font-family: var(--font-sans); border: none; background: none; }
    ul { list-style: none; }

    .container {
      max-width: var(--max-width);
      margin: 0 auto;
      padding: 0 20px;
    }

    /* ═══════════════════════════════════════════════════════════
       HEADER / NAV
    ═══════════════════════════════════════════════════════════ */
    header {
      background: var(--surface);
      border-bottom: 1px solid var(--border);
      position: sticky;
      top: 0;
      z-index: 100;
      box-shadow: var(--shadow-sm);
    }

    .header-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 88px;
    }

    .logo {
      display: flex;
      align-items: center;
      gap: 10px;
      text-decoration: none;
    }

    .logo img {
      height: 80px;
      width: auto;
    }

    .logo-dark { display: none; }
    html[data-theme="dark"] .logo-light { display: none; }
    html[data-theme="dark"] .logo-dark  { display: block; }

    /* Inline SVG logo fallback — rendered if image fails */
    .logo-text {
      font-family: var(--font-serif);
      font-size: 1.25rem;
      color: var(--text-dark);
      font-weight: 500;
      letter-spacing: -0.01em;
    }

    .logo-text span { color: var(--accent); }

    nav {
      display: flex;
      align-items: center;
      gap: 10px;
    }



    .nav-link {
      font-size: 0.875rem;
      font-weight: 400;
      color: var(--text-mid);
      padding: 6px 12px;
      border-radius: var(--radius-sm);
      transition: color var(--transition), background var(--transition);
    }

    .nav-link:hover { color: var(--accent); background: var(--accent-light); }

    .btn-cta {
      font-size: 0.8rem;
      font-weight: 500;
      color: var(--surface);
      background: var(--accent);
      padding: 7px 16px;
      border-radius: var(--radius-sm);
      transition: background var(--transition), box-shadow var(--transition);
      letter-spacing: 0.01em;
    }

    .btn-cta:hover { background: var(--accent-mid); box-shadow: var(--shadow-sm); }

    /* ═══════════════════════════════════════════════════════════
       HERO
    ═══════════════════════════════════════════════════════════ */
    .hero {
      padding: 52px 0 44px;
      text-align: center;
      border-bottom: 1px solid var(--border);
      background: var(--bg);
      position: relative;
      overflow: visible;
    }

    /* Subtle grain texture overlay — clipped to hero only */
    .hero::before {
      content: '';
      position: absolute;
      inset: 0;
      background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
      pointer-events: none;
      opacity: 0.5;
      overflow: hidden;
      border-radius: inherit;
    }

    .hero-eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.75rem;
      font-weight: 500;
      color: var(--accent);
      background: var(--accent-light);
      border: 1px solid rgba(43,76,46,0.15);
      padding: 4px 12px;
      border-radius: 20px;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      margin-bottom: 18px;
    }

    h1 {
      font-family: var(--font-serif);
      font-size: clamp(1.75rem, 4vw, 2.6rem);
      font-weight: 500;
      color: var(--text-dark);
      line-height: 1.25;
      letter-spacing: -0.02em;
      margin-bottom: 12px;
    }

    h1 em {
      font-style: italic;
      color: var(--accent);
    }

    .hero-sub {
      font-size: 1rem;
      color: var(--text-mid);
      max-width: 480px;
      margin: 0 auto 28px;
      font-weight: 300;
    }

    /* ═══════════════════════════════════════════════════════════
       SEARCH BAR (hero)
    ═══════════════════════════════════════════════════════════ */
    .city-hero-wrapper {
      display: flex;
      justify-content: center;
      max-width: 420px;
      width: 100%;
      margin: 0 auto;
    }

    .search-bar select {
      flex: 1;
      border: none;
      background: none;
      font-family: var(--font-sans);
      font-size: 0.95rem;
      color: var(--text-dark);
      outline: none;
      cursor: pointer;
      min-width: 0;
      padding: 4px 0;
    }

    .search-bar select option { color: var(--text-dark); }

    /* Custom city dropdown — replaces native select on hero to fix Chrome dark mode */
    .city-dropdown-wrapper {
      flex: 1;
      position: relative;
      min-width: 0;
    }

    .city-dropdown-trigger {
      width: 100%;
      border: 1.5px solid var(--border);
      background: var(--surface);
      font-family: var(--font-sans);
      font-size: 0.975rem;
      color: var(--text-dark);
      outline: none;
      cursor: pointer;
      padding: 14px 18px;
      border-radius: 50px;
      text-align: left;
      display: flex;
      align-items: center;
      gap: 10px;
      box-shadow: var(--shadow-md);
      transition: border-color var(--transition), box-shadow var(--transition);
    }

    .city-dropdown-trigger:hover {
      border-color: var(--accent);
      box-shadow: var(--shadow-lg);
    }

    .city-dropdown-trigger .placeholder { color: var(--text-subtle); }

    .city-dropdown-list {
      display: none;
      position: absolute;
      top: calc(100% + 8px);
      left: 0;
      right: 0;
      min-width: 220px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow-lg);
      z-index: 9999;
      overflow: hidden;
    }

    .city-search-input {
      width: 100%;
      padding: 10px 12px;
      border: none;
      border-bottom: 1px solid var(--border);
      background: var(--bg);
      font-family: var(--font-sans);
      font-size: 0.875rem;
      color: var(--text-dark);
      outline: none;
    }

    .city-search-input::placeholder { color: var(--text-subtle); }

    .city-options-list {
      max-height: 320px;
      overflow-y: auto;
      padding: 4px;
    }

    .city-options-list::-webkit-scrollbar { width: 4px; }
    .city-options-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

    .city-no-results {
      padding: 12px;
      font-size: 0.82rem;
      color: var(--text-subtle);
      text-align: center;
    }

    .city-dropdown-list.open { display: block; }

    .city-dropdown-list::-webkit-scrollbar { width: 4px; }
    .city-dropdown-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

    .city-option {
      padding: 8px 12px;
      font-family: var(--font-sans);
      font-size: 0.875rem;
      color: var(--text-dark);
      border-radius: var(--radius-sm);
      cursor: pointer;
      transition: background var(--transition);
      background: none;
      border: none;
      width: 100%;
      text-align: left;
    }

    .city-option:hover { background: var(--accent-light); color: var(--accent); }
    .city-option.selected { background: var(--accent-light); color: var(--accent); font-weight: 500; }



    /* ═══════════════════════════════════════════════════════════
       STATS BAR
    ═══════════════════════════════════════════════════════════ */
    .stats-bar {
      display: flex;
      justify-content: center;
      gap: 32px;
      margin-top: 32px;
      flex-wrap: wrap;
    }

    .stat-item {
      text-align: center;
    }

    .stat-number {
      font-family: var(--font-serif);
      font-size: 1.4rem;
      font-weight: 600;
      color: var(--accent);
    }

    .stat-label {
      font-size: 0.75rem;
      color: var(--text-subtle);
      margin-top: 2px;
      text-transform: uppercase;
      letter-spacing: 0.03em;
    }

    /* ═══════════════════════════════════════════════════════════
       MAIN LAYOUT
    ═══════════════════════════════════════════════════════════ */
    main {
      padding: 32px 0 60px;
    }

    .main-grid {
      display: grid;
      grid-template-columns: 240px 1fr;
      gap: 24px;
      align-items: start;
    }

    /* ═══════════════════════════════════════════════════════════
       FILTER SIDEBAR
    ═══════════════════════════════════════════════════════════ */
    .filter-sidebar {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 20px;
      position: sticky;
      top: 76px;
      box-shadow: var(--shadow-sm);
      overflow: visible;
    }

    .filter-title {
      font-family: var(--font-serif);
      font-size: 0.95rem;
      font-weight: 500;
      color: var(--text-dark);
      margin-bottom: 16px;
      padding-bottom: 12px;
      border-bottom: 1px solid var(--border);
    }

    .filter-group {
      margin-bottom: 20px;
    }

    .filter-group:last-child { margin-bottom: 0; }

    .filter-label {
      font-size: 0.75rem;
      font-weight: 500;
      color: var(--text-subtle);
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-bottom: 8px;
      display: block;
    }

    .filter-select {
      width: 100%;
      padding: 8px 10px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--bg);
      font-family: var(--font-sans);
      font-size: 0.875rem;
      color: var(--text-dark);
      outline: none;
      transition: border-color var(--transition);
      cursor: pointer;
      appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239E9B96' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 10px center;
      padding-right: 28px;
    }

    .filter-select:focus { border-color: var(--accent); }

    /* Range slider */
    .range-wrapper {
      position: relative;
    }

    .range-value {
      font-size: 0.8rem;
      color: var(--accent);
      font-weight: 500;
      float: right;
      margin-bottom: 6px;
    }

    input[type="range"] {
      width: 100%;
      height: 4px;
      background: var(--bg-2);
      border-radius: 2px;
      outline: none;
      appearance: none;
      cursor: pointer;
    }

    input[type="range"]::-webkit-slider-thumb {
      appearance: none;
      width: 16px;
      height: 16px;
      background: var(--accent);
      border-radius: 50%;
      border: 2px solid var(--surface);
      box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    }

    /* Star rating filter */
    .star-options {
      display: flex;
      gap: 4px;
    }

    .star-btn {
      flex: 1;
      padding: 5px 0;
      font-size: 0.8rem;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--bg);
      color: var(--text-mid);
      text-align: center;
      transition: all var(--transition);
    }

    .star-btn.active {
      background: var(--accent-light);
      border-color: var(--accent);
      color: var(--accent);
      font-weight: 500;
    }

    .btn-reset {
      width: 100%;
      padding: 8px;
      font-size: 0.8rem;
      color: var(--text-subtle);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: transparent;
      margin-top: 4px;
      transition: all var(--transition);
    }

    .btn-reset:hover { color: var(--text-dark); background: var(--bg-2); }

    /* Location toggle */
    .location-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .location-label-text {
      font-size: 0.8rem;
      color: var(--text-mid);
    }

    .toggle {
      position: relative;
      width: 36px;
      height: 20px;
      flex-shrink: 0;
    }

    .toggle input { opacity: 0; width: 0; height: 0; }

    .toggle-slider {
      position: absolute;
      inset: 0;
      background: var(--bg-2);
      border-radius: 20px;
      cursor: pointer;
      transition: background var(--transition);
      border: 1px solid var(--border);
    }

    .toggle-slider::before {
      content: '';
      position: absolute;
      width: 14px;
      height: 14px;
      left: 2px;
      top: 50%;
      transform: translateY(-50%);
      background: #fff;
      border-radius: 50%;
      transition: transform var(--transition);
      box-shadow: var(--shadow-sm);
    }

    .toggle input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
    .toggle input:checked + .toggle-slider::before { transform: translateY(-50%) translateX(16px); }

    /* Sort options */
    .sort-pills {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .sort-pill {
      padding: 7px 10px;
      font-size: 0.8rem;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--bg);
      color: var(--text-mid);
      text-align: left;
      transition: all var(--transition);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .sort-pill.active {
      background: var(--accent-light);
      border-color: var(--accent);
      color: var(--accent);
      font-weight: 500;
    }

    .sort-pill.disabled {
      opacity: 0.4;
      cursor: not-allowed;
      position: relative;
    }

    .sort-pill.disabled:hover {
      /* Override any hover styles — pill stays greyed */
      background: var(--bg);
      color: var(--text-mid);
      border-color: var(--border);
    }

    /* Tooltip rendered via JS to escape parent overflow clipping */
    #sort-tooltip {
      position: fixed;
      background: #1A1814;
      color: #ffffff;
      font-size: 0.72rem;
      font-family: var(--font-sans);
      padding: 5px 10px;
      border-radius: var(--radius-sm);
      white-space: nowrap;
      z-index: 9999;
      pointer-events: none;
      box-shadow: 0 2px 6px rgba(0,0,0,0.3);
      display: none;
    }

    .sort-pill svg { flex-shrink: 0; }

    /* ═══════════════════════════════════════════════════════════
       RESULTS AREA
    ═══════════════════════════════════════════════════════════ */
    .results-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
    }

    .results-count {
      font-size: 0.875rem;
      color: var(--text-mid);
    }

    .results-count strong {
      color: var(--text-dark);
      font-weight: 500;
    }

    /* ═══════════════════════════════════════════════════════════
       FEATURED BANNER
    ═══════════════════════════════════════════════════════════ */
    .featured-section {
      margin-bottom: 20px;
    }

    .featured-label {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.7rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--accent);
      margin-bottom: 10px;
    }

    .featured-label::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }

    /* ═══════════════════════════════════════════════════════════
       SCHOOL CARDS
    ═══════════════════════════════════════════════════════════ */
    .schools-list {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .school-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 20px;
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 12px;
      align-items: start;
      transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
      position: relative;
      overflow: hidden;
      opacity: 0;
      animation: fadeUp 0.3s ease forwards;
    }

    .school-card:hover {
      box-shadow: var(--shadow-md);
      border-color: rgba(43,76,46,0.2);
      transform: translateY(-1px);
    }

    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(8px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* Featured card accent */
    .school-card.featured {
      border-color: rgba(43,76,46,0.25);
      background: linear-gradient(135deg, #fff 0%, #f7fbf7 100%);
    }

    .school-card.featured::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      bottom: 0;
      width: 3px;
      background: var(--accent);
      border-radius: 3px 0 0 3px;
    }

    .featured-badge {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 0.65rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      color: var(--accent);
      background: var(--accent-light);
      border: 1px solid rgba(43,76,46,0.2);
      padding: 2px 8px;
      border-radius: 20px;
      margin-bottom: 6px;
    }

    .card-name {
      font-family: var(--font-serif);
      font-size: 1.05rem;
      font-weight: 500;
      color: var(--text-dark);
      margin-bottom: 4px;
      line-height: 1.3;
    }

    .card-address {
      font-size: 0.8rem;
      color: var(--text-subtle);
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .card-meta {
      display: flex;
      align-items: center;
      gap: 14px;
      flex-wrap: wrap;
    }

    /* Star rating display */
    .rating {
      display: flex;
      align-items: center;
      gap: 5px;
    }

    .stars {
      display: flex;
      gap: 1px;
    }

    .star {
      width: 13px;
      height: 13px;
      fill: #f0b429;
    }

    .star.empty { fill: var(--bg-2); }
    .star.half { fill: url(#half-fill); }

    .rating-number {
      font-size: 0.85rem;
      font-weight: 500;
      color: var(--text-dark);
    }

    .rating-count {
      font-size: 0.75rem;
      color: var(--text-subtle);
    }

    /* Distance chip */
    .distance-chip {
      font-size: 0.75rem;
      color: var(--text-mid);
      display: flex;
      align-items: center;
      gap: 3px;
    }

    /* Info stack — keeps address, hours, rating left-aligned */
    .card-info-stack {
      display: flex;
      flex-direction: column;
      gap: 5px;
    }

    .card-info-stack .card-address { margin-bottom: 0; }
    .card-info-stack .hours-chip { margin-top: 0; margin-bottom: 0; }
    .card-info-stack .card-meta { margin-top: 2px; }

    /* Today's hours chip */
    .hours-chip {
      font-size: 0.72rem;
      color: var(--text-subtle);
      display: flex;
      align-items: center;
      gap: 4px;
    }



    /* Price display */
    .price-display {
      text-align: right;
    }

    .price-main {
      font-family: var(--font-serif);
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--accent);
      display: block;
    }

    .price-sub {
      font-size: 0.7rem;
      color: var(--text-subtle);
    }

    .price-placeholder {
      font-size: 0.75rem;
      color: var(--text-subtle);
      font-style: italic;
    }

    /* Price tooltip on hover */
    .price-tooltip-wrapper {
      position: relative;
    }

    .price-tooltip {
      display: none;
      position: absolute;
      right: 0;
      top: calc(100% + 8px);
      background: var(--text-dark);
      color: #fff;
      border-radius: var(--radius-sm);
      padding: 10px 14px;
      font-size: 0.78rem;
      white-space: nowrap;
      z-index: 10;
      box-shadow: var(--shadow-lg);
      min-width: 180px;
    }

    .price-tooltip::before {
      content: '';
      position: absolute;
      top: -5px;
      right: 16px;
      width: 10px;
      height: 10px;
      background: var(--text-dark);
      transform: rotate(45deg);
      border-radius: 1px;
    }

    .price-tooltip-wrapper:hover .price-tooltip { display: block; }

    .price-tooltip-row {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      padding: 3px 0;
      border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .price-tooltip-row:last-child { border-bottom: none; }

    .price-tooltip-label { color: rgba(255,255,255,0.65); }
    .price-tooltip-value { font-weight: 500; }

    /* Contact links */
    .card-actions {
      display: flex;
      gap: 8px;
      margin-top: 10px;
      flex-wrap: wrap;
    }

    .action-link {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 0.775rem;
      color: var(--text-mid);
      padding: 4px 10px 4px 6px;
      border: 1px solid var(--border);
      border-radius: 20px;
      transition: all var(--transition);
      background: var(--bg);
    }

    .action-link:hover {
      color: var(--accent);
      border-color: var(--accent);
      background: var(--accent-light);
    }

    /* ═══════════════════════════════════════════════════════════
       EMPTY / LOADING STATES
    ═══════════════════════════════════════════════════════════ */
    .state-box {
      text-align: center;
      padding: 48px 24px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
    }

    .state-icon {
      font-size: 2.5rem;
      margin-bottom: 12px;
    }

    .state-title {
      font-family: var(--font-serif);
      font-size: 1.1rem;
      color: var(--text-dark);
      margin-bottom: 6px;
    }

    .state-sub {
      font-size: 0.85rem;
      color: var(--text-subtle);
    }

    /* Skeleton loader */
    .skeleton-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      padding: 18px 20px;
    }

    .skeleton {
      background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg) 50%, var(--bg-2) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.4s infinite;
      border-radius: 4px;
    }

    @keyframes shimmer {
      0%   { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    .sk-title  { height: 18px; width: 55%; margin-bottom: 8px; }
    .sk-sub    { height: 13px; width: 40%; margin-bottom: 14px; }
    .sk-meta   { height: 13px; width: 70%; }

    /* Stat shimmer */
    .stat-shimmer {
      display: inline-block;
      height: 26px;
      width: 60px;
      border-radius: 6px;
      background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg) 50%, var(--bg-2) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.4s infinite;
    }

    /* City trigger shimmer */
    .city-shimmer {
      display: inline-block;
      height: 14px;
      width: 110px;
      border-radius: 6px;
      background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg) 50%, var(--bg-2) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.4s infinite;
      vertical-align: middle;
    }

    /* ═══════════════════════════════════════════════════════════
       FEATURED CTA SECTION
    ═══════════════════════════════════════════════════════════ */
    .cta-section {
      background: var(--accent);
      border-radius: var(--radius);
      padding: 28px 32px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      margin-top: 32px;
      flex-wrap: wrap;
    }

    .cta-text h2 {
      font-family: var(--font-serif);
      font-size: 1.25rem;
      font-weight: 500;
      color: #fff;
      margin-bottom: 6px;
    }

    .cta-text p {
      font-size: 0.875rem;
      color: rgba(255,255,255,0.7);
    }

    .btn-cta-white {
      background: #fff;
      color: var(--accent);
      font-size: 0.875rem;
      font-weight: 500;
      padding: 10px 22px;
      border-radius: var(--radius-sm);
      transition: box-shadow var(--transition);
      white-space: nowrap;
      flex-shrink: 0;
    }

    .btn-cta-white:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

    /* ═══════════════════════════════════════════════════════════
       CONTACT MODAL
    ═══════════════════════════════════════════════════════════ */
    .modal-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(26,24,20,0.55);
      z-index: 200;
      backdrop-filter: blur(2px);
      align-items: center;
      justify-content: center;
      padding: 20px;
    }

    .modal-overlay.open { display: flex; }

    .modal {
      background: var(--surface);
      border-radius: var(--radius);
      padding: 32px;
      max-width: 440px;
      width: 100%;
      box-shadow: var(--shadow-lg);
      position: relative;
      animation: modalIn 0.22s ease;
    }

    @keyframes modalIn {
      from { opacity: 0; transform: scale(0.96) translateY(8px); }
      to   { opacity: 1; transform: scale(1) translateY(0); }
    }

    .modal-close {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--bg-2);
      color: var(--text-mid);
      font-size: 1rem;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background var(--transition);
    }

    .modal-close:hover { background: var(--border); }

    .modal h2 {
      font-family: var(--font-serif);
      font-size: 1.2rem;
      margin-bottom: 6px;
    }

    .modal p {
      font-size: 0.85rem;
      color: var(--text-mid);
      margin-bottom: 20px;
    }

    .form-group {
      margin-bottom: 14px;
    }

    .form-group label {
      display: block;
      font-size: 0.78rem;
      font-weight: 500;
      color: var(--text-mid);
      margin-bottom: 5px;
    }

    .form-group input,
    .form-group textarea {
      width: 100%;
      padding: 9px 12px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      font-family: var(--font-sans);
      font-size: 0.875rem;
      color: var(--text-dark);
      background: var(--bg);
      outline: none;
      transition: border-color var(--transition);
    }

    .form-group input:focus,
    .form-group textarea:focus { border-color: var(--accent); background: #fff; }

    .form-group textarea { resize: vertical; min-height: 80px; }

    .btn-submit {
      width: 100%;
      background: var(--accent);
      color: #fff;
      padding: 11px;
      border-radius: var(--radius-sm);
      font-size: 0.9rem;
      font-weight: 500;
      transition: background var(--transition);
      margin-top: 4px;
    }

    .btn-submit:hover { background: var(--accent-mid); }

    .form-success {
      text-align: center;
      padding: 20px 0;
    }

    .form-success .check { font-size: 2.5rem; margin-bottom: 10px; }
    .form-success h3 { font-family: var(--font-serif); margin-bottom: 6px; }
    .form-success p { font-size: 0.85rem; color: var(--text-mid); }

    /* ═══════════════════════════════════════════════════════════
       FOOTER
    ═══════════════════════════════════════════════════════════ */
    footer {
      background: var(--footer-bg);
      color: var(--footer-text);
      padding: 32px 0 24px;
      margin-top: 60px;
    }

    .footer-inner {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 16px;
    }

    .footer-logo {
      font-family: var(--font-serif);
      font-size: 1.1rem;
      color: #fff;
      font-weight: 500;
    }

    .footer-logo span { color: rgba(235,242,236,0.8); }

    .footer-links {
      display: flex;
      gap: 20px;
    }

    .footer-links a {
      font-size: 0.8rem;
      color: rgba(255,255,255,0.5);
      transition: color var(--transition);
    }

    .footer-links a:hover { color: rgba(255,255,255,0.85); }

    .footer-copy {
      font-size: 0.75rem;
      margin-top: 20px;
      padding-top: 16px;
      border-top: 1px solid rgba(255,255,255,0.08);
      text-align: center;
    }

    /* ═══════════════════════════════════════════════════════════
       RESPONSIVE
    ═══════════════════════════════════════════════════════════ */
    @media (max-width: 800px) {
      .main-grid {
        grid-template-columns: 1fr;
      }

      .filter-sidebar {
        position: static;
        display: none;
      }

      .filter-sidebar.open { display: block; }

      .mobile-filter-btn {
        display: inline-flex !important;
      }
    }

    .mobile-filter-btn {
      display: none;
      align-items: center;
      gap: 6px;
      font-size: 0.8rem;
      padding: 7px 14px;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      background: var(--surface);
      color: var(--text-mid);
    }

    @media (max-width: 540px) {
      .hero { padding: 36px 0 32px; }

      .school-card { grid-template-columns: 1fr; }
      .price-display { text-align: left; }
      .stats-bar { gap: 20px; }
      .cta-section { flex-direction: column; text-align: center; }
    }

    /* ── FILE UPLOAD ── */
    .file-upload-area {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 6px;
      padding: 16px;
      border: 1.5px dashed var(--border);
      border-radius: var(--radius-sm);
      background: var(--bg);
      cursor: pointer;
      transition: border-color var(--transition), background var(--transition);
      text-align: center;
    }

    .file-upload-area:hover {
      border-color: var(--accent);
      background: var(--accent-light);
    }

    .file-upload-area.has-file {
      border-color: var(--accent);
      background: var(--accent-light);
    }

    .file-upload-area svg { color: var(--text-subtle); }
    .file-upload-area.has-file svg { color: var(--accent); }

    #file-label {
      font-size: 0.82rem;
      color: var(--text-mid);
    }

    .file-upload-area.has-file #file-label {
      color: var(--accent);
      font-weight: 500;
    }

    .file-hint {
      font-size: 0.72rem;
      color: var(--text-subtle);
    }

    /* ── NAV DROPDOWN ── */
    .nav-dropdown {
      position: relative;
      margin-left: 14px;
    }

    .nav-dropdown-menu {
      display: none;
      position: absolute;
      top: 100%;
      right: 0;
      left: 0;
      /* Invisible bridge between button and menu so mouse can travel down */
      padding-top: 8px;
      z-index: 200;
    }

    .nav-dropdown-menu.open { display: block; }

    .nav-dropdown-menu-inner {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      box-shadow: var(--shadow-md);
      min-width: 0;
      width: 100%;
      overflow: hidden;
      animation: dropIn 0.15s ease;
      position: relative;
      padding-top: 4px;
    }

    .nav-dropdown-oder-label {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 0 14px 2px;
      font-size: 0.72rem;
      color: var(--text-subtle);
      font-family: var(--font-sans);
    }

    .nav-dropdown-oder-label::before,
    .nav-dropdown-oder-label::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }

    @keyframes dropIn {
      from { opacity: 0; transform: translateY(-4px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    .nav-dropdown-item {
      width: 100%;
      padding: 10px 14px;
      font-family: var(--font-sans);
      font-size: 0.8rem;
      color: var(--text-mid);
      background: none;
      border: none;
      text-align: left;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: background var(--transition), color var(--transition);
    }

    .nav-dropdown-item:hover {
      background: var(--accent-light);
      color: var(--accent);
    }
  
    /* Location button states */
    #location-btn.location-btn-active {
      color: var(--accent) !important;
      border-color: var(--accent) !important;
      background: var(--accent-light) !important;
    }

    #location-btn.location-btn-saved {
      color: var(--text-mid) !important;
    }
