/**
 * Kwezi Safaris: kwezi-blog.css
 * Single blog post styles (single.php). Enqueued on is_singular( 'post' )
 * by kwezi_enqueue_blog_css() in functions.php.
 *
 * CHANGE 97 (Nov 2026): moved out of the inline <style> block in
 * single.php so browsers cache it between posts. Also in this change:
 *   - hero 62vh (max 560px) instead of 100vh (max 720px), so the
 *     opening answer starts higher; endless zoom animation removed
 *   - body text 17px / 400 (was 15px / 300), capped at 72ch
 *   - blockquote: full border + tint (was a 3px left stripe)
 *   - new: tables, Rank Math FAQ block, reduced-motion rules
 */
/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
  --sand:       #e4e3d5;
  --sand-warm:  #E8E2CF;
  --sand-dark:  #d5d4c4;
  --ink:        #1a1a18;
  --ink-soft:   #3d3d39;
  --ink-muted:  #7a7a72;
  --white:      #ffffff;
  --accent:     #8b6914;
  --maroon:     #720b00;
  --deep:       #380000;
  --amber:      #e9731b;
  --border:     rgba(26,26,24,0.10);
  --border-med: rgba(26,26,24,0.18);
  --radius:     14px;
  --radius-sm:  8px;
  --font:       'Public Sans', sans-serif;
}

.ks-blog-wrap,
.ks-blog-wrap * {
  font-family: var(--font) !important;
  box-sizing: border-box;
}

/* =============================================
   HERO
   ============================================= */
.ks-post-hero {
  position: relative;
  height: 62vh;
  min-height: 420px;
  max-height: 560px;
  overflow: hidden;
  background: var(--ink);
}
.ks-post-hero__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.82;
}
.ks-post-hero__gradient {
  position: absolute; inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.10) 0%,
    rgba(0,0,0,0.20) 40%,
    rgba(0,0,0,0.72) 100%
  );
}
.ks-post-hero__content {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 860px;
  padding: 48px 32px 52px;
  text-align: center;
}
.ks-post-hero__cats {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
  justify-content: center;
}
.ks-post-hero__cat {
  font-size: 10px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--amber);
  text-decoration: none; transition: color 0.2s;
}
.ks-post-hero__cat:hover { color: #fff; }
.ks-post-hero__cat + .ks-post-hero__cat::before {
  content: '·'; color: rgba(255,255,255,0.4); margin-right: 8px;
}
.ks-post-hero__title {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 300; color: #fff !important;
  letter-spacing: -0.02em; line-height: 1.1;
  margin: 0 0 20px; max-width: 820px;
  
}
.ks-post-hero__meta {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  justify-content: center;
}
.ks-post-hero__meta-item {
  font-size: 12px; font-weight: 300;
  color: rgba(255,255,255,0.65);
  display: flex; align-items: center; gap: 6px;
}
.ks-post-hero__meta-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: rgba(255,255,255,0.3); flex-shrink: 0;
}

/* =============================================
   LAYOUT — CONTENT + SIDEBAR
   ============================================= */
