/**
 * GreatMigration.Africa long-form guide system.
 *
 * All styles are scoped under .gma-guide to avoid overriding Astra globally.
 * Use the GMA Guide template or wrap custom HTML in <div class="gma-guide">.
 */

.gma-guide,
.gma-guide * {
	box-sizing: border-box;
}

.gma-guide {
	--gma-paper: #F6EEDC;
	--gma-paper-2: #EFE2C4;
	--gma-paper-3: #E3D1A7;
	--gma-ink: #15100A;
	--gma-muted: #746244;
	--gma-acacia: #243B1E;
	--gma-acacia-2: #182713;
	--gma-acacia-mid: #3A5C30;
	--gma-gold: #B77B25;
	--gma-gold-2: #8A5E1A;
	--gma-gold-light: #D9A642;
	--gma-rust: #9E4B2A;
	--gma-sky: #557F9E;
	--gma-border: rgba(183, 123, 37, 0.16);
	--gma-border-2: rgba(183, 123, 37, 0.30);
	--gma-shadow: 0 24px 70px rgba(21, 16, 10, 0.10);

	font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-weight: 400;
	background: var(--gma-paper);
	color: var(--gma-ink);
	line-height: 1.75;
	overflow-x: clip;
}

.gma-template-main {
	margin: 0;
	padding: 0;
}

