/* Africa Travel Questions: the hub page and the eight topic pages.
   Loaded only by those pages, after site.css. */

.page-head .eyebrow a { color: var(--savannah); text-decoration: none; }
.page-head .eyebrow a:hover { color: var(--earth); }
.page-head .sub { max-width: 60ch; }
.guide-updated { margin-top: 10px; font-size: 15px; color: var(--stone); }

/* Topic page: question list on the left, answers on the right */
.guide { padding-top: clamp(40px, 6vw, 80px); }
.guide-grid { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.guide-toc { position: sticky; top: calc(var(--nav-h) + 24px); max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; padding-right: 8px; }
.toc summary { display: none; }
.toc-label { font-size: 14px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--savannah); margin-bottom: 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.toc li { border-bottom: 1px solid var(--line); }
.toc a { display: block; padding: 9px 0; font-size: 15px; line-height: 1.4; color: var(--dusk); text-decoration: none; }
.toc a:hover { color: var(--savannah); }

.guide-body { max-width: 72ch; }
.qa { padding: 0 0 48px; margin: 0 0 48px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 24px); }
.qa:last-child { border-bottom: 0; margin-bottom: 0; }
.qa h2 { font-size: clamp(28px, 2.8vw, 36px); line-height: 1.15; margin-bottom: 18px; }
.qa .answer { font-size: 19px; padding-left: 18px; border-left: 3px solid var(--amber); }
.qa h3 { font-family: var(--sans); font-size: 15px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--savannah); margin: 28px 0 10px; line-height: 1.4; }
.qa p + p, .qa .answer + p { margin-top: 1em; }
.qa ul, .qa ol { margin: 0; padding-left: 22px; }
.qa li + li { margin-top: 10px; }
.qa li::marker { color: var(--amber); }
.qa ol li::marker { font-weight: 500; }
.qa strong { font-weight: 500; color: var(--earth); }
.qa ul + p, .qa ol + p, .qa .table-wrap + p { margin-top: 1em; }

.table-wrap { overflow-x: auto; margin: 4px 0 0; }
.qa table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.qa th, .qa td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.qa thead th { background: var(--sand); font-weight: 500; color: var(--earth); }
.qa tbody th { font-weight: 500; color: var(--earth); }

/* Links to the other topics */
.guide-cards { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.guide-cards a { display: block; height: 100%; padding: 22px 24px; background: var(--warm-white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .2s; }
.guide-cards a:hover { border-color: var(--amber); }
.guide-cards strong { display: block; font-family: var(--serif); font-size: 25px; font-weight: 500; color: var(--earth); line-height: 1.15; }
.guide-cards span { display: block; margin-top: 6px; font-size: 16px; color: var(--dusk); }

.guide-cta .btn { margin-top: 26px; }

/* Hub page: every topic with every question listed */
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px clamp(32px, 5vw, 72px); }
.hub-topic h2 { font-size: clamp(28px, 2.8vw, 36px); line-height: 1.15; }
.hub-topic h2 a { text-decoration: none; }
.hub-topic h2 a:hover { color: var(--savannah); }
.hub-topic > p { margin-top: 8px; color: var(--dusk); }
.hub-topic ol { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--line); }
.hub-topic li { border-bottom: 1px solid var(--line); }
.hub-topic li a { display: block; padding: 9px 0; font-size: 16px; line-height: 1.4; text-decoration: none; }
.hub-topic li a:hover { color: var(--savannah); }

@media (max-width: 900px) {
  .guide-grid { grid-template-columns: minmax(0, 1fr); }
  .qa table { min-width: 560px; }
  .guide-toc { position: static; max-height: none; overflow: visible; padding-right: 0; }
  .toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--sand); }
  .toc summary { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-size: 17px; font-weight: 500; color: var(--earth); cursor: pointer; list-style: none; }
  .toc summary::-webkit-details-marker { display: none; }
  .toc summary::after { content: "+"; font-size: 26px; font-weight: 300; color: var(--amber); line-height: 1; transition: transform .2s; }
  .toc[open] summary::after { transform: rotate(45deg); }
  .toc-label { display: none; }
  .toc ol { margin: 0 18px 12px; }
  .hub-grid { grid-template-columns: 1fr; }
  .qa .answer { font-size: 18px; }
}
