/* Move the reCAPTCHA badge from the default bottom-right to bottom-left. */
.grecaptcha-badge { left: 4px !important; right: auto !important; }

:root {
  --green: #1f7a5c;
  --green-dark: #155c45;
  --green-light: #e8f3ee;
  --navy: #1a3a6b;
  --ink: #16302a;
  --text: #2b3a36;
  --muted: #6b7c77;
  --line: #e2ebe7;
  --bg: #ffffff;
  --bg-soft: #f5f9f7;
  --amber: #f0a202;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 48, 40, .06), 0 1px 3px rgba(16, 48, 40, .08);
  --shadow-md: 0 8px 24px rgba(16, 48, 40, .10);
  --shadow-lg: 0 18px 50px rgba(16, 48, 40, .16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* guard against any accidental horizontal scroll on mobile */
}

img { max-width: 100%; }

.container { width: min(1120px, 92vw); margin: 0 auto; }

a { color: inherit; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
  border: 1px solid transparent; border-radius: 10px;
  padding: 12px 20px; transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-dark); }
.btn-navy { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-navy:hover { background: #142d54; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.9); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark-img { height: 44px; width: auto; display: block; }
.brand-name { font-size: 1.3rem; font-weight: 700; color: var(--navy); letter-spacing: -.02em; }
.brand-name strong { color: var(--green); font-weight: 800; }
.site-nav { display: flex; align-items: center; gap: 22px; }

/* Language selector */
.lang-select { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 600; font-size: .92rem; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.lang-btn:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.lang-btn svg { color: var(--green); }
.lang-caret { font-size: .7rem; color: var(--muted); }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 50; width: 220px; max-height: 340px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; list-style: none; margin: 0; animation: chat-fade .15s ease; }
.lang-menu li { margin: 0; }
.lang-opt { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; font-size: .94rem; color: var(--text); background: transparent; border: 0; border-radius: 9px; padding: 9px 11px; cursor: pointer; }
.lang-opt:hover { background: var(--green-light); }
.lang-opt[aria-selected="true"] { background: var(--green-light); color: var(--green-dark); font-weight: 700; }
.lang-opt .lang-native { flex: 1; }
.lang-opt .lang-en { font-size: .78rem; color: var(--muted); }
.lang-opt .lang-check { color: var(--green); opacity: 0; }
.lang-opt[aria-selected="true"] .lang-check { opacity: 1; }
/* First-run language gate */
.lang-gate {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px;
  overflow-y: auto;
  background-color: #1a2c44;
  background-image:
    linear-gradient(rgba(12,24,44,.55), rgba(12,24,44,.62)),
    url("/gate-bg.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
html[data-lang-ready] #lang-gate { display: none; }
.lang-gate-card {
  position: relative; z-index: 1;
  width: min(600px, 94vw);
  background: #ffffff;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(6,16,32,.55), 0 4px 16px rgba(6,16,32,.35);
  padding: 36px 32px; text-align: center; animation: gate-pop .3s ease;
}
@keyframes gate-pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.lang-gate-logo { width: 74px; height: 74px; object-fit: contain; margin: 0 auto 12px; display: block; }
.lang-gate-title { font-size: clamp(1.5rem, 3.4vw, 2rem); color: var(--ink); letter-spacing: -.02em; margin: 0 0 8px; font-weight: 800; transition: opacity .45s ease; min-height: 1.15em; }
.lang-gate-sub { color: var(--muted); font-size: .98rem; font-weight: 600; margin: 0 auto 24px; max-width: 520px; line-height: 1.6; transition: opacity .45s ease; min-height: 1.2em; }
.lang-gate-title.fade, .lang-gate-sub.fade { opacity: 0; }
#lang-gate-go { width: 150px; flex: 0 0 auto; justify-content: center; }
#lang-gate-go-text { transition: opacity .45s ease; display: inline-block; }
#lang-gate-go-text.fade { opacity: 0; }
.lang-gate-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.lang-gate-opt {
  display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 10px; transition: transform .1s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.lang-gate-opt:hover { transform: translateY(-2px); border-color: var(--green); box-shadow: var(--shadow-md); background: var(--green-light); }
.lang-gate-opt .g-native { font-weight: 700; color: var(--ink); font-size: 1rem; }
.lang-gate-opt .g-en { font-size: .76rem; color: var(--muted); }
.lang-gate-other { border-top: 1px solid var(--line); padding-top: 20px; }
.lang-gate-other-label { display: block; font-size: .9rem; color: var(--text); font-weight: 600; margin-bottom: 12px; transition: opacity .45s ease; min-height: 1.2em; }
.lang-gate-other-label.fade { opacity: 0; }
.lang-gate-other-row { display: flex; gap: 10px; max-width: 480px; margin: 0 auto; }
.lang-gate-other-row input { flex: 1; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); outline: none; }
.lang-gate-other-row input::placeholder { transition: color .45s ease; }
.lang-gate-other-row input.fade::placeholder { color: transparent; }
.lang-gate-other-row input:focus { border-color: var(--green); background: #fff; }
@media (max-width: 560px) {
  .lang-gate-card { padding: 26px 18px; }
  .lang-gate-grid { grid-template-columns: repeat(2, 1fr); }
  .lang-gate-other-row { flex-direction: column; }
}

.lang-loading { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: rgba(255,255,255,.93); backdrop-filter: blur(4px); animation: chat-fade .15s ease; }
.lang-loading-text { font-weight: 700; color: var(--ink); font-size: 1.12rem; text-align: center; padding: 0 20px; }
/* Voice help button (header) */
.voice-btn { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-weight: 600; font-size: .9rem; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.voice-btn:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.voice-btn-ico { font-size: 1rem; line-height: 1; opacity: .55; transition: opacity .15s ease; }
.voice-btn.on { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.voice-btn.on .voice-btn-ico { opacity: 1; }
.voice-btn-state { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg-soft); border-radius: 999px; padding: 2px 8px; }
.voice-btn.on .voice-btn-state { color: #fff; background: var(--green); }
/* recording (voice command active) state */
.voice-rec-dot { display: none; width: 9px; height: 9px; border-radius: 50%; background: #ff2d3a; flex: 0 0 auto; box-shadow: 0 0 0 0 rgba(255,45,58,.7); }
.voice-btn.rec { border-color: #ff2d3a; background: #fff0f1; color: #b21622; }
.voice-btn.rec .voice-btn-ico { display: none; }
.voice-btn.rec .voice-rec-dot { display: inline-block; animation: rec-pulse 1.2s ease-in-out infinite; }
.voice-btn.rec .voice-btn-state { color: #fff; background: #ff2d3a; }
@keyframes rec-pulse { 0% { box-shadow: 0 0 0 0 rgba(255,45,58,.6); } 70% { box-shadow: 0 0 0 8px rgba(255,45,58,0); } 100% { box-shadow: 0 0 0 0 rgba(255,45,58,0); } }
@media (max-width: 560px) { .voice-btn-label { display: none; } }

/* Voice Command logger bar (under the header) */
.voice-log {
  position: fixed; top: 68px; left: 0; right: 0; z-index: 39;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: .9rem; color: #fff;
  background: linear-gradient(90deg, #b21622, #7a0f18);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.voice-log-dot { width: 11px; height: 11px; border-radius: 50%; background: #fff; flex: 0 0 auto; box-shadow: 0 0 0 0 rgba(255,255,255,.7); animation: rec-pulse-w 1.2s ease-in-out infinite; }
@keyframes rec-pulse-w { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 70% { box-shadow: 0 0 0 7px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); } }
.voice-log-status { font-weight: 700; white-space: nowrap; }
.voice-log-text { color: rgba(255,255,255,.92); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
@media (prefers-reduced-motion: reduce) { .voice-rec-dot, .voice-log-dot { animation: none; } }

/* Type-a-language input (bottom of menu) */
.lang-other-row { padding: 8px 4px 4px; border-top: 1px solid var(--line); margin-top: 4px; }
.lang-other-label { font-size: .86rem; font-weight: 600; color: var(--ink); padding: 2px 4px 9px; }
.lang-other-form { display: flex; gap: 6px; }
.lang-other-input { flex: 1; font: inherit; font-size: .9rem; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg-soft); outline: none; }
.lang-other-input:focus { border-color: var(--green); background: #fff; }
.lang-other-go { flex: 0 0 auto; width: 38px; border: 0; border-radius: 9px; background: var(--green); color: #fff; font-size: 1rem; cursor: pointer; }
.lang-other-go:hover { background: var(--green-dark); }

/* Microphone buttons */
.mic-btn { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--green-dark); font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; transition: background .15s ease, border-color .15s ease, transform .1s ease; }
.mic-btn:hover { background: #fff; border-color: var(--green); }
.mic-btn.listening, .mic-btn.rec { background: var(--green); border-color: var(--green); color: #fff; animation: mic-pulse 1.1s ease-in-out infinite; }
.mic-btn-chat { width: 44px; height: 44px; border-radius: 50%; }
@keyframes mic-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(31,122,92,.5); } 50% { box-shadow: 0 0 0 7px rgba(31,122,92,0); } }

/* Area-common languages (dropdown) */
.lang-area-label { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--green-dark); padding: 8px 11px 4px; }

/* Area-common languages (gate) */
.lang-gate-area { margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.gate-area-label { font-size: .8rem; font-weight: 700; color: var(--green-dark); margin-bottom: 10px; }
.gate-area-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gate-area-opt { border-color: var(--green) !important; background: var(--green-light) !important; }
.gate-area-opt:hover { background: #fff !important; }
@media (max-width: 560px) { .gate-area-chips { grid-template-columns: repeat(2, 1fr); } }

html[dir="rtl"] .lang-menu { right: auto; left: 0; }
html[dir="rtl"] body { text-align: right; }
@media (max-width: 480px) {
  .lang-btn #lang-current { display: none; }
  .lang-menu { width: 200px; }
}
.site-nav a { color: var(--text); font-weight: 500; font-size: .96rem; }
.site-nav a:hover { color: var(--green); }
.nav-login { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 10px;
  background: var(--green); color: #fff !important; font-weight: 600; font-size: .9rem; text-decoration: none; }
.nav-login:hover { background: var(--green-dark); color: #fff !important; }

/* ---------- Hero (search + categories, full viewport, no scroll needed) ---------- */
.hero {
  background-color: #eef4f0;
  background-image:
    linear-gradient(180deg, rgba(247,250,248,.80), rgba(247,250,248,.88)),
    url("/hero-bg.jpg");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll, scroll; /* 'fixed' caused heavy compositing/repaint load */
  border-bottom: 1px solid var(--line);
  min-height: calc(100svh - 68px);
  display: flex; align-items: center;
  padding: 40px 0;
}
.hero-inner { text-align: center; max-width: 820px; margin: 0 auto; width: 100%; }
.hero-title { font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -.03em; color: var(--ink); margin: 0 0 14px; font-weight: 800; }
.hero-sub { font-size: clamp(1rem, 1.6vw, 1.16rem); color: #000; margin: 0 auto 28px; max-width: 600px; }

/* category strip inside the hero */
.cat-strip { margin-top: 30px; }
.cat-strip-label { display: block; font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.category-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; margin: 0 auto; }
.category-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px 9px 11px; cursor: pointer; font: inherit; font-weight: 600;
  color: var(--ink); box-shadow: var(--shadow-sm);
  transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.category-chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--green); background: var(--green-light); }
.category-chip .chip-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--green-light); font-size: .95rem; }
.category-chip:hover .chip-icon { background: #fff; }

.search-bar {
  display: flex; gap: 10px; background: #fff; padding: 10px;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); max-width: 720px; margin: 0 auto;
}
.field { display: flex; align-items: center; gap: 8px; flex: 1; padding: 0 12px; border-radius: 10px; background: var(--bg-soft); border: 1px solid transparent; transition: border-color .15s ease, background .15s ease; }
.field:focus-within { border-color: var(--green); background: #fff; }
.field-icon { opacity: .7; font-size: .95rem; }
.field input { flex: 1; border: 0; background: transparent; outline: none; font: inherit; padding: 14px 0; color: var(--ink); }
.field-zip { flex: 0 0 150px; }
.search-bar .btn { padding: 0 26px; }

.hero-hint { font-size: .88rem; color: var(--muted); margin-top: 16px; }
.hero-terms { font-size: .82rem; color: var(--muted); margin-top: 22px; }
.hero-terms a { color: var(--green-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.hero-terms a:hover { color: var(--green); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; color: var(--ink); margin: 0 0 6px; font-weight: 700; }
.section-sub { color: var(--muted); margin: 0 0 32px; }

/* ---------- Category grid ---------- */
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.category-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; cursor: pointer; transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--green); }
.cat-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--green-light); font-size: 1.4rem; }
.cat-name { font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.cat-blurb { font-size: .85rem; color: var(--muted); line-height: 1.4; }

/* ---------- Results ---------- */
.results-section { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.results-head .section-title { margin: 0; }
.results-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.service-card {
  display: flex; flex-direction: column; gap: 12px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .15s ease;
}
.service-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sc-top { display: flex; align-items: center; gap: 10px; }
.sc-top > div { min-width: 0; } /* allow long names to wrap instead of overflowing */
.sc-cat { width: 38px; height: 38px; border-radius: 10px; background: var(--green-light); display: grid; place-items: center; font-size: 1.1rem; flex: 0 0 auto; }
.sc-org { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.sc-name { font-size: 1.08rem; font-weight: 700; color: var(--ink); margin: 0; line-height: 1.25; overflow-wrap: anywhere; }
.sc-desc { font-size: .92rem; color: var(--text); margin: 0; overflow-wrap: anywhere; }
.sc-meta span { overflow-wrap: anywhere; }
.job-card .sc-foot { margin-top: 6px; }
.job-open { width: 100%; padding: 12px 14px; font-size: .95rem; }
.sc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-tag { font-size: .74rem; font-weight: 600; color: var(--green-dark); background: var(--green-light); border: 1px solid #d4e8df; padding: 3px 9px; border-radius: 999px; }

/* AI summary note + error */
.results-note { display: flex; gap: 10px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--green); border-radius: 12px; padding: 14px 16px; margin-bottom: 22px; color: var(--text); font-size: .95rem; box-shadow: var(--shadow-sm); }
.results-note-icon { font-size: 1rem; }
.results-note-avatar { border-radius: 50%; flex: 0 0 auto; object-fit: cover; background: var(--green-light); }
.results-error { color: #9a3a2a; background: #fdecea; border: 1px solid #f6cabd; padding: 14px 16px; border-radius: 12px; }

/* ---------- Branded JH loader ---------- */
.jh-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 56px 0 64px; text-align: center; }
.jh-loader-mark { position: relative; width: 88px; height: 88px; display: grid; place-items: center; }
.jh-spinner {
  position: absolute; inset: 0; width: 88px; height: 88px; border-radius: 50%;
  background: conic-gradient(from 90deg, var(--green) 10%, rgba(31,122,92,0) 70%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  animation: jh-spin .95s linear infinite;
}
.jh-monogram {
  width: 56px; height: 56px; border-radius: 16px; background: var(--green); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; letter-spacing: .02em;
  box-shadow: 0 6px 18px rgba(31,122,92,.35); animation: jh-pulse 1.4s ease-in-out infinite;
}
.jh-loader-logo { width: 60px; height: 60px; object-fit: contain; animation: jh-pulse 1.4s ease-in-out infinite; }
.jh-loader-text { font-weight: 700; color: var(--ink); font-size: 1.12rem; }
.jh-loader-sub { color: var(--muted); font-size: .94rem; min-height: 1.2em; transition: opacity .3s ease; }
.jh-dots i { opacity: .25; animation: jh-blink 1.2s infinite; }
.jh-dots i:nth-child(2) { animation-delay: .2s; }
.jh-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes jh-spin { to { transform: rotate(360deg); } }
@keyframes jh-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes jh-blink { 0%,100% { opacity: .25; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .jh-spinner { animation-duration: 2s; }
  .jh-monogram, .jh-dots i { animation: none; }
}

/* ---------- Follow-up question ---------- */
.followup { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 14px; padding: 18px 18px 16px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.followup-head { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; color: var(--ink); font-size: 1.02rem; margin-bottom: 14px; }
.followup-icon { font-size: 1.05rem; }
.followup-options { display: flex; flex-wrap: wrap; gap: 9px; }
.followup-opt {
  font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; color: var(--green-dark);
  background: var(--green-light); border: 1px solid #d4e8df; border-radius: 999px; padding: 9px 16px;
  transition: transform .1s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.followup-opt:hover { transform: translateY(-1px); background: var(--green); color: #fff; border-color: var(--green); }
.followup-form { display: flex; gap: 8px; margin-top: 14px; }
.followup-input { flex: 1; font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); outline: none; transition: border-color .15s ease, background .15s ease; }
.followup-input:focus { border-color: var(--green); background: #fff; }
.followup-form .btn { white-space: nowrap; }
.followup-avatar { border-radius: 50%; flex: 0 0 auto; object-fit: cover; background: var(--green-light); }

/* ZIP required message */
.zip-error { color: #9a3a2a; background: #fdecea; border: 1px solid #f6cabd; display: inline-block; margin: 14px auto 0; padding: 9px 14px; border-radius: 10px; font-size: .9rem; font-weight: 500; }
.field.field-error { border-color: #e0816f !important; background: #fff6f4 !important; }

/* Show more */
.show-more-wrap { display: flex; justify-content: center; margin-top: 26px; }
.show-more-wrap .btn { min-width: 240px; }
.sc-meta { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); margin-top: auto; }
.sc-meta span { display: inline-flex; gap: 6px; }
.sc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.badge { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .02em; }
.badge-free { background: var(--green-light); color: var(--green-dark); }
.badge-reduced { background: #fff4dc; color: #9a6b00; }

.empty-state { text-align: center; padding: 56px 0; color: var(--muted); }
.empty-emoji { font-size: 2.4rem; }
.empty-state h3 { color: var(--ink); margin: 12px 0 4px; }

/* ---------- How it works ---------- */
.how-section { background: #fff; scroll-margin-top: 80px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.how-step { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 22px; }
.how-num { width: 38px; height: 38px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 700; display: grid; place-items: center; margin-bottom: 14px; }
.how-step h3 { margin: 0 0 6px; color: var(--ink); font-size: 1.1rem; }
.how-step p { margin: 0; color: var(--muted); font-size: .94rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #cdddd6; padding: 52px 0 26px; margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 40px; padding-bottom: 32px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-brand .brand-name { color: #fff; font-size: 1.3rem; }
.footer-brand .brand-name strong { color: #7fd1b3; }
.footer-brand p { color: #9fb6ae; font-size: .92rem; max-width: 320px; margin: 12px 0 0; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-cols h4 { color: #fff; font-size: .95rem; margin: 0 0 12px; }
.footer-cols a { display: block; color: #9fb6ae; font-size: .9rem; padding: 4px 0; }
.footer-cols a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; padding-top: 22px; font-size: .82rem; color: #84a096; flex-wrap: wrap; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
/* The hidden attribute must win over the display rules above (author CSS otherwise beats the UA [hidden] rule). */
[hidden] { display: none !important; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16,48,40,.62); }
.modal-card { position: relative; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); width: min(520px, 94vw); padding: 30px; max-height: 88vh; overflow: auto; }
.modal-close { position: absolute; top: 14px; right: 16px; border: 0; background: transparent; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; }
.modal-close:hover { color: var(--ink); }
.modal-body h3 { margin: 0 0 4px; color: var(--ink); font-size: 1.4rem; }
.modal-org { color: var(--green-dark); font-weight: 600; margin: 0 0 16px; }
.modal-desc { color: var(--text); margin: 0 0 20px; }
.modal-detail { display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.modal-detail b { color: var(--ink); min-width: 78px; }
/* Detail popup: Send (SMS / Email) chooser */
.modal-send { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }
.modal-send-q { margin: 0 0 12px; font-size: .92rem; font-weight: 600; color: var(--ink); }
.modal-send-choices { display: flex; gap: 8px; margin-bottom: 12px; }
.modal-choice { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: .92rem; color: var(--ink); background: var(--bg-soft); border: 1.5px solid var(--line); border-radius: 11px; padding: 12px; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .1s ease; }
.modal-choice:hover { transform: translateY(-1px); border-color: var(--green); background: var(--green-light); }
.modal-choice[aria-selected="true"] { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.modal-send-form { display: flex; gap: 8px; }
.modal-send-input { flex: 1; font: inherit; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; }
.modal-send-input:focus { border-color: var(--green); }
.modal-send-form .btn { white-space: nowrap; }
.modal-send-status { margin: 12px 0 0; font-size: .9rem; font-weight: 600; }
.modal-send-status.ok { color: var(--green-dark); }
.modal-send-status.err { color: #9a3a2a; }
@media (max-width: 480px) { .modal-send-choices, .modal-send-form { flex-direction: column; } }

.modal-services { margin: 0 0 18px; }
.modal-services b { display: block; color: var(--ink); font-size: .9rem; margin-bottom: 8px; }
/* Detail popup action buttons */
.modal-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }
.modal-actions-primary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-action {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: inherit; font-weight: 700; font-size: .98rem; color: #fff; cursor: pointer;
  border: 0; border-radius: 14px; padding: 15px 16px; text-decoration: none;
  transition: transform .1s ease, box-shadow .18s ease, filter .15s ease;
}
.btn-action:active { transform: translateY(1px); }
.btn-action-ico { font-size: 1.12rem; line-height: 1; }
.btn-action-call { background: linear-gradient(135deg, #239b73, var(--green-dark)); box-shadow: 0 6px 16px rgba(31,122,92,.32); }
.btn-action-call:hover { box-shadow: 0 10px 22px rgba(31,122,92,.42); filter: brightness(1.04); transform: translateY(-1px); }
.btn-action-map { background: linear-gradient(135deg, #2a4f8f, var(--navy)); box-shadow: 0 6px 16px rgba(26,58,107,.32); }
.btn-action-map:hover { box-shadow: 0 10px 22px rgba(26,58,107,.42); filter: brightness(1.06); transform: translateY(-1px); }

.modal-actions-secondary { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-soft {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 600; font-size: .9rem; color: var(--text); cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease; white-space: nowrap;
}
.btn-soft:hover { background: #fff; border-color: var(--green); color: var(--green-dark); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-soft:active { transform: translateY(0); }
.btn-soft-ico { font-size: .98rem; line-height: 1; opacity: .85; }
@media (max-width: 480px) {
  .modal-actions-primary { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .site-nav { gap: 14px; }
  .search-bar { flex-direction: column; }
  .field-zip { flex: 1; }
  .search-bar .btn { padding: 14px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr; }
  .how-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }

  /* Results page: stack header, give buttons room and bigger tap targets */
  .section { padding: 44px 0; }
  .results-head { flex-direction: column; align-items: stretch; gap: 12px; margin-bottom: 18px; }
  .results-head-actions { width: 100%; }
  .results-head-actions .btn { flex: 1; padding: 12px 14px; font-size: .92rem; }
  .show-more-wrap .btn { width: 100%; min-width: 0; }

  /* Detail modal: comfortable on small screens, full-width actions */
  .modal { padding: 12px; }
  .modal-card { padding: 22px 18px; width: 100%; max-height: 92vh; }
  .modal-actions .btn { flex: 1 1 100%; }
  .modal-detail { flex-direction: column; gap: 2px; }
  .modal-detail b { min-width: 0; }
}

@media (max-width: 420px) {
  .hero-title { font-size: 1.7rem; }
  .category-chip { padding: 8px 13px 8px 9px; font-size: .9rem; }
  .brand-name { font-size: 1.15rem; }
  .service-card { padding: 16px; }
}

/* ---------- Live chat with John ---------- */
.chat-launcher { position: fixed; right: 22px; bottom: 22px; z-index: 70; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.chat-launcher-bubble {
  background: #fff; color: var(--ink); font-weight: 600; font-size: .92rem; padding: 11px 16px; border-radius: 999px;
  border: 1px solid var(--line); box-shadow: var(--shadow-md); white-space: nowrap;
  animation: chat-bob 2.6s ease-in-out infinite; max-width: 60vw;
}
.chat-launcher-btn { position: relative; width: 64px; height: 64px; border-radius: 50%; background: #fff; border: 2px solid var(--green);
  display: grid; place-items: center; box-shadow: 0 10px 26px rgba(31,122,92,.4); flex: 0 0 auto; transition: transform .12s ease; }
.chat-launcher:hover .chat-launcher-btn { transform: scale(1.06); }
.chat-launcher-btn img { border-radius: 50%; }
.chat-launcher-ping { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--green); animation: chat-ping 1.8s cubic-bezier(0,0,.2,1) infinite; }
@keyframes chat-ping { 0% { transform: scale(1); opacity: .7; } 80%,100% { transform: scale(1.5); opacity: 0; } }
@keyframes chat-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.chat-launcher.open { display: none; }

.chat-backdrop { position: fixed; inset: 0; z-index: 74; background: rgba(16,48,40,.55); backdrop-filter: blur(3px); animation: chat-fade .2s ease; }
@keyframes chat-fade { from { opacity: 0; } to { opacity: 1; } }
.chat-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 75;
  width: min(580px, 94vw); height: min(720px, 90vh);
  background: #fff; border-radius: 22px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--line); animation: chat-in .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes chat-in { from { transform: translate(-50%, -46%) scale(.96); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: linear-gradient(120deg, var(--green), var(--green-dark)); color: #fff; }
.chat-head-avatar { border-radius: 50%; background: #fff; flex: 0 0 auto; }
.chat-head-info { display: flex; flex-direction: column; line-height: 1.25; flex: 1; }
.chat-head-info strong { font-size: 1.12rem; }
.chat-head-status { font-size: .82rem; opacity: .92; display: inline-flex; align-items: center; gap: 6px; }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: #8ff0c4; box-shadow: 0 0 0 0 rgba(143,240,196,.7); animation: chat-live 1.6s infinite; }
@keyframes chat-live { 0% { box-shadow: 0 0 0 0 rgba(143,240,196,.7); } 70% { box-shadow: 0 0 0 7px rgba(143,240,196,0); } }
.chat-clear { margin-left: auto; display: grid; place-items: center; background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.5); color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; transition: background .15s ease, transform .1s ease; flex: 0 0 auto; }
.chat-clear:hover { background: rgba(255,255,255,.32); transform: scale(1.06); }
.chat-clear:active { transform: scale(.96); }
.chat-close { display: grid; place-items: center; background: rgba(255,255,255,.22); border: 1.5px solid rgba(255,255,255,.6); color: #fff; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; transition: background .15s ease, transform .1s ease; flex: 0 0 auto; }
.chat-close:hover { background: rgba(255,255,255,.38); transform: scale(1.06); }
.chat-close:active { transform: scale(.96); }

.chat-messages { flex: 1; overflow-y: auto; padding: 20px 18px; display: flex; flex-direction: column; gap: 14px; background: var(--bg-soft); }
.chat-msg { max-width: 86%; padding: 13px 16px; border-radius: 16px; font-size: .95rem; line-height: 1.6; word-wrap: break-word; }
.chat-msg.john { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; color: var(--text); box-shadow: var(--shadow-sm); }
.chat-msg.user { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 5px; white-space: pre-wrap; }
/* Clean, documented formatting inside John's messages */
.chat-msg.john p { margin: 0 0 10px; }
.chat-msg.john p:last-child { margin-bottom: 0; }
.chat-msg.john strong { color: var(--ink); font-weight: 700; }
.chat-msg.john ul, .chat-msg.john ol { margin: 6px 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.chat-msg.john li { line-height: 1.5; }
.chat-msg.john ul li::marker { color: var(--green); }
.chat-msg.john a { color: var(--green-dark); font-weight: 600; }
.chat-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.chat-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .4; animation: jh-blink 1.2s infinite; }
.chat-typing i:nth-child(2) { animation-delay: .2s; } .chat-typing i:nth-child(3) { animation-delay: .4s; }

/* Quick action */
.chat-actions { padding: 10px 14px; background: #fff; border-top: 1px solid var(--line); display: flex; }
.chat-action-btn { flex: 1; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; color: #fff; background: var(--navy); border: 0; border-radius: 12px; padding: 11px 14px; transition: background .15s ease, transform .1s ease; }
.chat-action-btn:hover { background: #142d54; }
.chat-action-btn:active { transform: translateY(1px); }
.chat-action-btn:disabled { opacity: .55; cursor: default; }

/* Chat transcript tools (print / send) */
.chat-tools { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-tool { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: .86rem; color: var(--text); background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.chat-tool:hover { background: #fff; border-color: var(--green); color: var(--green-dark); }
.chat-send-box { padding: 12px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.chat-send-q { margin: 0 0 10px; font-size: .9rem; font-weight: 600; color: var(--ink); }
.chat-send-choices { display: flex; gap: 8px; margin-bottom: 10px; }
.chat-choice { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 600; font-size: .9rem; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 11px; padding: 11px; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .1s ease; }
.chat-choice:hover { transform: translateY(-1px); border-color: var(--green); background: var(--green-light); }
.chat-choice[aria-selected="true"] { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.chat-send-form { display: flex; gap: 8px; }
.chat-send-input { flex: 1; font: inherit; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; }
.chat-send-input:focus { border-color: var(--green); }
.chat-send-status { margin: 10px 0 0; font-size: .88rem; font-weight: 600; }
.chat-send-status.ok { color: var(--green-dark); }
.chat-send-status.err { color: #9a3a2a; }

.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-input { flex: 1; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-soft); outline: none; }
.chat-input:focus { border-color: var(--green); background: #fff; }
.chat-send { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--green); color: #fff; font-size: 1.1rem; cursor: pointer; transition: background .15s ease; }
.chat-send:hover { background: var(--green-dark); }
.chat-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 680px) {
  .chat-launcher-bubble { display: none; }
  .chat-panel { width: 96vw; height: 90vh; border-radius: 18px; }
}

/* ---------- Results header actions ---------- */
.results-head-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Print ---------- */
.print-only { display: none; }
@media print {
  /* Hide all site chrome and interactive bits */
  .site-header, .site-footer, .hero, .how-section,
  #chat-launcher, #chat-panel, #chat-backdrop,
  #show-more-wrap, #jh-loader, #followup,
  .results-head-actions, .sc-foot .btn { display: none !important; }

  html, body { background: #fff !important; }
  .print-only { display: block; }
  .print-head { font-size: 14px; font-weight: 700; color: #155c45; border-bottom: 2px solid #155c45; padding-bottom: 6px; margin-bottom: 14px; }

  /* ----- Default: print the full results list ----- */
  body:not(.print-detail) .modal { display: none !important; }
  .results-section { padding: 0 !important; border: 0 !important; background: #fff !important; }
  .results-note { box-shadow: none; }
  .results-grid { display: block !important; }
  .service-card { break-inside: avoid; page-break-inside: avoid; box-shadow: none !important; border: 1px solid #ccc !important; margin-bottom: 12px; }

  /* ----- Detail print: only the selected location ----- */
  body.print-detail main > section,
  body.print-detail .modal-backdrop,
  body.print-detail .modal-close,
  body.print-detail .modal-actions { display: none !important; }
  body.print-detail .modal { position: static !important; display: block !important; height: auto !important; padding: 0 !important; }
  body.print-detail .modal-card { box-shadow: none !important; border: 0 !important; width: auto !important; max-height: none !important; padding: 0 !important; overflow: visible !important; }

  /* ----- Chat transcript print: only the conversation ----- */
  body.print-chat main > section, body.print-chat .site-header, body.print-chat .site-footer { display: none !important; }
  body.print-chat #chat-backdrop, body.print-chat .chat-head, body.print-chat .chat-tools,
  body.print-chat #chat-send-box, body.print-chat .chat-form { display: none !important; }
  body.print-chat #chat-panel { display: block !important; position: static !important; width: auto !important; height: auto !important; box-shadow: none !important; border: 0 !important; }
  body.print-chat .chat-messages { display: block !important; overflow: visible !important; background: #fff !important; padding: 0 !important; }
  body.print-chat .chat-msg { max-width: 100% !important; border: 1px solid #ddd !important; margin-bottom: 8px; break-inside: avoid; }
}

/* ---------- Legal pages (Terms / Privacy) ---------- */
.legal { padding: 48px 0 72px; }
.legal-inner { max-width: 760px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--ink); letter-spacing: -.02em; margin: 0 0 6px; }
.legal-updated { color: var(--muted); font-size: .9rem; margin: 0 0 28px; }
.legal h2 { font-size: 1.18rem; color: var(--ink); margin: 30px 0 8px; }
.legal p { color: var(--text); margin: 0 0 14px; line-height: 1.65; }
.legal a { color: var(--green-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--green); }
.legal a.btn { text-decoration: none; }
.legal-note { color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 30px; }
.footer-bottom a { color: #cdddd6; }
.footer-bottom a:hover { color: #fff; }
