/**
 * Page Hero widget.
 */

.msd-phero {
	--msd-phero-accent: var(--msd-red, #9d2020);

	position: relative;
	padding: clamp(32px, 5vw, 56px) 0 clamp(72px, 10vw, 128px);
	overflow: hidden;
	color: var(--msd-ink, #1e2a30);
	isolation: isolate;
}

.msd-phero__media {
	position: absolute;
	z-index: -1;
	inset: 0;
}

/* Two classes: Elementor's ".elementor img" rule would otherwise reset the height. */
.msd-phero .msd-phero__photo {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	object-fit: cover;
	object-position: right center;
}

/*
 * Fade from the page colour into the photo. On small screens the text runs
 * across the whole width, so the fade stays strong enough to read on.
 */
.msd-phero__media::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, #f7f4ee 0%, rgba(247, 244, 238, 0.94) 55%, rgba(247, 244, 238, 0.8) 100%);
	content: "";
}

/* Faint key outline behind the text (city pages). */
.msd-phero .msd-phero__key {
	position: absolute;
	z-index: -1;
	top: 50%;
	right: clamp(-260px, -12vw, -80px);
	width: clamp(420px, 58vw, 980px);
	max-width: none;
	height: auto;
	transform: translateY(-50%) rotate(-28deg);
	color: var(--msd-phero-accent);
	opacity: 0.09;
	pointer-events: none;
}

/* Breadcrumb */

.msd-phero__crumbs {
	margin-bottom: clamp(28px, 4vw, 48px);
}

.msd-phero__crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	color: var(--msd-text-soft, #59636a);
	font-size: 14px;
	line-height: 1.5;
	list-style: none;
}

.msd-phero .msd-phero__crumbs a {
	color: var(--msd-text-soft, #59636a);
	text-decoration: none;
}

.msd-phero .msd-phero__crumbs a:hover {
	color: var(--msd-phero-accent);
	text-decoration: underline;
}

.msd-phero__crumbs .is-current {
	color: var(--msd-ink, #1e2a30);
	font-weight: 600;
}

/* Headline and text */

.msd-phero__copy {
	display: flex;
	flex-direction: column;
	gap: 22px;
	max-width: 760px;
}

/* Headline across the whole content width; the text below keeps its own limit. */
.msd-phero__copy--wide {
	max-width: none;
}

.msd-phero .msd-phero__title {
	margin: 0;
	color: var(--msd-ink, #1e2a30);
	font-family: var(--msd-font-heading, "Bricolage Grotesque", system-ui, sans-serif);
	font-size: clamp(2.6rem, 5.8vw, 5rem);
	font-weight: 800;
	line-height: 0.98;
	letter-spacing: -0.035em;
	text-wrap: balance;
}

.msd-phero__accent {
	color: var(--msd-phero-accent);
}

.msd-phero__accent--break {
	display: block;
}

.msd-phero .msd-phero__text {
	max-width: 560px;
	margin: 0;
	color: var(--msd-text-muted, #4c565d);
	font-size: clamp(17px, 1.6vw, 20px);
	line-height: 1.6;
	text-wrap: pretty;
}

/* Buttons */

.msd-phero__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 28px;
}

.msd-phero .msd-phero__button {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 58px;
	border-radius: 999px;
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.msd-phero .msd-phero__button:hover {
	transform: translateY(-2px);
}

.msd-phero .msd-phero__button--call {
	padding: 0 28px 0 22px;
	background-color: var(--msd-espresso, #281616);
	color: var(--msd-white, #fff);
}

.msd-phero .msd-phero__button--call:hover {
	background-color: var(--msd-espresso-hover, #3e2323);
	color: var(--msd-white, #fff);
}

.msd-phero .msd-phero__button--wa {
	padding: 0 26px 0 20px;
	border: 1.5px solid #d8d1c4;
	background-color: var(--msd-white, #fff);
	color: var(--msd-ink, #1e2a30);
}

.msd-phero .msd-phero__button--wa:hover {
	border-color: var(--msd-green, #15803d);
	color: var(--msd-ink, #1e2a30);
}

.msd-phero__button .msd-icon {
	font-size: 22px;
}

.msd-phero__button--wa .msd-icon {
	color: var(--msd-green, #15803d);
	font-size: 20px;
}

@media (min-width: 980px) {

	/* The design's fade: solid over the text, clear over the photo's subject. */
	.msd-phero__media::after {
		background: linear-gradient(90deg, #f7f4ee 0%, #f7f4ee 38%, rgba(247, 244, 238, 0.88) 55%, rgba(247, 244, 238, 0.35) 78%, rgba(247, 244, 238, 0) 100%);
	}
}

@media (prefers-reduced-motion: reduce) {

	.msd-phero .msd-phero__button {
		transition: none;
	}

	.msd-phero .msd-phero__button:hover {
		transform: none;
	}
}
