/* ============================================================
   TherapyCostGuide — style.css
   Palette: Periwinkle #5B7EA6 + Terra Cotta #D4845A + Warm White #F7F8FC
   Typography: Georgia serif headings, system-ui body
   Style: NAMI/Psychology Today — warm, professional, approachable
   ============================================================ */

/* ── CSS Custom Properties ── */
:root {
  --primary:    #5B7EA6;
  --accent:     #D4845A;
  --dark:       #1E2D3D;
  --bg:         #F7F8FC;
  --card-bg:    #FFFFFF;
  --border:     #DDE3EC;
  --text:       #2C3A4A;
  --text-muted: #6B7A8D;
  --primary-dark: #3F5F82;
  --accent-dark:  #B8673D;
  --success:    #3A7D58;
  --radius:     10px;
  --shadow:     0 2px 14px rgba(91, 126, 166, 0.10);
  --max-w:      1100px;
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.75;
}

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

a {
  color: var(--primary);
  text-decoration: underline;
}

a:hover {
  color: var(--accent);
}

/* ── Container ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Reading Progress Bar ── */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--accent);
  z-index: 9999;
  width: 0;
  transition: width 0.1s;
}

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  background: #fff;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(91, 126, 166, 0.08);
}

.site-header::before {
  content: '';
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 16px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-text {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--dark);
  white-space: nowrap;
}

.logo-text span {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--dark);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.15s;
}

.site-nav a:hover {
  color: var(--primary);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  background: linear-gradient(135deg, #3F5F82 0%, #5B7EA6 55%, #7A9DBE 100%);
  color: #fff;
  padding: 80px 24px 72px;
  text-align: center;
}

.hero-inner {
  max-width: 780px;
  margin: 0 auto;
}

.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: bold;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 16px;
  line-height: 1.65;
}

.hero-stat {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 40px;
  padding: 8px 22px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 32px;
}

.hero-stat strong {
  color: #fff;
  font-weight: 700;
}

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 30px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

/* ============================================================
   COST SNAPSHOT BAR
   ============================================================ */

.cost-snapshot-section {
  background: #fff;
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

.cost-snapshot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.snapshot-tile {
  background: var(--bg);
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.snapshot-tile:hover {
  transform: translateY(-2px);
}

.snapshot-cost {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.35rem;
  font-weight: bold;
  color: var(--primary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.snapshot-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   TRUST BAR
   ============================================================ */

.trust-bar {
  background: #EBF0F7;
  border: 1px solid #C8D5E7;
  border-radius: var(--radius);
  padding: 12px 20px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--primary-dark);
  margin: 16px 0 28px;
}

.trust-bar span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

/* ============================================================
   CATEGORY SECTION
   ============================================================ */

.categories-section {
  padding: 56px 0 16px;
}

.popular-section {
  padding: 16px 0 64px;
}

.section-heading {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.55rem;
  font-weight: bold;
  color: var(--dark);
  margin-bottom: 8px;
}

.section-subheading {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.category-card {
  display: block;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--border);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
  border-top-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(91, 126, 166, 0.16);
  color: inherit;
  text-decoration: none;
}

.category-icon {
  font-size: 1.8rem;
  margin-bottom: 10px;
  display: block;
}

.category-card h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.05rem;
  font-weight: bold;
  color: var(--dark);
  margin-bottom: 6px;
}

.category-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   ARTICLE GRID
   ============================================================ */

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.article-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 3px solid transparent;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  overflow: hidden;
}

.article-card:hover {
  border-left-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91, 126, 166, 0.14);
  color: inherit;
  text-decoration: none;
}

.article-card-inner {
  padding: 22px 20px;
}

.article-card-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: bold;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.35;
}

.article-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}

.article-card-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

/* ============================================================
   LIST PAGE
   ============================================================ */

.list-page {
  padding-bottom: 64px;
}

