/* ==========================================================================
   Africa CPTA Theme — Single (Posts/Pages)
   Article layout, meta, share, related
   ========================================================================== */

/* ---------- Base header (generic single) ---------- */
.single-header {
  padding: clamp(28px, 5vw, 60px) 0;
  background: var(--color-surface, #fff);
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,.08));
}
.single-header .title {
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: .25rem;
}
.single-header .meta {
  color: var(--color-text-dim, #5b6b79);
  font-size: .95rem;
}

/* ---------- Featured image block ---------- */
.single-hero {
  margin-top: 24px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-1, 0 2px 4px rgba(0,0,0,.05));
}
.single-hero img { display: block; width: 100%; height: auto; }

/* ---------- Main content ---------- */
.single-content {
  padding: clamp(24px, 3vw, 40px) 0;
}
.single-content .entry-content {
  font-size: 1.05rem;
  line-height: 1.85;
}
.single-content .entry-content :where(img, video) {
  max-width: 100%;
  height: auto;
  border-radius: .375rem;
}

/* ---------- Share bar (reusable) ---------- */
.share-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-block: 1px solid var(--color-border, rgba(0,0,0,.08));
  padding: 12px 0;
  margin: 24px 0;
}
.share-bar .label { color: var(--color-text-dim,#5b6b79); font-weight: 600; }
.share-bar a,
.share-bar button {
  font-size: .95rem;
  color: var(--color-text,#222);
}
.share-bar a:hover,
.share-bar button:hover { color: var(--color-primary,#007b5e); }

/* ---------- Author box (optional) ---------- */
.author-box {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--color-border, rgba(0,0,0,.08));
  border-radius: 12px;
  background: var(--color-surface,#fff);
  margin-top: 24px;
}
.author-box img {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- Related posts grid ---------- */
.related-posts {
  padding: clamp(24px, 4vw, 48px) 0;
  background: var(--color-muted, #f5f7f9);
}
.related-grid {
  display: grid; gap: 20px; grid-template-columns: 1fr;
}
@media (min-width: 768px)  { .related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }

/* ==========================================================================
   Country Single
   ========================================================================== */
.country-banner { min-height: 280px; position: relative; }
.country-banner-bg {
  position: absolute; inset: 0;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  filter: saturate(1.05);
}
.country-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.35));
}
.country-banner .breadcrumb a { text-decoration: none; }

/* Section nav (sticky in sidebar) */
.section-nav .nav-link { color: var(--bs-body-color); opacity: .85; }
.section-nav .nav-link:hover, .section-nav .nav-link:focus { opacity: 1; }
.section-nav .nav-link.active { font-weight: 700; color: var(--bs-primary); }

/* Swiper gallery guard */
.overview-gallery, .overview-gallery .swiper-wrapper { width: 100%; min-width: 0; }
.overview-gallery .swiper-slide { display: flex; }
.overview-gallery img { width: 100%; height: auto; border-radius: .5rem; }

/* Country cards micro interaction */
.fintech-country-card { transition: transform .16s ease, box-shadow .16s ease; }
.fintech-country-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }

/* List groups visual */
.list-group.list-group-flush { border-radius: .5rem; overflow: hidden; }
.list-group-item { background-color: #fff; }

/* Anchor offset for sticky header */
[id] { scroll-margin-top: 90px; }
@media (min-width: 992px) {
  .section-nav { top: 96px !important; }
}

/* ==========================================================================
   Actor Single
   ========================================================================== */
.actor-hero { position: relative; }
.actor-hero .fintech-animated-bg { opacity:.25; }
.actor-tags .badge { border:1px solid rgba(255,255,255,.25); backdrop-filter: blur(2px); }

.actor-side .actor-meta i { vertical-align: -2px; }
.actor-article .card { border-radius: 14px; }
.actor-article .card-body { padding: 1.25rem; }
.actor-article h2.h3 { font-weight: 800; letter-spacing: -.01em; }

@media (min-width: 992px) { .actor-side { top: 96px; } }

/* Dark cards (if actor sections appear on dark backgrounds) */
html.theme-dark .actor-article .card,
.dark-section .actor-article .card {
  background: #11161d;
  border-color: rgba(255,255,255,.12);
  color: #e8eef5;
}

/* ==========================================================================
   Article Single (article-report)
   ========================================================================== */
.article-banner {
  min-height: 320px;
  position: relative;
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.article-banner .banner-dim {
  position:absolute; inset:0;
  background:linear-gradient(180deg,rgba(0,0,0,.35),rgba(0,0,0,.5));
}
.article-breadcrumbs .breadcrumb-item + .breadcrumb-item::before { color:#ced4da; }

/* Meta badges and links */
.article-meta .meta-item { font-size:.95rem; opacity:.95; }
.article-source-link:hover { text-decoration: underline; }

/* Main card content */
.article-main-card .article-content { line-height: 1.7; }
.article-main-card .article-content p { margin-bottom: 1rem; }
.article-main-card .article-content img { max-width:100%; height:auto; border-radius: .375rem; }
.article-main-card .article-content blockquote {
  padding-left:1rem; border-left:4px solid var(--bs-primary); color:#495057;
}

/* Sidebar (latest lists) */
.article-sidebar { top: 96px; } /* when sticky-top is applied */
.article-sidebar .card-body { padding: 1rem; }
.article-sidebar .sidebar-head {
  font-weight:700; margin-bottom:.75rem; border-bottom:2px solid var(--bs-primary); padding-bottom:.35rem;
}
.article-sidebar .thumb-50 { width:50px; height:50px; background:#e9ecef; }
.article-sidebar .sidebar-link { color:#0d6efd; }
.article-sidebar .sidebar-link:hover { text-decoration: underline; }

/* Related carousels */
.related-carousel { --swiper-theme-color: var(--bs-primary); }
.related-carousel .related-card {
  background:#fff; padding: .75rem;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: .5rem;
  height: auto;
}
.related-carousel .related-card .title { font-weight:600; }
.related-carousel .related-card .thumb { display:block; width:100%; height:auto; }
.related-carousel .related-card .excerpt { margin-top:.25rem; }
.related-carousel .swiper-pagination-bullet { opacity:.6; }
.related-carousel .swiper-pagination-bullet-active { opacity:1; background:var(--bs-primary); }

/* Dark section compatibility */
html.theme-dark .article-main-card .article-content,
html.theme-dark .article-related-links,
html.theme-dark .related-card {
  background:#12171e; color:#e8eef5; border-color:rgba(255,255,255,.12);
}

/* ==========================================================================
   News Single (news-feed)
   ========================================================================== */
.news-banner {
  min-height: 320px;
  position: relative;
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.news-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.55));
}
.news-breadcrumbs .breadcrumb-item + .breadcrumb-item::before { color: #e7eef5; }

/* Meta + tags in banner */
.news-banner-meta .badge { font-weight: 600; }
.news-banner-tags .badge { border: 1px solid rgba(255,255,255,.25); backdrop-filter: blur(2px); }

/* Sidebar helpers */
.news-box .rounded { border-radius: .6rem; }
.thumb-50 { width: 50px; height: 50px; background:#e9ecef; display:block; }
.sidebar-head {
  font-weight:700; margin-bottom:.75rem; border-bottom:2px solid var(--bs-primary); padding-bottom:.35rem;
}

/* Related swiper under news */
.news-related-swiper .card-img-top { object-fit: cover; aspect-ratio: 16/9; }
.news-related-swiper .swiper-pagination-bullet { opacity:.6; }
.news-related-swiper .swiper-pagination-bullet-active { opacity:1; background: var(--bs-primary); }

/* Reuse share-bar styles */
.share-bar .label { color: var(--color-text-dim, #5b6b79); font-weight: 600; }
.share-bar a { color: var(--color-text, #222); }
.share-bar a:hover { color: var(--bs-primary); }

/* Dark tweaks */
html.theme-dark .news-box .bg-white,
html.theme-dark .news-related-swiper .card {
  background:#12171e; color:#e8eef5; border-color:rgba(255,255,255,.12);
}
