/* Hero: full-width background image with dark overlay and centred text. */

.wu-hero {
	position: relative;
	display: grid;
	min-height: 300px;
	isolation: isolate;
	background-color: var(--wu-color-text);
	color: var(--wu-color-on-dark);
}

.wu-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: var(--wu-overlay-hero);
}

.wu-hero__media {
	position: absolute;
	inset: 0;
	z-index: -2;
	margin: 0;
}

.wu-hero__media .wu-picture {
	display: block;
	width: 100%;
	height: 100%;
}

.wu-hero__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * Tall: fills the screen from the bottom of the site header to the bottom of the screen,
 * on every device, with the text centred. wu.js sets --wu-hero-offset to the hero's
 * distance from the top of the page (the header height); without JS it is 0 (full screen).
 * min-height (not height) so long text on small phones can still grow the hero.
 */
.wu-hero--tall {
	min-height: calc(100vh - var(--wu-hero-offset, 0px));
	min-height: calc(100svh - var(--wu-hero-offset, 0px));
}

.wu-hero--tall .wu-hero__inner {
	padding-block: var(--wu-space-lg);
}

.wu-hero__inner {
	align-self: center;
	padding-block: clamp(64px, 10vw, 120px);
	text-align: center;
}

.wu-hero__breadcrumbs {
	margin-bottom: var(--wu-space-md);
	text-align: left;
}

.wu-hero__breadcrumbs a {
	color: inherit;
}

.wu-hero__title {
	margin-bottom: var(--wu-space-md);
	color: inherit;
	font-weight: 700;
}

.wu-hero__text {
	max-width: 760px;
	margin: 0 auto var(--wu-space-lg);
}

.wu-hero__text:last-child {
	margin-bottom: 0;
}

.wu-hero__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--wu-space-sm);
}

/*
 * Split: text on the left, product image on the right (product pages).
 * The side image is hidden on phones, as in the old template.
 */
.wu-hero__side {
	display: none;
	margin: 0;
}

.wu-hero__side-image {
	width: 100%;
	max-height: 70vh;
	object-fit: contain;
}

@media (min-width: 768px) {
	.wu-hero--split .wu-hero__inner {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--wu-space-xl);
		align-items: center;
		text-align: left;
	}

	.wu-hero--split .wu-hero__text {
		margin-inline: 0;
	}

	.wu-hero--split .wu-hero__actions {
		justify-content: flex-start;
	}

	.wu-hero--split .wu-hero__side {
		display: block;
	}
}

/* Left: title in a translucent dark box, left-aligned (case studies). */
.wu-hero--left::after {
	background-color: rgb(0 0 0 / 10%);
}

.wu-hero--left .wu-hero__inner {
	text-align: left;
}

.wu-hero--left .wu-hero__title {
	display: inline-block;
	max-width: 550px;
	margin: 0;
	padding: 20px;
	background-color: rgb(31 30 30 / 48%);
}
