.kkh-slide .kkh-slide-image {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--wp--preset--border-radius--sm);
	margin: 0;
}

/* Message first; the photo sits under the text on narrow screens. */
.kkh-slide-body {
	min-width: 0;
}

/*
 * Hero slider presentation.
 * Without JavaScript the slider is a swipeable, scroll-snap carousel.
 */

/* The section is the positioning context for the edge-sitting arrows. */
.kkh-hero-section {
	position: relative;
}

.kkh-hero {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: stretch;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.kkh-hero::-webkit-scrollbar {
	display: none;
}

.kkh-slide {
	flex: 0 0 100%;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	justify-content: center;
	/* Slimmer inner padding on small screens; the desktop rule below adds
	   more once the slide is a wide two-column card. */
	padding: var(--wp--preset--spacing--40);
	/* Space between the text body and the photo on stacked (mobile) slides. */
	gap: var(--wp--preset--spacing--30);
}

/* From tablet up the slide becomes a single card: text beside the photo,
   so the whole slide fits on a small laptop screen. */
@media (min-width: 782px) {
	.kkh-slide {
		flex-direction: row;
		align-items: center;
		gap: var(--wp--preset--spacing--50);
		padding: var(--wp--preset--spacing--50);
		min-height: min(52vh, 22rem);
	}

	.kkh-slide-body {
		flex: 1 1 0;
	}

	.kkh-slide .kkh-slide-image {
		flex: 0 0 38%;
		align-self: center;
		aspect-ratio: auto;
		/* Fixed height instead of stretch: stretching inside the scroll
		   track resolves against its own height and balloons. */
		height: clamp(14rem, 40vh, 20rem);
		object-fit: cover;
	}

	/* Keep the display heading from towering over a short viewport. */
	.kkh-slide .wp-block-heading {
		font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem);
	}
}

/*
 * Controls are injected by slider.js; hidden when JS is unavailable.
 * The controls box covers the slider without catching clicks, and each
 * arrow sits half over the slider's left / right border.
 */
.kkh-hero-controls {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

.kkh-hero-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 2.5rem;
	height: 2.5rem;
	display: grid;
	place-items: center;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: var(--wp--preset--border-radius--round);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	font-size: 1.125rem;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	pointer-events: auto;
	box-shadow: 0 4px 12px rgba(43, 33, 25, 0.12);
}

.kkh-hero-controls .kkh-hero-arrow:first-child {
	left: -0.875rem;
}

.kkh-hero-controls .kkh-hero-arrow:last-child {
	right: -0.875rem;
}

.kkh-hero-arrow:hover,
.kkh-hero-arrow:focus-visible {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

/* Slightly smaller arrows on phones so they stay clear of the screen edge. */
@media (max-width: 781px) {
	.kkh-hero-arrow {
		width: 2.25rem;
		height: 2.25rem;
		font-size: 1rem;
	}

	.kkh-hero-controls .kkh-hero-arrow:first-child {
		left: -0.625rem;
	}

	.kkh-hero-controls .kkh-hero-arrow:last-child {
		right: -0.625rem;
	}
}

/* Autoplay status text is visually hidden but available to screen readers. */
.kkh-hero-status {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}