/* Half text / half image feature splits */
.feature-split {
	padding-top: 0;
	padding-bottom: 0;
}

.feature-split + .feature-split {
	border-top: 1px solid var(--halbro-grey-light);
}

.halftext-halfimage {
	overflow: hidden;
}

.halftext-halfimage__container {
	padding-left: 0;
	padding-right: 0;
	max-width: none;
	width: 100%;
}

.halftext-halfimage__row {
	display: block;
	margin: 0;
	width: 100%;
}

.halftext-halfimage__panel {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: stretch;
	width: 100%;
	min-height: clamp(300px, 38vw, 440px);
}

.halftext-halfimage__col {
	display: flex;
	min-width: 0;
	min-height: inherit;
}

.halftext-halfimage__col--text {
	background: var(--halbro-grey-pale);
}

.halftext-halfimage__col--image {
	background: var(--halbro-charcoal);
}

.halftext-halfimage__text-inner {
	display: flex;
	align-items: center;
	width: 100%;
	padding: clamp(2.25rem, 5vw, 4rem) var(--container-x);
	box-sizing: border-box;
}

/* Keep copy toward the image seam */
.halftext-halfimage__panel--text-image .halftext-halfimage__text-inner {
	justify-content: flex-end;
}

.halftext-halfimage__panel--image-text .halftext-halfimage__text-inner {
	justify-content: flex-start;
}

.halftext-halfimage__content {
	width: 100%;
	max-width: 28rem;
}

.halftext-halfimage__content h2 {
	font-size: clamp(1.75rem, 3.2vw, 2.5rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	line-height: 1.05;
	margin: 0 0 1rem;
	color: var(--halbro-charcoal);
}

.halftext-halfimage__content p {
	font-size: 1.0625rem;
	line-height: 1.65;
	color: var(--halbro-grey);
	margin: 0 0 1rem;
}

.halftext-halfimage__content p:last-child {
	margin-bottom: 0;
}

.halftext-halfimage__content .btn {
	margin-top: 0.75rem;
}

.halftext-halfimage__media {
	width: 100%;
	height: 100%;
	min-height: inherit;
	flex: 1;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Prefer the richer edge of wide banner assets */
.halftext-halfimage__panel--text-image .halftext-halfimage__media {
	background-position: right center;
}

.halftext-halfimage__panel--image-text .halftext-halfimage__media {
	background-position: left center;
}

/* Contained variant — text/image split inside page gutters, not edge-to-edge */
.feature-split--contained {
	padding-top: clamp(3rem, 6vw, 5rem);
	padding-bottom: clamp(3rem, 6vw, 5rem);
}

.feature-split--contained + .feature-split--contained {
	border-top: none;
}

.feature-split--contained .halftext-halfimage__container {
	max-width: 1280px;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-x);
	padding-right: var(--container-x);
	width: 100%;
	box-sizing: border-box;
}

.feature-split--contained .halftext-halfimage__panel {
	min-height: 0;
	gap: clamp(1.5rem, 3vw, 2.5rem);
	align-items: center;
}

.feature-split--contained .halftext-halfimage__col--text {
	background: transparent;
}

.feature-split--contained .halftext-halfimage__text-inner,
.feature-split--contained .halftext-halfimage__panel--text-image .halftext-halfimage__text-inner,
.feature-split--contained .halftext-halfimage__panel--image-text .halftext-halfimage__text-inner {
	justify-content: center;
	padding: 0;
}

.feature-split--contained .halftext-halfimage__content {
	max-width: none;
}

.feature-split--contained .halftext-halfimage__media {
	aspect-ratio: 5 / 4;
	min-height: clamp(240px, 28vw, 360px);
	height: auto;
}

.feature-split--contained .halftext-halfimage__col--image {
	background: transparent;
}

.halftext-halfimage__media--placeholder {
	background: linear-gradient(145deg, #2c2c2c 0%, #111 100%);
}

@media (max-width: 900px) {
	.halftext-halfimage__panel {
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.halftext-halfimage__panel--text-image .halftext-halfimage__col--image {
		order: -1;
	}

	.halftext-halfimage__col--image {
		min-height: clamp(220px, 52vw, 320px);
	}

	.halftext-halfimage__media {
		min-height: clamp(220px, 52vw, 320px);
	}

	.feature-split--contained .halftext-halfimage__media {
		aspect-ratio: 16 / 10;
		min-height: clamp(220px, 52vw, 320px);
	}

	.halftext-halfimage__text-inner,
	.halftext-halfimage__panel--text-image .halftext-halfimage__text-inner,
	.halftext-halfimage__panel--image-text .halftext-halfimage__text-inner {
		justify-content: flex-start;
		padding: clamp(2rem, 6vw, 2.75rem) var(--container-x);
	}

	.feature-split--contained .halftext-halfimage__text-inner,
	.feature-split--contained .halftext-halfimage__panel--text-image .halftext-halfimage__text-inner,
	.feature-split--contained .halftext-halfimage__panel--image-text .halftext-halfimage__text-inner {
		padding: clamp(1.5rem, 4vw, 2rem) 0 0;
	}

	.halftext-halfimage__content {
		max-width: none;
	}
}
