/* Afrikea polish layer: tighter rhythm (no dead space), redesigned Values / Vision & Mission / Approach,
   a testimonial carousel and a tidier contact page. Loaded after afrikea-redesign.css. */

/* ---------- Global rhythm: remove oversized gaps on every page ---------- */
.site-shell .section-space { padding-block: clamp(44px, 5.4vw, 80px); }
.site-shell .section-heading { margin-bottom: 30px; }
.site-shell .section-heading-offset { padding-left: 0; }
.site-shell .split-layout { gap: clamp(32px, 5vw, 76px); }
.site-shell .impact-band { padding: 46px 0; }
.site-shell .section-feature { padding-block: 8px 64px; }
.site-shell .invite-band { padding: 34px 0; }
.site-shell .section-partners { padding-block: 48px; }
.site-shell .section-final-cta { padding-block: clamp(52px, 6vw, 84px); }
.site-shell .site-footer { padding: 52px 0 20px; }
.site-shell .footer-bottom { margin-top: 32px; }

.site-shell .page-hero-simple { min-height: 0; padding: 50px 0 56px; }
.site-shell .page-hero-editorial { min-height: 340px; }
.site-shell .page-hero-editorial .page-hero-content { padding-block: 52px; }
.site-shell .editorial-layout { gap: 48px; padding-block: 48px 72px; }
.site-shell .editorial-prose { max-width: 920px; }
.site-shell .section-listing { padding-top: 44px; }
.site-shell .story-feature-hero { padding: 48px 0 52px; }
.site-shell .article-header { padding: 44px 0 34px; }
.site-shell .article-body { margin: 30px auto 44px; }
.site-shell .article-cover { margin-top: 26px; }
.site-shell .article-end { padding-bottom: 44px; }
.site-shell .donation-panel { margin-block: 30px 56px; }
.site-shell .empty-state { margin-block: 20px; padding-block: 40px; }

/* Imported WordPress content: no empty blocks, no tall root containers */
.site-shell .rich-copy p:empty,
.site-shell .rich-copy div:empty,
.site-shell .rich-copy .wp-block-spacer { display: none; }
.site-shell .rich-copy br + br { display: none; }
.site-shell .rich-copy h1, .site-shell .rich-copy h2, .site-shell .rich-copy h3, .site-shell .rich-copy h4 { margin: 1.25em 0 .5em; }
.site-shell .legacy-content .wp-block-uagb-container.alignfull.uagb-is-root-container { padding-block: clamp(22px, 3vw, 42px) !important; }
.site-shell .legacy-content .wp-block-uagb-container.uagb-layout-grid { gap: 16px !important; }
.site-shell .legacy-content .wp-block-uagb-advanced-heading { margin-bottom: 14px; }

