/* MGI theme styles. Colours and type sizes come from theme.json. */
:root {
	--mgi-navy: #344460;
	--mgi-navy-deep: #222D42;
	--mgi-ink: #26324A;
	--mgi-red: #EC3034;
	--mgi-red-ink: #C8252A;
	--mgi-green: #1F8546;
	--mgi-green-bright: #5CC23A;
	--mgi-green-deep: #17663A;
	--mgi-on-dark: #DCE3EF;
	--mgi-on-dark-2: #A9B6CC;
	--mgi-mist: #EEF1F6;
	--mgi-mist-2: #E2E7EF;
	--mgi-land: #D9DFE9;
	--mgi-slate: #566380;
	--mgi-line: #D3DAE5;
	--mgi-field: #A9B4C7;
	--mgi-sec: clamp(56px, 8vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }
body { font-stretch: 100%; -webkit-font-smoothing: antialiased; }
/* Narrow items in a constrained section line up with the section's left edge instead of centring. */
.is-layout-constrained > p,
.is-layout-constrained > .mgi-count,
.is-layout-constrained > .mgi-tm,
.is-layout-constrained > .mgi-search,
.is-layout-constrained > .mgi-form,
.is-layout-constrained > .mgi-done,
.is-layout-constrained > .wp-block-post-excerpt {
	margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 1200px)) / 2)) !important;
	margin-right: auto !important;
}
h1, .wp-block-post-title { font-stretch: 122%; }
h2 { font-stretch: 114%; }
h3, h4 { font-stretch: 106%; }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--mgi-red); outline-offset: 3px; border-radius: 2px; }
.wp-block-post-content p, .band p, .page-head p { max-width: 68ch; }
.lede, .lede p { font-size: 1.2rem; line-height: 1.55; max-width: 60ch; }
.muted { color: var(--mgi-slate); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Header ---------- */
.mgi-head-wrap { position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 50; }
.site-head { background: #fff; border-bottom: 1px solid var(--mgi-line); }
.site-head .head-in { min-height: 78px; gap: 18px; }
.site-head .brand { gap: 14px; flex-shrink: 0; }
.site-head .wp-block-site-logo img { height: 56px; width: auto; }
.site-head .tagline { font-size: .8rem; line-height: 1.25; color: var(--mgi-slate); max-width: 9.5em; border-left: 1px solid var(--mgi-line); padding-left: 14px; margin: 0; }
.site-head .head-cta { gap: 8px; flex-shrink: 0; }
.site-head .wp-block-buttons { margin: 0; }
.main-nav { margin-left: auto; }
.main-nav .wp-block-navigation-item__content { font-weight: 600; font-size: .95rem; color: var(--mgi-navy); padding: 10px 10px; white-space: nowrap; text-decoration: none; border-radius: 4px; }
.main-nav .wp-block-navigation-item__content:hover { background: var(--mgi-mist); color: var(--mgi-navy); }
.main-nav .current-menu-item > .wp-block-navigation-item__content { box-shadow: inset 0 -3px 0 var(--mgi-red); }
.main-nav .wp-block-navigation__submenu-container { border: 1px solid var(--mgi-line) !important; box-shadow: 0 18px 40px rgba(34, 45, 66, .16); padding: 10px 0; min-width: 300px !important; }
.main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 8px 18px; font-weight: 500; color: var(--mgi-ink); }
.main-nav .wp-block-navigation__submenu-icon { margin-left: 2px; }
.mgi-wa { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; color: var(--mgi-green); border: 1px solid var(--mgi-line); background: #fff; }
.mgi-wa:hover { background: var(--mgi-mist); color: var(--mgi-green); }
@media (max-width: 1320px) { .site-head .tagline { display: none; } }
/* Collapse the menu into the menu button below 1000px rather than WordPress's default 600px. */
@media (min-width: 600px) and (max-width: 1000px) {
	.main-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.main-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-size: 1.1rem; }
@media (max-width: 1000px) {
	.site-head .head-in { justify-content: flex-start !important; }
}
@media (max-width: 700px) {
	.site-head .wp-block-site-logo img { height: 46px; }
	.site-head .head-cta .wp-block-buttons { display: none; }
}

/* ---------- Buttons ---------- */
.wp-block-button__link, .mgi-btn { white-space: nowrap; }
.mgi-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 650; font-size: .98rem; padding: 12px 20px; border-radius: 4px; border: 2px solid transparent; text-decoration: none; cursor: pointer; line-height: 1.2; }
.mgi-btn-red, .is-style-mgi-red .wp-block-button__link { background: var(--mgi-red-ink); color: #fff; }
.mgi-btn-red:hover, .is-style-mgi-red .wp-block-button__link:hover { background: #A91E22; color: #fff; }
.mgi-btn-navy, .is-style-mgi-navy .wp-block-button__link { background: var(--mgi-navy); color: #fff; }
.mgi-btn-navy:hover, .is-style-mgi-navy .wp-block-button__link:hover { background: var(--mgi-navy-deep); color: #fff; }
.mgi-btn-line, .is-style-mgi-line .wp-block-button__link { border: 2px solid var(--mgi-navy); color: var(--mgi-navy); background: transparent; }
.mgi-btn-line:hover, .is-style-mgi-line .wp-block-button__link:hover { background: var(--mgi-navy); color: #fff; }
.is-style-mgi-white .wp-block-button__link { background: #fff; color: var(--mgi-red-ink); }
.is-style-mgi-white .wp-block-button__link:hover { background: var(--mgi-navy-deep); color: #fff; }
.mgi-btn-sm { padding: 8px 14px; font-size: .9rem; }

/* ---------- Bands ---------- */
.wp-site-blocks .band, .wp-site-blocks .hero, .wp-site-blocks .page-head { margin-block-start: 0; margin-block-end: 0; }
.wp-site-blocks main > .wp-block-post-content { margin-block-start: 0; }
.band { padding-top: var(--mgi-sec); padding-bottom: var(--mgi-sec); }
.band.tight-top { padding-top: 44px; }
.band-mist { background: var(--mgi-mist); }
.band-navy { background: var(--mgi-navy-deep); color: #DCE3EF; }
.band-navy h2, .band-navy h3 { color: #fff; }
.band-red { background: var(--mgi-red-ink); color: #fff; }
.band-red h2 { color: #fff; }
.section-head { gap: 24px; margin-bottom: 30px; }
.section-head h2, .section-head p { margin: 0; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(40px, 6vw, 76px); padding-bottom: clamp(40px, 5vw, 64px); border-bottom: 1px solid var(--mgi-line); }
.hero-grid { gap: clamp(28px, 5vw, 64px) !important; align-items: center !important; }
.hero-title { font-size: clamp(2.5rem, 5.4vw, 4.35rem) !important; font-stretch: 125%; line-height: 1 !important; letter-spacing: -.018em; margin-bottom: .38em; }
.hero .lede { margin-bottom: 28px; }
.hero .wp-block-buttons { margin-bottom: 36px; }

.mgi-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--mgi-line); }
.mgi-facts > div { padding: 14px 14px 0 0; }
.mgi-facts dt { font-stretch: 115%; font-weight: 750; font-size: 1.4rem; color: var(--mgi-navy); line-height: 1.15; }
.mgi-facts dd { margin: 2px 0 0; font-size: .88rem; color: var(--mgi-slate); line-height: 1.35; }
.mgi-facts dd a { color: var(--mgi-slate); text-decoration: none; }
.mgi-facts dd a:hover { color: var(--mgi-red-ink); text-decoration: underline; }

.mgi-map svg { width: 100%; height: auto; }
.mgi-africa .c { fill: var(--mgi-land); stroke: #fff; stroke-width: .7; stroke-linejoin: round; }
.mgi-africa .c.on { fill: var(--g, var(--mgi-green)); transition: fill .2s; }
.mgi-africa .c.on.hl, .mgi-africa a:hover .c.on, .mgi-africa a:focus .c.on, .mgi-africa.is-single .c.on { fill: var(--mgi-navy); }
@media (prefers-reduced-motion: no-preference) {
	.mgi-africa.is-animated .c.on { animation: mgi-fill .55s ease-out backwards; animation-delay: calc(var(--i) * 85ms + 250ms); }
	@keyframes mgi-fill { from { fill: var(--mgi-land); } to { fill: #2E9C47; } }
}
.mgi-countries { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px 16px; font-size: .92rem; }
.mgi-countries a { text-decoration: none; color: var(--mgi-ink); display: inline-block; padding: 3px 0; }
.mgi-countries a:hover, .mgi-countries a.hl { color: var(--mgi-navy); text-decoration: underline; text-decoration-color: var(--mgi-green); }
.mgi-map-note { font-size: .88rem; color: var(--mgi-slate); margin: 12px 0 0; }

/* ---------- Two arms ---------- */
.arms { gap: 0 !important; border: 1px solid var(--mgi-line); }
.arm { --pad: clamp(28px, 4vw, 48px); padding: var(--pad) !important; }
.arm .arm-photo { margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 26px !important; width: calc(100% + 2 * var(--pad)); max-width: none !important; }
.arm-photo img { display: block; width: 100%; height: clamp(180px, 20vw, 250px); object-fit: cover; }
.arm-training { background: var(--mgi-navy); color: #DCE3EF; }
.arm-training h2, .arm-training a { color: #fff; }
.arm-research { background: #fff; border-left: 6px solid var(--mgi-green); }
.arm ul { margin: 0 0 22px; padding: 0; list-style: none; }
.arm li { padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.arm-research li { border-bottom-color: var(--mgi-mist-2); padding-left: 18px; position: relative; }
.arm-research li::before { content: ""; position: absolute; left: 0; top: .95em; width: 8px; height: 8px; background: var(--mgi-green); }
.arm-links { font-weight: 600; }
.arm-links a { margin-right: 22px; }
@media (max-width: 781px) { .arm-research { border-left: 0; border-top: 6px solid var(--mgi-green); } }

/* ---------- Sector rows ---------- */
.rows { border-top: 2px solid var(--mgi-navy); }
.rows .row { padding: 18px 0; border-bottom: 1px solid var(--mgi-line); margin: 0 !important; gap: 24px !important; align-items: center !important; }
.rows .row .sector-photo { margin: 0; }
.sector-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 3px; }
.rows .row h3, .rows .row p { margin: 0; }
.rows .row p { color: var(--mgi-slate); }
.rows .row .more { font-weight: 600; text-align: right; }
@media (max-width: 781px) { .rows .row { gap: 6px !important; } .rows .row .more { text-align: left; } .rows .row .row-photo { margin-bottom: 8px; } .sector-photo img { aspect-ratio: 16 / 7; } }

/* ---------- Clients ---------- */
.clients { display: flex; flex-wrap: wrap; gap: 22px 44px; margin: 30px 0 26px; padding: 0; list-style: none; }
.clients li { color: #9FB0CB; font-size: .85rem; }
.clients strong { display: block; font-stretch: 125%; font-weight: 800; font-size: clamp(1.7rem, 3.4vw, 2.6rem); color: #fff; letter-spacing: .01em; line-height: 1; margin-bottom: 6px; }
.clients br { display: none; }
.band-navy .small { color: #9FB0CB; font-size: .9rem; }

/* ---------- Course search and index ---------- */
.mgi-search { display: flex; gap: 10px; max-width: 640px; margin-bottom: 34px; }
.mgi-search input { min-height: 50px; flex: 1; font: inherit; padding: 13px 14px; border: 1px solid var(--mgi-field); border-radius: 4px; background: #fff; min-width: 0; }
.mgi-index { list-style: none; margin: 0; padding: 0; columns: 3 280px; column-gap: 44px; }
.mgi-index li { break-inside: avoid; }
.mgi-index a { display: flex; align-items: baseline; gap: 8px; padding: 9px 0; text-decoration: none; color: var(--mgi-ink); border-bottom: 1px solid var(--mgi-line); }
.mgi-index a .n { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--mgi-slate); font-size: .92rem; }
.mgi-index a:hover { color: var(--mgi-red-ink); }

.cols3 h3 { margin-bottom: .35em; }
.cols3 p { color: var(--mgi-slate); margin: 0; }

/* ---------- Reviews ---------- */
.mgi-reviews { border: 1px solid var(--mgi-line); border-top: 4px solid var(--mgi-navy); padding: 28px; background: #fff; display: grid; gap: 6px; }
.mgi-reviews p { margin: 0; }
.mgi-reviews-score { display: flex; align-items: center; gap: 14px; }
.mgi-reviews-rating { font-stretch: 120%; font-weight: 800; font-size: 2.6rem; color: var(--mgi-navy); line-height: 1; }
.mgi-stars { position: relative; display: inline-block; font-size: 1.6rem; line-height: 1; color: var(--mgi-line); letter-spacing: 2px; }
.mgi-stars::before { content: "\2605\2605\2605\2605\2605"; }
.mgi-stars span { position: absolute; inset: 0 auto 0 0; width: var(--pct, 0%); overflow: hidden; color: #E9A100; white-space: nowrap; }
.mgi-stars span::before { content: "\2605\2605\2605\2605\2605"; }
.mgi-reviews-count { color: var(--mgi-slate); font-size: 1.1rem; }
.mgi-reviews-count strong { color: var(--mgi-navy); font-weight: 750; }
.mgi-reviews:not(.has-rating) .mgi-reviews-count strong { font-stretch: 120%; font-weight: 800; font-size: 2.6rem; line-height: 1; display: block; margin-bottom: 4px; }
.mgi-reviews-links { margin-top: 14px !important; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- CTA band ---------- */
.cta-band { gap: 28px; }
.cta-band h2 { margin: 0 0 6px; }
.cta-band p { margin: 0; color: #FFE2E2; }

/* ---------- Inner pages ---------- */
.page-head { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(28px, 4vw, 44px); border-bottom: 1px solid var(--mgi-line); background: linear-gradient(var(--mgi-mist), #fff); }
.page-head .wp-block-post-title, .page-head h1 { margin: 0 0 .4em; }
.page-head-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: center; }
.page-head-grid > * { margin-block: 0 !important; }
.page-head-grid:has(> .page-head-photo) { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.page-head-photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
@media (max-width: 781px) { .page-head-grid:has(> .page-head-photo) { grid-template-columns: minmax(0, 1fr); } .page-head-photo img { aspect-ratio: 16 / 9; } }
.page-head .wp-block-post-excerpt { margin: 0; }
.page-head .wp-block-post-excerpt__excerpt { font-size: 1.2rem; line-height: 1.55; max-width: 60ch; margin: 0; }
.page-head .wp-block-term-description p { font-size: 1.2rem; max-width: 60ch; }
.mgi-crumbs { font-size: .88rem; color: var(--mgi-slate); margin-bottom: 14px; }
.mgi-crumbs a { color: var(--mgi-slate); }
.mgi-layout { gap: clamp(28px, 4vw, 56px) !important; }
.mgi-aside { border: 1px solid var(--mgi-line); border-top: 4px solid var(--mgi-navy); padding: 24px !important; background: #fff; align-self: flex-start; }
@media (min-width: 782px) { .mgi-aside { position: sticky; top: 110px; } }
.mgi-aside dl { margin: 0 0 18px; }
.mgi-aside dt { font-size: .82rem; color: var(--mgi-slate); }
.mgi-aside dd { margin: 0 0 12px; font-weight: 600; }
.mgi-aside .mgi-btn, .mgi-aside .wp-block-button, .mgi-aside .wp-block-button__link { width: 100%; }
.mgi-aside .mgi-btn { margin-bottom: 10px; }
.mgi-aside .wp-block-buttons { gap: 10px; flex-direction: column; }
.mgi-aside .mgi-map { max-width: 240px; margin: 0 auto 16px; }

/* Services table */
.services table { border-collapse: collapse; width: 100%; }
.services th, .services td { border: 0; border-bottom: 1px solid var(--mgi-line); padding: 22px 24px 22px 0; text-align: left; vertical-align: top; }
.services thead th { font-size: .85rem; color: var(--mgi-slate); font-weight: 600; border-bottom: 2px solid var(--mgi-navy); padding-top: 0; padding-bottom: 10px; }
.services tbody td:first-child { font-stretch: 106%; font-weight: 700; color: var(--mgi-navy); font-size: 1.1rem; width: 28%; }
.services tbody td:last-child { color: var(--mgi-slate); font-size: .95rem; width: 28%; }
@media (max-width: 781px) {
	.services thead { display: none; }
	.services tr, .services td { display: block; width: auto !important; padding: 4px 0; border: 0; }
	.services tr { padding: 16px 0; border-bottom: 1px solid var(--mgi-line); }
}

.work { border-top: 2px solid var(--mgi-green); gap: 0 !important; }
.work .wp-block-column { padding: 20px 22px 0 0; }
.work strong { color: var(--mgi-navy); font-stretch: 108%; font-size: 1.08rem; }
.work p { color: var(--mgi-slate); }

.steps { counter-reset: s; list-style: none; padding: 0 !important; margin: 26px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.steps li { counter-increment: s; border-top: 3px solid var(--mgi-navy); padding-top: 14px; color: var(--mgi-slate); font-size: .95rem; }
.steps li::before { content: counter(s); display: block; font-stretch: 120%; font-weight: 800; font-size: 1.6rem; color: var(--mgi-red-ink); line-height: 1; margin-bottom: 8px; }
.steps strong { display: block; color: var(--mgi-navy); font-size: 1.0625rem; }
.steps br { display: none; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

.office { border-top: 4px solid var(--mgi-navy); padding-top: 18px; }
.office.uk { border-top-color: var(--mgi-red-ink); }
.wp-block-details { border-bottom: 1px solid var(--mgi-line); padding: 14px 0; }
.wp-block-details summary { cursor: pointer; font-weight: 650; color: var(--mgi-navy); }
.wp-block-details p { margin: 10px 0 0; }

.mgi-quals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.mgi-qual { border-top: 4px solid var(--mgi-navy); padding-top: 18px; }
.mgi-qual dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 16px; }
.mgi-qual dt { color: var(--mgi-slate); }
.mgi-qual dd { margin: 0; }
.mgi-badge { display: inline-block; background: #DCF0E1; color: #155F33; font-weight: 650; font-size: .85rem; padding: 4px 10px; border-radius: 3px; }
@media (max-width: 781px) { .mgi-quals { grid-template-columns: 1fr; } }

/* ---------- Catalogue ---------- */
.mgi-filters { display: grid; grid-template-columns: 2fr repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; margin-bottom: 18px; }
.mgi-filters label { display: flex; flex-direction: column; font-size: .84rem; font-weight: 600; color: var(--mgi-slate); gap: 5px; }
.mgi-filters input, .mgi-filters select { min-height: 46px; font: inherit; font-size: .95rem; padding: 10px 11px; border: 1px solid var(--mgi-field); border-radius: 4px; background: #fff; color: var(--mgi-ink); }
.mgi-filters .mgi-btn { min-height: 46px; }
.mgi-count { font-size: .92rem; color: var(--mgi-slate); margin: 0 0 10px; }
.mgi-results { list-style: none; margin: 0; padding: 0 !important; border-top: 2px solid var(--mgi-navy); }
.mgi-result { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--mgi-line); margin: 0 !important; }
.mgi-result .code { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--mgi-slate); font-size: .9rem; }
.mgi-result .t { font-weight: 650; color: var(--mgi-navy); text-decoration: none; font-size: 1.03rem; }
.mgi-result a.t:hover { text-decoration: underline; color: var(--mgi-red-ink); }
.mgi-result .meta { font-size: .86rem; color: var(--mgi-slate); margin-top: 3px; }
.mgi-result .acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.mgi-tag { display: inline-block; font-size: .76rem; font-weight: 650; padding: 2px 8px; border-radius: 3px; background: var(--mgi-mist-2); color: var(--mgi-navy); margin-right: 6px; vertical-align: 1px; }
.mgi-tag-exam { background: #FDE4E4; color: #8F1A1E; }
.mgi-tag-qcto { background: #DCF0E1; color: #155F33; }
.mgi-pages { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 22px; }
.mgi-pages a, .mgi-pages span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--mgi-line); border-radius: 4px; text-decoration: none; }
.mgi-pages span[aria-current] { background: var(--mgi-navy); color: #fff; border-color: var(--mgi-navy); }
.mgi-tm { font-size: .8rem; color: var(--mgi-slate); margin-top: 22px; max-width: 90ch; }
.mgi-empty { color: var(--mgi-slate); }
@media (max-width: 1000px) { .mgi-filters { grid-template-columns: 1fr 1fr; } .mgi-filters label:first-child { grid-column: 1 / -1; } }
@media (max-width: 700px) {
	.mgi-result { grid-template-columns: 1fr; gap: 6px; }
	.mgi-result .acts { justify-content: flex-start; }
	.mgi-search { flex-direction: column; }
}

/* ---------- Quote form ---------- */
.mgi-form { max-width: 760px; }
.mgi-form fieldset { border: 0; padding: 0; margin: 0 0 26px; }
.mgi-form legend { font-stretch: 110%; font-weight: 750; color: var(--mgi-navy); font-size: 1.15rem; margin-bottom: 12px; padding: 0; }
.mgi-form .grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.mgi-form .field { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; font-weight: 600; }
.mgi-form .field.full { grid-column: 1 / -1; }
.mgi-form .field input, .mgi-form .field select, .mgi-form .field textarea { min-height: 48px; font: inherit; font-weight: 400; font-size: 1rem; padding: 11px 12px; border: 1px solid var(--mgi-field); border-radius: 4px; background: #fff; color: var(--mgi-ink); }
.mgi-form .field textarea { min-height: 120px; resize: vertical; }
.mgi-form .opt, .mgi-form .hint { font-weight: 400; color: var(--mgi-slate); }
.mgi-form .choice { display: flex; gap: 10px; flex-wrap: wrap; }
.mgi-form .choice label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--mgi-field); border-radius: 4px; padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: .95rem; }
.mgi-form .choice input { accent-color: var(--mgi-red-ink); width: 18px; height: 18px; }
.mgi-form .choice label:has(input:checked) { border-color: var(--mgi-navy); background: var(--mgi-mist); box-shadow: inset 0 0 0 1px var(--mgi-navy); }
.mgi-form .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .95rem; }
.mgi-form .consent input { margin-top: 5px; width: 18px; height: 18px; min-height: 0; accent-color: var(--mgi-red-ink); }
.mgi-form .consent-field { margin-bottom: 22px; }
.mgi-form .err { color: var(--mgi-red-ink); font-size: .86rem; font-weight: 600; }
.mgi-form .invalid input, .mgi-form .invalid select, .mgi-form .invalid textarea { border-color: var(--mgi-red-ink); }
.mgi-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mgi-form-error { background: #FDE4E4; color: #8F1A1E; padding: 12px 14px; border-radius: 4px; font-weight: 600; }
.mgi-done { border: 1px solid var(--mgi-line); border-top: 4px solid var(--mgi-green); padding: 28px; max-width: 760px; }
@media (max-width: 700px) { .mgi-form .grid2 { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-foot { background: var(--mgi-navy-deep); color: #B9C4D8; font-size: .93rem; padding-top: 56px; padding-bottom: 30px; }
.site-foot a { color: #E5EAF3; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot h2, .site-foot h3, .site-foot h4 { color: #fff; font-size: .95rem; font-stretch: 108%; margin: 0 0 10px; }
.site-foot p { margin: 0 0 8px; }
.site-foot .foot-logo img { height: 64px; width: auto; }
.site-foot .foot-logo .wp-block-image { margin: 0 0 14px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot .foot-base { border-top: 1px solid #3A4762; margin-top: 40px; padding-top: 20px; font-size: .84rem; gap: 16px; }
.mgi-social { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px !important; }

/* ---------- Small screens ---------- */
@media (max-width: 700px) {
	.mgi-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.mgi-countries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Course descriptions */
.wp-block-post-content h2 { margin-top: 1.5em; }
.wp-block-post-content > h2:first-child { margin-top: 0; }

/* ---------- Privacy notice and other long text ---------- */
.legal.is-layout-constrained > h2, .legal.is-layout-constrained > ul {
	max-width: 72ch; margin-left: max(0px, calc((100% - var(--wp--style--global--content-size, 1200px)) / 2)) !important; margin-right: auto !important; }
.legal > h2 { font-size: 1.35rem; margin-top: 2em; }
.legal .updated { color: var(--mgi-slate); font-size: .92rem; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .5em; }
.legal ul.kv { list-style: none; padding: 16px 20px; background: var(--mgi-mist); border-left: 4px solid var(--mgi-navy); display: grid; gap: 10px; }
.legal ul.kv li { margin: 0; }

/* =====================================================================
 * Colour scheme: dark header, hero and footer, dark and green bands,
 * tinted backgrounds instead of plain white, colour per training area.
 * =================================================================== */
:root {
	--mgi-night: #161E2E;
	--mgi-night-2: #1D2639;
	--mgi-paper: #F2F4F8;
	--mgi-mist: #E6EBF2;
	--mgi-shadow: 0 8px 24px rgba(22, 30, 46, .08);
}
body { background: var(--mgi-paper); }

/* Training area colours */
.area-central-banking-finance-audit, .term-central-banking-finance-audit { --area: #2F6FB5; }
.area-economics-public-finance-policy, .term-economics-public-finance-policy { --area: #7B4FB0; }
.area-governance-law-anti-corruption, .term-governance-law-anti-corruption { --area: #3E5379; }
.area-project-management-me, .term-project-management-me { --area: #1F8546; }
.area-energy-electrical-utilities, .term-energy-electrical-utilities { --area: #D98A0B; }
.area-digital-data-ict, .term-digital-data-ict { --area: #0E8C9B; }
.area-leadership-hr-office-professionals, .term-leadership-hr-office-professionals { --area: #C8252A; }
.area-procurement-supply-chain, .term-procurement-supply-chain { --area: #5B6B82; }
.area-communication-marketing-research, .term-communication-marketing-research { --area: #C43D73; }
.area-development-environment-agriculture, .term-development-environment-agriculture { --area: #4E8A2E; }
.area-health-safety-wellness, .term-health-safety-wellness { --area: #D9622B; }

/* Header */
.site-head { background: var(--mgi-night); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.site-head .brand .wp-block-image { margin: 0; }
.site-head .brand img { display: block; height: auto; }
.site-head .tagline { color: var(--mgi-on-dark-2); border-left-color: rgba(255, 255, 255, .18); }
.main-nav, .main-nav .wp-block-navigation-item__content, .main-nav .wp-block-navigation__submenu-icon { color: #E6EBF3; }
.main-nav .wp-block-navigation-item__content:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.main-nav .wp-block-navigation__submenu-container { background: var(--mgi-night-2) !important; border-color: rgba(255, 255, 255, .1) !important; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { color: #E6EBF3; }
.main-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.main-nav .wp-block-navigation__responsive-container-open, .main-nav .wp-block-navigation__responsive-container-close { color: #fff; }
.main-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--mgi-night) !important; color: #fff !important; }
.main-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #fff; }
.mgi-wa { background: transparent; border-color: rgba(255, 255, 255, .25); color: var(--mgi-green-bright); }
.mgi-wa:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* Home hero */
.hero {
	--mgi-land: #44557A;
	background:
		radial-gradient(ellipse 60% 70% at 80% 40%, rgba(46, 156, 71, .26), transparent 70%),
		linear-gradient(160deg, #141B2A 0%, #222D45 55%, #2E3B57 100%);
	color: var(--mgi-on-dark);
	padding-bottom: 0;
	border-bottom: 5px solid var(--mgi-green);
}
.hero .hero-title { color: #fff; }
.hero .lede { color: var(--mgi-on-dark); }
.hero .is-style-mgi-navy .wp-block-button__link { background: var(--mgi-red-ink); }
.hero .is-style-mgi-navy .wp-block-button__link:hover { background: #A91E22; }
.hero .is-style-mgi-line .wp-block-button__link { border-color: rgba(255, 255, 255, .85); color: #fff; }
.hero .is-style-mgi-line .wp-block-button__link:hover { background: #fff; color: var(--mgi-navy); }
.hero .mgi-facts { border-top-color: rgba(255, 255, 255, .2); }
.hero .mgi-facts dt { color: #fff; }
.hero .mgi-facts dd, .hero .mgi-facts dd a { color: var(--mgi-on-dark-2); }
.hero .mgi-facts dd a:hover { color: #fff; }
.hero .mgi-africa .c { stroke: #1E283D; }
.hero .mgi-africa .c.on.hl, .hero .mgi-africa a:hover .c.on, .hero .mgi-africa a:focus .c.on { fill: #fff; }
.hero .mgi-countries a { color: var(--mgi-on-dark); }
.hero .mgi-countries a:hover, .hero .mgi-countries a.hl { color: #fff; text-decoration-color: var(--mgi-green-bright); }
.hero .mgi-map-note { color: var(--mgi-on-dark-2); }
.hero-paths { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(32px, 5vw, 56px) !important; border-top: 1px solid rgba(255, 255, 255, .14); }
.hero-paths > * { margin: 0 !important; }
.hero-paths .path a { display: block; height: 100%; padding: 22px 22px 28px; color: #fff; text-decoration: none; border-left: 1px solid rgba(255, 255, 255, .12); transition: background .15s; }
.hero-paths .path:first-child a { border-left: 0; padding-left: 0; }
.hero-paths .path strong { display: block; font-stretch: 108%; font-size: 1.05rem; margin-bottom: 4px; }
.hero-paths .path span { display: block; color: var(--mgi-on-dark-2); font-size: .9rem; line-height: 1.4; }
.hero-paths .path a:hover { background: rgba(255, 255, 255, .05); }
.hero-paths .path a:hover strong { color: var(--mgi-green-bright); }
@media (max-width: 900px) {
	.hero-paths { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hero-paths .path a, .hero-paths .path:first-child a { border-left: 0; padding: 18px 16px 18px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
}
@media (max-width: 520px) { .hero-paths { grid-template-columns: minmax(0, 1fr); } }

/* Inner page headers */
.page-head {
	background:
		radial-gradient(ellipse 50% 90% at 95% 10%, rgba(46, 156, 71, .22), transparent 70%),
		linear-gradient(160deg, #141B2A 0%, #222D45 60%, #2E3B57 100%);
	color: var(--mgi-on-dark);
	border-bottom: 5px solid var(--area, var(--mgi-green));
}
.page-head h1, .page-head .wp-block-post-title, .page-head .wp-block-query-title, .page-head h2 { color: #fff; }
.page-head p, .page-head .lede, .page-head .wp-block-post-excerpt__excerpt, .page-head .wp-block-term-description { color: var(--mgi-on-dark); }
.page-head .mgi-crumbs, .page-head .mgi-crumbs a { color: var(--mgi-on-dark-2); }
.page-head .mgi-crumbs a:hover { color: #fff; }
.page-head a { color: #fff; }
.page-head-photo img { box-shadow: 0 18px 40px rgba(0, 0, 0, .28); }

/* Bands */
.band-paper { background: var(--mgi-paper); }
.band-mist { background: var(--mgi-mist); }
.band-green-soft { background: linear-gradient(180deg, #E9F4EC 0%, #DDEFE3 100%); }
.band-green { background: linear-gradient(160deg, #135630 0%, #17663A 55%, #1C7744 100%); color: #E8F5EC; }
.band-green h2, .band-green h3 { color: #fff; }
.band-green .clients li, .band-green .small { color: #CDE7D6; }
.band-green .clients strong { color: #fff; }
.band-red { background: linear-gradient(160deg, #B51E23 0%, #D8292E 100%); }

/* Dark bands: on the home page, and the tinted sections inside inner pages */
:is(.band-dark, .wp-block-post-content .band-mist) {
	background:
		radial-gradient(ellipse 45% 80% at 100% 0%, rgba(46, 156, 71, .16), transparent 70%),
		linear-gradient(160deg, var(--mgi-night) 0%, #222D45 100%);
	color: var(--mgi-on-dark);
}
:is(.band-dark, .wp-block-post-content .band-mist) :is(h2, h3, strong) { color: #fff; }
:is(.band-dark, .wp-block-post-content .band-mist) :is(p, li) { color: var(--mgi-on-dark); }
:is(.band-dark, .wp-block-post-content .band-mist) .muted { color: var(--mgi-on-dark-2); }
:is(.band-dark, .wp-block-post-content .band-mist) a:not(.wp-block-button__link):not(.mgi-btn) { color: #fff; text-decoration-color: var(--mgi-green-bright); }
:is(.band-dark, .wp-block-post-content .band-mist) .rows { border-top-color: var(--mgi-green-bright); }
:is(.band-dark, .wp-block-post-content .band-mist) .rows .row { border-bottom-color: rgba(255, 255, 255, .12); }
:is(.band-dark, .wp-block-post-content .band-mist) .rows .row p { color: var(--mgi-on-dark-2); }
:is(.band-dark, .wp-block-post-content .band-mist) .steps li { border-top-color: var(--mgi-green-bright); color: var(--mgi-on-dark-2); }
:is(.band-dark, .wp-block-post-content .band-mist) .steps li::before { color: var(--mgi-green-bright); font-weight: 300; font-size: 2.4rem; }
:is(.band-dark, .wp-block-post-content .band-mist) .work { border-top-color: var(--mgi-green-bright); }
:is(.band-dark, .wp-block-post-content .band-mist) .work p { color: var(--mgi-on-dark-2); }
:is(.band-dark, .wp-block-post-content .band-mist) .is-style-mgi-line .wp-block-button__link { border-color: #fff; color: #fff; }
.sector-photo img { box-shadow: 0 8px 20px rgba(0, 0, 0, .25); }

/* Numbered columns, as in "How we deliver" */
.band-steps .cols3 { counter-reset: d; }
.band-steps .cols3 > .wp-block-column { counter-increment: d; border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 22px; position: relative; }
.band-steps .cols3 > .wp-block-column::after { content: ""; position: absolute; top: -1px; left: 0; width: 44px; height: 3px; background: var(--mgi-green-bright); }
.band-steps .cols3 > .wp-block-column::before { content: "0" counter(d); display: block; font-weight: 300; font-stretch: 105%; font-size: 3rem; line-height: 1; color: var(--mgi-green-bright); margin-bottom: 14px; }

/* Cards on tinted backgrounds */
.promo-cards { gap: clamp(20px, 3vw, 32px) !important; }
.promo-card { --pad: clamp(22px, 3vw, 32px); background: #fff; padding: 0 var(--pad) var(--pad) !important; border-top: 5px solid var(--mgi-green); box-shadow: var(--mgi-shadow); }
.promo-card.promo-intl { border-top-color: var(--mgi-red-ink); }
.promo-card .promo-photo { margin: 0 calc(var(--pad) * -1) 22px !important; width: calc(100% + 2 * var(--pad)); max-width: none !important; }
.promo-photo img { display: block; width: 100%; height: clamp(170px, 18vw, 230px); object-fit: cover; }
.promo-card p:last-child a { font-weight: 650; }
.arms { box-shadow: var(--mgi-shadow); border: 0; }
.mgi-reviews { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 36px; border: 0; border-top: 4px solid var(--mgi-green); box-shadow: var(--mgi-shadow); }
.mgi-reviews .mgi-reviews-links { margin: 0 0 0 auto !important; }
@media (max-width: 700px) { .mgi-reviews .mgi-reviews-links { margin: 6px 0 0 !important; } }
.office { background: #fff; padding: 24px !important; box-shadow: var(--mgi-shadow); }
.mgi-qual { background: #fff; padding: 24px; box-shadow: var(--mgi-shadow); }
.mgi-aside { border: 0; box-shadow: var(--mgi-shadow); }
.mgi-form { background: #fff; padding: clamp(20px, 3vw, 34px); border-top: 4px solid var(--mgi-red-ink); box-shadow: var(--mgi-shadow); }
.mgi-done { background: #fff; box-shadow: var(--mgi-shadow); }
.wp-block-details { background: #fff; padding: 14px 18px; margin: 0 0 8px; border: 0; border-left: 4px solid var(--mgi-green); box-shadow: 0 3px 10px rgba(22, 30, 46, .05); }
.services table { background: #fff; box-shadow: var(--mgi-shadow); }
.services th:first-child, .services td:first-child { padding-left: 22px; }
.legal ul.kv { background: #fff; }

/* Training area cards */
.mgi-index { columns: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.mgi-index li { break-inside: auto; }
.mgi-index a { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-height: 104px; padding: 18px 18px 16px; background: #fff; border: 0; border-top: 4px solid var(--area, var(--mgi-navy)); border-radius: 4px; box-shadow: var(--mgi-shadow); color: var(--mgi-ink); transition: transform .15s, box-shadow .15s; }
.mgi-index a .nm { font-weight: 700; font-stretch: 106%; color: var(--mgi-navy); line-height: 1.3; }
.mgi-index a .n { margin: auto 0 0; font-size: .85rem; font-weight: 650; color: var(--area, var(--mgi-slate)); }
.mgi-index a:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(22, 30, 46, .14); color: var(--mgi-ink); }
.mgi-index a:hover .nm { color: var(--mgi-red-ink); }

/* Course lists */
.mgi-filters { background: #fff; padding: 18px; border-top: 4px solid var(--mgi-green); box-shadow: var(--mgi-shadow); }
.mgi-results { border-top: 0; display: grid; gap: 10px; }
.mgi-result { grid-template-columns: 136px minmax(0, 1fr) auto; background: #fff; border: 0 !important; border-left: 5px solid var(--area, var(--mgi-navy)) !important; border-radius: 4px; padding: 14px 18px !important; box-shadow: 0 4px 14px rgba(22, 30, 46, .06); }
.mgi-result .code { justify-self: start; background: var(--mgi-mist); color: var(--mgi-navy); border-radius: 3px; padding: 3px 8px; font-size: .8rem; line-height: 1.35; }
.mgi-result .meta::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--area, var(--mgi-slate)); margin-right: 7px; vertical-align: 1px; }
.mgi-pages a, .mgi-pages span { background: #fff; }

/* Call to action */
.cta-buttons { gap: 10px; }
.band-red .is-style-mgi-navy .wp-block-button__link { background: var(--mgi-night); color: #fff; }
.band-red .is-style-mgi-navy .wp-block-button__link:hover { background: #000; color: #fff; }
.band-red .is-style-mgi-line .wp-block-button__link { border-color: rgba(255, 255, 255, .9); color: #fff; background: transparent; }
.band-red .is-style-mgi-line .wp-block-button__link:hover { background: #fff; color: var(--mgi-red-ink); }

/* Footer */
.site-foot { background: var(--mgi-night); }

/* No strip between the last section and the footer. */
.wp-site-blocks > .wp-block-template-part, .wp-site-blocks > footer { margin-block-start: 0; }

/* ---------- Fewer white areas ---------- */
/* No gap between the header and the first section. */
body .wp-site-blocks > * { margin-block-start: 0; }

/* Research and Advisory half of the two-arms card in green, beside the navy Training half. */
.arm-research { background: linear-gradient(160deg, #135630 0%, var(--mgi-green-deep) 60%, #1C7744 100%); border-left: 0; color: #E8F5EC; }
.arm-research h2, .arm-research a { color: #fff; }
.arm-research p { color: #E8F5EC; }
.arm-research li { border-bottom-color: rgba(255, 255, 255, .16); }
.arm-research li::before { background: var(--mgi-green-bright); }
@media (max-width: 781px) { .arm-research { border-top: 0; } }

/* Navy cards for reviews and the QCTO and delegates promos. */
.mgi-reviews, .promo-card { background: linear-gradient(160deg, var(--mgi-night) 0%, #24304A 100%); color: var(--mgi-on-dark); }
.mgi-reviews { border-top-color: var(--mgi-green-bright); }
.mgi-reviews-count, .mgi-reviews p { color: var(--mgi-on-dark); }
.mgi-reviews-count strong, .mgi-reviews-rating { color: #fff; }
.mgi-reviews .mgi-btn-navy { background: var(--mgi-red-ink); }
.mgi-reviews .mgi-btn-navy:hover { background: #A91E22; }
.mgi-reviews .mgi-btn-line { border-color: rgba(255, 255, 255, .85); color: #fff; }
.mgi-reviews .mgi-btn-line:hover { background: #fff; color: var(--mgi-navy); }
.promo-card h2 { color: #fff; }
.promo-card p { color: var(--mgi-on-dark); }
.promo-card a { color: #fff; text-decoration-color: var(--mgi-green-bright); }
.promo-card a:hover { color: var(--mgi-green-bright); }

/* Catalogue filters fit narrow screens. */
.mgi-filters input, .mgi-filters select { width: 100%; min-width: 0; }
@media (max-width: 1000px) { .mgi-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .mgi-filters { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
	.mgi-result { grid-template-columns: minmax(0, 1fr); gap: 8px; }
	.mgi-result .acts { justify-content: flex-start; }
}
/* Phone menu: left-aligned, with the Training links indented under a green line. */
.main-nav .is-menu-open .wp-block-navigation__responsive-container-content,
.main-nav .is-menu-open .wp-block-navigation__container,
.main-nav .is-menu-open .wp-block-navigation-item { align-items: flex-start !important; justify-content: flex-start !important; text-align: left; }
.main-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding: 8px 20px 32px !important; }
.main-nav .is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; border-left: 2px solid var(--mgi-green-bright) !important; background: transparent !important; box-shadow: none !important; padding: 2px 0 2px 16px !important; margin: 4px 0 6px !important; }
.main-nav .is-menu-open .wp-block-navigation-item__content { color: #fff !important; padding: 8px 0 !important; }
.main-nav .is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content { color: var(--mgi-on-dark) !important; font-size: 1rem !important; }
/* Short pages: no white below the footer. Pages without bands (such as country pages) get breathing room. */
html { background: var(--mgi-night); }
.wp-block-post-content > :first-child:not(.alignfull) { margin-block-start: clamp(32px, 5vw, 56px) !important; }
.wp-block-post-content > :last-child:not(.alignfull) { margin-block-end: clamp(40px, 6vw, 72px) !important; }
/* Course summary line in course lists */
.mgi-result .sum { margin: 4px 0 0; font-size: .9rem; line-height: 1.45; color: var(--mgi-slate); max-width: 70ch; }
/* Course page sections */
.single-mgi_course .wp-block-post-content h2 { font-size: 1.35rem; margin-top: 1.6em; }
.single-mgi_course .wp-block-post-content > h2:first-child { margin-top: 0; }
.single-mgi_course .wp-block-post-content ul { padding-left: 0; list-style: none; }
.single-mgi_course .wp-block-post-content ul li { position: relative; padding: 7px 0 7px 26px; border-bottom: 1px solid var(--mgi-line); }
.single-mgi_course .wp-block-post-content ul li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 10px; height: 10px; border-radius: 2px; background: var(--mgi-green); }
