/* ============================================================
   CLEARWATER NORTH ALABAMA — Design System
   Clean & Trustworthy: Deep navy + crisp white + water blue
   Font: Playfair Display (headings) + Source Sans 3 (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Source+Sans+3:wght@300;400;500;600;700&display=swap');

:root {
  --navy:       #0d2b45;
  --navy-mid:   #1a3f5c;
  --blue:       #1a7fc1;
  --blue-light: #3ba3e8;
  --sky:        #e8f4fd;
  --teal:       #0a9396;
  --white:      #ffffff;
  --off-white:  #f7fbff;
  --gray-100:   #f1f5f9;
  --gray-200:   #e2eaf2;
  --gray-400:   #94a3b8;
  --gray-600:   #4a6580;
  --gray-800:   #1e2f3f;
  --accent:     #f4a300;
  --accent-lt:  #fff3cc;
  --red:        #e63946;

  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(13,43,69,0.08);
  --shadow-md: 0 6px 24px rgba(13,43,69,0.12);
  --shadow-lg: 0 16px 48px rgba(13,43,69,0.16);

  --max-w: 1200px;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-light); }

/* ── UTILITIES ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section    { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.text-center { text-align: center; }

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--sky);
  color: var(--blue);
}
.badge-accent { background: var(--accent-lt); color: #b07800; }
.badge-teal   { background: #e0f5f5; color: var(--teal); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(26,127,193,.35);
}
.btn-primary:hover { background: var(--blue-light); color: var(--white); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,127,193,.4); }

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-outline:hover { background: var(--blue); color: var(--white); }

.btn-white {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.btn-white:hover { background: var(--off-white); color: var(--navy); transform: translateY(-1px); }

.btn-accent {
  background: var(--accent);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(244,163,0,.35);
}
.btn-accent:hover { background: #e09500; color: var(--white); transform: translateY(-1px); }

/* Section labels */
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 12px;
}

h1,h2,h3,h4 { font-family: var(--font-head); line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

.lead { font-size: 1.15rem; color: var(--gray-600); line-height: 1.75; }

/* ── NAVIGATION ── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 1000;
  transition: box-shadow .3s;
}
#navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  text-decoration: none;
}
.nav-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 18px;
}
.nav-logo span { color: var(--blue); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all .15s;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); background: var(--sky); }

.nav-cta { margin-left: 8px; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: all .3s;
}

/* Mobile nav */
.mobile-nav {
  display: none;
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 24px 24px;
  z-index: 999;
  box-shadow: var(--shadow-md);
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-800);
  font-weight: 500;
  font-size: 15px;
}
.mobile-nav a:last-child { border-bottom: none; }

/* ── HERO ── */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 80px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-mid) 60%, #1a4f72 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-wave {
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 80px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: 20px;
}

.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--blue-light); }
.hero .lead { color: rgba(255,255,255,0.75); margin-bottom: 36px; }

.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-trust {
  display: flex;
  gap: 24px;
  margin-top: 40px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.65);
  font-size: 13px;
}
.trust-item .icon { font-size: 16px; }

