/**
 * Trihead Horizontal Scroll widget styles.
 * The section is one viewport tall and gets pinned by GSAP ScrollTrigger; the
 * inner track is translated horizontally as the page scrolls down. Editor /
 * reduced-motion stack the panels; touch devices get a native swipe.
 */

.trihead-hscroll {
	--th-panel-w: 100vw;
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100svh;
	overflow: hidden;
}

.trihead-hscroll * {
	box-sizing: border-box;
}

.trihead-hscroll__track {
	display: flex;
	height: 100%;
	will-change: transform;
}

.trihead-hscroll__panel {
	position: relative;
	flex: 0 0 var(--th-panel-w, 100vw);
	max-width: var(--th-panel-w, 100vw);
	height: 100%;
}

/* Nested Elements version: each panel is an Elementor container (.e-con)
   placed directly inside the track. Size it the same as a panel. */
.trihead-hscroll__track > .e-con {
	flex: 0 0 var(--th-panel-w, 100vw);
	max-width: var(--th-panel-w, 100vw);
	height: 100%;
}

.trihead-hscroll__bg {
	position: absolute;
	inset: 0;
	display: flex;
	padding: 8vh 6vw;
	background-size: cover;
	background-position: center;
}

/* Content position presets. */
.trihead-hscroll__bg.is-pos-center {
	align-items: center;
	justify-content: center;
	text-align: center;
}
.trihead-hscroll__bg.is-pos-bottom-left {
	align-items: flex-end;
	justify-content: flex-start;
	text-align: left;
}
.trihead-hscroll__bg.is-pos-bottom-center {
	align-items: flex-end;
	justify-content: center;
	text-align: center;
}
.trihead-hscroll__bg.is-pos-top-left {
	align-items: flex-start;
	justify-content: flex-start;
	text-align: left;
}

.trihead-hscroll__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.45);
	pointer-events: none;
}

.trihead-hscroll__content {
	position: relative;
	z-index: 2;
	max-width: 640px;
}

.trihead-hscroll__heading {
	margin: 0 0 0.4em;
	color: #ffffff;
	font-size: clamp(1.6rem, 4vw, 4rem);
	font-weight: 600;
	line-height: 1.1;
}

.trihead-hscroll__text {
	color: rgba(255, 255, 255, 0.85);
	font-size: 1.05rem;
	line-height: 1.6;
}

.trihead-hscroll__text p {
	margin: 0 0 0.8em;
}

.trihead-hscroll__button {
	display: inline-block;
	margin-top: 1.2em;
	padding: 14px 26px;
	background-color: #d4561e;
	color: #ffffff;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 2px;
}

/* ---------------------------------------------------------------------
 * Stacked fallback — editor and reduced-motion.
 * ------------------------------------------------------------------- */
.trihead-hscroll--editor,
.trihead-hscroll--static {
	height: auto;
	overflow: visible;
}

.trihead-hscroll--editor .trihead-hscroll__track,
.trihead-hscroll--static .trihead-hscroll__track {
	flex-direction: column;
	height: auto;
}

.trihead-hscroll--editor .trihead-hscroll__panel,
.trihead-hscroll--static .trihead-hscroll__panel,
.trihead-hscroll--editor .trihead-hscroll__track > .e-con,
.trihead-hscroll--static .trihead-hscroll__track > .e-con {
	flex: 0 0 auto;
	width: 100%;
	max-width: 100%;
	height: auto;
	min-height: 60vh;
}

.trihead-hscroll--editor .trihead-hscroll__panel,
.trihead-hscroll--editor .trihead-hscroll__track > .e-con {
	border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

/* ---------------------------------------------------------------------
 * Touch fallback — native horizontal swipe with snap.
 * ------------------------------------------------------------------- */
.trihead-hscroll--swipe {
	height: auto;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.trihead-hscroll--swipe .trihead-hscroll__track {
	height: 80vh;
	width: max-content;
}

.trihead-hscroll--swipe .trihead-hscroll__panel,
.trihead-hscroll--swipe .trihead-hscroll__track > .e-con {
	scroll-snap-align: start;
	height: 100%;
}
