/* ============================================================
   AquaPura — Design System & App Styles
   Covers: site header/footer, homepage, water quality portal
   ============================================================ */

/* ── 1. TOKENS ─────────────────────────────────────────────── */
:root {
  --navy:        #0A1628;
  --navy-light:  #122040;
  --aqua:        #0EA5E9;
  --aqua-dark:   #0284C7;
  --aqua-pale:   #E0F2FE;
  --green-ok:    #10B981;
  --amber-warn:  #F59E0B;
  --red-danger:  #EF4444;

  --gray-50:  #F8FAFC;
  --gray-100: #F1F5F9;
  --gray-200: #E2E8F0;
  --gray-300: #CBD5E1;
  --gray-400: #94A3B8;
  --gray-500: #64748B;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1E293B;

  --font-heading: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
  --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;

  --radius:    8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow:    0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.15);

  --max-w:    1200px;
  --header-h: 68px;
}

/* ── 2. RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--gray-800);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── 3. LAYOUT UTILITIES ────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section     { padding: 80px 0; }
.section--sm { padding: 48px 0; }
.section--lg { padding: 120px 0; }
.lead        { font-size: 17px; color: var(--gray-500); line-height: 1.7; }
.text-center { text-align: center; }

/* ── 4. TYPOGRAPHY ──────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
}
h1 { font-size: clamp(32px, 5vw, 56px); }
h2 { font-size: clamp(24px, 3.5vw, 40px); }
h3 { font-size: clamp(18px, 2.5vw, 24px); }
h4 { font-size: 18px; }
p  { margin-bottom: 0; }
code {
  font-family: 'Consolas', 'Courier New', monospace;
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ── 5. BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--aqua);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--aqua-dark);
  box-shadow: 0 4px 16px rgba(14,165,233,.35);
  transform: translateY(-1px);
}
.btn-primary--sm { padding: 8px 18px; font-size: 13px; }
.btn-primary--lg { padding: 16px 40px; font-size: 17px; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--aqua);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  border: 2px solid var(--aqua);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-secondary:hover { background: var(--aqua); color: #fff; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .2s;
}
.btn-ghost:hover { background: rgba(255,255,255,.2); }

/* ── 6. SITE HEADER (partials/header.ejs) ───────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  height: var(--header-h);
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.site-logo__icon { font-size: 24px; }
.site-logo__text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  color: var(--navy);
  letter-spacing: -.5px;
}
.site-nav { display: flex; gap: 4px; flex: 1; }
.site-nav__link {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: color .15s, background .15s;
}
.site-nav__link:hover, .site-nav__link.active {
  color: var(--navy);
  background: var(--gray-100);
}
.site-header__actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 6px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: .25s;
}

/* ── 7. SITE FOOTER (partials/footer.ejs) ───────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.65);
  padding: 64px 0 32px;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand .site-logo__text { color: #fff; }
.footer-brand p { margin-top: 12px; font-size: 14px; line-height: 1.7; color: rgba(255,255,255,.45); }
.footer-heading {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,.6); transition: color .15s; }
.footer-links a:hover { color: var(--aqua); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255,255,255,.3);
}

/* Old EWG footer classes — kept for wq-* standalone pages */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 32px;
}
.footer-logo-area .footer-logo-text {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.footer-desc { font-size: 13px; color: rgba(255,255,255,.4); margin-top: 8px; }
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,.6); transition: color .15s; }
.footer-col ul li a:hover { color: var(--aqua); }

