/**
 * MF Hero — Page-level CSS (not Shadow DOM)
 */

/* ============================================================
   Host element — full-bleed breakout
   ============================================================ */
mf-hero {
	display: block;
	position: relative;
	width: 100vw;
	max-width: 100vw;
	left: 50%;
	transform: translateX(-50%);
	margin-bottom: var(--mmx-spacing-sequence, 0);
	box-sizing: border-box;
	padding: 0;
}

/* Ensure no ancestor clips the full-bleed on mobile */
mf-hero,
mf-hero * {
	box-sizing: border-box;
}

/* ============================================================
   Image container — relative so overlay and content position
   ============================================================ */
.mf-hero__image-container {
	position: relative;
	width: 100%;
	max-width: 100%;
	line-height: 0;
	overflow: hidden;
}

.mf-hero__image-container picture {
	display: block;
	width: 100%;
}

.mf-hero__image-container picture img,
.mf-hero__image-container > img {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
}

/* ============================================================
   Optional overlay
   ============================================================ */
.mf-hero__overlay {
	position: absolute;
	inset: 0;
	background: var(--mf-hero-overlay, rgba(0,0,0,0));
	pointer-events: none;
	z-index: 1;
}

/* ============================================================
   Desktop content — absolutely positioned over image
   Hidden on mobile
   ============================================================ */
.mf-hero__content-desktop {
	/* Hidden on mobile — use visibility so mmx-text still initializes */
	position: absolute;
	z-index: 2;
	background: transparent;
	visibility: hidden;
	pointer-events: none;
}

@media screen and (min-width: 40em) {
	.mf-hero__content-desktop {
		visibility: visible;
		pointer-events: auto;
	}
}

/* ============================================================
   Mobile content — below image, normal flow
   Hidden on desktop
   ============================================================ */
.mf-hero__content-mobile {
	/* Shown on mobile, hidden on desktop via visibility so mmx-text initializes */
	display: block;
	padding: 20px 16px;
	color: inherit;
}

.mf-hero__content-mobile mmx-text,
.mf-hero__content-mobile mmx-button {
	display: block;
}

@media screen and (min-width: 40em) {
	.mf-hero__content-mobile {
		visibility: hidden;
		height: 0;
		overflow: hidden;
		padding: 0;
	}
}

/* ============================================================
   Spacing between text elements inside content divs
   ============================================================ */
.mf-hero__content-desktop > *,
.mf-hero__content-mobile > * {
	display: block;
	margin-bottom: 0.5em;
}

.mf-hero__content-desktop > *:last-child,
.mf-hero__content-mobile > *:last-child {
	margin-bottom: 0;
}

/* Button gets a bit more top breathing room */
.mf-hero__button {
	display: inline-block;
	margin-top: 0.5em;
}