.ks-blog-wrap { background: #f4f2e6; }

.ks-blog-layout {
  max-width: 1200px; margin: 0 auto;
  padding: 60px 32px 80px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: start;
}

/* =============================================
   ARTICLE CONTENT
   ============================================= */
.ks-post-article {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.ks-post-article__body {
  padding: 48px 52px 52px;
}

/* Article typography */
.ks-post-article__body p {
  font-size: 17px; font-weight: 400;
  line-height: 1.75; color: #1a1a18;
  max-width: 72ch;
  margin: 0 0 20px;
}
.ks-post-article__body p:last-child { margin-bottom: 0; }

.ks-post-article__body h2 {
  font-size: 28px; font-weight: 300;
  color: var(--maroon); letter-spacing: -0.02em;
  line-height: 1.2; margin: 44px 0 16px;
}
.ks-post-article__body h3 {
  font-size: 20px; font-weight: 400;
  color: var(--ink); letter-spacing: -0.01em;
  line-height: 1.3; margin: 32px 0 12px;
}
.ks-post-article__body h4 {
  font-size: 11px; font-weight: 600;
  color: var(--ink-muted); letter-spacing: 0.14em;
  text-transform: uppercase; margin: 28px 0 8px;
}
.ks-post-article__body h2:first-child,
.ks-post-article__body h3:first-child,
.ks-post-article__body h4:first-child { margin-top: 0; }

/* CHANGE 96: site link style */
.ks-post-article__body a {
  color: var(--kw-link, #7d5e10); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
  transition: color 0.2s ease-out;
}
.ks-post-article__body a:hover { color: var(--kw-link-hover, #720b00); }

.ks-post-article__body strong { font-weight: 600; color: var(--ink); }
.ks-post-article__body em { font-style: italic; }

.ks-post-article__body ul,
.ks-post-article__body ol {
  padding: 0; margin: 0 0 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.ks-post-article__body ul { list-style: none; }
.ks-post-article__body ul li {
  padding-left: 22px; position: relative;
  font-size: 17px; font-weight: 400;
  color: var(--ink-soft); line-height: 1.7;
}
.ks-post-article__body ul li::before {
  content: '→'; position: absolute; left: 0;
  color: var(--accent); font-size: 13px; top: 3px;
}
.ks-post-article__body ol {
  list-style: none; counter-reset: ks-ol;
}
.ks-post-article__body ol li {
  counter-increment: ks-ol;
  padding-left: 28px; position: relative;
  font-size: 17px; font-weight: 400;
  color: var(--ink-soft); line-height: 1.7;
}
.ks-post-article__body ol li::before {
  content: counter(ks-ol) '.';
  position: absolute; left: 0;
  font-size: 13px; font-weight: 600;
  color: var(--maroon);
}

.ks-post-article__body blockquote {
  margin: 32px 0;
  padding: 24px 28px;
  background: #f4f1e8;
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
}
.ks-post-article__body blockquote p {
  font-size: 17px; font-style: italic;
  font-weight: 300; color: var(--ink-soft);
  margin: 0; line-height: 1.75;
}

.ks-post-article__body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

.ks-post-article__body img {
  max-width: 100%; height: auto;
  border-radius: var(--radius-sm);
  display: block; margin: 28px 0;
}

.ks-post-article__body figure {
  margin: 28px 0;
}
.ks-post-article__body figcaption {
  font-size: 12px; font-weight: 300;
  color: var(--ink-muted); margin-top: 8px;
  text-align: center; font-style: italic;
}

/* Post footer — tags + share */
.ks-post-footer {
  padding: 24px 52px;
  border-top: 1px solid var(--border);
  background: var(--sand);
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.ks-post-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.ks-post-tag {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-muted);
  padding: 5px 12px; border: 1px solid var(--border-med);
  border-radius: 100px; text-decoration: none;
  transition: all 0.2s;
}
.ks-post-tag:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.ks-post-share { display: flex; align-items: center; gap: 10px; }
.ks-post-share__label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-muted);
}
.ks-post-share__link {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--border-med);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft); text-decoration: none;
  font-size: 13px; transition: all 0.2s;
}
.ks-post-share__link:hover { background: var(--maroon); color: #fff; border-color: var(--maroon); }

/* =============================================
   SIDEBAR
   ============================================= */
.ks-sidebar {
  position: sticky;
  top: 24px;
  display: flex; flex-direction: column; gap: 24px;
}

/* Shared sidebar widget shell */
.ks-widget {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ks-widget__header {
  padding: 18px 24px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--sand-warm);
}
.ks-widget__title {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-muted); margin: 0;
}
.ks-widget__body { padding: 20px 24px; }

/* ── Widget: Featured Safaris ── */
.ks-widget-safaris { padding: 0; }
.ks-sidebar-safari {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background 0.2s;
}
.ks-sidebar-safari:last-child { border-bottom: none; }
.ks-sidebar-safari:hover { background: #faf9f4; }
.ks-sidebar-safari__img {
  width: 72px; height: 72px; flex-shrink: 0;
  border-radius: var(--radius-sm); overflow: hidden;
}
.ks-sidebar-safari__img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.4s ease;
}
.ks-sidebar-safari:hover .ks-sidebar-safari__img img { transform: scale(1.06); }
.ks-sidebar-safari__info { flex: 1; min-width: 0; }
.ks-sidebar-safari__name {
  font-size: 13.5px; font-weight: 500;
  color: var(--ink); line-height: 1.35;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ks-sidebar-safari__price {
  font-size: 13px; font-weight: 600;
  color: var(--maroon); margin: 0 0 8px;
}
.ks-sidebar-safari__cta {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-muted);
  display: flex; align-items: center; gap: 4px;
  transition: color 0.2s;
}
.ks-sidebar-safari:hover .ks-sidebar-safari__cta { color: var(--maroon); }
.ks-sidebar-safari__cta::after { content: '→'; font-size: 11px; }

/* ── Widget: Categories ── */
.ks-widget-cats { display: flex; flex-direction: column; gap: 2px; }
.ks-cat-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 300; color: var(--ink-soft);
  text-decoration: none; transition: all 0.2s;
}
.ks-cat-link:hover,
.ks-cat-link.is-active { background: #f4f1e8; color: var(--ink); }
.ks-cat-link.is-active { font-weight: 500; }
.ks-cat-link__count {
  font-size: 10px; font-weight: 400;
  color: var(--ink-muted); margin-left: 8px;
}

/* ── Widget: Related Articles ── */
.ks-widget-related { display: flex; flex-direction: column; gap: 0; }
.ks-related-post {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: opacity 0.2s;
}
.ks-related-post:last-child { border-bottom: none; padding-bottom: 0; }
.ks-related-post:first-child { padding-top: 0; }
.ks-related-post:hover { opacity: 0.75; }
.ks-related-post__img {
  width: 60px; height: 60px; flex-shrink: 0;
  border-radius: var(--radius-sm); overflow: hidden;
}
.ks-related-post__img img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ks-related-post__info { flex: 1; min-width: 0; }
.ks-related-post__title {
  font-size: 13px; font-weight: 400;
  color: var(--ink); line-height: 1.4;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ks-related-post__date {
  font-size: 10px; font-weight: 300;
  color: var(--ink-muted);
}

/* ── Widget: Recent Articles ── */
/* Reuses .ks-related-post styles */

/* ── Widget: Enquiry CTA ── */
.ks-widget-cta {
  background: var(--deep);
  border-color: transparent;
  text-align: center;
  padding: 32px 24px;
}
.ks-widget-cta .ks-widget__title { color: rgba(255,255,255,0.4); }
.ks-widget-cta__heading {
  font-size: 22px; font-weight: 300;
  color: #fff !important; letter-spacing: -0.02em;
  margin: 16px 0 10px; line-height: 1.2;
}
.ks-widget-cta__body {
  font-size: 13px; font-weight: 300;
  color: rgba(255,255,255,0.6);
  line-height: 1.7; margin: 0 0 24px;
}
.ks-widget-cta__btn {
  display: inline-block;
  background: #720b00; color: var(--deep);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 13px 28px; border-radius: 100px;
  text-decoration: none; transition: background 0.2s, color 0.2s;
}
.ks-widget-cta__btn:hover { background: var(--amber); color: #fff; }
.ks-widget-cta__header {
  border-bottom-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .ks-blog-layout { grid-template-columns: 1fr 300px; gap: 40px; }
  .ks-post-article__body { padding: 36px 40px 44px; }
  .ks-post-footer { padding: 20px 40px; }
}
@media (max-width: 900px) {
  .ks-blog-layout {
    grid-template-columns: 1fr;
    padding: 40px 24px 60px;
  }
  .ks-sidebar { position: relative; top: auto; }
  .ks-post-hero__content { padding: 32px 28px 40px; }
}
@media (max-width: 600px) {
  .ks-post-hero { height: 52vh; min-height: 340px; }
  .ks-post-article__body { padding: 28px 24px 36px; }
  .ks-post-footer { padding: 18px 24px; flex-direction: column; align-items: flex-start; }
  .ks-blog-layout { padding: 28px 16px 52px; }
  .ks-post-article__body h2 { font-size: 24px; }
  .ks-post-article__body h3 { font-size: 18px; }
}
/* =============================================
   CHANGE 93: AUTHOR BOX, TOURS FOR THIS STORY, PLANNING BLOCK
   ============================================= */
.ks-post-extra { padding: 0 56px 8px; }
.ks-post-author {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 24px 0; border-top: 1px solid var(--border);
}
.ks-post-author__mark {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand); color: var(--maroon);
  font-size: 18px; font-weight: 600; letter-spacing: .02em;
}
.ks-post-author__label {
  margin: 0 0 2px; font-size: 11px; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-muted);
}
.ks-post-author__name { margin: 0 0 6px; font-size: 18px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.ks-post-author__bio { margin: 0 0 8px; font-size: 15px; line-height: 1.6; color: var(--ink-soft); }
.ks-post-author__link { font-size: 14px; font-weight: 500; color: var(--maroon) !important; text-decoration: underline; text-underline-offset: 2px; }

.ks-post-plan {
  margin: 8px 0 32px; padding: 28px; border-radius: var(--radius);
  background: var(--deep); color: #f6efe6;
}
.ks-post-plan__eyebrow {
  margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: #f0a464;
}
.ks-post-plan .ks-post-plan__title {
  margin: 0 0 8px !important; font-size: 24px !important; line-height: 1.25 !important;
  font-weight: 600 !important; color: #ffffff !important; text-wrap: balance;
}
.ks-post-plan__text { margin: 0 0 20px; font-size: 15px; line-height: 1.6; color: rgba(246,239,230,.82); max-width: 60ch; }
.ks-post-plan__tours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 20px; padding: 0; list-style: none; }
.ks-post-plan__tours li { display: block; color: inherit; }
.ks-post-tour {
  display: flex; gap: 12px; align-items: center; height: 100%;
  padding: 10px; border-radius: 10px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); text-decoration: none !important;
  transition: background-color .2s ease-out, border-color .2s ease-out;
}
.ks-post-tour:hover { background: rgba(255,255,255,.1); border-color: rgba(240,164,100,.5); }
.ks-post-tour__img { flex-shrink: 0; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; }
.ks-post-tour__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ks-post-tour__name { display: block; font-size: 15px; font-weight: 600; line-height: 1.35; color: #ffffff; }
.ks-post-tour__price { display: block; margin-top: 4px; font-size: 13px; color: #f0a464; font-variant-numeric: tabular-nums; }
.ks-post-plan__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ks-post-plan__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 6px;
  font-size: 15px; font-weight: 600; text-decoration: none !important;
  transition: background-color .2s ease-out, color .2s ease-out;
}
.ks-post-plan__btn--primary { background: #e9731b; color: #1a1a18 !important; }
.ks-post-plan__btn--primary:hover { background: #f0a464; }
.ks-post-plan__btn--ghost { border: 1px solid rgba(255,255,255,.35); color: #ffffff !important; }
.ks-post-plan__btn--ghost:hover { background: rgba(255,255,255,.08); }
.ks-post-plan__btn .kwezi-icon { width: 18px; height: 18px; }
.ks-post-share__link .kwezi-icon { width: 15px; height: 15px; }
@media (max-width: 1024px) { .ks-post-extra { padding: 0 40px 8px; } }
@media (max-width: 600px) {
  .ks-post-extra { padding: 0 24px 8px; }
  .ks-post-plan { padding: 22px 18px; }
  .ks-post-plan__tours { grid-template-columns: 1fr; }
  .ks-post-plan__btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) { .ks-post-tour, .ks-post-plan__btn { transition: none; } }

/* =============================================
   CHANGE 97: TABLES IN POST CONTENT
   Comparison and price tables. Scroll sideways on
   narrow screens instead of squashing columns.
   ============================================= */
.ks-post-article__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  background: var(--white);
  border: 1px solid var(--border-med);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.ks-post-article__body figure.wp-block-table { margin: 28px 0; overflow-x: auto; }
.ks-post-article__body figure.wp-block-table table { margin: 0; }
.ks-post-article__body thead th,
.ks-post-article__body table tr:first-child th {
  background: var(--sand);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
}
.ks-post-article__body th,
.ks-post-article__body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
  color: var(--ink);
}
.ks-post-article__body tbody tr:nth-child(even) td { background: #faf9f4; }
.ks-post-article__body tbody tr:last-child td { border-bottom: none; }
.ks-post-article__body td a { color: var(--kw-link, #7d5e10); }
@media (max-width: 700px) {
  .ks-post-article__body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    font-size: 14px;
  }
  .ks-post-article__body th,
  .ks-post-article__body td { padding: 10px 12px; }
}

/* =============================================
   CHANGE 97: RANK MATH FAQ BLOCK
   ============================================= */
.ks-post-article__body .rank-math-block { margin: 32px 0 8px; }
.ks-post-article__body .rank-math-list { display: flex; flex-direction: column; gap: 12px; }
.ks-post-article__body .rank-math-list-item {
  padding: 20px 24px;
  background: #faf9f4;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.ks-post-article__body .rank-math-question {
  font-size: 18px; font-weight: 600;
  color: var(--ink); line-height: 1.35;
  margin: 0 0 8px;
}
.ks-post-article__body .rank-math-answer p { margin-bottom: 0; }

/* =============================================
   CHANGE 97: REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
  .ks-post-hero__cat,
  .ks-post-article__body a,
  .ks-post-tag,
  .ks-post-share__link,
  .ks-related-post { transition: none; }
}