/* ── 8. WQ HUB PAGE (wq-hub.ejs) ───────────────────────────── */
.wq-hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0d2a52 50%, #0a1e3d 100%);
  padding: 100px 0 80px;
  text-align: center;
}
.wq-hero__title {
  color: #fff;
  font-size: clamp(36px, 6vw, 60px);
  margin-bottom: 20px;
  line-height: 1.15;
}
.wq-hero__sub {
  color: rgba(255,255,255,.75);
  font-size: 18px;
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.65;
}
.wq-search-bar {
  display: flex;
  max-width: 560px;
  margin: 0 auto;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.wq-search-input {
  flex: 1;
  padding: 18px 24px;
  border: none;
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  color: var(--gray-800);
}
.wq-search-btn {
  padding: 18px 28px;
  background: var(--aqua);
  color: #fff;
  border: none;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.wq-search-btn:hover { background: var(--aqua-dark); }

.wq-stats-bar { background: var(--navy-light); border-bottom: 1px solid rgba(255,255,255,.06); }
.wq-stats-bar__inner { display: flex; justify-content: center; }
.wq-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px;
  border-right: 1px solid rgba(255,255,255,.06);
}
.wq-stat:last-child { border-right: none; }
.wq-stat__num {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--aqua);
  line-height: 1;
}
.wq-stat__label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.wq-states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.wq-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  text-align: center;
  transition: border-color .2s, box-shadow .2s, transform .15s;
}
.wq-state-card:hover {
  border-color: var(--aqua);
  box-shadow: 0 4px 16px rgba(14,165,233,.15);
  transform: translateY(-2px);
}
.wq-state-card__code {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1;
}
.wq-state-card__name { font-size: 12px; color: var(--gray-500); margin-top: 4px; line-height: 1.3; }
.wq-state-card__count { font-size: 11px; color: var(--aqua-dark); margin-top: 6px; font-weight: 500; }

/* ── 9. HOMEPAGE SECTIONS (index.ejs — to be created) ───────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0d2a52 60%, #0a1e3d 100%);
  padding: 120px 0 100px;
  text-align: center;
}
.hero__eyebrow {
  display: inline-block;
  background: rgba(14,165,233,.15);
  color: var(--aqua);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 24px;
  border: 1px solid rgba(14,165,233,.3);
}
.hero__title { color: #fff; margin-bottom: 24px; line-height: 1.1; }
.hero__title em { color: var(--aqua); font-style: normal; }
.hero__sub {
  color: rgba(255,255,255,.75);
  font-size: 19px;
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.65;
}
.hero__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.stats-bar { background: var(--gray-50); border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
.stats-bar__inner { display: flex; justify-content: center; }
.stat-item {
  flex: 1;
  max-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
  border-right: 1px solid var(--gray-200);
}
.stat-item:last-child { border-right: none; }
.stat-item__num { font-family: var(--font-heading); font-size: 36px; font-weight: 700; color: var(--navy); }
.stat-item__label { font-size: 13px; color: var(--gray-500); margin-top: 4px; text-align: center; }

.section-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--aqua);
  margin-bottom: 12px;
}
.section-title { font-size: clamp(28px, 4vw, 44px); color: var(--navy); margin-bottom: 16px; }
.section-sub { font-size: 17px; color: var(--gray-500); max-width: 560px; margin: 0 auto; line-height: 1.7; }

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
}
.step-card {
  text-align: center;
  padding: 40px 32px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
}
.step-card__num {
  width: 56px;
  height: 56px;
  background: var(--aqua);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.step-card__title { font-size: 18px; color: var(--navy); margin-bottom: 10px; }
.step-card__text  { font-size: 14px; color: var(--gray-500); line-height: 1.7; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 56px;
}
.product-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.product-card__img { width: 100%; height: 220px; object-fit: cover; background: var(--gray-100); }
.product-card__body { padding: 24px; }
.product-card__name { font-size: 19px; color: var(--navy); margin-bottom: 8px; }
.product-card__tagline { font-size: 14px; color: var(--gray-500); margin-bottom: 20px; }
.product-card__footer { display: flex; align-items: center; justify-content: space-between; }

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.testimonial-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}
.testimonial-card__stars { color: #FBBF24; font-size: 18px; margin-bottom: 16px; }
.testimonial-card__text {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.7;
  margin-bottom: 24px;
  font-style: italic;
}
.testimonial-card__author { font-weight: 600; font-size: 14px; color: var(--navy); }
.testimonial-card__location { font-size: 13px; color: var(--gray-400); }

.aquapura-cta {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin: 48px 0;
}
.aquapura-cta__text h3 { color: #fff; font-size: 22px; margin-bottom: 8px; }
.aquapura-cta__text p  { color: rgba(255,255,255,.65); font-size: 15px; line-height: 1.6; }
.aquapura-cta__actions { display: flex; gap: 12px; flex-shrink: 0; flex-wrap: wrap; }

.cta-section { background: var(--aqua); padding: 100px 0; text-align: center; }
.cta-section h2 { color: #fff; margin-bottom: 16px; }
.cta-section p  { color: rgba(255,255,255,.85); font-size: 18px; margin-bottom: 40px; }
.cta-section .btn-primary { background: #fff; color: var(--aqua); }
.cta-section .btn-primary:hover { background: var(--gray-100); }

/* ── HOMEPAGE PRODUCT CARDS ────────────────────────────────── */
.prod-card-home {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s, transform .2s;
}
.prod-card-home:hover {
  box-shadow: 0 16px 48px rgba(10,22,40,.12);
  transform: translateY(-4px);
}