.gma-template-main .ast-container,
.gma-guide .ast-container {
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.gma-guide a {
	color: var(--gma-gold-2);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

.gma-guide img {
	max-width: 100%;
	height: auto;
	display: block;
}

.gma-container {
	width: min(1120px, calc(100% - 40px));
	margin-inline: auto;
}

.gma-tag {
	display: inline-block;
	font-size: 0.67rem;
	font-weight: 700;
	letter-spacing: 0.20em;
	text-transform: uppercase;
	color: var(--gma-gold);
	border: 1px solid var(--gma-border-2);
	padding: 0.32rem 0.9rem;
	border-radius: 2px;
	margin-bottom: 0.9rem;
}

.gma-section-title {
	font-family: "Fraunces", Georgia, serif;
	font-size: clamp(2.15rem, 4vw, 3.65rem);
	font-weight: 400;
	line-height: 1.05;
	color: var(--gma-ink);
	letter-spacing: -0.02em;
	margin: 0;
}

.gma-section-title em,
.gma-guide h1 em,
.gma-guide h2 em {
	color: var(--gma-gold);
	font-style: italic;
}

.gma-section-heading--light .gma-section-title,
.gma-section-title.gma-light {
	color: var(--gma-paper);
}

.gma-section-heading--light .gma-section-title em {
	color: var(--gma-gold-light);
}

.gma-section-body {
	font-size: 0.98rem;
	font-weight: 300;
	color: var(--gma-muted);
	line-height: 1.9;
	max-width: 620px;
	margin: 0;
}

.gma-section-heading--light .gma-section-body {
	color: rgba(246, 238, 220, 0.66);
}

.gma-sep {
	width: 42px;
	height: 2px;
	background: var(--gma-gold);
	margin: 1.25rem 0 1.55rem;
}

.gma-grid {
	display: grid;
	gap: 1.5rem;
}

.gma-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gma-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gma-grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Optional in-post navigation. This avoids fighting Astra's site header. */
.gma-guide-nav {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(246, 238, 220, 0.94);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--gma-border);
}

.gma-guide-nav__inner {
	width: min(1180px, calc(100% - 36px));
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 0.75rem 0;
}

.gma-guide-nav__logo {
	font-family: "Fraunces", Georgia, serif;
	font-size: 1.05rem;
	color: var(--gma-ink);
	text-decoration: none;
	white-space: nowrap;
}

.gma-guide-nav__logo b {
	color: var(--gma-gold);
}

.gma-guide-nav__links {
	display: flex;
	align-items: center;
	gap: 1.35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.gma-guide-nav__links a {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	color: var(--gma-muted);
	text-decoration: none;
}

.gma-guide-nav__links a:hover {
	color: var(--gma-gold);
}

/* Hero */
.gma-hero {
	min-height: 86vh;
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	overflow: hidden;
	background: var(--gma-ink);
	padding: 8rem 1.25rem 7rem;
	isolation: isolate;
}

.gma-hero__bg {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 50% 12%, rgba(255, 218, 116, 0.34), transparent 26%),
		linear-gradient(180deg,
			#091221 0%,
			#17335C 13%,
			#7A3A27 28%,
			#D58224 39%,
			#E7B44A 49%,
			#CFCB84 57%,
			#6E96AA 66%,
			#C46D24 76%,
			#7C220F 87%,
			#130806 100%);
	z-index: -3;
}

.gma-hero__arc {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 7px;
	background: linear-gradient(90deg, #0A1830 0%, #C06420 22%, #F1C969 45%, #83AFC2 62%, #DA8127 78%, #4A1007 100%);
	z-index: 2;
}

.gma-hero__silhouette {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 260px;
	background:
		radial-gradient(ellipse at 14% 52%, rgba(8, 5, 3, 0.98) 0 16px, transparent 17px),
		radial-gradient(ellipse at 18% 48%, rgba(8, 5, 3, 0.98) 0 25px, transparent 26px),
		radial-gradient(ellipse at 72% 48%, rgba(8, 5, 3, 0.98) 0 30px, transparent 31px),
		linear-gradient(to top, #060303 0 32%, transparent 33%);
	opacity: 0.90;
	z-index: -1;
}

.gma-hero__silhouette::before {
	content: "";
	position: absolute;
	left: 6%;
	bottom: 72px;
	width: 94px;
	height: 72px;
	background:
		linear-gradient(#070403, #070403) 42px 28px / 9px 72px no-repeat,
		radial-gradient(ellipse, #070403 0 58%, transparent 59%) 0 0 / 94px 42px no-repeat;
}

.gma-hero__silhouette::after {
	content: "";
	position: absolute;
	right: 7%;
	bottom: 64px;
	width: 128px;
	height: 92px;
	background:
		linear-gradient(#070403, #070403) 58px 24px / 10px 92px no-repeat,
		radial-gradient(ellipse, #070403 0 60%, transparent 61%) 0 0 / 128px 48px no-repeat;
}

.gma-hero__content {
	position: relative;
	z-index: 5;
	width: min(1000px, 100%);
	text-align: center;
	color: #fff;
}

.gma-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	font-size: 0.70rem;
	font-weight: 700;
	letter-spacing: 0.20em;
	text-transform: uppercase;
	color: rgba(246, 238, 220, 0.62);
	margin-bottom: 1.55rem;
}

.gma-hero__eyebrow span {
	width: 5px;
	height: 5px;
	border-radius: 999px;
	background: var(--gma-gold-light);
}

.gma-hero h1 {
	font-family: "Fraunces", Georgia, serif;
	font-size: clamp(3rem, 7vw, 6rem);
	font-weight: 300;
	line-height: 1.02;
	color: #fff;
	letter-spacing: -0.03em;
	margin: 0 0 0.75rem;
}

.gma-hero__subtitle {
	font-family: "Fraunces", Georgia, serif;
	font-size: clamp(1.25rem, 2.8vw, 2.25rem);
	font-weight: 300;
	color: rgba(246, 238, 220, 0.58);
	line-height: 1.2;
	margin: 0 0 1.5rem;
}

.gma-hero__desc {
	font-size: 1.05rem;
	font-weight: 300;
	color: rgba(246, 238, 220, 0.76);
	max-width: 720px;
	margin: 0 auto 2.4rem;
	line-height: 1.9;
}

.gma-hero__stats,
.gma-stat-band__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	border: 1px solid rgba(246, 238, 220, 0.12);
	max-width: 760px;
	margin: 0 auto 2.4rem;
}

.gma-hero__stat,
.gma-stat-card {
	padding: 1rem 0.75rem;
	text-align: center;
	border-right: 1px solid rgba(246, 238, 220, 0.12);
}

.gma-hero__stat:last-child,
.gma-stat-card:last-child {
	border-right: none;
}

.gma-hero__stat-value,
.gma-stat-card__value {
	font-family: "Fraunces", Georgia, serif;
	font-size: 1.45rem;
	font-weight: 400;
	color: var(--gma-gold-light);
	line-height: 1;
	margin-bottom: 0.28rem;
}

.gma-hero__stat-label,
.gma-stat-card__label {
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: rgba(246, 238, 220, 0.40);
}

/* Buttons */
.gma-btn-row {
	display: flex;
	gap: 1rem;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
}

.gma-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0.95rem 2.2rem;
	border-radius: 2px;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	text-decoration: none !important;
	transition: transform 0.16s ease, background 0.22s ease, border-color 0.22s ease;
}

.gma-btn:hover {
	transform: translateY(-1px);
}

.gma-btn--primary {
	background: var(--gma-gold);
	color: #fff !important;
	border: 1px solid var(--gma-gold);
}

.gma-btn--primary:hover {
	background: var(--gma-gold-2);
	border-color: var(--gma-gold-2);
}

.gma-btn--outline,
.gma-btn--outline-light {
	background: transparent;
	color: rgba(246, 238, 220, 0.90) !important;
	border: 1px solid rgba(246, 238, 220, 0.30);
}

.gma-btn--outline:hover,
.gma-btn--outline-light:hover {
	background: rgba(246, 238, 220, 0.06);
	border-color: rgba(246, 238, 220, 0.60);
}

.gma-btn--dark-outline {
	color: var(--gma-acacia) !important;
	border-color: var(--gma-border-2);
}

/* Content sections */
.gma-section {
	padding: 7rem 0;
	background: var(--gma-paper);
}

.gma-section--paper-2 {
	background: var(--gma-paper-2);
}

.gma-section--dark {
	background: var(--gma-acacia);
	color: var(--gma-paper);
	position: relative;
	overflow: hidden;
}

.gma-section--dark::before {
	content: "";
	position: absolute;
	top: -180px;
	right: -180px;
	width: 620px;
	height: 620px;
	border-radius: 999px;
	background: rgba(183, 123, 37, 0.07);
	pointer-events: none;
}

.gma-section--dark > .gma-container {
	position: relative;
	z-index: 2;
}

.gma-two-col {
	display: grid;
	grid-template-columns: 0.9fr 1.6fr;
	gap: 5rem;
	align-items: start;
}

.gma-prose {
	font-size: 0.96rem;
	font-weight: 300;
	color: var(--gma-muted);
	line-height: 1.95;
}

.gma-prose p {
	margin: 0 0 1.35rem;
}

.gma-prose h2,
.gma-prose h3,
.gma-prose h4 {
	font-family: "Fraunces", Georgia, serif;
	color: var(--gma-ink);
	line-height: 1.18;
	margin: 2rem 0 0.75rem;
}

.gma-prose h3 {
	font-size: 1.55rem;
	font-weight: 450;
}

.gma-prose ul,
.gma-prose ol {
	margin: 1rem 0 1.4rem 1.25rem;
	padding: 0;
}

.gma-prose li {
	margin: 0.3rem 0;
}

.gma-facts {
	margin-top: 2.5rem;
	border-top: 1px solid var(--gma-border);
}

.gma-fact-row {
	display: grid;
	grid-template-columns: 136px 1fr;
	gap: 1.2rem;
	padding: 1rem 0;
	border-bottom: 1px solid var(--gma-border);
}

.gma-fact-label {
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gma-muted);
}

.gma-fact-value {
	font-size: 0.90rem;
	font-weight: 300;
	color: var(--gma-muted);
	line-height: 1.65;
}

.gma-fact-value strong {
	color: var(--gma-ink);
	font-weight: 700;
}

/* Stat band */
.gma-stat-band {
	background: var(--gma-acacia);
	padding: 4.25rem 0;
}

.gma-stat-band__grid {
	max-width: none;
	margin: 0;
	border-color: rgba(183, 123, 37, 0.22);
	background: rgba(183, 123, 37, 0.18);
	gap: 1px;
}

.gma-stat-card {
	background: rgba(255, 255, 255, 0.035);
	border-right: none;
	padding: 2rem 1.25rem;
}

.gma-stat-card__value {
	font-size: 2.65rem;
}

.gma-stat-card__note {
	font-size: 0.78rem;
	font-weight: 300;
	color: rgba(246, 238, 220, 0.42);
	line-height: 1.6;
	margin-top: 0.4rem;
}

/* Cards */
.gma-card-grid {
	display: grid;
	gap: 1px;
	border: 1px solid var(--gma-border-2);
	background: var(--gma-border-2);
}

.gma-card-grid--2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gma-card-grid--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gma-card-grid--4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gma-card {
	position: relative;
	background: var(--gma-paper);
	padding: 2.35rem 1.85rem;
	transition: background 0.2s ease, transform 0.2s ease;
}

.gma-card:hover {
	background: #fffaf0;
}

.gma-card::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--gma-gold);
	transform: scaleY(0);
	transform-origin: top;
	transition: transform 0.28s ease;
}

.gma-card:hover::before {
	transform: scaleY(1);
}

.gma-card__kicker {
	display: inline-block;
	font-size: 0.62rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gma-gold);
	margin-bottom: 0.65rem;
}

.gma-card h3,
.gma-card h4 {
	font-family: "Fraunces", Georgia, serif;
	font-size: 1.24rem;
	font-weight: 450;
	color: var(--gma-ink);
	line-height: 1.22;
	margin: 0 0 0.55rem;
}

.gma-card p {
	font-size: 0.86rem;
	font-weight: 300;
	color: var(--gma-muted);
	line-height: 1.8;
	margin: 0;
}

.gma-card__meta {
	display: inline-block;
	margin-top: 0.85rem;
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gma-gold-2);
}

