/*
Theme Name:   GeneratePress Africa FX Guide Child
Theme URI:    https://africafxguide.com
Description:  Child theme of GeneratePress for africafxguide.com. Navy, teal and cream palette, self-hosted Newsreader and Inter fonts, licence-first home page, and styling for the Key takeaways, Source, Risk warning and affiliate CTA boxes used in the articles. No stock photos, no external requests.
Author:       africafxguide.com
Template:     generatepress
Version:      1.0.2
Requires at least: 6.3
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  generatepress-africafxguide-child
*/

/* ==========================================================================
   1. Fonts (self-hosted, latin subset, variable, font-display: swap)
   ========================================================================== */
@font-face{font-family:"Inter";font-style:normal;font-weight:100 900;font-display:swap;src:url("fonts/inter-latin-wght.woff2") format("woff2")}
@font-face{font-family:"Newsreader";font-style:normal;font-weight:200 800;font-display:swap;src:url("fonts/newsreader-latin-wght.woff2") format("woff2")}

/* ==========================================================================
   2. Tokens
   ========================================================================== */
:root{
  --afx-navy:#0B1F3A; --afx-navy2:#12305A; --afx-deep:#08162B;
  --afx-ink:#14202E; --afx-muted:#5B6878; --afx-line:#DDE3EA;
  --afx-sand:#F6F4EF; --afx-paper:#FFFFFF;
  --afx-teal:#0F766E; --afx-teal-d:#0B5C56; --afx-mint:#7FD6CB; --afx-gold:#B7791F;
  --afx-warn-bg:#FFF7E6; --afx-warn-line:#E8C27A; --afx-ok:#15663C; --afx-bad:#B42318;
  --afx-serif:"Newsreader","Source Serif 4",Georgia,"Times New Roman",serif;
  --afx-sans:"Inter","Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;
  --afx-radius:10px;
}

/* ==========================================================================
   3. Base (overrides GeneratePress defaults)
   ========================================================================== */