/* Image area — clean, neutral */
.prod-card-img-wrap {
  height: 220px;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 20px;
}

.prod-card-img {
  max-height: 170px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  transition: transform .3s ease;
}
.prod-card-home:hover .prod-card-img { transform: scale(1.04); }

/* Card body */
.prod-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.prod-card-type {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--aqua);
  margin-bottom: 6px;
  display: block;
}
.prod-card-name {
  font-family: var(--font-heading);
  font-size: 17px;
  color: var(--navy);
  margin-bottom: 6px;
  line-height: 1.3;
}
.prod-card-tagline {
  font-size: 13px;
  color: var(--gray-500);
  line-height: 1.55;
  margin-bottom: 16px;
}
.prod-card-feats {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.prod-card-feats li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.4;
}
.prod-feat-check {
  color: var(--green-ok);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.prod-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
  margin-top: auto;
}
.prod-card-quote {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  transition: color .15s;
}
.prod-card-quote:hover { color: var(--aqua); }


/* ── 10. WQ-* PAGES — OLD EWG CLASSES RESTYLED ──────────────── */
/* These standalone pages use EWG class names, now with AquaPura colors */

/* Header inside standalone wq-* pages */
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
.logo-circle {
  width: 38px;
  height: 38px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.logo-circle span { color: var(--aqua); font-size: 9px; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-family: var(--font-heading); font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.2; }
.logo-sub  { font-size: 10px; color: var(--gray-400); line-height: 1; }

.header-nav { display: flex; gap: 4px; flex: 1; }
.header-nav a {
  padding: 6px 14px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  transition: color .15s, background .15s;
}
.header-nav a:hover { color: var(--navy); background: var(--gray-100); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-search-wrap form {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.header-search-wrap input {
  padding: 7px 14px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
  width: 190px;
}
.header-search-wrap button {
  padding: 7px 12px;
  background: none;
  border: none;
  color: var(--gray-500);
  cursor: pointer;
}
.header-search-wrap button:hover { color: var(--navy); }
.btn-take-action {
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  background: var(--navy);
  color: #fff;
  transition: background .15s;
}
.btn-take-action:hover { background: var(--navy-light); }
.btn-donate {
  padding: 7px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  background: var(--green-ok);
  color: #fff;
  transition: background .15s;
}
.btn-donate:hover { background: #0a9668; }

/* Page hero */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  padding: 48px 0 40px;
}
.page-hero .container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.hero-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,.45);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.hero-breadcrumb a { color: rgba(255,255,255,.6); }
.hero-breadcrumb a:hover { color: var(--aqua); }
.hero-breadcrumb .sep { color: rgba(255,255,255,.25); }
.hero-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--aqua);
  margin-bottom: 10px;
}
.hero-title { color: #fff; font-size: clamp(24px, 4vw, 38px); margin-bottom: 24px; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stat  { display: flex; flex-direction: column; }
.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.hero-stat-value--sm { font-size: 18px; }
.hero-stat-label {
  font-size: 12px;
  color: rgba(255,255,255,.45);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Content layout */
.content-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 40px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  align-items: start;
}
.content-sidebar { position: sticky; top: calc(var(--header-h) + 16px); }
.content-main    { min-width: 0; }

.sidebar-summary {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 24px;
}
.sum-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: 700;
  color: var(--aqua);
  line-height: 1;
}
.sum-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  margin: 8px 0;
  line-height: 1.4;
}
.sum-total { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 6px; }

