/* American Water Quality Guide - Light Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #1e293b;
  --text-muted: #64748b;
  --accent-blue: #1e40af;
  --accent-teal: #0891b2;
  --accent-green: #059669;
  --accent-red: #dc2626;
  --accent-orange: #d97706;
  --accent-purple: #7c3aed;
  --accent-yellow: #ca8a04;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --max-width: 900px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 17px;
}

a { color: var(--accent-blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-teal); }

img { max-width: 100%; height: auto; }

/* Navigation */
.nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}
.nav-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-blue);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.nav-logo span { color: var(--text-primary); }
.nav-links { display: flex; gap: 1.25rem; font-size: .875rem; flex-wrap: wrap; }
.nav-links a { color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--accent-blue); }
.nav-toggle { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; }

@media (max-width: 768px) {
  .nav-links { display: none; position: absolute; top: 60px; left: 0; right: 0; background: #ffffff; flex-direction: column; padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); gap: .75rem; }
  .nav-links.active { display: flex; }
  .nav-toggle { display: block; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 50%, #f8fafc 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem 1.5rem;
  text-align: center;
}
.hero h1 { font-size: 2.75rem; font-weight: 800; margin-bottom: 1rem; line-height: 1.2; color: var(--text-primary); }
.hero p { font-size: 1.2rem; color: var(--text-muted); max-width: 650px; margin: 0 auto; }
.hero .badge {
  display: inline-block;
  background: #dbeafe;
  color: var(--accent-blue);
  padding: .35rem 1rem;
  border-radius: 2rem;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
}

/* Content */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text-primary);
  border-left: 4px solid var(--accent-blue);
  padding-left: .75rem;
}
.content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 2rem 0 .75rem;
  color: var(--text-primary);
}
.content p { margin-bottom: 1.25rem; color: var(--text-secondary); }
.content ul, .content ol { margin-bottom: 1.25rem; padding-left: 1.5rem; color: var(--text-secondary); }
.content li { margin-bottom: .5rem; }
.content strong { color: var(--text-primary); }

/* Alert box */
.alert {
  background: #fffbeb;
  border-left: 4px solid var(--accent-orange);
  padding: 1.25rem 1.5rem;
  border-radius: 0 .5rem .5rem 0;
  margin: 2rem 0;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}
.alert-icon { font-size: 1.5rem; flex-shrink: 0; }
.alert p { margin: 0; color: var(--text-secondary); }
.alert strong { color: var(--accent-orange); }

.info-box {
  background: #eff6ff;
  border-left: 4px solid var(--accent-blue);
  padding: 1.25rem 1.5rem;
  border-radius: 0 .5rem .5rem 0;
  margin: 2rem 0;
}
.info-box p { margin: 0; }

/* Cards grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.card:hover { border-color: var(--accent-blue); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card h3 { margin: 0 0 .5rem; font-size: 1.1rem; color: var(--text-primary); }
.card p { margin: 0; font-size: .95rem; }
.card .card-tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 1rem;
  margin-bottom: .75rem;
}
.card .card-tag.green { background: #ecfdf5; color: var(--accent-green); }
.card .card-tag.blue { background: #dbeafe; color: var(--accent-blue); }
.card .card-tag.purple { background: #ede9fe; color: var(--accent-purple); }
.card .card-tag.orange { background: #fef3c7; color: var(--accent-orange); }
.card .card-tag.red { background: #fee2e2; color: var(--accent-red); }

/* Product cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.product-card .product-tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .25rem .75rem;
  border-radius: 1rem;
  margin-bottom: .75rem;
  width: fit-content;
}
.product-card h3 { font-size: 1.15rem; margin: 0 0 .5rem; color: var(--text-primary); }
.product-card .price { color: var(--accent-green); font-weight: 600; font-size: 1.1rem; margin-bottom: .5rem; }
.product-card p { font-size: .9rem; flex-grow: 1; }
.product-card .btn {
  display: block;
  text-align: center;
  padding: .75rem;
  border-radius: .5rem;
  font-weight: 600;
  font-size: .95rem;
  margin-top: 1rem;
  transition: all .2s;
}
.btn-green { background: var(--accent-green); color: #ffffff; }
.btn-green:hover { background: #047857; color: #ffffff; }
.btn-blue { background: var(--accent-blue); color: #ffffff; }
.btn-blue:hover { background: #1e3a8a; color: #ffffff; }
.btn-purple { background: var(--accent-purple); color: #ffffff; }
.btn-purple:hover { background: #6d28d9; color: #ffffff; }

/* Comparison table */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border-radius: .75rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead { background: #f1f5f9; }
th { padding: .75rem 1rem; text-align: left; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
td { padding: .75rem 1rem; border-top: 1px solid var(--border); color: var(--text-secondary); }
tbody tr:nth-child(even) { background: #f8fafc; }
tbody tr:hover { background: #eff6ff; }
.check { color: var(--accent-green); font-weight: 600; }
.cross { color: var(--accent-red); }

/* FAQ */
.faq { margin: 2.5rem 0; }
.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: .75rem;
  margin-bottom: .75rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.faq summary {
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
}
.faq summary::after { content: '+'; font-size: 1.25rem; color: var(--accent-blue); transition: transform .2s; }
.faq details[open] summary::after { content: '−'; }
.faq summary::-webkit-details-marker { display: none; }
.faq .faq-answer { padding: 0 1.25rem 1.25rem; color: var(--text-secondary); }

/* Stats row */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.25rem;
  text-align: center;
}
.stat .stat-value { font-size: 1.75rem; font-weight: 800; color: var(--accent-blue); }
.stat .stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

/* TOC */
.toc {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.5rem;
  margin: 2rem 0;
}
.toc h3 { font-size: 1rem; margin: 0 0 .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }
.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: .4rem; font-size: .95rem; }

/* Internal links section */
.related {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1.5rem;
  margin: 2.5rem 0;
}
.related h3 { margin: 0 0 1rem; font-size: 1.1rem; color: var(--text-primary); }
.related-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.related-links a {
  background: #ffffff;
  padding: .5rem 1rem;
  border-radius: .5rem;
  font-size: .9rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.related-links a:hover { border-color: var(--accent-blue); background: #eff6ff; }

/* Footer */
.footer {
  background: #f1f5f9;
  border-top: 1px solid var(--border);
  padding: 3rem 1.5rem;
  margin-top: 2rem;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}
.footer p { color: var(--text-muted); font-size: .85rem; margin-bottom: .5rem; }
.footer-links { margin-top: 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.footer-links a { color: var(--text-muted); font-size: .85rem; }
.footer-links a:hover { color: var(--accent-blue); }

/* Updated date */
.updated {
  display: inline-block;
  color: var(--text-muted);
  font-size: .85rem;
  margin-bottom: 1.5rem;
}

/* CTA box */
.cta-box {
  background: linear-gradient(135deg, #eff6ff, #ecfdf5);
  border: 1px solid #bfdbfe;
  border-radius: .75rem;
  padding: 2rem;
  text-align: center;
  margin: 2.5rem 0;
}
.cta-box h3 { color: var(--accent-blue); margin: 0 0 .75rem; }
.cta-box p { margin-bottom: 1rem; }
.cta-box .btn {
  display: inline-block;
  padding: .75rem 2rem;
  border-radius: .5rem;
  font-weight: 600;
}

/* Breadcrumbs */
.breadcrumb {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-blue); }
.breadcrumb span { margin: 0 .35rem; }

/* Trust badge */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #f1f5f9;
  border: 1px solid var(--border);
  padding: .25rem .75rem;
  border-radius: 2rem;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-right: .5rem;
  margin-bottom: .5rem;
}