body.afx-theme{background:var(--afx-sand);color:var(--afx-ink);font-family:var(--afx-sans);font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}
.afx-theme a{color:var(--afx-teal-d)}
.afx-theme a:hover{color:var(--afx-teal)}
.afx-theme :focus-visible{outline:3px solid #1d9a8f;outline-offset:2px;border-radius:2px}
.afx-theme h1,.afx-theme h2,.afx-theme h3,.afx-theme h4{font-family:var(--afx-serif);color:var(--afx-navy);font-weight:500;letter-spacing:-.01em}
.afx-wrap{max-width:1180px;margin:0 auto;padding:0 20px}
.afx-theme .skip-link{background:var(--afx-navy);color:#fff}
.afx-theme .screen-reader-text:focus{z-index:100000}

/* ==========================================================================
   4. Disclosure bar and sticky header
   ========================================================================== */
.afx-bar{background:var(--afx-navy);color:#C9D6E8;font-size:12.5px;line-height:1.5;padding:8px 0}
.afx-bar .afx-wrap{display:flex;flex-direction:column;gap:4px}
.afx-bar b{color:#fff}
.afx-bar a{color:var(--afx-mint);text-decoration:underline}
.afx-header{background:#fff;border-bottom:1px solid var(--afx-line);position:sticky;top:0;z-index:50}
.admin-bar .afx-header{top:32px}
@media (max-width:782px){.admin-bar .afx-header{top:46px}}
.afx-hdr{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px}
.afx-brand{display:flex;align-items:center;gap:11px;text-decoration:none}
.afx-brand svg{width:38px;height:38px;flex:0 0 auto}
.afx-brand .w1,.afx-brand .w2{display:block}
.afx-brand .w1{font-family:var(--afx-serif);font-weight:600;font-size:22px;color:var(--afx-navy);letter-spacing:-.01em;line-height:1}
.afx-brand .w2{font-size:10.5px;letter-spacing:.18em;color:var(--afx-muted);text-transform:uppercase;margin-top:4px;line-height:1.2}
.afx-brand:hover .w1{color:var(--afx-teal-d)}
.afx-nav-toggle{display:none;min-height:44px;min-width:44px;padding:8px 14px;border:1px solid var(--afx-line);background:#fff;border-radius:6px;font:600 14px var(--afx-sans);color:var(--afx-navy);cursor:pointer}
.afx-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:4px 22px}
.afx-nav a{display:block;padding:10px 0;font-size:15px;font-weight:500;color:var(--afx-ink);text-decoration:none;border-bottom:2px solid transparent}
.afx-nav a:hover,.afx-nav .current-menu-item>a,.afx-nav .current-menu-ancestor>a,.afx-nav a[aria-current="page"]{color:var(--afx-teal-d);border-bottom-color:var(--afx-teal)}
.afx-header-cta{display:none}
/* mobile menu only when JS is available; without JS the links wrap under the brand */
@media (max-width:899px){
  .afx-hdr{flex-wrap:wrap;padding:8px 0}
  .afx-nav{flex-basis:100%;order:3}
  .afx-nav ul{gap:0 18px}
  .afx-js .afx-nav-toggle{display:inline-flex;align-items:center}
  .afx-js .afx-nav{display:none}
  .afx-js .afx-nav.is-open{display:block}
  .afx-js .afx-nav ul{flex-direction:column;gap:0;padding-bottom:10px}
  .afx-js .afx-nav a{padding:12px 2px;border-bottom:1px solid var(--afx-line)}
}
@media (min-width:900px){
  .afx-hdr{min-height:72px}
  .afx-nav ul{flex-wrap:nowrap}
  .afx-header-cta{display:inline-block}
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */
.afx-btn,.afx-theme .afx-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;background:var(--afx-teal);color:#fff;padding:10px 20px;border-radius:6px;font-weight:600;font-size:15px;line-height:1.2;text-decoration:none;border:1px solid var(--afx-teal)}
.afx-btn:hover,.afx-theme .afx-btn:hover{background:var(--afx-teal-d);border-color:var(--afx-teal-d);color:#fff}
.afx-btn.ghost,.afx-theme .afx-btn.ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.5)}
.afx-btn.ghost:hover,.afx-theme .afx-btn.ghost:hover{background:rgba(255,255,255,.1);border-color:#fff}
.afx-btn.sm{padding:8px 14px;font-size:14px}

/* ==========================================================================
   6. Home page
   ========================================================================== */
body.afx-home #page,body.afx-home .site.grid-container{max-width:none;margin:0;padding:0;width:100%}
body.afx-home .site-content{display:block;padding:0}
.afx-main{display:block;width:100%}
.afx-section{padding:44px 0}
.afx-section.tight{padding-top:0}
.afx-sh{margin-bottom:22px}
.afx-sh h2{font-size:28px;line-height:1.2;margin:0}
.afx-sh p{margin:6px 0 0;color:var(--afx-muted);max-width:640px}

/* hero */
.afx-hero{background:linear-gradient(135deg,var(--afx-navy) 0%,var(--afx-navy2) 100%);color:#fff;position:relative;overflow:hidden}
.afx-hero:before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 85% 20%,rgba(15,118,110,.45),transparent 45%),repeating-linear-gradient(90deg,rgba(255,255,255,.035) 0 1px,transparent 1px 80px);pointer-events:none}
.afx-hero .afx-wrap{position:relative;display:grid;grid-template-columns:1fr;gap:32px;padding-top:44px;padding-bottom:44px;align-items:center}
.afx-eyebrow{font-size:12.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--afx-mint);font-weight:600}
.afx-theme .afx-hero h1{color:#fff;font-size:33px;line-height:1.12;margin:12px 0 16px;letter-spacing:-.015em}
.afx-hero .lead{font-size:17px;color:#CFDAEA;max-width:560px;margin:0 0 24px}
.afx-cta-row{display:flex;gap:12px;flex-wrap:wrap}
.afx-hero .micro{font-size:13px;color:#A9BBD3;margin:18px 0 0;max-width:560px}
.afx-panel{background:#fff;color:var(--afx-ink);border-radius:var(--afx-radius);padding:20px;box-shadow:0 18px 50px rgba(0,0,0,.28)}
.afx-panel h2{margin:0 0 4px;font-family:var(--afx-sans);font-size:15px;letter-spacing:.01em;font-weight:700;color:var(--afx-navy)}
.afx-panel .sub{font-size:13px;color:var(--afx-muted);margin:0 0 10px}
.afx-lic{width:100%;border-collapse:collapse;font-size:14px;margin:0}
.afx-lic th,.afx-lic td{padding:10px 6px;border:0;border-top:1px solid var(--afx-line);text-align:left;vertical-align:top;background:none}
.afx-lic th{font-size:11.5px;text-transform:uppercase;letter-spacing:.08em;color:var(--afx-muted);border-top:0;font-weight:600}
.afx-lic tbody th{text-transform:none;letter-spacing:0;font-size:14px;color:var(--afx-ink);border-top:1px solid var(--afx-line)}
.afx-lic small{display:block;color:var(--afx-muted);font-size:12.5px;line-height:1.4}
.afx-lic a{font-weight:600}
.afx-tag{display:inline-block;font-size:11.5px;font-weight:600;padding:2px 8px;border-radius:99px;line-height:1.5}
.afx-tag.ok{background:#E3F4EA;color:var(--afx-ok)} .afx-tag.no{background:#FDE7E4;color:var(--afx-bad)} .afx-tag.na{background:#EEF1F5;color:#4B5767}
.afx-panel .src{font-size:12px;color:var(--afx-muted);margin:10px 0 0;line-height:1.5}

/* trust strip */
.afx-trust{background:#fff;border-bottom:1px solid var(--afx-line)}
.afx-trust .afx-wrap{display:grid;grid-template-columns:1fr;gap:16px;padding-top:20px;padding-bottom:20px}
.afx-trust .it{display:flex;gap:12px;align-items:flex-start;font-size:14px}
.afx-trust .ic{flex:0 0 36px;height:36px;border-radius:8px;background:#E7F3F1;color:var(--afx-teal-d);display:grid;place-items:center;font-weight:700}
.afx-trust b{display:block;font-size:14.5px}
.afx-trust span.d{color:var(--afx-muted);font-size:13px}

/* country cards */
.afx-grid4,.afx-grid3{display:grid;grid-template-columns:1fr;gap:16px}
.afx-country{background:#fff;border:1px solid var(--afx-line);border-radius:var(--afx-radius);padding:20px;border-top:4px solid var(--afx-teal);display:flex;flex-direction:column}
.afx-country.warn{border-top-color:var(--afx-gold)}
.afx-country h3{margin:0 0 4px;font-size:22px}
.afx-country .reg{font-size:13px;color:var(--afx-muted);margin-bottom:12px}
.afx-country ul{padding-left:18px;margin:0 0 14px;font-size:14px}
.afx-country li{margin-bottom:4px}
.afx-country .more{margin-top:auto;font-weight:600;font-size:14px}
.afx-country .info{font-size:12px;color:#7A5410;background:var(--afx-warn-bg);border:1px solid var(--afx-warn-line);border-radius:6px;padding:4px 8px;margin:0 0 12px}

/* guide cards */
.afx-card{background:#fff;border:1px solid var(--afx-line);border-radius:var(--afx-radius);overflow:hidden;display:flex;flex-direction:column}
.afx-card .img{height:96px;background:linear-gradient(120deg,var(--afx-navy),var(--afx-teal));position:relative}
.afx-card .img.b{background:linear-gradient(120deg,#1B2B4A,#8a5a14)}
.afx-card .img.c{background:linear-gradient(120deg,#0E3B4D,#2E8B7A)}
.afx-card .img.d{background:linear-gradient(120deg,#12305A,#0B5C56)}
.afx-card .img span{position:absolute;left:14px;bottom:10px;color:#fff;font-size:12px;letter-spacing:.12em;text-transform:uppercase;font-weight:600}
.afx-card .body{padding:16px 18px;display:flex;flex-direction:column;gap:8px;flex:1}
.afx-card h3{margin:0;font-size:21px;line-height:1.25}
.afx-card h3 a{color:var(--afx-navy);text-decoration:none}
.afx-card h3 a:hover{color:var(--afx-teal-d);text-decoration:underline}
.afx-card p{margin:0;font-size:14.5px;color:#415062}
.afx-card .meta{margin-top:auto;padding-top:12px;border-top:1px solid var(--afx-line);font-size:12.5px;color:var(--afx-muted)}

/* facts table */
.afx-cmp{background:#fff;border:1px solid var(--afx-line);border-radius:var(--afx-radius);overflow:auto}
.afx-cmp table{width:100%;border-collapse:collapse;font-size:14.5px;min-width:560px;margin:0}
.afx-cmp th{background:var(--afx-navy);color:#fff;text-align:left;padding:12px 14px;font-weight:600;font-size:13px;letter-spacing:.03em;border:0}
.afx-cmp tbody th{background:none;color:var(--afx-ink);font-weight:600;font-size:14.5px;letter-spacing:0;border-top:1px solid var(--afx-line)}
.afx-cmp td{padding:12px 14px;border:0;border-top:1px solid var(--afx-line);vertical-align:top}
.afx-cmp tr:nth-child(even) td{background:#FAFBFC}
.afx-cmp .cite,.afx-fine{font-size:12.5px;color:var(--afx-muted)}
.afx-fine{margin:12px 0 0}

/* editorial boxes */
.afx-edit{display:grid;grid-template-columns:1fr;gap:20px}
.afx-box2{background:#fff;border:1px solid var(--afx-line);border-radius:var(--afx-radius);padding:22px}
.afx-box2 h2{font-size:22px;margin:0 0 10px}
.afx-box2 p{font-size:14.5px;margin:0 0 10px}
.afx-warnbox{background:var(--afx-warn-bg);border:1px solid var(--afx-warn-line);border-radius:8px;padding:14px 16px;font-size:14px;color:#5C4210}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.afx-theme .site-footer{background:none;max-width:none;width:100%;margin:0;padding:0}
.afx-footer{background:var(--afx-deep);color:#AFC0D8;padding:40px 0 26px;font-size:14px;margin-top:0}
.afx-footer .cols{display:grid;grid-template-columns:1fr;gap:26px}
.afx-footer h2{font-family:var(--afx-sans);color:#fff;margin:0 0 8px;font-size:14px;font-weight:700;letter-spacing:0}
.afx-footer a{color:#C3D1E6;display:block;margin:0;padding:6px 0;text-decoration:none}
.afx-footer a:hover{color:#fff;text-decoration:underline}
.afx-footer .afx-brand .w1{color:#fff;font-size:20px}
.afx-footer p{margin:12px 0 0}
.afx-footer .legal{border-top:1px solid rgba(255,255,255,.14);margin-top:26px;padding-top:18px;font-size:12.5px;line-height:1.7;color:#9FB1CC}
.afx-footer .legal b{color:#E3EBF6}
.afx-footer .legal a{display:inline;padding:0;text-decoration:underline;color:#C3D1E6}
.afx-footer .copy{margin-top:12px;font-size:12.5px;color:#9FB1CC}

/* ==========================================================================
   8. Articles and pages (GeneratePress content)
   ========================================================================== */
.afx-theme.no-sidebar .site-content,.afx-theme .site-content{display:block}
.afx-theme .site-main{margin:0}
.afx-theme:not(.afx-home) .site.grid-container{max-width:860px;padding:0 14px}
.afx-theme:not(.afx-home) .site-content{padding:20px 0 40px}
.afx-theme:not(.afx-home) .inside-article,
.afx-theme:not(.afx-home) .page-header,
.afx-theme:not(.afx-home) .no-results,
.afx-theme:not(.afx-home) .comments-area{background:#fff;border:1px solid var(--afx-line);border-radius:var(--afx-radius);padding:24px 20px;box-shadow:none}
.afx-theme:not(.afx-home) .separate-containers .site-main>*{margin-bottom:20px}
.afx-theme .entry-title,.afx-theme .page-title{font-size:30px;line-height:1.15;margin:0 0 .5em}
.afx-theme .entry-meta{font-size:13px;color:var(--afx-muted);margin-bottom:6px}
.afx-theme .entry-meta a{color:var(--afx-muted)}
.afx-theme .entry-content{font-size:17px;line-height:1.7}
.afx-theme .entry-content>*:first-child{margin-top:0}
.afx-theme .entry-content h2{font-size:27px;line-height:1.2;margin:1.8em 0 .5em;padding-top:.2em}
.afx-theme .entry-content h3{font-size:21px;line-height:1.3;margin:1.5em 0 .4em}
.afx-theme .entry-content p,.afx-theme .entry-content ul,.afx-theme .entry-content ol{margin-bottom:1.1em}
.afx-theme .entry-content li{margin-bottom:.35em}
.afx-theme .entry-content a:not(.afx-btn){text-decoration:underline;text-underline-offset:2px;text-decoration-thickness:1px}
.afx-theme .entry-content .has-small-font-size{font-size:14px;color:var(--afx-muted)}
.afx-theme .entry-content .has-small-font-size em{font-style:normal}
.afx-theme .entry-content hr{border:0;border-top:1px solid var(--afx-line);margin:2em 0}
.afx-theme .entry-content blockquote{border-left:4px solid var(--afx-teal);margin:1.4em 0;padding:.2em 1.2em;color:#2b3a4c;background:none}
.afx-theme .entry-footer{font-size:13px;color:var(--afx-muted)}
.afx-theme .post-navigation,.afx-theme .paging-navigation{font-size:14px}

/* tables */
.afx-theme .entry-content .wp-block-table{overflow-x:auto;margin:1.4em 0;-webkit-overflow-scrolling:touch}
.afx-theme .entry-content .wp-block-table table{width:100%;min-width:560px;border-collapse:collapse;font-size:15px;line-height:1.5;border:1px solid var(--afx-line)}
.afx-theme .entry-content .wp-block-table th{background:var(--afx-navy);color:#fff;text-align:left;padding:11px 14px;font-weight:600;font-size:13.5px;border:0}
.afx-theme .entry-content .wp-block-table td{padding:11px 14px;border:0;border-top:1px solid var(--afx-line);vertical-align:top}
.afx-theme .entry-content .wp-block-table tbody tr:nth-child(even) td{background:#FAFBFC}

/* article boxes: classes already used in the published articles.
   !important is used because the stored HTML carries inline styles. */
.afx-theme .afx-box{border-radius:6px!important;margin:1.6em 0!important;padding:16px 20px!important;font-size:16px!important;line-height:1.6;color:var(--afx-ink)}
.afx-theme .afx-box p{margin:0 0 .6em!important;font-size:inherit}
.afx-theme .afx-box p:last-child,.afx-theme .afx-box ul:last-child{margin-bottom:0!important}
.afx-theme .afx-box>p:first-child>strong:only-child,.afx-theme .afx-box>p:first-child[style*="font-weight:700"]{font-family:var(--afx-sans);font-size:11.5px!important;letter-spacing:.12em;text-transform:uppercase;color:var(--afx-navy)}
.afx-theme .afx-box ul{margin:0 0 0 1.2em!important;padding:0}
.afx-theme .afx-box li{margin-bottom:.4em}
.afx-theme .afx-box a{text-decoration:underline}
.afx-theme .afx-takeaways{background:#EEF6F6!important;border-left:5px solid var(--afx-teal)!important}
.afx-theme .afx-takeaways>p:first-child{color:var(--afx-teal-d)!important}
.afx-theme .afx-source{background:#F7F4EC!important;border:1px solid #D9D2BD!important;font-size:15px!important}
.afx-theme .afx-source ul,.afx-theme .afx-source ol{font-size:14.5px;word-break:break-word}
.afx-theme .afx-risk{background:#FFF4F2!important;border-left:5px solid var(--afx-bad)!important}
.afx-theme .afx-risk>p:first-child{color:var(--afx-bad)!important}
.afx-theme .afx-note{background:#F3F5F8!important;border-left:5px solid #1E3A5F!important;font-size:14.5px!important;color:var(--afx-ink);margin-top:1.2em}
.afx-theme .afx-cta-box{background:#F0F7F7!important;border:1px solid var(--afx-teal)!important}
.afx-theme .afx-cta-box a[rel~="sponsored"]{display:inline-flex!important;align-items:center;min-height:44px;background:var(--afx-teal)!important;color:#fff!important;text-decoration:none!important;padding:10px 22px!important;border-radius:6px!important;font-weight:700;font-size:16px}
.afx-theme .afx-cta-box a[rel~="sponsored"]:hover{background:var(--afx-teal-d)!important}
.afx-theme .afx-cta-box small{color:var(--afx-muted);margin-left:6px}

/* ==========================================================================
   9. Larger screens
   ========================================================================== */
@media (min-width:700px){
  .afx-bar .afx-wrap{flex-direction:row;justify-content:space-between;gap:18px}
  .afx-grid4{grid-template-columns:1fr 1fr}
  .afx-grid3{grid-template-columns:1fr 1fr}
  .afx-trust .afx-wrap{grid-template-columns:1fr 1fr}
  .afx-footer .cols{grid-template-columns:1fr 1fr}
  .afx-theme:not(.afx-home) .inside-article{padding:36px 40px}
  .afx-theme .entry-title,.afx-theme .page-title{font-size:38px}
}
@media (min-width:960px){
  .afx-section{padding:60px 0}
  .afx-sh h2{font-size:32px}
  .afx-hero .afx-wrap{grid-template-columns:1.25fr 1fr;gap:48px;padding-top:72px;padding-bottom:72px}
  .afx-theme .afx-hero h1{font-size:50px}
  .afx-hero .lead{font-size:18px}
  .afx-grid4{grid-template-columns:repeat(4,1fr);gap:18px}
  .afx-grid3{grid-template-columns:repeat(3,1fr);gap:22px}
  .afx-trust .afx-wrap{grid-template-columns:repeat(4,1fr);gap:18px}
  .afx-edit{grid-template-columns:1fr 1fr;gap:28px}
  .afx-footer .cols{grid-template-columns:1.4fr 1fr 1fr 1fr;gap:30px}
  .afx-card .img{height:120px}
}
@media (prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
@media print{.afx-bar,.afx-header,.afx-footer .cols{display:none}}