/* ---------- Programmes: no orphan card, no empty corner ---------- */
@media (min-width: 1121px) {
    .site-shell .programme-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
@media (min-width: 721px) and (max-width: 1120px) {
    .site-shell .programme-card:last-child:nth-child(odd) { display: grid; grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
    .site-shell .programme-card:last-child:nth-child(odd) .programme-image { height: 100%; min-height: 220px; }
    .site-shell .programme-card:last-child:nth-child(odd) .programme-card-copy { align-self: center; }
}
@media (max-width: 720px) {
    .site-shell .programme-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .site-shell .programme-card:last-child:nth-child(odd) .programme-image { height: 200px; }
}

/* ---------- Our Values ---------- */
.site-shell .section-values { background: var(--brand-cream); }
.site-shell .values-layout { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); align-items: center; gap: clamp(32px, 5.5vw, 84px); }
.site-shell .values-copy h2 { margin: 0 0 14px; }
.site-shell .values-lead { max-width: 640px; margin: 0 0 12px; color: var(--brand-green-dark); font-family: var(--brand-serif); font-size: clamp(1.2rem, 1.7vw, 1.55rem); line-height: 1.45; }
.site-shell .values-intro { max-width: 640px; margin: 0 0 26px; font-size: 1rem; line-height: 1.75; }
.site-shell .values-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 28px; padding: 0; list-style: none; }
.site-shell .value-card { display: flex; align-items: flex-start; gap: 14px; margin: 0; padding: 18px 18px 20px; border: 1px solid #e6eee9; border-radius: 18px; background: #fff; box-shadow: 0 8px 22px rgba(13, 55, 48, .05); transition: transform .22s ease, box-shadow .22s ease; }
.site-shell .value-card:hover { transform: translateY(-3px); box-shadow: var(--brand-shadow-soft); }
.site-shell .value-index { display: grid; flex: 0 0 38px; height: 38px; place-items: center; border-radius: 12px; background: var(--brand-mint); color: var(--brand-green); font-size: .78rem; font-weight: 850; letter-spacing: .04em; }
.site-shell .value-card h3 { margin: 2px 0 6px; font-size: 1.18rem; line-height: 1.2; }
.site-shell .value-card p { margin: 0; font-size: .86rem; line-height: 1.6; }
.site-shell .values-media { position: relative; align-self: stretch; min-height: 440px; }
.site-shell .values-media::before { position: absolute; inset: 22px -14px -14px 22px; border: 2px solid var(--brand-mint-strong); border-radius: 30px; content: ""; }
.site-shell .values-media picture, .site-shell .values-media > img { position: absolute; inset: 0; display: block; overflow: hidden; border-radius: 28px; box-shadow: var(--brand-shadow); }
.site-shell .values-media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Our Vision & Mission ---------- */
.site-shell .vm-section { background: linear-gradient(135deg, #eef6f1 0%, #e8f1f6 100%); }
.site-shell .vm-head { max-width: 680px; margin: 0 auto 34px; text-align: center; }
.site-shell .vm-head h2 { margin: 0; }
.site-shell .vm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.site-shell .vm-card { position: relative; display: flex; min-height: 340px; flex-direction: column; align-items: flex-start; overflow: hidden; padding: clamp(28px, 3.6vw, 48px); border-radius: 28px; isolation: isolate; }
.site-shell .vm-card-vision { border: 1px solid #d9e8df; background: #fff; box-shadow: var(--brand-shadow-soft); }
.site-shell .vm-card-mission { background: linear-gradient(150deg, var(--brand-green-dark) 0%, #0e5a63 100%); box-shadow: 0 22px 54px rgba(9, 61, 50, .28); }
.site-shell .vm-icon { display: grid; width: 56px; height: 56px; margin-bottom: 22px; place-items: center; border-radius: 18px; background: var(--brand-mint); color: var(--brand-green); }
.site-shell .vm-icon svg { width: 28px; height: 28px; }
.site-shell .vm-kicker { margin-bottom: 8px; color: var(--brand-green); font-size: .72rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.site-shell .vm-card h3 { margin: 0 0 14px; font-size: clamp(1.9rem, 2.6vw, 2.5rem); }
.site-shell .vm-card p { position: relative; z-index: 1; max-width: 520px; margin: 0; color: #3b5650; font-family: var(--brand-serif); font-size: clamp(1.08rem, 1.45vw, 1.32rem); line-height: 1.62; }
.site-shell .vm-watermark { position: absolute; z-index: -1; right: 18px; bottom: -30px; color: rgba(23, 105, 79, .055); font-family: var(--brand-serif); font-size: 8.5rem; line-height: 1; pointer-events: none; }
.site-shell .vm-card-mission .vm-icon { background: rgba(255, 255, 255, .14); color: #d6f0e1; }
.site-shell .vm-card-mission .vm-kicker { color: #bfe6cf; }
.site-shell .vm-card-mission h3 { color: #fff; }
.site-shell .vm-card-mission p { color: rgba(255, 255, 255, .9); }
.site-shell .vm-card-mission .vm-watermark { color: rgba(255, 255, 255, .06); }

/* ---------- Our Approach ---------- */
.site-shell .approach-modern { background: #f7faf8; }
.site-shell .approach-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.site-shell .approach-step { position: relative; margin: 0; padding: 28px 26px 30px; overflow: hidden; border: 1px solid #e1ebe5; border-radius: 22px; background: #fff; box-shadow: 0 10px 28px rgba(12, 69, 53, .05); }
.site-shell .approach-step::before { position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--brand-green), var(--brand-blue)); content: ""; }
.site-shell .approach-number { display: block; color: var(--brand-mint-strong); font-family: var(--brand-serif); font-size: 4.2rem; line-height: 1; letter-spacing: -.04em; }
.site-shell .approach-label { display: block; margin: 4px 0 12px; color: var(--brand-green); font-size: .7rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.site-shell .approach-step h3 { margin: 0 0 10px; font-size: 1.35rem; line-height: 1.22; }
.site-shell .approach-step p { margin: 0; font-size: .92rem; line-height: 1.7; }

/* ---------- Testimonial carousel ---------- */
.site-shell .section-testimonials { overflow: hidden; }
.site-shell .section-testimonials .section-heading { align-items: end; }
.site-shell .tm-controls { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.site-shell .tm-arrow, .site-shell .tm-toggle { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid #b9cfdb; border-radius: 50%; background: #fff; color: var(--brand-blue-dark); font-size: 1.15rem; line-height: 1; cursor: pointer; transition: background .2s ease, color .2s ease, transform .2s ease; }
.site-shell .tm-toggle { font-size: .58rem; letter-spacing: -.1em; }
.site-shell .tm-arrow:hover, .site-shell .tm-toggle:hover { background: var(--brand-blue-dark); color: #fff; transform: translateY(-2px); }
.site-shell .tm-track { display: flex; gap: 20px; overflow-x: auto; padding: 4px 2px 18px; scroll-snap-type: x mandatory; scroll-padding-inline: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.site-shell .tm-track::-webkit-scrollbar { display: none; }
.site-shell .tm-slide { position: relative; display: flex; flex: 0 0 calc((100% - 20px) / 2); flex-direction: column; justify-content: space-between; gap: 22px; margin: 0; padding: 32px 32px 28px; border: 1px solid #d6e5ee; border-radius: 24px; background: #fff; box-shadow: 0 14px 36px rgba(29, 88, 122, .08); scroll-snap-align: start; }
.site-shell .tm-quote-icon { width: 38px; height: 38px; color: var(--brand-blue); opacity: .28; }
.site-shell .tm-slide blockquote { flex: 1 1 auto; margin: 0; padding: 0; border: 0; background: none; }
.site-shell .tm-slide blockquote p { margin: 0; color: var(--brand-green-dark); font-family: var(--brand-serif); font-size: clamp(1.1rem, 1.55vw, 1.4rem); line-height: 1.55; }
.site-shell .tm-slide figcaption { display: flex; align-items: center; gap: 13px; padding-top: 18px; border-top: 1px solid #e3edf2; }
.site-shell .tm-avatar { display: grid; flex: 0 0 46px; height: 46px; place-items: center; border-radius: 50%; background: linear-gradient(135deg, var(--brand-green), var(--brand-blue)); color: #fff; font-size: .82rem; font-weight: 800; letter-spacing: .03em; }
.site-shell .tm-person { display: grid; gap: 1px; }
.site-shell .tm-person strong { color: var(--brand-ink); font-size: .95rem; }
.site-shell .tm-person small { color: var(--brand-muted); font-size: .78rem; }
.site-shell .tm-dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.site-shell .tm-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: #b9cfdb; cursor: pointer; transition: width .25s ease, background .25s ease; }
.site-shell .tm-dot[aria-current="true"] { width: 28px; background: var(--brand-blue-dark); }
.site-shell .tm-track:focus-visible { outline-offset: 6px; border-radius: 12px; }

/* ---------- Contact page ---------- */
.site-shell.contact-page .article-body { width: min(1100px, calc(100% - 56px)); margin: 30px auto 14px; }
.site-shell.contact-page .article-body .wp-block-uagb-container:has(> .wp-block-uagb-container > .wp-block-uagb-info-box) { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.site-shell.contact-page .article-body .wp-block-uagb-info-box { height: 100%; padding: 20px 22px; border: 1px solid #e1e9e4; border-radius: 18px; background: #f7faf8; }
.site-shell.contact-page .article-body .uagb-ifb-title { margin: 0 0 6px; font-size: 1.15rem; }
.site-shell.contact-page .article-body .uagb-ifb-desc { margin: 0; word-break: break-word; }
.site-shell.contact-page .article-body .uagb-ifb-desc a { color: var(--brand-green); font-weight: 700; text-decoration: none; }
.site-shell.contact-page .contact-panel { margin-top: 24px; margin-bottom: 56px; }

/* ---------- Responsive ---------- */
@media (max-width: 1120px) {
    .site-shell .approach-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
    .site-shell .approach-step { padding: 24px 20px 26px; }
    .site-shell .tm-slide { flex-basis: calc((100% - 20px) / 2); padding: 26px 24px 24px; }
}
@media (max-width: 920px) {
    .site-shell .values-layout { grid-template-columns: 1fr; }
    .site-shell .values-media { min-height: 0; aspect-ratio: 1.25 / 1; }
    .site-shell .vm-grid { grid-template-columns: 1fr; }
    .site-shell .vm-card { min-height: 0; }
    .site-shell .approach-steps { grid-template-columns: 1fr; }
    .site-shell .approach-number { font-size: 3.2rem; }
    .site-shell .tm-slide { flex-basis: 100%; }
}
@media (max-width: 720px) {
    .site-shell .section-space { padding-block: 44px; }
    .site-shell .values-list { grid-template-columns: 1fr; }
    .site-shell .values-media::before { inset: 14px -8px -8px 14px; }
    .site-shell .vm-watermark { font-size: 6.5rem; }
    .site-shell .section-testimonials .section-heading { flex-direction: row; align-items: flex-end; }
    .site-shell .tm-arrow, .site-shell .tm-toggle { width: 42px; height: 42px; }
    .site-shell .tm-slide { padding: 24px 20px 22px; }
    .site-shell.contact-page .article-body { width: calc(100% - 32px); }
}
@media (prefers-reduced-motion: reduce) {
    .site-shell .tm-track { scroll-behavior: auto; }
}
