/* ============================================
   HEALTH TOPIC DETAIL PAGE
   ============================================ */
.topic-body {
  max-width: 820px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--who-gray-800);
}
.topic-body h2,
.topic-body h3 {
  color: var(--who-navy);
  margin-top: 32px;
  margin-bottom: 12px;
}
.topic-body p  { margin: 0 0 18px; }
.topic-body a  { color: var(--who-blue); }
.topic-body ul,
.topic-body ol { padding-left: 24px; margin-bottom: 18px; }
.topic-body li { margin-bottom: 6px; }

/* ============================================
   HEALTH TOPICS LISTING PAGE
   ============================================ */
.ht-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--who-navy);
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Popular topics — 6-column image grid */
.ht-popular-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}
@media (max-width: 768px) {
  .ht-popular-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .ht-popular-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
.ht-popular-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: var(--who-radius-md);
  overflow: hidden;
}
.ht-popular-card:hover {}
.ht-popular-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--who-gray-100);
}
.ht-popular-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ht-popular-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--who-blue-light) 0%, var(--who-gray-200) 100%);
}
.ht-popular-title {
  padding: 10px 4px 4px;
  font-size: .875rem;
  font-weight: 700;
  color: var(--who-navy);
  line-height: 1.3;
}

/* Legacy filter-bar (kept for other uses) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* A-Z listing: .alpha-bar / .alpha-btn rules moved to
   components/alpha-bar.css (shared with the countries page).
   Loaded via the who26/alpha-bar dependency in this library. */

.topics-columns {
  column-count: 4;
  column-gap: 32px;
}
@media (max-width: 1100px) {
  .topics-columns { column-count: 3; column-gap: 28px; }
}
@media (max-width: 768px) {
  .topics-columns { column-count: 2; column-gap: 24px; }
}
@media (max-width: 480px) {
  .topics-columns { column-count: 1; }
}
.topic-letter-section {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin-bottom: 28px;
}
.topic-letter {
  font-size: .9375rem;
  font-weight: 700;
  color: var(--who-navy);
  margin: 0 0 8px;
  padding-bottom: 7px;
  border-bottom: 2px solid var(--who-gray-200);
}
.topic-letter-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.topic-letter-list li {
  border-bottom: 1px solid var(--who-gray-100);
}
.topic-letter-list li:last-child { border-bottom: none; }
.topic-letter-list a {
  display: block;
  padding: 6px 4px;
  color: var(--who-gray-800);
  font-size: .875rem;
  font-weight: 400;
  text-decoration: none;
  line-height: 1.45;
  transition: color var(--who-transition), background var(--who-transition);
  border-radius: 3px;
}
.topic-letter-list a:hover {
  color: var(--who-blue);
  background: var(--who-gray-50);
}

/* ============================================================
   HEALTH TOPIC DETAIL PAGE
   ============================================================ */

/* ── Section spacing ─────────────────────────────────────── */
.section-topic-content {
  padding-top: 48px;
  padding-bottom: 48px;
}

/* Tab navigation (.topic-tabs / .topic-tab-*) moved to components/topic-tabs.css —
   attach via the who26/topic-tabs library on any page using this markup. */

/* ── Fact-sheet accordion ────────────────────────────────── */
.topic-factsheets {
  position: sticky;
  top: calc(var(--who-nav-height) + 16px);
}

.factsheets-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--who-navy);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--who-blue);
}

.factsheets-accordion {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--who-gray-200);
  border-radius: var(--who-radius-md);
  overflow: hidden;
}

.factsheet-item {
  border-bottom: 1px solid var(--who-gray-200);
}
.factsheet-item:last-child {
  border-bottom: none;
}

.factsheet-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--who-gray-50);
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--who-navy);
}
.factsheet-toggle:hover {
  background: var(--who-blue-light);
}
.factsheet-item.is-open .factsheet-toggle {
  background: var(--who-blue-light);
  color: var(--who-blue);
}

.factsheet-chevron {
  flex-shrink: 0;
  transition: transform .2s ease;
}
.factsheet-item.is-open .factsheet-chevron {
  transform: rotate(180deg);
}

.factsheet-body {
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--who-gray-800);
  background: var(--who-white);
}
.factsheet-body p       { margin-bottom: .8rem; }
.factsheet-body p:last-child { margin-bottom: 0; }
.factsheet-body ul,
.factsheet-body ol      { padding-left: 1.4rem; margin-bottom: .8rem; }
.factsheet-body li      { margin-bottom: .3rem; }
.factsheet-body a       { color: var(--who-blue); text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 991px) {
  .topic-factsheets {
    position: static;
    margin-top: 40px;
  }
  .topic-tabs-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .topic-tabs-nav::-webkit-scrollbar { display: none; }
}

