.sb-intro-gallery {
	padding-block: 56px;
	background-color: var(--sb-color-white);
}

.sb-intro-gallery--bg-gray {
	background-color: var(--sb-color-bg-soft);
}

.sb-intro-gallery__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 48px;
	align-items: center;
}

.sb-intro-gallery__grid--image-left {
	direction: rtl;
}

.sb-intro-gallery__grid--image-left > * {
	direction: ltr;
}

/* "Match image height to content" — stretch the row so both columns share
   the same height, then let the image(s) fill that height instead of
   using a fixed aspect-ratio photo shape. */
.sb-intro-gallery__grid--match-height {
	align-items: stretch;
}

.sb-intro-gallery__grid--match-height .sb-intro-gallery__media,
.sb-intro-gallery__grid--match-height .sb-intro-gallery__img {
	height: 100%;
}

.sb-intro-gallery__grid--match-height .sb-intro-gallery__img img {
	height: 100%;
	aspect-ratio: auto;
}

.sb-intro-gallery__heading {
	font-family: var(--sb-font-family) !important;
	font-style: normal !important;
	font-weight: var(--sb-font-weight-heading)!important;
	font-size: var(--sb-font-size-h2-display) !important;
	line-height: 1.2 !important;
	color: var(--sb-color-body) !important;
	margin: 0 0 10px !important;
}

.sb-intro-gallery__heading strong,
.sb-intro-gallery__heading b {
	color: var(--sb-color-purple-deep) !important;
	font-weight: var(--sb-font-weight-heading-bold) !important;
}

.sb-intro-gallery__heading p {
	margin: 0 !important;
	font-family: var(--sb-font-family) !important;
	font-style: normal !important;
	font-weight: 800 !important;
	font-size: 26px !important;
	line-height: 32px !important;
	color: var(--sb-color-body) !important;
}

.sb-intro-gallery__body {
	font-family: var(--sb-font-family);
	font-style: normal;
	font-weight: 400;
	font-size: 22px;
	line-height: 32px;
	color: var(--sb-color-body);
	max-width: 100%;
	overflow-x: hidden;
}

/* Guard against leftover pasted markup (stray wrapper divs/classes from a
   copy-pasted source) forcing its own width/positioning inside the body
   WYSIWYG — this has happened before on other pages' body fields. */
.sb-intro-gallery__body * {
	max-width: 100% !important;
}

.sb-intro-gallery__body p {
	margin: 0 0 16px !important;
}

.sb-intro-gallery__body p:last-child {
	margin-bottom: 0 !important;
}

.sb-intro-gallery__body a {
	color: var(--sb-color-purple-deep);
}

.sb-intro-gallery__body a:hover,
.sb-intro-gallery__body a:focus-visible {
	color: var(--sb-color-black);
}

.sb-intro-gallery__media {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.sb-intro-gallery__media--single {
	grid-template-columns: 1fr;
}

.sb-intro-gallery__img {
	border-radius: var(--sb-radius-tile);
	overflow: hidden;
}

.sb-intro-gallery__img:hover img {
	transform: scale(1.06);
}

.sb-intro-gallery__img img {
	width: 100%;
	height: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	transition: transform 500ms ease;
	display: block;
}

.sb-intro-gallery__media--single .sb-intro-gallery__img img {
	aspect-ratio: 16 / 10;
}

.sb-intro-gallery__cta-wrap {
	display: flex;
	justify-content: center;
	margin-top: 24px;
}

/* "Move button under the text content" variant — sits inside the copy
   column, centred under the heading/body instead of full-width below the
   whole block. */
.sb-intro-gallery__cta-wrap--inline {
	justify-content: center;
	margin-top: 28px;
}

/* CTA — same construction as the other block buttons (teal pill, purple
   slide-up + text-slide hover). */
.sb-intro-gallery__cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background-color: var(--sb-color-teal);
	font-family: var(--sb-font-family);
	font-style: normal;
	font-weight: 400 !important;
	font-size: 16px !important;
	line-height: 18px !important;
	padding: 16px 88px !important;
	border-radius: var(--sb-radius-pill);
	box-shadow: none;
	text-decoration: none;
	white-space: nowrap;
}

