/**
 * Geshmak Hero Video — two-phase teaser + full background video.
 * Layout + stacking only; visual design of the overlay content is left to
 * atomic classes on the elements dropped inside .gshmk-hero-content.
 */

/* --------------------------------------------------------------------------
   Wrapper — positioning context for the absolute video stage.
   min-height is set inline from the widget's "Minimum height (vh)" control.
   -------------------------------------------------------------------------- */
.gshmk-hero-video-wrap {
	position: relative;
	display: flex;
	overflow: hidden;
	/* Contain the internal z-index layers (video/scrim/content) so they can't
	   paint over — and intercept clicks on — sibling elements that overlap this
	   hero (e.g. a separate overlay container). Without this, .gshmk-hero-content
	   (z-index:2) leaks into the ancestor stacking context. */
	isolation: isolate;
}

/* --------------------------------------------------------------------------
   Video stage — sits behind the overlay content.
   -------------------------------------------------------------------------- */
.gshmk-hero-video-wrap .gshmk-video-stage {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.gshmk-hero-video-wrap .gshmk-hero-video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: opacity 0.6s ease;
}

/* Full video starts invisible; fades in once it can play through. */
.gshmk-hero-video-wrap .gshmk-hero-video--full {
	opacity: 0;
}

.gshmk-hero-video-wrap .gshmk-hero-video--full.is-ready {
	opacity: 1;
}

/* --------------------------------------------------------------------------
   Scrim — darkening gradient for text contrast over moving footage.
   -------------------------------------------------------------------------- */
.gshmk-hero-video-wrap .gshmk-video-scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.gshmk-hero-video-wrap .gshmk-video-scrim.is-light {
	background: linear-gradient(
		to bottom,
		rgba( 0, 0, 0, 0.05 ) 0%,
		rgba( 0, 0, 0, 0.20 ) 60%,
		rgba( 0, 0, 0, 0.35 ) 100%
	);
}

.gshmk-hero-video-wrap .gshmk-video-scrim.is-medium {
	background: linear-gradient(
		to bottom,
		rgba( 0, 0, 0, 0.15 ) 0%,
		rgba( 0, 0, 0, 0.45 ) 60%,
		rgba( 0, 0, 0, 0.65 ) 100%
	);
}

.gshmk-hero-video-wrap .gshmk-video-scrim.is-strong {
	background: linear-gradient(
		to bottom,
		rgba( 0, 0, 0, 0.35 ) 0%,
		rgba( 0, 0, 0, 0.60 ) 60%,
		rgba( 0, 0, 0, 0.80 ) 100%
	);
}

/* --------------------------------------------------------------------------
   Overlay content — the Elementor drop-zone, stacked above the video + scrim.
   -------------------------------------------------------------------------- */
.gshmk-hero-video-wrap .gshmk-hero-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
}

/* --------------------------------------------------------------------------
   Reduced motion — hide the moving video entirely. The wrapper's poster
   background (set inline when a Poster Image URL is provided) remains visible,
   so the hero still looks intentional. Set a background colour on the section
   too for a guaranteed fallback when no poster is supplied.
   -------------------------------------------------------------------------- */
@media ( prefers-reduced-motion: reduce ) {
	.gshmk-hero-video-wrap .gshmk-video-stage .gshmk-hero-video {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Editor hint shown when no video URLs are set yet (editor canvas only).
   -------------------------------------------------------------------------- */
.gshmk-hero-video-empty {
	position: absolute;
	inset: 0;
	z-index: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	color: #999;
	font-size: 13px;
	text-align: center;
	background: #f0f0f0;
	border: 2px dashed #ccc;
}