.sidebar-nav-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-400);
  margin-bottom: 8px;
}
.sidebar-nav { margin-bottom: 24px; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--gray-600);
  transition: background .15s, color .15s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--aqua-pale);
  color: var(--aqua-dark);
}
.sidebar-pws {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 12px;
  color: var(--gray-600);
}

.content-section { margin-bottom: 48px; }
.section-heading {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-200);
}
.highlight-box {
  background: var(--aqua-pale);
  border-left: 4px solid var(--aqua);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.highlight-box strong { display: block; color: var(--navy); font-size: 15px; margin-bottom: 8px; }
.highlight-box p { font-size: 14px; color: var(--gray-600); line-height: 1.65; }
.overview-text p { font-size: 15px; color: var(--gray-700); line-height: 1.7; margin-bottom: 16px; }

/* Contaminant tabs */
.cont-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 20px;
}
.cont-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.cont-tab:hover { color: var(--navy); }
.cont-tab.active { color: var(--navy); border-bottom-color: var(--aqua); }
.cont-tab-count {
  background: var(--gray-200);
  color: var(--gray-700);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
}
.cont-tab.active .cont-tab-count { background: var(--aqua); color: #fff; }
.cont-panel        { display: none; }
.cont-panel.active { display: block; }

/* Contaminant cards */
.cont-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.cont-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  border-top: 3px solid var(--red-danger);
  transition: box-shadow .2s;
}
.cont-card:hover { box-shadow: var(--shadow); }
.cont-card--other { border-top-color: var(--gray-300); }

.cont-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.cont-card-name { font-family: var(--font-heading); font-size: 16px; color: var(--navy); margin-bottom: 4px; }
.cont-card-name a { color: inherit; }
.cont-card-name a:hover { color: var(--aqua-dark); }
.cont-card-effect { font-size: 12px; color: var(--gray-500); }
.cont-info-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.cont-info-icon:hover { background: var(--aqua); color: #fff; border-color: var(--aqua); }

.cont-values { display: flex; gap: 12px; margin-bottom: 16px; }
.cont-value-item { flex: 1; }
.cont-value-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gray-400);
  margin-bottom: 4px;
}
.cont-value-num { font-family: var(--font-heading); font-size: 18px; font-weight: 700; color: var(--navy); }
.cont-card-divider { border-top: 1px solid var(--gray-200); margin-bottom: 16px; }
.cont-multiplier-row { display: flex; align-items: center; gap: 12px; }
.cont-multiplier-num {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  color: var(--red-danger);
  flex-shrink: 0;
}
.cont-multiplier-text { font-size: 13px; color: var(--gray-600); line-height: 1.4; }
.cont-multiplier-text strong { color: var(--navy); }