/* Hero visual panel */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.water-card {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  backdrop-filter: blur(8px);
  color: white;
}
.water-card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 12px;
}
.water-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
}
.water-card-row:last-child { border-bottom: none; }
.water-card-row .val { font-weight: 600; color: var(--blue-light); }
.water-card-row .val.warn { color: #ffd166; }
.water-card-row .val.ok   { color: #90e0b0; }

.water-card-big { text-align: center; }
.water-card-big .score { font-family: var(--font-head); font-size: 3rem; font-weight: 800; color: #ffd166; line-height: 1; }
.water-card-big .score-label { font-size: 13px; color: rgba(255,255,255,.6); margin-top: 4px; }

/* ── CATEGORY CARDS ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: all .25s ease;
  cursor: pointer;
  text-decoration: none;
  display: block;
  color: inherit;
}
.cat-card:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  color: inherit;
}
.cat-icon {
  width: 60px; height: 60px;
  background: var(--sky);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 20px;
  transition: background .25s;
}
.cat-card:hover .cat-icon { background: var(--blue); }
.cat-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.cat-card p  { font-size: 13.5px; color: var(--gray-600); line-height: 1.5; }
.cat-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  margin-top: 14px;
}

/* ── WATER QUALITY SECTION ── */
.wq-section { background: var(--off-white); }

.wq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.wq-issues { margin-top: 28px; display: flex; flex-direction: column; gap: 14px; }
.issue-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}
.issue-icon { font-size: 22px; flex-shrink: 0; }
.issue-info { flex: 1; }
.issue-info strong { display: block; font-size: 14px; font-weight: 600; }
.issue-info span   { font-size: 13px; color: var(--gray-600); }
.issue-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.ib-high   { background: #fee2e2; color: #c0392b; }
.ib-med    { background: #fef3c7; color: #92620a; }
.ib-common { background: var(--sky); color: var(--blue); }

.county-map-placeholder {
  background: linear-gradient(135deg, var(--sky) 0%, #dceefb 100%);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.county-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 20px;
}
.county-pill {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  cursor: pointer;
  transition: all .2s;
  text-decoration: none;
}
.county-pill:hover { background: var(--blue); color: var(--white); border-color: var(--blue); }

/* ── BLOG / GUIDES ── */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}
.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all .25s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); color: inherit; }
.blog-card-img {
  height: 180px;
  background: linear-gradient(135deg, var(--navy-mid), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 52px;
  position: relative;
  overflow: hidden;
}
.blog-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(13,43,69,0.5));
}
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-card-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.blog-card-body h3 { font-size: 1.05rem; margin-bottom: 10px; line-height: 1.35; }
.blog-card-body p  { font-size: 13.5px; color: var(--gray-600); line-height: 1.6; flex: 1; }
.blog-read-more {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--blue); margin-top: 16px;
}

