/*
 * ThriveMBA Core - typography and site chrome.
 *
 * This is what makes the site look like the approved design rather than a
 * stock theme: the serif display face, the header, the footer and the
 * campus strip.
 *
 * To stop the plugin setting fonts site-wide, add this to wp-config.php:
 *   define( 'TMBA_NO_FONTS', true );
 */

:root {
	--tmba-navy: #0b2a4a;
	--tmba-amber: #e9a73c;
	--tmba-cream: #fdf7ee;
	--tmba-pale: #e9f0fa;
	--tmba-display-font: "Playfair Display", Georgia, "Times New Roman", serif;
	--tmba-body-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---------- Typography ---------- */

body.tmba-fonts {
	font-family: var(--tmba-body-font);
	-webkit-font-smoothing: antialiased;
}

body.tmba-fonts .tmba-display,
body.tmba-fonts .tmba-wordmark,
body.tmba-fonts .tmba-section__title,
body.tmba-fonts .tmba-card__title {
	font-family: var(--tmba-display-font);
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* The wordmark: "Thrive" navy, "MBA" amber, as in the design. */
.tmba-wordmark a,
.tmba-wordmark {
	text-decoration: none;
}

/* ---------- Header ---------- */

.tmba-header {
	position: relative;
	z-index: 20;
}

.tmba-header .wp-block-navigation {
	font-family: var(--tmba-body-font);
}

.tmba-header .wp-block-navigation a {
	color: var(--tmba-navy);
	text-decoration: none;
	padding: 6px 0;
	border-bottom: 2px solid transparent;
	transition: border-color .15s ease;
}

.tmba-header .wp-block-navigation a:hover,
.tmba-header .wp-block-navigation .current-menu-item > a {
	border-bottom-color: var(--tmba-amber);
}

.tmba-header .wp-block-site-logo img {
	max-height: 46px;
	width: auto;
}

/* When a logo image is uploaded, hide the text wordmark beside it. */
.tmba-header .wp-block-site-logo:not(.is-default-size) + .tmba-wordmark,
.tmba-header .wp-block-site-logo img[src] ~ .tmba-wordmark {
	display: none;
}

/* The nav takes the slack and shrinks; the logo and CTA never get crushed. */
.tmba-header .wp-block-navigation {
	flex: 1 1 auto;
	min-width: 0;
}

.tmba-header .wp-block-navigation__container {
	flex-wrap: wrap;
	row-gap: 4px;
}

.tmba-header > .wp-block-group > .wp-block-group:first-child,
.tmba-header .wp-block-buttons {
	flex: 0 0 auto;
}

/* Eight top-level items is a lot. Tighten before anything overflows. */
@media (max-width: 1280px) {
	.tmba-header .wp-block-navigation {
		font-size: 14px;
		--wp--style--block-gap: 18px;
	}
	.tmba-header .wp-block-navigation .wp-block-navigation__container {
		gap: 18px;
	}
}

@media (max-width: 1080px) {
	.tmba-header .wp-block-navigation {
		font-size: 13.5px;
	}
	.tmba-header .wp-block-navigation .wp-block-navigation__container {
		gap: 14px;
	}
	.tmba-header .wp-block-button__link {
		padding: 10px 14px !important;
		font-size: 14px !important;
	}
}

@media (max-width: 860px) {
	.tmba-header .wp-block-buttons {
		display: none;
	}
}

/* ---------- Hero extras ---------- */

.tmba-usp {
	display: flex;
	flex-wrap: wrap;
	gap: 22px 30px;
	margin-top: 10px;
}

.tmba-usp__item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	max-width: 210px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: #17324f;
}

.tmba-usp__item .tmba-icon {
	flex: 0 0 auto;
	margin-top: 1px;
	opacity: .8;
}

.tmba-hero-script {
	position: absolute;
	top: 18px;
	right: 20px;
	z-index: 5;
	pointer-events: none;
}

.tmba-hero-script span {
	display: inline-block;
	font-family: var(--tmba-display-font);
	font-style: italic;
	font-size: 25px;
	line-height: 1.12;
	text-align: right;
	color: var(--tmba-navy);
	text-shadow: 0 1px 10px rgba(255, 255, 255, .85);
}

.tmba-hero-script span::after {
	content: "";
	display: block;
	width: 92px;
	height: 5px;
	margin: 6px 0 0 auto;
	border-radius: 3px;
	background: var(--tmba-amber);
}

/* The hero column needs to be a positioning context for the script. */
.wp-block-column:has(> .tmba-hero-script) {
	position: relative;
}

@media (max-width: 860px) {
	.tmba-hero-script {
		display: none;
	}
}

/* ---------- Card icons ---------- */

.tmba-cardicon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: var(--tmba-pale);
	margin-bottom: 2px;
}

/* ---------- Trusted-by strip ---------- */

.tmba-logos {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 18px 0 10px;
	max-width: 100%;
}

.tmba-logos__track {
	flex: 1 1 auto;
	/* Without this a flex child refuses to shrink and the scroller pushes
	   the whole page wide on mobile. */
	min-width: 0;
	display: flex;
	gap: 18px;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 4px 0;
}

.tmba-logos__track::-webkit-scrollbar {
	display: none;
}

.tmba-logos__slot {
	flex: 0 0 auto;
	scroll-snap-align: start;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 118px;
	height: 76px;
	border: 1px dashed #b9cce3;
	border-radius: 10px;
	background: rgba(255, 255, 255, .6);
}

.tmba-logos__slot span {
	font-size: 12px;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: #8aa5c2;
}

.tmba-logos__slot img {
	max-width: 86px;
	max-height: 56px;
	object-fit: contain;
}

.tmba-logos__nav {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border: 1px solid #c3d5ea;
	border-radius: 50%;
	background: #fff;
	color: var(--tmba-navy);
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
}

.tmba-logos__nav:hover {
	background: var(--tmba-navy);
	color: #fff;
}

.tmba-logos__nav:focus-visible {
	outline: 2px solid var(--tmba-navy);
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.tmba-logos__slot {
		width: 96px;
		height: 64px;
	}
	.tmba-logos {
		gap: 8px;
	}
}

/* ---------- Footer ---------- */

.tmba-footer a {
	color: inherit;
	text-decoration: none;
}

.tmba-footer a:hover {
	color: #fff;
	text-decoration: underline;
}

/* ---------- Responsive type ---------- */

@media (max-width: 860px) {
	body.tmba-fonts h1.tmba-display {
		font-size: 38px !important;
	}
	body.tmba-fonts h2.tmba-display {
		font-size: 28px !important;
	}
}
