/*
 * Home Video Hero
 * Layout/typography (overlay, title, text, button) come from the existing
 * .hero-slider styles in the theme bundle, so it matches the Hero Slider.
 * Heights mirror the Hero Slider image (1376x768) behaviour.
 */
.home-video-hero {
	position: relative;
	overflow: hidden;
	height: calc(var(--header-height, 0px) + 60vh);
	background-color: var(--theme-palette-color-2, #043d25);
}

@media (min-width: 480px) {
	.home-video-hero {
		height: min(55.8vw, 80vh);
	}
}

.home-video-hero__media,
.home-video-hero__poster,
.home-video-hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.home-video-hero__poster,
.home-video-hero__video {
	object-fit: cover;
	object-position: center;
	max-width: none;
	margin: 0;
}

.home-video-hero__video {
	opacity: 0;
	transition: opacity 0.6s ease;
}

.home-video-hero.is-playing .home-video-hero__video,
.editor-styles-wrapper .home-video-hero__video {
	opacity: 1;
}

.home-video-hero .hero-slider--overlay {
	z-index: 1;
}

/* Play button: shown only when the video could not start by itself
   (iPhone Low Power Mode, reduced motion, data saver). */
.home-video-hero__play {
	position: absolute;
	top: clamp(16px, 2.5vw, 32px);
	right: clamp(16px, 2.5vw, 32px);
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	min-height: 0;
	margin: 0;
	padding: 0; /* the triangle path is already optically centred in its 24x24 box */
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	background: rgba(4, 61, 37, 0.45);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	transition: background 0.25s ease, transform 0.25s ease, opacity 0.3s ease;
}

.home-video-hero__play[hidden] {
	display: none;
}

.home-video-hero__play:hover,
.home-video-hero__play:focus-visible {
	background: var(--theme-palette-color-1, #0c6641);
	color: #fff;
	transform: scale(1.06);
}

.home-video-hero__play:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.9);
	outline-offset: 3px;
}

.home-video-hero__play svg {
	width: 26px;
	height: 26px;
}

.home-video-hero__play.is-hiding {
	opacity: 0;
	transform: scale(0.8);
	pointer-events: none;
}

@media (max-width: 767px) {
	.home-video-hero__play {
		width: 52px;
		height: 52px;
	}

	.home-video-hero__play svg {
		width: 22px;
		height: 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.home-video-hero:not(.is-user-play) .home-video-hero__video {
		display: none;
	}
}
