/* ============================================================
   TOPICS.HTML — Three-column layout
   ============================================================ */

/* ── Overall layout ── */
.topics-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  padding-top: 72px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 0;
}

/* ── LEFT: fixed symptom nav ── */
.topics-left {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow-y: auto;
  border-right: 1px solid rgba(107,143,113,0.15);
  background: var(--cream);
}
.topics-left-inner { padding: 32px 20px 40px; }
.topics-left-title {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 20px;
}
.topics-cluster { margin-bottom: 6px; }
.topics-cluster-link {
  display: block;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--charcoal);
  padding: 8px 10px;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}
.topics-cluster-link:hover, .topics-cluster-link.active {
  background: var(--sage-pale);
  color: var(--sage-dark);
}
.topics-subnav {
  list-style: none;
  display: none;
  padding: 4px 0 8px 12px;
  border-left: 2px solid var(--sage-light);
  margin-left: 10px;
}
.topics-subnav.open { display: block; }
.topics-subnav li { margin-bottom: 2px; }
.topics-pillar-link, .topics-article-link {
  display: block;
  font-size: 0.78rem;
  padding: 5px 8px;
  border-radius: 3px;
  line-height: 1.35;
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}
.topics-pillar-link { color: var(--sage-dark); font-weight: 600; }
.topics-article-link { color: var(--warm-mid); font-weight: 400; }
.topics-pillar-link:hover, .topics-article-link:hover,
.topics-pillar-link.active, .topics-article-link.active {
  background: rgba(107,143,113,0.1);
  color: var(--sage-dark);
}

/* ── MIDDLE: article content ── */
.topics-main { padding: 48px 48px 80px; min-height: calc(100vh - 72px); }
.topics-welcome { padding: 40px 0; }
.topics-welcome-inner { display: flex; align-items: center; gap: 48px; }
.topics-welcome-text { flex: 1; min-width: 0; }
.topics-welcome-image { flex: 0 0 280px; }
.topics-welcome-image img { width: 100%; height: auto; border-radius: 12px; display: block; }
@media (max-width: 768px) {
  .topics-welcome-inner { flex-direction: column; gap: 28px; }
  .topics-welcome-image { flex: none; width: 100%; max-width: 320px; margin: 0 auto; }
}
.topics-welcome-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 20px;
}
.topics-welcome-sub {
  font-size: 1rem;
  color: var(--warm-mid);
  line-height: 1.7;
  margin-bottom: 12px;
}
.topics-article-body h1 {
  font-family: var(--font-body);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--charcoal);
  line-height: 1.2;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--sage-light);
}
.topics-article-body h2 {
  font-family: var(--font-body);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-top: 40px;
  margin-bottom: 12px;
  scroll-margin-top: 90px;
}
.topics-article-body h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-top: 24px;
  margin-bottom: 8px;
  scroll-margin-top: 90px;
}
.topics-article-body p {
  font-size: 0.95rem;
  color: var(--warm-mid);
  line-height: 1.8;
  margin-bottom: 14px;
  text-align: justify;
}
.topics-article-body li {
  font-size: 0.95rem;
  color: var(--warm-mid);
  line-height: 1.7;
  margin-bottom: 6px;
  margin-left: 20px;
  list-style: disc;
}
.topics-article-body strong { color: var(--charcoal); }

/* Internal cross-links */
.topics-link {
  color: #1a73e8;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: color 0.2s;
}
.topics-link:hover { color: #1557b0; }

/* Article CTA at bottom */
.topics-article-cta {
  margin-top: 56px;
  padding: 32px;
  background: var(--sage-pale);
  border-radius: 8px;
  border: 1px solid rgba(107,143,113,0.2);
  text-align: center;
}
.topics-article-cta p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--charcoal);
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center !important;
}

.toc-block {
  background: var(--sage-pale);
  border-left: 3px solid var(--sage-light);
  border-radius: 0 6px 6px 0;
  padding: 20px 24px;
  margin: 24px 0 32px;
}
.toc-block h2 {
  font-size: 0.72rem !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage) !important;
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  border: none !important;
  padding-bottom: 0 !important;
}
.toc-block ul { list-style: none; padding: 0; margin: 0; }
.toc-block li { margin-bottom: 5px; margin-left: 0; list-style: none; }
.toc-block a { font-size: 0.82rem; color: var(--sage-dark); text-decoration: none; transition: color 0.2s; }
.toc-block a:hover { color: var(--sage); text-decoration: underline; }

/* ── RIGHT: table of contents — hidden ── */
.topics-right {
  display: none;
}
.topics-toc-inner { padding: 32px 20px 40px; }
.topics-toc-title {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 16px;
}
.topics-toc-list { list-style: none; padding: 0; }
.topics-toc-list li { margin-bottom: 6px; margin-left: 0; list-style: none; }
.topics-toc-list a {
  font-size: 0.78rem;
  color: var(--warm-mid);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  padding: 3px 0;
  transition: color 0.2s;
}
.topics-toc-list a:hover { color: var(--sage-dark); }
.topics-toc-list a.toc-active { color: var(--sage-dark); font-weight: 600; }
.topics-toc-cta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(107,143,113,0.15);
}
.topics-book-btn {
  font-size: 0.72rem !important;
  padding: 10px 14px !important;
  display: block;
  text-align: center;
  background: #C0392B !important;
  box-shadow: 0 3px 12px rgba(192,57,43,0.25) !important;
}
.topics-book-btn:hover { background: #A93226 !important; }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .topics-layout { grid-template-columns: 220px 1fr; }
}
@media (max-width: 768px) {
  .topics-layout { grid-template-columns: 1fr; }
  .topics-left {
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(107,143,113,0.15);
  }
  .topics-main { padding: 32px 20px 60px; }
}
