/*
 * AirIBMS theme glue — WordPress-integration overrides only.
 * The design itself lives in site.css (verbatim from the design handoff).
 */

/* Neutralize Gutenberg Group block-gap margins inside the design wrapper */
.wp-block-group.figma-top .is-layout-flow > * {
	margin-block: 0;
}

/* Keep the WP admin bar from covering the sticky header */
@media (min-width: 783px) {
	body.admin-bar header {
		top: 32px;
	}
}

/* Safety net: media blocks placed outside a Custom section still respect
   the design's content column instead of spanning the full viewport */
main > .wp-block-image,
main > .wp-block-video,
main > .wp-block-embed,
main > .wp-block-gallery {
	width: min(var(--content), calc(100% - 48px));
	margin: 48px auto;
}

/* Sections with a client-set background photo: keep overlay text readable.
   Cards with their own background keep their own colors. */
.has-bg-photo .section-heading :is(.eyebrow, h2, .lead),
.hero.has-bg-photo :is(h1, .lead) {
	color: #fff;
}

/* Hero strap lines (v2 content) */
.hero .hero-strap {
	color: #fff;
	font-size: 20px;
	font-weight: 500;
	margin: 0 0 6px;
}

/* Team member photo (field exists; renders when set) */
.team-photo {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	flex: none;
}

/* Image + text block: two columns, image left by default */
.media-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	gap: 56px;
	align-items: center;
}
.media-grid.media-flip .media-visual {
	order: 2;
}
.media-visual img {
	width: 100%;
	height: auto;
	display: block;
}
@media (max-width: 800px) {
	.media-grid,
	.media-grid.media-flip {
		grid-template-columns: 1fr;
		gap: 32px;
	}
	.media-grid.media-flip .media-visual {
		order: 0;
	}
}

/* Compact stacking: consecutive .s-compact sections (e.g. the v2
   portfolio / who-pays / cost trio) keep 88px outer padding but only
   48px between them instead of 88+88. */
.s-compact:has(+ .s-compact) {
	padding-bottom: 48px;
}
.s-compact + .s-compact {
	padding-top: 0;
}

/* s-compact illustrations: 80% of the column width, rounded corners,
   centered in the column (26.10 review) */
.s-compact .media-visual img {
	width: 80%;
	margin-inline: auto;
	border-radius: 20px;
}

/* Stats band footnote (v3 source line under the facts gradient) */
.facts .facts-note {
	margin: 14px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.75);
}

/* Case studies: testimonial at the bottom of the blue section,
   left corner below the case cards (v3 review) */
.section.blue .case-quote {
	max-width: 760px;
	margin: 40px 0 0;
	padding: 0 0 0 20px;
	border-left: 3px solid var(--green);
	font-family: 'Funnel Display', sans-serif;
	font-size: 22px;
	line-height: 1.35;
	color: #fff;
}
.section.blue .case-quote cite {
	display: block;
	margin-top: 12px;
	font-family: 'Funnel Sans', sans-serif;
	font-size: 14px;
	font-style: normal;
	color: #d5e8ff;
}
@media (max-width: 800px) {
	.section.blue .case-quote {
		font-size: 18px;
		margin-top: 28px;
	}
}

/* Header contact CTA (sits in .nav-actions, next to the language switcher) */
.nav-cta {
	min-height: 44px;
	padding: 10px 18px;
	font-size: 15px;
	white-space: nowrap;
}
@media (max-width: 800px) {
	.nav-cta {
		padding: 8px 14px;
		font-size: 14px;
	}
}

/* Clickable card: stretched link across the whole card (link field set) */
article.has-card-link {
	position: relative;
	transition: filter 0.15s;
}
.card-link {
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
}
.card-link:focus-visible {
	outline: 3px solid #135bdc;
	outline-offset: 3px;
}
article.has-card-link:hover {
	filter: brightness(0.97);
}
article.has-card-link:hover h3 {
	color: #0076bd;
}

/* Partner models with four entries sit side by side (v2 "Four ways to
   partner"); three-model sections keep the design's three-column grid. */
.three-grid.models-4 {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1150px) {
	.three-grid.models-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 800px) {
	.three-grid.models-4 {
		grid-template-columns: 1fr;
	}
}

/* About block with the "leadership-split" class: photo | first leadership
   member | vertical rule | remaining members stacked. Without a photo the
   first column drops out (two-column split). */
.team-split {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr);
	column-gap: 40px;
	align-items: start;
}
.team-split.no-photo {
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.team-split > article {
	padding-right: 40px;
	border-right: 1px solid #e7ecf4;
}
.team-split-photo img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: var(--radius);
}
.team-split-rest {
	display: grid;
	row-gap: 36px;
}
@media (max-width: 1150px) {
	.team-split {
		grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 28px;
	}
	.team-split > article {
		padding-right: 28px;
	}
}
@media (max-width: 800px) {
	.team-split,
	.team-split.no-photo {
		grid-template-columns: 1fr;
		row-gap: 32px;
	}
	.team-split-photo {
		max-width: 220px;
	}
	.team-split > article {
		padding-right: 0;
		border-right: 0;
	}
	.team-split-rest {
		border-top: 1px solid #e7ecf4;
		padding-top: 32px;
	}
}
