/* ==========================================================================
   Hero page testimonials — text / video / text + video mixed
   Template part: templates/template-parts/hero-testimonials.php
   Script:        assets/js/hero-testimonials.js
   Everything is scoped to .lw-ht, so other sections are not affected.
   ========================================================================== */

@font-face {
	font-family: "LW Grift";
	src: url("../../new-landing-assets/fonts/Grift-ExtraBold.woff2") format("woff2"),
		url("../../new-landing-assets/fonts/Grift-ExtraBold.woff") format("woff");
	font-weight: 800;
	font-style: normal;
	font-display: swap;
}

.lw-ht {
	--ht-purple: #7b00fc;
	--ht-text: #000;
	--ht-muted: rgba(0, 0, 0, 0.7);
	--ht-line: #ebebeb;
	--ht-bg: #fff;
	--ht-gap: 20px;
	--ht-card-w: 300px;       /* text card width (desktop) */
	--ht-video-w: 300px;      /* video card width (desktop) */
	--ht-card-h: 480px;       /* card height when videos are mixed in (= 9:16 of 210px) */
	position: relative;
	padding: 60px 0 80px;
	overflow: hidden;
	background: var(--ht-bg);
	color: var(--ht-text);
	font-family: "Montserrat-Medium", "Montserrat", system-ui, sans-serif;
}

.lw-ht *,
.lw-ht *::before,
.lw-ht *::after {
	box-sizing: border-box;
}

/* ---------- Heading ---------- */
.lw-ht__head {
	max-width: 960px;
	margin: 0 auto 48px;
	padding: 0 16px;
	text-align: center;
}

.lw-ht__title {
	margin: 0 auto 8px;
	font-family: "LW Grift", "Montserrat-Bold", sans-serif;
	font-weight: 800;
	font-size: clamp(1.75rem, 3.75vw + 1rem, 3.75rem);
	line-height: 1.06;
	color: var(--ht-text);
}

.lw-ht__intro {
	max-width: 640px;
	margin: 16px auto 0;
	font-size: 18px;
	font-style: italic;
	line-height: 1.5;
}

/* ---------- Text card ---------- */
.lw-ht-card {
	display: flex;
	flex-direction: column;
	flex: 0 0 auto;
	width: var(--ht-card-w);
	padding: 30px;
	border: 1px solid var(--ht-line);
	border-radius: 14px;
	background: #fff;
	text-align: left;
}

.lw-ht-card__top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 20px;
}

.lw-ht-card__quote {
	display: block;
	width: 40px;
	height: auto;
}

.lw-ht-card__stars {
	color: #ffae00;
	font-size: 18px;
	letter-spacing: 2px;
}

.lw-ht-card__text {
	flex: 1 1 auto;
	min-height: 0;
	margin: 0 0 18px;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.6;
	white-space: normal;
	color: var(--ht-text);
}

.lw-ht-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	margin-top: auto;
	padding-top: 15px;
	border-top: 1px solid #e7e7e7;
}

.lw-ht-card__name {
	display: block;
	margin-bottom: 2px;
	font-family: "Montserrat-Bold", "Montserrat", sans-serif;
	font-size: 18px;
	color: var(--ht-text);
}

.lw-ht-card__role {
	display: block;
	font-size: 14px;
	line-height: 1.4;
	color: var(--ht-muted);
}

.lw-ht-card__photo {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
}

/* ---------- Video card (portrait 9:16) ---------- */
.lw-ht-video {
	position: relative;
	flex: 0 0 auto;
	/*width: var(--ht-video-w);*/
	margin: 0;
	/*aspect-ratio: 9 / 16;*/
	border-radius: 16px;
	overflow: hidden;
	background: #111;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
	transform: translateZ(0); /* keeps rounded corners on the video in Safari */
}

.lw-ht-video__media {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #111;
}

.lw-ht-video::after {
	content: "";
	position: absolute;
	inset: 45% 0 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.78));
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.lw-ht-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	width: 60px;
	height: 60px;
	margin: -30px 0 0 -30px;
	padding: 0;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--ht-purple);
	box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.25);
	cursor: pointer;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.lw-ht-video__play svg {
	width: 26px;
	height: 26px;
	margin-left: 4px;
	fill: currentColor;
}

.lw-ht-video:hover .lw-ht-video__play,
.lw-ht-video__play:focus-visible {
	transform: scale(1.08);
}

.lw-ht-video__play:focus-visible {
	outline: 3px solid var(--ht-purple);
	outline-offset: 4px;
}

.lw-ht-video__info {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: 16px 16px 18px;
	color: #fff;
	text-align: left;
	pointer-events: none;
	transition: opacity 0.3s ease;
}

.lw-ht-video__name {
	display: block;
	font-family: "Montserrat-Bold", "Montserrat", sans-serif;
	font-size: 16px;
	line-height: 1.25;
}

.lw-ht-video__role {
	display: block;
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.35;
	opacity: 0.85;
}

/* While playing: hide button, name and fade so the video controls are usable */
.lw-ht-video.is-playing .lw-ht-video__play,
.lw-ht-video.is-playing .lw-ht-video__info,
.lw-ht-video.is-playing::after {
	opacity: 0;
	pointer-events: none;
}

/* ---------- Desktop: two scrolling rows ---------- */
.lw-ht__swipe {
	display: none;
}