/* ── Utility Table ────────────────────────────────────────── */
.ut {
  width: 100%;
  border-collapse: collapse;
  font-family: Inter, Helvetica, Arial, sans-serif;
}
.ut-wrap {
  border: 1px solid #d8dee8;
  border-radius: 10px;
  overflow: hidden;
}
.ut thead th {
  background: #071d49;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  font-weight: 700;
  padding: 18px 24px;
  text-align: left;
  white-space: nowrap;
}
.ut thead th:last-child { text-align: left; }
.ut tbody td {
  padding: 18px 24px;
  border-bottom: 1px solid #e8edf4;
  font-size: 15px;
  color: #4a5e78;
  vertical-align: middle;
}
.ut tbody tr:last-child td { border-bottom: none; }
.ut tbody tr:hover td { background: #f8fafc; }
.ut tbody td:first-child {
  font-size: 15px;
  font-weight: 600;
  color: #0f2747;
}
.ut tbody td:first-child a {
  color: #0f2747;
  text-decoration: none;
}
.ut tbody td:first-child a:hover {
  color: var(--aqua);
  text-decoration: underline;
}
.ut tbody td:last-child {
  text-align: left;
  font-variant-numeric: tabular-nums;
}

/* Badges (mantidos para outras páginas) */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  min-width: 36px;
}
.badge--pop       { background: #EFF6FF; color: #1D4ED8; }
.badge--detected  { background: #D1FAE5; color: #065F46; }
.badge--violation { background: #FEF3C7; color: #92400E; }
.badge--exceeded  { background: #FEE2E2; color: #991B1B; }

.btn-outline {
  display: inline-block;
  padding: 4px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s, color .15s, background .15s;
}
.btn-outline:hover {
  border-color: var(--aqua);
  color: var(--aqua);
  background: #f0f9ff;
}

/* Filter button group */
.filter-btn-group { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.filter-btn {
  padding: 8px 18px;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.filter-btn:hover { border-color: var(--aqua); color: var(--aqua-dark); }
.filter-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Empty state */
.empty-state { text-align: center; padding: 64px 24px; color: var(--gray-400); }
.empty-state i    { font-size: 48px; margin-bottom: 16px; }
.empty-state h3   { color: var(--gray-600); font-size: 20px; margin-bottom: 8px; }
.empty-state p    { font-size: 14px; }

/* States list (wq-states.ejs) */
.states-list {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.state-row {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-200);
  gap: 16px;
  transition: background .15s;
}
.state-row:hover { background: var(--gray-50); }
.state-row__code { font-family: var(--font-heading); font-weight: 700; font-size: 15px; color: var(--navy); width: 32px; flex-shrink: 0; }
.state-row__name { flex: 1; font-size: 14px; color: var(--gray-700); }
.state-row__count { font-size: 12px; color: var(--gray-400); }

/* Utility rows */
.utility-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-200);
  gap: 16px;
  transition: background .15s;
}
.utility-row:hover { background: var(--gray-50); }
.utility-row__name { flex: 1; font-size: 14px; font-weight: 500; color: var(--navy); }
.utility-row__name a { color: inherit; }
.utility-row__name a:hover { color: var(--aqua-dark); }
.utility-row__city { font-size: 13px; color: var(--gray-500); min-width: 120px; }
.utility-row__pop  { font-size: 13px; color: var(--gray-500); min-width: 100px; }
.utility-row__cont { font-size: 13px; font-weight: 600; }
.utility-row__cont--high { color: var(--red-danger); }
.utility-row__cont--ok   { color: var(--green-ok); }

/* Search results */
.search-result-card {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 12px;
  transition: box-shadow .2s;
}
.search-result-card:hover { box-shadow: var(--shadow); }
.search-result-card__title { font-size: 16px; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.search-result-card__title a { color: inherit; }
.search-result-card__title a:hover { color: var(--aqua-dark); }
.search-result-card__meta { font-size: 13px; color: var(--gray-500); }

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.blog-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
}
.blog-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.blog-card__img     { width: 100%; height: 200px; object-fit: cover; background: var(--gray-100); }
.blog-card__body    { padding: 24px; }
.blog-card__tag     { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--aqua); margin-bottom: 10px; }
.blog-card__title   { font-size: 18px; color: var(--navy); margin-bottom: 10px; line-height: 1.4; }
.blog-card__title a { color: inherit; }
.blog-card__title a:hover { color: var(--aqua-dark); }
.blog-card__excerpt { font-size: 14px; color: var(--gray-500); line-height: 1.65; margin-bottom: 20px; }
.blog-card__date    { font-size: 12px; color: var(--gray-400); }

/* ── 11. RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1024px) {
  .content-layout          { grid-template-columns: 220px 1fr; }
  .site-footer__grid       { grid-template-columns: 1fr 1fr; }
  .testimonials-grid       { grid-template-columns: repeat(2, 1fr); }
  .steps-grid              { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .site-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    padding: 12px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }
  .hamburger     { display: flex; }

  .content-layout  { grid-template-columns: 1fr; }
  .content-sidebar { position: static; }
  .hero-stats      { gap: 20px; }

  .footer-grid         { grid-template-columns: 1fr 1fr; gap: 28px; }
  .site-footer__grid   { grid-template-columns: 1fr; gap: 28px; }
  .cont-cards-grid     { grid-template-columns: 1fr; }
  .steps-grid          { grid-template-columns: 1fr; }
  .testimonials-grid   { grid-template-columns: 1fr; }
  .wq-states-grid      { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .states-list         { grid-template-columns: 1fr 1fr; }
  .aquapura-cta        { flex-direction: column; text-align: center; }
  .header-search-wrap  { display: none; }
  .wq-stats-bar__inner { flex-wrap: wrap; }
  .wq-stat             { min-width: 50%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.06); }
}

@media (max-width: 480px) {
  .container     { padding: 0 16px; }
  .states-list   { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions a { text-align: center; }
  .wq-search-bar {
    flex-direction: column;
    border-radius: var(--radius);
    overflow: visible;
    box-shadow: none;
    gap: 8px;
  }
  .wq-search-input {
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
  }
  .wq-search-btn { border-radius: var(--radius); }
}

/* ── MOBILE RESPONSIVENESS ──────────────────────────────────── */

/* Prevent horizontal overflow globally */
html, body { overflow-x: hidden; max-width: 100%; }
* { box-sizing: border-box; }

/* ── Layout grid classes ── */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.two-col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.three-col-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.four-col-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.products-grid-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .products-grid-layout { grid-template-columns: repeat(2, 1fr); }
  .four-col-grid        { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Hero */
  .hero-grid               { grid-template-columns: 1fr; gap: 0; }
  .hero-grid .hero-image   { display: none; }
  .hero { padding: 48px 0 40px; }
  .hero__title { font-size: clamp(28px, 8vw, 42px) !important; }

  /* Two col */
  .two-col-grid            { grid-template-columns: 1fr; gap: 32px; }

  /* Three col → 1 col */
  .three-col-grid          { grid-template-columns: 1fr; }
  .products-grid-layout    { grid-template-columns: 1fr; }

  /* Stats bar */
  .stats-bar__inner        { flex-wrap: wrap; gap: 0; }
  .stat-item               { min-width: 50%; padding: 16px; border-right: none; border-bottom: 1px solid var(--gray-200); }

  /* Section padding */
  .section                 { padding: 48px 0; }

  /* Gallery */
  .install-card            { min-height: 240px; }

  /* Logo */
  .site-logo img           { height: 36px !important; }

  /* Product cards full width */
  .product-card            { width: 100%; }

  /* Sidebar layout */
  .sidebar-layout          { grid-template-columns: 1fr !important; }
  .sidebar-layout > *:last-child { order: -1; }
}

@media (max-width: 480px) {
  /* Stats single col */
  .stat-item               { min-width: 100%; }

  /* Buttons full width */
  .btn-primary--lg         { width: 100%; text-align: center; justify-content: center; }

  /* Section title smaller */
  .section-title           { font-size: 22px; }

  /* Cards */
  .diff-card               { padding: 20px 16px; }

  /* Why page grids */
  .problem-grid            { grid-template-columns: 1fr !important; }

  /* Contact form name fields stack */
  .name-grid               { grid-template-columns: 1fr !important; }
}

@media (max-width: 768px) {
  /* Contact page */
  .contact-layout          { grid-template-columns: 1fr !important; gap: 40px !important; }

  /* Product page sidebar */
  .product-detail-layout   { grid-template-columns: 1fr !important; }

  /* Blog grid */
  .blog-grid               { grid-template-columns: 1fr !important; }

  /* Why page section grids */
  .diff-grid               { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 480px) {
  .diff-grid               { grid-template-columns: 1fr !important; }
}