/* Dark cards */
.gma-section--dark .gma-card-grid {
	border-color: rgba(183, 123, 37, 0.22);
	background: rgba(183, 123, 37, 0.22);
}

.gma-section--dark .gma-card {
	background: rgba(255, 255, 255, 0.035);
}

.gma-section--dark .gma-card:hover {
	background: rgba(255, 255, 255, 0.065);
}

.gma-section--dark .gma-card h3,
.gma-section--dark .gma-card h4 {
	color: var(--gma-paper);
}

.gma-section--dark .gma-card p {
	color: rgba(246, 238, 220, 0.58);
}

/* Tables */
.gma-table-wrap {
	width: 100%;
	overflow-x: auto;
	border: 1px solid var(--gma-border-2);
	background: var(--gma-paper);
	box-shadow: var(--gma-shadow);
}

.gma-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
	min-width: 720px;
}

.gma-table th {
	text-align: left;
	font-size: 0.65rem;
	font-weight: 800;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--gma-paper);
	background: var(--gma-acacia);
	padding: 0.88rem 1rem;
	border-bottom: 1px solid rgba(255,255,255,0.12);
	vertical-align: top;
}

.gma-table td {
	padding: 0.92rem 1rem;
	border-bottom: 1px solid var(--gma-border);
	color: var(--gma-muted);
	font-weight: 300;
	line-height: 1.65;
	vertical-align: top;
	background: rgba(246, 238, 220, 0.92);
}

