/* Mental Health Recovery Guide - Stylesheet */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --accent: #10b981;
  --accent-dark: #059669;
  --accent-light: #d1fae5;
  --text: #1e293b;
  --text-light: #64748b;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --max-w: 1200px;
  --max-w-article: 780px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--text); line-height: 1.7; background: var(--bg); }
img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.article-container { max-width: var(--max-w-article); margin: 0 auto; padding: 0 1.5rem; }

/* Phone Banner */
.phone-banner { background: var(--primary); color: white; text-align: center; padding: 0.6rem 1rem; font-size: 0.85rem; }
.phone-banner a { color: white; font-weight: 600; text-decoration: underline; }

/* Nav */
.nav { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.05rem; color: var(--text); text-decoration: none; }
.nav-logo svg { flex-shrink: 0; }
.nav-links { display: flex; align-items: center; list-style: none; gap: 0.25rem; }
.nav-links li a { padding: 0.5rem 0.75rem; border-radius: var(--radius); color: var(--text-light); font-size: 0.9rem; font-weight: 500; transition: all 0.2s; text-decoration: none; }
.nav-links li a:hover, .nav-links li a.active { color: var(--primary); background: var(--primary-light); }
.nav-cta { background: var(--primary) !important; color: white !important; padding: 0.5rem 1rem !important; }
.nav-cta:hover { background: var(--primary-dark) !important; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; width: 40px; height: 40px; }
.nav-toggle svg { width: 24px; height: 24px; }

/* Breadcrumbs */
.breadcrumbs { padding: 1rem 0; font-size: 0.85rem; color: var(--text-light); }
.breadcrumbs a { color: var(--text-light); }
.breadcrumbs span { margin: 0 0.4rem; }

/* Hero */
.hero { position: relative; min-height: 500px; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(30,41,59,.85), rgba(37,99,235,.7)); }
.hero-content { position: relative; z-index: 2; max-width: var(--max-w); margin: 0 auto; padding: 4rem 1.5rem; color: white; }
.hero-content h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 2.8rem; margin-bottom: 1.25rem; line-height: 1.2; }
.hero-content p { font-size: 1.15rem; max-width: 640px; opacity: 0.9; margin-bottom: 1.5rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-label { text-transform: uppercase; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; color: var(--primary); margin-bottom: 0.5rem; }
h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 2.2rem; margin-bottom: 1rem; line-height: 1.25; }
h2 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.6rem; margin: 2rem 0 1rem; line-height: 1.3; color: var(--text); }
h3 { font-size: 1.15rem; font-weight: 600; margin: 1.5rem 0 0.75rem; }
.lead { font-size: 1.15rem; color: var(--text-light); max-width: 700px; margin-bottom: 2rem; }

/* Buttons */
.btn { display: inline-block; padding: 0.75rem 1.5rem; border-radius: var(--radius); font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: all 0.2s; cursor: pointer; border: none; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover { background: var(--accent-dark); text-decoration: none; }
.btn-outline { border: 2px solid var(--border); color: var(--text); background: white; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all 0.2s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 1.5rem; }
.card-body h3 { margin-top: 0; }
.card-body h3 a { color: var(--text); }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 1rem; }
.card-tag { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.25rem 0.75rem; border-radius: 20px; margin-bottom: 0.75rem; }
.tag-blue { background: var(--primary-light); color: var(--primary-dark); }
.tag-green { background: var(--accent-light); color: var(--accent-dark); }
.tag-purple { background: #ede9fe; color: #6d28d9; }
.tag-orange { background: #ffedd5; color: #c2410c; }
.tag-red { background: #fee2e2; color: #dc2626; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2rem; text-align: center; }
.stat-num { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-light); margin-top: 0.25rem; }

/* CTA Box */
.cta-box { background: linear-gradient(135deg, var(--primary-light), #ede9fe); border: 2px solid var(--primary); border-radius: var(--radius-lg); padding: 2.5rem; text-align: center; margin: 2.5rem 0; }
.cta-box h3 { color: var(--primary-dark); font-family: 'Playfair Display', Georgia, serif; font-size: 1.4rem; margin: 0 0 0.75rem; }
.cta-box p { color: var(--text); max-width: 550px; margin: 0 auto 1.25rem; }

.cta-box-green { background: linear-gradient(135deg, var(--accent-light), #ecfdf5); border-color: var(--accent); }
.cta-box-green h3 { color: var(--accent-dark); }

/* Article Content */
.article-content { max-width: var(--max-w-article); margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.article-content p { margin-bottom: 1rem; }
.article-content ul, .article-content ol { margin: 1rem 0 1.5rem 1.5rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content img { border-radius: var(--radius-lg); margin: 1.5rem 0; }

/* Sidebar Layout */
.content-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.sidebar { position: sticky; top: 80px; }
.sidebar-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; }
.sidebar-card h4 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--text); }
.sidebar-card ul { list-style: none; }
.sidebar-card ul li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.sidebar-card ul li:last-child { border-bottom: none; }
.sidebar-card ul li a { color: var(--text-light); font-size: 0.9rem; }
.sidebar-card ul li a:hover { color: var(--primary); }

/* Condition Badge */
.condition-header { display: flex; align-items: flex-start; gap: 1.5rem; margin-bottom: 2rem; }
.condition-icon { width: 64px; height: 64px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 2rem; flex-shrink: 0; }

/* Info Box */
.info-box { background: var(--primary-light); border-left: 4px solid var(--primary); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }
.info-box p { margin: 0; color: var(--text); font-size: 0.95rem; }
.warning-box { background: #fef3c7; border-left-color: #f59e0b; }
.success-box { background: var(--accent-light); border-left-color: var(--accent); }

/* TOC */
.toc { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin: 2rem 0; }
.toc h4 { margin-bottom: 0.75rem; }
.toc ol { margin: 0; padding-left: 1.25rem; }
.toc li { margin-bottom: 0.4rem; }
.toc a { color: var(--text-light); font-size: 0.9rem; }

/* Footer */
.footer { background: var(--text); color: #94a3b8; padding: 4rem 0 2rem; margin-top: 4rem; }
.footer h4 { color: white; font-size: 0.95rem; margin-bottom: 1rem; }
.footer a { color: #94a3b8; }
.footer a:hover { color: white; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 0.5rem; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; }
.footer-bottom { border-top: 1px solid #334155; margin-top: 3rem; padding-top: 1.5rem; font-size: 0.8rem; text-align: center; }

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; position: fixed; top: 64px; left: 0; right: 0; background: white; flex-direction: column; padding: 1rem; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero-content h1 { font-size: 2rem; }
  h1 { font-size: 1.8rem; }
  .card-grid { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
