/* ============================================================
   Sauna History — Design system
   Visual mood: peakwestplumbing.com/plumbing-colorado
   Deep navy + red CTA accent on light backgrounds, bold headings.
   ============================================================ */
:root {
  --navy: #0a2a43;
  --navy-dark: #071f34;
  --navy-2: #0b1953;
  --accent: #e63946;
  --accent-dark: #d72027;
  --bg: #ffffff;
  --bg-soft: #f5f5f5;
  --bg-soft-2: #f0f3fa;
  --text: #242424;
  --muted: #797979;
  --border: #e1e1e1;
  --radius: 0.5rem;
  --content-max: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  color: var(--text);
  background: var(--bg-soft);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ================= HEADER ================= */
.site-header { background: var(--navy); }
.header-top { background: var(--navy-dark); color: #fff; text-align: center; padding: 0.55rem 1rem; font-size: 0.85rem; letter-spacing: 0.2px; font-weight: 600; }
.masthead { background: #fff; border-bottom: 3px solid var(--navy); }
.masthead-inner { max-width: var(--content-max); margin: 0 auto; padding: 1.15rem 1.25rem; }
.logo a { text-decoration: none; }
.logo-main { font-size: 1.7rem; font-weight: 800; color: var(--navy); letter-spacing: 0.2px; }
.logo-main strong { color: var(--accent); }
.tagline { display: block; margin-top: 0.15rem; font-size: 0.82rem; color: var(--muted); }

.nav-bar { background: var(--navy); }
.nav-inner { max-width: var(--content-max); margin: 0 auto; padding: 0 1rem; }
.mobile-toggle {
  display: none; background: transparent; border: 0; cursor: pointer; padding: 0.75rem;
  margin: 0 auto;
}
.mobile-toggle span { display: block; width: 24px; height: 3px; background: #fff; margin: 4px 0; border-radius: 2px; }

.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.main-nav a {
  color: #fff; text-decoration: none; font-weight: 600; padding: 0.7rem 0.95rem;
  border-radius: 4px; font-size: 0.98rem;
}
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,0.12); color: #fff; }
.main-nav a.active { border-bottom: 2px solid var(--accent); }

.dropdown { position: relative; }
.dropdown-toggle {
  background: transparent; color: #fff; border: 0; cursor: pointer; font-weight: 600;
  padding: 0.7rem 0.95rem; font-size: 0.98rem; border-radius: 4px;
}
.dropdown-toggle:hover { background: rgba(255,255,255,0.12); }
.dropdown-menu {
  position: absolute; left: 0; top: 100%; background: #fff; min-width: 240px;
  box-shadow: 0 10px 24px rgba(10,42,67,0.18); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.5rem 0; display: none; z-index: 60;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block; color: var(--navy); padding: 0.55rem 1rem; font-weight: 500;
  text-decoration: none; font-size: 0.95rem;
}
.dropdown-menu a:hover { background: var(--bg-soft-2); color: var(--accent); }

/* Mobile nav (<= 768) */
@media (max-width: 768px) {
  .main-nav { display: none; }
  .main-nav.open { display: flex; flex-direction: column; align-items: stretch; background: var(--navy); width: 100%; }
  .main-nav.open > a, .main-nav.open .dropdown-toggle { width: 100%; text-align: left; }
  .main-nav.open .dropdown-menu { position: static; box-shadow: none; }
  .dropdown.active .dropdown-menu { display: block; }
  .mobile-toggle { display: block; }
}

/* ================= HERO ================= */
.page-hero { background: var(--navy); color: #fff; }
.hero-inner { max-width: var(--content-max); margin: 0 auto; padding: 2.4rem 1.25rem; }
.hero-category {
  display: inline-block; margin-top: 0; color: #fff; background: rgba(230,57,70,0.16);
  border: 1px solid var(--accent); padding: 0.2rem 0.85rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.4px;
}
.hero-title { font-size: clamp(1.7rem, 2.6vw + 1rem, 2.7rem); font-weight: 800; line-height: 1.12; color: #fff; margin: 1rem 0 0.6rem; letter-spacing: 0.2px; }
.hero-title a { color: var(--accent); }
.hero-description { font-size: 1.08rem; line-height: 1.5; max-width: 800px; opacity: 0.95; margin: 0 0 1rem; }
.hero-meta { font-size: 0.85rem; color: rgba(255,255,255,0.85); margin-top: 0.6rem; }
.hero-meta span { margin: 0 0.35rem; }
.btn-hero {
  display: inline-block; margin: 0.5rem 0 1.1rem; background: var(--accent); color: #fff;
  text-decoration: none; font-weight: 700; padding: 0.8rem 1.6rem; border: 0;
  border-radius: 8px; font-size: 1rem; box-shadow: 0 8px 20px rgba(230,57,70,0.35);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-hero:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(230,57,70,0.45); background: var(--accent-dark); }
.hero-img {
  display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--radius); border: 3px solid #fff; margin-top: 1.2rem;
}
.hero-img-caption { font-size: 0.82rem; color: rgba(255,255,255,0.8); text-align: center; margin: 0.35rem 0 0; }

/* ================= LAYOUT ================= */
.layout { max-width: var(--content-max); margin: 2rem auto; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.6rem; align-items: start; }
.content-main { background: #fff; padding: 2rem 2.3rem; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 14px rgba(10,42,67,0.08); }

/* Typography + content */
.content-main h2 { color: var(--navy); font-weight: 800; font-size: 1.55rem; margin: 1.6rem 0 0.7rem; line-height: 1.2; }
.content-main h3 { color: var(--navy-2); font-weight: 700; font-size: 1.18rem; margin: 1.1rem 0 0.5rem; line-height: 1.28; }
.content-main p { margin: 0 0 1rem; }
.content-main a { color: var(--navy); }
p.lead { font-size: 1.12rem; line-height: 1.62; color: var(--text); }

/* Images */
.featured-image {
  display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover;
  border-radius: var(--radius); margin: 1.4rem 0 0.4rem; border: 1px solid var(--border);
}
.image-caption { font-size: 0.82rem; color: var(--muted); text-align: center; margin: 0.3rem 0 0.2rem; }

/* Video */
.video-wrap { margin: 1.6rem 0 0.4rem; }
.video-wrap iframe {
  display: block; width: 100%; aspect-ratio: 16/9; border: 1px solid var(--border);
  border-radius: var(--radius); background: #000;
}

/* FAQ */
.faq-list { margin: 0.6rem 0; padding: 0; list-style: none; }
.faq-list li { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.9rem 1.1rem; margin: 0 0 0.7rem; }
.faq-q { font-weight: 700; color: var(--navy); margin: 0 0 0.35rem; }

hr.sep { border: 0; border-top: 1px solid var(--border); margin: 1.6rem 0; }

/* Related */
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1rem; }
.related-card {
  display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; text-decoration: none; color: var(--text); transition: transform .15s ease, border-color .15s ease;
}
.related-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.related-card h4 { color: var(--navy); font-weight: 700; font-size: 1.02rem; margin: 0 0 0.45rem; line-height: 1.25; }
.related-card p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* Topic grid (homepage category cards) */
.topic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; margin: 1rem 0 1.6rem; }
.topic-card {
  display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; box-shadow: 0 4px 12px rgba(10,42,67,0.08);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(10,42,67,0.16); border-color: var(--accent); }
.topic-card img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.topic-card-body { padding: 1rem 1.1rem; }
.topic-card-body h3 { color: var(--navy); font-weight: 800; font-size: 1.15rem; margin: 0 0 0.5rem; }
.topic-card-body p { font-size: 0.94rem; color: var(--muted); margin: 0; }

/* Category index */
.stat-card {
  background: var(--navy); color: #fff; border-radius: var(--radius); padding: 0.9rem 1.1rem;
  margin: 1.1rem 0 0.4rem; box-shadow: 0 4px 12px rgba(10,42,67,0.12);
}
.stat-card p { margin: 0; }
.stat-card .stat-number { font-weight: 800; font-size: 1.06rem; }
.content-main ul { margin: 0.6rem 0 1.2rem; padding-left: 1.3rem; }
.content-main li { margin: 0.25rem 0; }

/* CTA */
.cta-box {
  background: var(--navy); color: #fff; border-radius: var(--radius); padding: 2rem 2.2rem;
  margin: 1.6rem 0; text-align: center; box-shadow: 0 8px 22px rgba(10,42,67,0.18);
}
.cta-box h3 { color: #fff; font-weight: 800; font-size: 1.4rem; margin: 0 0 0.7rem; }
.cta-box p { color: rgba(255,255,255,0.9); margin: 0 0 1.1rem; }
.cta-btn {
  display: inline-block; background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 700; padding: 0.75rem 1.5rem; border: 0; border-radius: 8px; font-size: 1rem;
}
.cta-btn:hover { background: var(--accent-dark); }

/* ================= SIDEBAR ================= */
.sidebar { display: flex; flex-direction: column; gap: 1.1rem; }
.sidebar-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: 0 3px 10px rgba(10,42,67,0.07); }
.sidebar-card h4 { color: var(--navy); font-weight: 800; font-size: 1.05rem; margin: 0 0 0.6rem; text-transform: uppercase; letter-spacing: 0.4px; font-size: 0.9rem; }
.sidebar-card p { font-size: 0.92rem; color: var(--text); margin: 0 0 0.7rem; }
.sidebar-card p:last-child { margin: 0; }
.toc-list { margin: 0; padding: 0; list-style: none; }
.toc-list li { margin: 0.3rem 0; }
.toc-list a { color: var(--navy); text-decoration: none; font-weight: 500; font-size: 0.92rem; }
.toc-list a:hover { color: var(--accent); }
.category-list { margin: 0; padding: 0; list-style: none; }
.category-list li { margin: 0.35rem 0; }
.category-list a { color: var(--navy); text-decoration: none; font-weight: 500; font-size: 0.93rem; display: flex; justify-content: space-between; }
.category-list a:hover { color: var(--accent); }
.category-list .count { color: var(--muted); font-size: 0.82rem; }

/* ================= FOOTER ================= */
.site-footer { background: var(--navy); color: #fff; margin-top: 2.4rem; }
.footer-grid {
  max-width: var(--content-max); margin: 0 auto; padding: 2.2rem 1.25rem;
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1.6rem;
}
.footer-col h4 { color: #fff; font-weight: 800; font-size: 1.02rem; margin: 0 0 0.65rem; text-transform: uppercase; letter-spacing: 0.4px; }
.footer-col p { font-size: 0.9rem; color: rgba(255,255,255,0.88); line-height: 1.5; margin: 0; }
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col li { margin: 0.3rem 0; }
.footer-col a { color: rgba(255,255,255,0.88); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { max-width: var(--content-max); margin: 0 auto; padding: 1.1rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.15); text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.82); }

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { order: 2; }
  .related-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: minmax(0,1fr); }
  .topic-grid { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 520px) {
  .related-grid { grid-template-columns: minmax(0,1fr); }
  .content-main { padding: 1.4rem 1.2rem; }
}