.gma-table td:first-child {
	font-weight: 700;
	color: var(--gma-ink);
}

.gma-table tr:hover td {
	background: #fff8ea;
}

.gma-pill {
	display: inline-block;
	font-size: 0.62rem;
	font-weight: 800;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	padding: 0.22rem 0.62rem;
	border-radius: 2px;
	white-space: nowrap;
}

.gma-pill--high {
	background: rgba(58, 92, 48, 0.13);
	color: var(--gma-acacia-mid);
}

.gma-pill--medium {
	background: rgba(183, 123, 37, 0.16);
	color: var(--gma-gold-2);
}

.gma-pill--low {
	background: rgba(158, 75, 42, 0.13);
	color: var(--gma-rust);
}

/* Tabs */
.gma-tabs {
	margin-top: 3rem;
}

.gma-tabs__nav {
	display: flex;
	gap: 0;
	border-bottom: 2px solid var(--gma-border-2);
	margin-bottom: 2.5rem;
	overflow-x: auto;
}

.gma-tabs__button {
	appearance: none;
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	margin: 0 0 -2px;
	padding: 0.85rem 1.35rem;
	font-family: "Plus Jakarta Sans", system-ui, sans-serif;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.10em;
	text-transform: uppercase;
	color: var(--gma-muted);
	cursor: pointer;
	white-space: nowrap;
}

.gma-tabs__button:hover,
.gma-tabs__button.is-active {
	color: var(--gma-gold);
	border-bottom-color: var(--gma-gold);
}

.gma-tabs__panel {
	display: none;
}

.gma-tabs__panel.is-active {
	display: block;
}

/* FAQ */
.gma-faq-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 4rem;
	margin-top: 3rem;
}

.gma-faq-item {
	padding: 1.4rem 0;
	border-bottom: 1px solid var(--gma-border);
}

.gma-faq-item h3,
.gma-faq-item h4 {
	font-family: "Fraunces", Georgia, serif;
	font-size: 1.12rem;
	font-weight: 500;
	color: var(--gma-ink);
	line-height: 1.3;
	margin: 0 0 0.55rem;
}

.gma-faq-item p {
	font-size: 0.88rem;
	font-weight: 300;
	color: var(--gma-muted);
	line-height: 1.85;
	margin: 0;
}