.list-hero {
  background: linear-gradient(135deg, #3F5F82 0%, #5B7EA6 100%);
  color: #fff;
  padding: 52px 0;
}

.list-hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: bold;
  color: #fff;
  margin-bottom: 10px;
}

.list-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
}

.list-page .container {
  padding-top: 40px;
}

/* ============================================================
   ARTICLE LAYOUT (single)
   ============================================================ */

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  max-width: var(--max-w);
  margin: 48px auto;
  padding: 0 24px;
  align-items: start;
}

.article-body {
  min-width: 0;
}

.article-body h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: bold;
  color: var(--dark);
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-body h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.35rem;
  font-weight: bold;
  color: var(--dark);
  margin: 38px 0 12px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
}

.article-body h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary-dark);
  margin: 26px 0 8px;
}

.article-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 6px;
}

.article-body p {
  margin-bottom: 18px;
}

.article-body ul,
.article-body ol {
  padding-left: 24px;
  margin-bottom: 18px;
}

.article-body li {
  margin-bottom: 6px;
}

.article-body a {
  color: var(--primary);
  text-decoration: underline;
}

.article-body a:hover {
  color: var(--accent);
}

.article-body strong {
  font-weight: 700;
  color: var(--dark);
}

/* ── Infographic ── */
.infographic {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 28px;
  display: block;
  border: 1px solid var(--border);
}

/* ── Breadcrumb ── */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ============================================================
   COST TABLE
   ============================================================ */

.cost-table-wrap {
  margin: 28px 0;
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cost-table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}

.cost-table-wrap table thead tr,
.cost-table-wrap table tr:first-child {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.cost-table-wrap table thead th,
.cost-table-wrap table tr:first-child td {
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  color: #fff;
}

.cost-table-wrap table tbody tr:nth-child(even),
.cost-table-wrap table tr:nth-child(even):not(:first-child) {
  background: #F2F5FA;
}

.cost-table-wrap table tbody tr:nth-child(odd),
.cost-table-wrap table tr:nth-child(odd):not(:first-child) {
  background: #fff;
}

.cost-table-wrap table td,
.cost-table-wrap table tbody th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.cost-table-wrap table tr:last-child td {
  font-weight: 700;
  border-left: 3px solid var(--accent);
}

/* ============================================================
   KEY BOX
   ============================================================ */

.key-box {
  border-left: 4px solid var(--primary);
  background: #EBF0F7;
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
}

.key-box h4 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--primary-dark);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.key-box p:last-child {
  margin-bottom: 0;
}

.key-box ul {
  padding-left: 20px;
}

/* ============================================================
   WARN BOX
   ============================================================ */

.warn-box {
  border-left: 4px solid var(--accent);
  background: #FDF1EB;
  padding: 20px 24px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
}

.warn-box p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
  position: sticky;
  top: 80px;
}

.sidebar-widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--primary);
}

.sidebar-widget h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 1rem;
  font-weight: bold;
  color: var(--dark);
  margin-bottom: 10px;
}

.sidebar-widget p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.6;
}

.sidebar-widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget li {
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  font-size: 0.875rem;
}

.sidebar-widget li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-widget a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.sidebar-widget a:hover {
  color: var(--accent);
}

/* ============================================================
   DISCLAIMER
   ============================================================ */

.disclaimer {
  background: #EFF2F7;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 40px;
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--dark);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 56px 24px 28px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 36px;
  margin-bottom: 40px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}

.footer-col h4 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.9rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 768px) {
  .cost-snapshot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .site-nav {
    gap: 14px;
  }

  .hero {
    padding: 56px 20px 48px;
  }

  .trust-bar {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .cost-snapshot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .site-nav {
    flex-wrap: wrap;
  }

  .snapshot-cost {
    font-size: 1.1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Ad Placeholder ---------- */
.ad-banner {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.ad-banner-leaderboard { height: 90px; }
.ad-banner-rectangle  { height: 250px; }
.ad-banner-inline     { height: 120px; margin: 32px 0; }