/* ── CTA BANNER ── */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  padding: 72px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '💧';
  position: absolute;
  font-size: 200px;
  opacity: 0.04;
  top: -40px; right: -20px;
  line-height: 1;
}
.cta-banner h2 { color: var(--white); margin-bottom: 16px; }
.cta-banner .lead { color: rgba(255,255,255,0.7); margin-bottom: 36px; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── FOOTER ── */
footer {
  background: var(--gray-800);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand p { font-size: 14px; margin-top: 14px; line-height: 1.7; color: rgba(255,255,255,0.55); }
.footer-col h4 { font-family: var(--font-head); font-size: .95rem; color: var(--white); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a { color: rgba(255,255,255,.55); font-size: 14px; transition: color .2s; text-decoration: none; }
.footer-col ul a:hover { color: var(--blue-light); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; font-size: 13px; flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,.55); text-decoration: none; }
.footer-bottom a:hover { color: var(--blue-light); }

/* ── INNER PAGE HERO (shorter) ── */
.page-hero {
  padding-top: calc(var(--nav-h) + 56px);
  padding-bottom: 56px;
  background: linear-gradient(160deg, var(--navy), var(--navy-mid));
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 60px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}
.page-hero .breadcrumb {
  font-size: 13px; color: rgba(255,255,255,.5); margin-bottom: 16px;
}
.page-hero .breadcrumb a { color: rgba(255,255,255,.5); text-decoration: none; }
.page-hero .breadcrumb a:hover { color: var(--blue-light); }
.page-hero h1 { color: var(--white); margin-bottom: 16px; }
.page-hero .lead { color: rgba(255,255,255,.7); max-width: 640px; }

/* ── WATER QUALITY PAGE ── */
.wq-county-section { background: var(--off-white); }

.county-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.county-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: all .2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.county-card:hover { box-shadow: var(--shadow-md); border-color: var(--blue); transform: translateY(-2px); color: inherit; }
.county-card-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 16px; }
.county-card h3 { font-size: 1.1rem; }
.county-score-badge {
  font-size: 13px; font-weight: 700; padding: 4px 12px;
  border-radius: 100px;
}
.score-c { background: #fee2e2; color: #c0392b; }
.score-b { background: #fef3c7; color: #92620a; }
.score-a { background: #d1fae5; color: #065f46; }
.county-issues { display: flex; flex-direction: column; gap: 8px; }
.county-issue-row { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--gray-100); }
.county-issue-row:last-child { border-bottom: none; }
.county-issue-row .level { font-weight: 600; }
.level-high   { color: #c0392b; }
.level-med    { color: #92620a; }
.level-low    { color: var(--teal); }

/* Stats strip */
.stats-strip {
  background: var(--blue);
  color: var(--white);
  padding: 40px 0;
}
.stats-row {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 24px;
}
.stat-item { text-align: center; }
.stat-num  { font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; line-height: 1; }
.stat-label{ font-size: 13px; margin-top: 4px; opacity: .8; }

/* Info boxes */
.info-box {
  border-left: 4px solid var(--blue);
  background: var(--sky);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 18px 22px;
  margin: 24px 0;
}
.info-box.warn { border-color: var(--accent); background: var(--accent-lt); }
.info-box.alert { border-color: var(--red); background: #fee2e2; }
.info-box p { font-size: 14px; line-height: 1.6; }
.info-box strong { color: var(--navy); }

/* Contaminant table */
.contam-table {
  width: 100%; border-collapse: collapse; margin-top: 24px;
  font-size: 14px;
}
.contam-table th {
  background: var(--navy); color: var(--white);
  padding: 12px 16px; text-align: left;
  font-family: var(--font-body); font-weight: 600; font-size: 13px;
  letter-spacing: .04em;
}
.contam-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}
.contam-table tr:nth-child(even) td { background: var(--gray-100); }
.contam-table tr:hover td { background: var(--sky); }
.tag-pill {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 100px; margin: 2px;
}
.tp-hard   { background: #fee2e2; color: #c0392b; }
.tp-filter { background: #d1fae5; color: #065f46; }
.tp-ro     { background: var(--sky); color: var(--blue); }
.tp-uv     { background: #ede9fe; color: #5b21b6; }

/* ── BLOG PAGE ── */
.blog-hero-search {
  margin-top: 28px;
  display: flex; gap: 12px; max-width: 520px;
}
.blog-hero-search input {
  flex: 1; padding: 13px 18px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.12);
  color: var(--white); font-family: var(--font-body);
  font-size: 15px; outline: none;
}
.blog-hero-search input::placeholder { color: rgba(255,255,255,.5); }
.blog-hero-search input:focus { border-color: var(--blue-light); background: rgba(255,255,255,.18); }

.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding: 28px 0 8px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 40px;
}
.filter-btn {
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--gray-200);
  background: var(--white); color: var(--gray-600);
  transition: all .15s;
}
.filter-btn:hover, .filter-btn.active {
  background: var(--blue); color: var(--white); border-color: var(--blue);
}

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.blog-sidebar { position: sticky; top: calc(var(--nav-h) + 24px); }

.sidebar-widget {
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
}
.sidebar-widget h4 {
  font-size: .95rem; margin-bottom: 16px;
  padding-bottom: 12px; border-bottom: 1px solid var(--gray-200);
}
.sidebar-links { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sidebar-links li a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--gray-700);
  text-decoration: none; transition: all .15s;
}
.sidebar-links li a:hover { background: var(--sky); color: var(--blue); }

.blog-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Featured post */
.post-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none; color: inherit;
  transition: box-shadow .25s;
  background: var(--white);
}
.post-featured:hover { box-shadow: var(--shadow-lg); color: inherit; }
.post-featured-img {
  height: 280px;
  background: linear-gradient(135deg, var(--navy), #1a6895);
  display: flex; align-items: center; justify-content: center;
  font-size: 80px;
}
.post-featured-body {
  padding: 36px;
  display: flex; flex-direction: column; justify-content: center;
}
.post-featured-body .badge { margin-bottom: 12px; }
.post-featured-body h2 { font-size: 1.5rem; margin-bottom: 12px; }
.post-featured-body p { font-size: 14px; color: var(--gray-600); line-height: 1.7; }

/* ── QUIZ WIDGET ── */
.quiz-section {
  background: linear-gradient(135deg, var(--sky) 0%, #dbeeff 100%);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
  margin: 60px 0;
}
.quiz-section h2 { margin-bottom: 12px; }
.quiz-section .lead { margin-bottom: 32px; }

.quiz-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 560px;
  margin: 0 auto 24px;
}
.quiz-opt {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  display: flex; align-items: center; gap: 10px;
  transition: all .2s;
}
.quiz-opt:hover { border-color: var(--blue); background: var(--sky); }
.quiz-opt.selected { border-color: var(--blue); background: var(--sky); color: var(--blue); }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease forwards; }
.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .wq-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .county-cards { grid-template-columns: 1fr; }
  .blog-main-grid { grid-template-columns: 1fr; }
  .post-featured { grid-template-columns: 1fr; }
  .post-featured-img { height: 200px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .stats-row { gap: 32px; }
  .quiz-options { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}

/* ── PRO VERIFIED BADGE ── */
.pro-verified {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #d1fae5;
  color: #065f46;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid #6ee7b7;
  letter-spacing: .03em;
}

/* ── CITY DIAGNOSTIC BUTTONS ── */
.city-btn {
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  font-family: var(--font-body);
  transition: all .2s ease;
}
.city-btn:hover { border-color: var(--blue); color: var(--blue); background: var(--sky); }
.city-btn.active { background: var(--blue); color: var(--white); border-color: var(--blue); box-shadow: 0 4px 12px rgba(26,127,193,.3); }

/* ── DIAGNOSTIC METRIC TILES ── */
.diag-metric {
  padding: 20px 24px;
  border-right: 1px solid var(--gray-200);
  text-align: center;
}
.diag-metric:last-child { border-right: none; }
.diag-metric-label { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 8px; }
.diag-metric-value { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; line-height: 1; }
.diag-metric-sub { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.dv-red    { color: #dc2626; }
.dv-orange { color: #d97706; }
.dv-green  { color: #059669; }
.dv-blue   { color: var(--blue); }

/* ── PFAS ALERT BAR ── */
.pfas-alert-bar {
  display: flex; align-items: center; gap: 12px;
  background: #fef2f2; border-top: 1px solid #fecaca;
  padding: 14px 32px;
}
.pfas-alert-bar.moderate { background: #fffbeb; border-color: #fde68a; }
.pfas-alert-bar.low { background: #f0fdf4; border-color: #bbf7d0; }
.pfas-alert-bar .alert-icon { font-size: 20px; flex-shrink: 0; }
.pfas-alert-bar p { font-size: 13.5px; line-height: 1.5; }
.pfas-alert-bar strong { color: var(--navy); }

/* ── DIAGNOSTIC REC SECTION ── */
.diag-rec-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
.diag-rec-text h4 { font-size: 1rem; margin-bottom: 6px; color: var(--navy); }
.diag-rec-text p  { font-size: 13.5px; color: var(--gray-600); line-height: 1.5; max-width: 440px; }
.diag-rec-badge { display: flex; align-items: center; gap: 8px; }

/* ── FAQ ACCORDION ── */
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.faq-question {
  width: 100%; text-align: left; background: none; border: none;
  padding: 18px 24px;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; font-family: var(--font-body);
  font-size: 15px; font-weight: 600; color: var(--navy);
  transition: background .15s;
}
.faq-question:hover { background: var(--sky); }
.faq-chevron { font-size: 18px; transition: transform .3s; color: var(--blue); flex-shrink: 0; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 24px;
  font-size: 14.5px; color: var(--gray-600); line-height: 1.7;
}
.faq-item.open .faq-answer { max-height: 600px; padding: 0 24px 20px; }

@media (max-width: 640px) {
  #diag-metrics { grid-template-columns: 1fr 1fr !important; }
  .diag-metric:nth-child(2) { border-right: none; }
  .diag-metric:nth-child(3) { border-top: 1px solid var(--gray-200); grid-column: 1/-1; }
  .pfas-alert-bar { padding: 14px 20px; }
}

/* ============================================================
   MOBILE RESPONSIVE OVERRIDES — 480px & below
   ============================================================ */

/* Global overflow safety */
html, body { overflow-x: hidden; }
* { box-sizing: border-box; }
img, video, table { max-width: 100%; }

/* Container padding on very small screens */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section    { padding: 40px 0; }
  .section-sm { padding: 32px 0; }

  /* Hero */
  .hero { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 40px; }
  .hero h1 { font-size: 1.9rem; }
  .hero .lead { font-size: 1rem; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }

  /* Category grid → 1 col */
  .cat-grid { grid-template-columns: 1fr !important; }

  /* Blog grid */
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card-img { height: 140px; font-size: 36px; }

  /* Stats strip */
  .stat-num { font-size: 1.8rem; }
  .stats-row { gap: 20px; }

  /* CTA banner buttons */
  .cta-btns { flex-direction: column; align-items: center; }
  .cta-btns .btn { width: 100%; max-width: 320px; justify-content: center; }

  /* Page hero */
  .page-hero h1 { font-size: 1.6rem; }
  .page-hero .lead { font-size: 0.95rem; }

  /* Blog layout — sidebar goes below on mobile */
  .blog-layout { grid-template-columns: 1fr !important; }

  /* Filter bar wraps */
  .filter-bar { gap: 6px; }
  .filter-btn { font-size: 12px; padding: 6px 12px; }

  /* Blog hero search */
  .blog-hero-search { flex-direction: column; }
  .blog-hero-search input { width: 100%; }
  .blog-hero-search .btn { width: 100%; justify-content: center; }

  /* Post featured */
  .post-featured { grid-template-columns: 1fr !important; }
  .post-featured-img { height: 160px; }
  .post-featured-body { padding: 20px; }
  .post-featured-body h2 { font-size: 1.2rem; }

  /* County cards */
  .county-cards { grid-template-columns: 1fr !important; }

  /* City buttons on diagnostic tool */
  .city-btn { font-size: 13px; padding: 8px 14px; }

  /* Diagnostic card metrics — stack to 1 col on very small */
  #diag-metrics { grid-template-columns: 1fr !important; }
  .diag-metric { border-right: none !important; border-bottom: 1px solid var(--gray-200); }
  .diag-metric:last-child { border-bottom: none; }

  /* Diagnostic rec section */
  .diag-rec-inner { flex-direction: column; }
  .diag-rec-inner .btn { width: 100%; justify-content: center; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr !important; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Nav logo text truncation */
  .nav-logo { font-size: 1rem; }

  /* Quiz options */
  .quiz-options { grid-template-columns: 1fr !important; }
  .quiz-opt { font-size: 13px; padding: 12px 14px; }

  /* Water card rows */
  .water-card-row { font-size: 13px; }
  .water-card-big .score { font-size: 2.4rem; }

  /* Breadcrumb */
  .breadcrumb { font-size: 12px; }

  /* Info boxes */
  .info-box, .info-box.warn, .info-box.alert { font-size: 13px; padding: 14px 16px; }

  /* Issue rows on homepage */
  .issue-row { flex-wrap: wrap; gap: 8px; }
  .issue-badge { font-size: 10px; }

  /* County pills */
  .county-pills { gap: 6px; }
  .county-pill { font-size: 12px; padding: 5px 12px; }

  /* Tables — allow horizontal scroll */
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Pro-verified badge */
  .pro-verified { font-size: 11px; }
}

/* ── 768px breakpoints (additions to existing) ── */
@media (max-width: 768px) {
  /* cat-grid → 2 col at 768, not just 1024 */
  .cat-grid { grid-template-columns: repeat(2, 1fr); }

  /* blog-hero-search full width */
  .blog-hero-search { max-width: 100%; }

  /* Post layout sidebar stacks */
  .post-sidebar { position: static !important; }

  /* Diag metrics → 2 col */
  #diag-metrics { grid-template-columns: repeat(2, 1fr) !important; }

  /* PFAS risk sidebar table rows wrap */
  .pfas-alert-bar { flex-direction: column; gap: 8px; }
  .pfas-alert-bar .alert-icon { align-self: flex-start; }
}

/* Post layout — responsive sidebar */
.post-layout-responsive {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .post-layout-responsive { grid-template-columns: 1fr; }
  .post-layout-responsive > aside { position: static !important; }
}

/* Guide hub article grid */
.guide-article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}
@media (max-width: 600px) {
  .guide-article-grid { grid-template-columns: 1fr; }
}

/* County page header grid */
.county-header-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  margin-bottom: 40px;
}
@media (max-width: 600px) {
  .county-header-grid {
    grid-template-columns: 1fr;
  }
  .county-header-grid > div:last-child {
    text-align: left;
  }
}

/* Inline pros/cons grid in RO article */
.pros-cons-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-size: 13px;
}
@media (max-width: 600px) {
  .pros-cons-inline { grid-template-columns: 1fr; }
}

/* Responsive table wrapper */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 24px 0; }
.table-scroll table { margin: 0; min-width: 480px; }

/* Global mobile safety net */
img { max-width: 100%; height: auto; }
.affiliate-btn { white-space: normal; text-align: center; }
.btn { max-width: 100%; }

/* Prevent long words/URLs breaking layout */
p, li, td, th, h1, h2, h3 { overflow-wrap: break-word; word-wrap: break-word; }

/* Fix nav logo overflow on small screens */
@media (max-width: 360px) {
  .nav-logo span { display: none; }
  .nav-logo { font-size: 0.95rem; }
}