.lw-ht__row {
	position: relative;
	width: 100%;
	overflow: hidden;
	padding: 4px 0 20px;
}

/* White fade at both edges */
.lw-ht__row::before,
.lw-ht__row::after {
	content: "";
	position: absolute;
	top: 0;
	z-index: 3;
	width: 150px;
	height: 100%;
	pointer-events: none;
}

.lw-ht__row::before {
	left: 0;
	background: linear-gradient(to right, var(--ht-bg) 20%, rgba(255, 255, 255, 0));
}

.lw-ht__row::after {
	right: 0;
	background: linear-gradient(to left, var(--ht-bg) 20%, rgba(255, 255, 255, 0));
}

.lw-ht__track {
	display: flex;
	gap: var(--ht-gap);
	width: max-content;
}

.lw-ht__track.is-left {
	animation: lwHtLeft 60s linear infinite;
}

.lw-ht__track.is-right {
	animation: lwHtRight 60s linear infinite;
}

/* Pause on hover, and while a video in the row is playing */
.lw-ht__row:hover .lw-ht__track,
.lw-ht__track.is-paused {
	animation-play-state: paused;
}

/* Track = set + gap + same set → one set + one gap = 50% + half a gap */
@keyframes lwHtLeft {
	from { transform: translateX(0); }
	to   { transform: translateX(calc(-50% - var(--ht-gap) / 2)); }
}

@keyframes lwHtRight {
	from { transform: translateX(calc(-50% - var(--ht-gap) / 2)); }
	to   { transform: translateX(0); }
}

/* Mixed: every card as tall as the video cards; long reviews scroll inside */
.lw-ht__carousel.is-mixed .lw-ht__track {
	align-items: stretch;
}

.lw-ht__carousel.is-mixed .lw-ht__track .lw-ht-card {
	height: var(--ht-card-h);
}

.lw-ht__carousel.is-mixed .lw-ht__track .lw-ht-video {
	height: var(--ht-card-h);
	/*aspect-ratio: auto;*/
}

.lw-ht__carousel.is-mixed .lw-ht-card__text {
	overflow-y: auto;
	scrollbar-width: thin;
}

/* ---------- Videos only ---------- */
.lw-ht__videos {
	display: flex;
	justify-content: center;
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 16px 8px;
}

.lw-ht__videos .lw-ht-video {
	--ht-video-w: 270px;
	flex: 0 1 var(--ht-video-w);
	min-width: 0;
	border-radius: 20px;
}

.lw-ht__videos .lw-ht-video__play {
	width: 72px;
	height: 72px;
	margin: -36px 0 0 -36px;
}

.lw-ht__videos .lw-ht-video__name {
	font-size: 18px;
}

.lw-ht__videos .lw-ht-video__role {
	font-size: 14px;
}

/* ---------- Button ---------- */
.lw-ht__cta {
	margin-top: 48px;
	padding: 0 16px;
	text-align: center;
}

.lw-ht__btn {
	display: inline-block;
	width: 100%;
	max-width: 430px;
	padding: 18px 28px;
	border-radius: 999px;
	background: var(--ht-purple);
	color: #fff;
	font-family: "Montserrat-Bold", "Montserrat", sans-serif;
	font-size: 17px;
	text-align: center;
	text-decoration: none;
	transition: transform 0.2s ease, filter 0.2s ease;
}

.lw-ht__btn:hover,
.lw-ht__btn:focus-visible {
	color: #fff;
	filter: brightness(1.1);
	transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
	.lw-ht__track.is-left,
	.lw-ht__track.is-right {
		animation: none;
	}
	.lw-ht__row {
		overflow-x: auto;
	}
}

/* ---------- Tablet ---------- */
@media (max-width: 991px) {
	.lw-ht {
		--ht-card-w: 380px;
	}

	.lw-ht-card__text {
		font-size: 15px;
		line-height: 1.5;
	}

	.lw-ht__row::before,
	.lw-ht__row::after {
		width: 50px;
	}
}

/* ---------- Mobile: one swipe row ---------- */
@media (max-width: 768px) {
	.lw-ht {
		padding: 72px 0 56px;
	}

	.lw-ht__head {
		margin-bottom: 28px;
	}

	.lw-ht__intro {
		font-size: 15px;
	}

	.lw-ht__rows {
		display: none;
	}

	.lw-ht__swipe,
	.lw-ht__videos {
		display: flex;
		justify-content: flex-start;
		gap: 12px;
		padding: 6px 16px 24px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scroll-padding: 0 16px;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
	}

	.lw-ht__swipe::-webkit-scrollbar,
	.lw-ht__videos::-webkit-scrollbar {
		display: none;
	}

	.lw-ht__swipe .lw-ht-card {
		flex: 0 0 300px;
		width: auto;
		padding: 22px;
		scroll-snap-align: start;
	}

	.lw-ht__swipe .lw-ht-video,
	.lw-ht__videos .lw-ht-video {
		flex: 0 0 64%;
		width: auto;
		max-width: 300px;
		scroll-snap-align: start;
	}

	/* Mixed: all cards as tall as the videos */
	.lw-ht__carousel.is-mixed .lw-ht__swipe {
		align-items: stretch;
	}
	.btn.btn-primary{
	            height: 52px;
        padding: 0 26px 0 26px;
        font-size: 16px;
	}
}