.sb-intro-gallery__cta,
.sb-intro-gallery__cta:hover,
.sb-intro-gallery__cta:focus-visible,
.sb-intro-gallery__cta:active,
.sb-intro-gallery__cta:visited {
	color: var(--sb-color-white) !important;
	border: 0 !important;
}

.sb-intro-gallery__cta::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: var(--sb-color-lavender);
	transform: translateY(100%);
	transition: transform 320ms ease;
	z-index: 0;
}

.sb-intro-gallery__cta:hover::before,
.sb-intro-gallery__cta:focus-visible::before {
	transform: translateY(0);
}

.sb-intro-gallery__cta .sb-cta-pill__label-wrap {
	align-items: center;
}

.sb-intro-gallery__cta .sb-cta-pill__label--front,
.sb-intro-gallery__cta .sb-cta-pill__label--back {
	transition: transform 320ms ease;
}

.sb-intro-gallery__cta .sb-cta-pill__label--front {
	transform: translateY(0);
}

.sb-intro-gallery__cta .sb-cta-pill__label--back {
	display: block;
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	transform: translateY(0);
}

.sb-intro-gallery__cta:hover .sb-cta-pill__label--front,
.sb-intro-gallery__cta:focus-visible .sb-cta-pill__label--front {
	transform: translateY(-100%);
}

.sb-intro-gallery__cta:hover .sb-cta-pill__label--back,
.sb-intro-gallery__cta:focus-visible .sb-cta-pill__label--back {
	transform: translateY(-100%);
}

/* Every block in the theme now stacks to a single column below this same
   1200px breakpoint (was a patchwork of 782/960/1024 per block — a real
   width like 785px landed in a "dead zone" for whichever blocks used 960
   or 1024, still rendering 2 cramped columns). */
@media (max-width: 1199px) {
	.sb-intro-gallery {
		padding-top: 20px;
		padding-bottom: 20px;
	}

	.sb-intro-gallery .sb-container {
		display: flex;
		flex-direction: column;
	}

	.sb-intro-gallery__grid,
	.sb-intro-gallery__grid--image-left {
		display: contents;
		direction: ltr;
	}

	/* The grid becoming display:contents (so copy/media/cta can be freely
	   re-ordered with `order` below) breaks AOS's fade-left/right scroll
	   reveal for its direct children — the pre-animation translateX(100px)
	   offset can end up stuck, pushing content off-screen. Not worth fixing
	   the animation itself on a layout that's already being reflowed for
	   mobile, so just disable it here. */
	.sb-intro-gallery__copy,
	.sb-intro-gallery__media {
		transform: none !important;
		opacity: 1 !important;
	}

	.sb-intro-gallery__copy {
		order: 1;
		text-align: center;
	}

	.sb-intro-gallery__copy .sb-intro-gallery__cta-wrap--inline {
		justify-content: center;
	}

	.sb-intro-gallery__cta-wrap:not(.sb-intro-gallery__cta-wrap--inline) {
		order: 2;
	}

	.sb-intro-gallery__media {
		order: 3;
		grid-template-columns: 1fr !important;
		margin-top: 24px;
	}

	.sb-intro-gallery__img img {
		aspect-ratio: 4 / 3;
	}

	/* Single image: shown above the copy instead of below, and a bit taller. */
	.sb-intro-gallery__media--single {
		order: 0;
		margin-top: 0;
		margin-bottom: 24px;
	}

	.sb-intro-gallery__media--single .sb-intro-gallery__img img {
		aspect-ratio: 4 / 3.4;
	}
}

/* True small-screen text shrink — a stacked single column is still plenty
   wide for the full heading size down to ~782px. */
@media (max-width: 782px) {
	.sb-intro-gallery__heading {
		font-size: clamp(32px, 8vw, 48px);
		line-height: 1.15;
	}

	.sb-intro-gallery__body {
		font-size: clamp(16px, 4vw, 22px);
		line-height: 1.4;
	}
}

@media (max-width: 640px) {
	.sb-intro-gallery__cta {
		width: 100%;
	}
}
