/* ==========================================================================
   Africa CPTA Theme — Pages
   Generic page-level typography, content spacing, and WP block tuning
   ========================================================================== */

/* Root scales (safe defaults if not already defined elsewhere) */
:root{
  --page-max-width: 1200px;
  --page-flow: 1.1rem;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --color-bg: var(--color-surface, #fff);
  --color-text: var(--color-text, #222);
  --color-text-dim: var(--color-text-dim, #5b6b79);
  --color-border: var(--color-border, rgba(0,0,0,.08));
  --color-primary: var(--color-primary, #007b5e);
  --shadow-1: var(--shadow-1, 0 2px 4px rgba(0,0,0,.05));
}

/* Respect system dark when using the base stylesheet alone */
@media (prefers-color-scheme: dark) {
  :root{
    --color-bg: #12171e;
    --color-text: #e8eef5;
    --color-text-dim: #aab9c8;
    --color-border: rgba(255,255,255,.12);
  }
}

/* --------------------------------------
   Page header / breadcrumb
--------------------------------------- */
.page-header{
  padding: clamp(32px, 5vw, 64px) 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}
.page-header .title{
  font-weight: 800;
  letter-spacing: -.01em;
  margin: 0;
}

/* Breadcrumbs */
.breadcrumbs{
  font-size: .9rem;
  color: var(--color-text-dim);
}
.breadcrumbs a{
  color: inherit;
  text-decoration: none;
}
.breadcrumbs a:hover,
.breadcrumbs a:focus{
  color: var(--color-primary);
  text-decoration: underline;
}
.breadcrumbs .separator{
  opacity: .6;
  margin: 0 .5rem;
}

/* --------------------------------------
   Default WP content area
--------------------------------------- */
.entry-content{
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}
.entry-content > * + *{
  margin-top: var(--page-flow);
}

/* Headings rhythm */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6{
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.25;
  color: var(--color-text);
}
.entry-content h1{ font-size: clamp(1.875rem, 3vw, 2.25rem); margin-top: 1.25em; }
.entry-content h2{ font-size: clamp(1.5rem, 2.2vw, 1.875rem); margin-top: 1.2em; }
.entry-content h3{ font-size: clamp(1.25rem, 1.6vw, 1.5rem); margin-top: 1.1em; }

/* Media */
.entry-content img,
.entry-content video,
.entry-content svg{
  max-width: 100%;
  height: auto;
  display: block;
}
.entry-content figure{ margin: 0; }
.entry-content figcaption{
  font-size: .9rem;
  color: var(--color-text-dim);
  text-align: center;
  margin-top: .5rem;
}

/* Tables */
.entry-content table{
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow-1);
}
.entry-content th,
.entry-content td{
  border: 1px solid var(--color-border);
  padding: .65rem .75rem;
  vertical-align: top;
}
.entry-content thead th{
  background: rgba(0,0,0,.03);
  font-weight: 700;
}

/* Code */
.entry-content code,
.entry-content pre{
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.entry-content code{
  background: rgba(0,0,0,.05);
  padding: .1rem .35rem;
  border-radius: 4px;
}
.entry-content pre{
  background: rgba(0,0,0,.05);
  padding: 1rem;
  border-radius: 10px;
  overflow: auto;
}

/* Lists spacing */
.entry-content ul,
.entry-content ol{ padding-left: 1.2rem; }
.entry-content li + li{ margin-top: .35rem; }

/* Quotes */
.wp-block-quote,
blockquote{
  border-left: 4px solid var(--color-primary);
  padding-left: 1rem;
  color: var(--color-text);
  background: transparent;
}
.wp-block-pullquote{
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.25rem;
  border-radius: 10px;
}

/* Buttons */
.wp-block-button__link,
.entry-content .btn{
  border-radius: var(--radius-pill);
  font-weight: 700;
}
.wp-block-button.is-style-outline .wp-block-button__link{
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Links */
.entry-content a{
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: .1em;
}
.entry-content a:hover{
  opacity: .9;
}

/* --------------------------------------
   Gutenberg alignments (wide/full)
--------------------------------------- */
.alignwide{
  margin-left: calc(50% - min(50%, var(--page-max-width)/2));
  margin-right: calc(50% - min(50%, var(--page-max-width)/2));
}
.alignfull{
  width: 100vw;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* --------------------------------------
   Utilities for page components
--------------------------------------- */
.intro-participate-image,
.intro-2-image{
  width: 100%;
  max-width: 320px;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow-1);
}

/* Card gradient skin used on pages */
.fintech-card-gradient{
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}

/* CTA buttons */
.fintech-cta-btn{
  font-weight: 700;
  padding-inline: 1.1rem;
}

/* Map iframe */
.contact-map{
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: var(--radius-lg);
}

/* Sidebar heads reused in single/page */
.sidebar-head{
  font-weight: 700;
  margin-bottom: .75rem;
  border-bottom: 2px solid var(--bs-primary, var(--color-primary));
  padding-bottom: .35rem;
}

/* Focus visible (accessibility) */
:where(a, button, [role="button"], .wp-block-button__link):focus-visible{
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 8px;
}

/* --------------------------------------
   Dark section compatibility if wrapped
--------------------------------------- */
html.theme-dark .fintech-card-gradient{
  background: #12171e;
  border-color: rgba(255,255,255,.12);
  color: #e8eef5;
}
html.theme-dark .entry-content code,
html.theme-dark .entry-content pre{
  background: rgba(255,255,255,.06);
}
html.theme-dark .entry-content table thead th{
  background: rgba(255,255,255,.04);
}
.about-icons-bottom {
    max-width: 100px;
}
.participate-icons-bottom{
    max-width: 100px;
}