/* CTA */
.gma-cta-band {
	background: var(--gma-acacia);
	padding: 5rem 0;
	text-align: center;
	color: var(--gma-paper);
}

.gma-cta-band h2 {
	font-family: "Fraunces", Georgia, serif;
	font-size: clamp(2rem, 4vw, 3.1rem);
	font-weight: 400;
	line-height: 1.1;
	color: var(--gma-paper);
	margin: 0 0 0.85rem;
}

.gma-cta-band h2 em {
	color: var(--gma-gold-light);
}

.gma-cta-band p {
	font-size: 0.96rem;
	font-weight: 300;
	color: rgba(246, 238, 220, 0.66);
	max-width: 620px;
	margin: 0 auto 2.35rem;
	line-height: 1.85;
}

/* Link clusters */
.gma-link-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.25rem;
	margin-top: 3rem;
}

.gma-link-card {
	display: block;
	position: relative;
	border: 1px solid var(--gma-border-2);
	border-radius: 3px;
	padding: 1.8rem;
	text-decoration: none !important;
	background: rgba(255,255,255,0.18);
	transition: background 0.2s ease, border-color 0.2s ease;
}

.gma-link-card:hover {
	background: rgba(255,255,255,0.35);
	border-color: var(--gma-gold);
}

.gma-link-card__tag {
	display: block;
	font-size: 0.62rem;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--gma-gold);
	margin-bottom: 0.6rem;
}

.gma-link-card h3,
.gma-link-card h4 {
	font-family: "Fraunces", Georgia, serif;
	font-size: 1.18rem;
	font-weight: 450;
	color: var(--gma-ink);
	line-height: 1.3;
	margin: 0 0 0.45rem;
}

.gma-link-card p {
	font-size: 0.84rem;
	font-weight: 300;
	color: var(--gma-muted);
	line-height: 1.7;
	margin: 0;
}

/* WordPress content cleanup inside the guide template */
.gma-wordpress-content > *:first-child {
	margin-top: 0;
}

.gma-wordpress-content > *:last-child {
	margin-bottom: 0;
}

.gma-blank-canvas-body {
	margin: 0;
	background: var(--gma-paper, #F6EEDC);
}

/* Animations */
@keyframes gmaFadeUp {
	from {
		opacity: 0;
		transform: translateY(22px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.gma-hero__eyebrow,
.gma-hero h1,
.gma-hero__subtitle,
.gma-hero__desc,
.gma-hero__stats,
.gma-hero .gma-btn-row {
	animation: gmaFadeUp 0.75s ease both;
}

.gma-hero h1 { animation-delay: 0.12s; }
.gma-hero__subtitle { animation-delay: 0.20s; }
.gma-hero__desc { animation-delay: 0.28s; }
.gma-hero__stats { animation-delay: 0.36s; }
.gma-hero .gma-btn-row { animation-delay: 0.44s; }

@media (max-width: 980px) {
	.gma-guide-nav__links {
		display: none;
	}

	.gma-section {
		padding: 5rem 0;
	}

	.gma-two-col,
	.gma-grid--2,
	.gma-grid--3,
	.gma-grid--4,
	.gma-card-grid--2,
	.gma-card-grid--3,
	.gma-card-grid--4,
	.gma-link-grid,
	.gma-faq-grid {
		grid-template-columns: 1fr;
	}

	.gma-hero {
		min-height: 82vh;
		padding-top: 6rem;
		padding-bottom: 5rem;
	}

	.gma-hero__stats,
	.gma-stat-band__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gma-hero__stat:nth-child(2),
	.gma-stat-card:nth-child(2) {
		border-right: none;
	}
}

@media (max-width: 620px) {
	.gma-container {
		width: min(100% - 28px, 1120px);
	}

	.gma-hero {
		padding-inline: 1rem;
	}

	.gma-hero__stats,
	.gma-stat-band__grid {
		grid-template-columns: 1fr;
	}

	.gma-hero__stat,
	.gma-stat-card {
		border-right: none;
		border-bottom: 1px solid rgba(246, 238, 220, 0.12);
	}

	.gma-hero__stat:last-child,
	.gma-stat-card:last-child {
		border-bottom: none;
	}

	.gma-fact-row {
		grid-template-columns: 1fr;
		gap: 0.3rem;
	}

	.gma-btn {
		width: 100%;
	}

	.gma-btn-row {
		width: 100%;
	}
}
