/* ============================================================================
   Testimonial slider — front end.
   A flow block, same as a group: no section background and no full-bleed
   breakout, so it can sit inside another section. The card keeps its own
   surface. The editor preview reuses these classes.
   ========================================================================== */

.q-testimonial-slider {
	--q-testimonial-green: var(--wp--preset--color--btn-color-primary, #01ff40);
	--q-testimonial-cyan: var(--wp--preset--color--cyan, #92e2ff);
	--q-testimonial-card: #2626268c;
	--q-testimonial-muted: #a3adab;
	--q-testimonial-tab: #768180;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0;
	background: none;
	color: #fff;
}

/* Saved content may still carry alignfull. Do not break out of the parent. */
.wp-block-qfse-testimonial-slider.alignfull,
.q-testimonial-slider.alignfull {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
	padding-left: 0;
	padding-right: 0;
}

.q-testimonial-slider *,
.q-testimonial-slider *::before,
.q-testimonial-slider *::after {
	box-sizing: border-box;
}

.q-testimonial-slider__card {
	width: min(1280px, 100%);
	margin: 0 auto;
	padding: clamp(16px, 2.2vw, 28px);
	background: var(--q-testimonial-card);
	border: 1px solid rgba(146, 226, 255, 0.08);
	border-radius: 20px;
}

.q-testimonial-slider__slide {
	display: grid;
	grid-template-columns: 360px minmax(0, 1fr);
	gap: clamp(24px, 4vw, 48px);
	align-items: center;
}

.q-testimonial-slider__slide[hidden] {
	display: none !important;
}

.q-testimonial-slider__portrait {
	position: relative;
	width: 360px;
	height: 450px;
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.04);
}

.q-testimonial-slider__portrait img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.q-testimonial-slider__portrait-empty,
.q-testimonial-slider__logo-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 48px;
	color: rgba(255, 255, 255, 0.45);
	font-size: 14px;
}

.q-testimonial-slider__body {
	min-width: 0;
	padding: clamp(8px, 1.5vw, 20px) clamp(4px, 1vw, 12px) clamp(8px, 1.5vw, 20px) 0;
}

/* Every logo gets the same box (168×68, the widest and the tallest of the
   prototype logos) and is fitted into it, so a new logo needs no CSS. */
.q-testimonial-slider__logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 168px;
	max-height: 68px;
	object-fit: contain;
	object-position: left center;
}

/* Sizes from the prototype so the three logos look the same size: a wide
   wordmark is lower, the stacked HARVN mark is taller. */
.q-testimonial-slider__logo[alt="Spartan"] {
	height: 30px;
	max-height: none;
}

.q-testimonial-slider__logo[alt="HARVN"] {
	height: 68px;
	max-height: none;
}

/* Horizontal Manpower artwork (167×48) has about 9px of empty space above
   and below the mark. */
.q-testimonial-slider__logo[alt="Manpower"] {
	height: 48px;
	max-height: none;
	margin: -9px 0;
}

.q-testimonial-slider .q-testimonial-slider__marks {
	display: block;
	margin: 36px 0 0;
	color: #01ff40;
	font-family: Rubik, var(--font-family-rubik, sans-serif);
	font-style: normal;
	font-weight: 700;
	font-size: clamp(72px, 2.3vw + 63px, 96px);
	line-height: 0.6;
	letter-spacing: 0;
}

.q-testimonial-slider__marks svg {
	display: none;
}

.q-testimonial-slider__marks:has(svg)::before {
	content: "\201C";
}

/* :root :where(p) and .is-layout-flow p in the theme share or beat a
   single class, and they load later. Two classes plus the element win. */
.q-testimonial-slider p.q-testimonial-slider__quote {
	margin: -12px 0 0;
	margin-block-start: -12px;
	margin-block-end: 0;
	color: #fff;
	font-family: var(--types-paragraph-font-family, inherit);
	font-size: var(--types-h5-font-size, 32px);
	font-weight: var(--font-weight-medium, 500);
	line-height: var(--types-h5-line-height, 37px);
	letter-spacing: var(--types-paragraph-letter-spacing, -0.4px);
}

.q-testimonial-slider__mark {
	color: var(--q-testimonial-cyan);
}

.q-testimonial-slider__rule {
	margin: 22px 0 16px;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.q-testimonial-slider p.q-testimonial-slider__name {
	margin: 0;
	margin-block: 0;
	color: #fff;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.3;
}

.q-testimonial-slider p.q-testimonial-slider__role {
	margin: 4px 0 0;
	margin-block-start: 4px;
	margin-block-end: 0;
	color: var(--q-testimonial-muted);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
}

.q-testimonial-slider__tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px clamp(24px, 4vw, 56px);
	width: min(1280px, 100%);
	margin: 28px auto 0;
	padding: 0;
}

.q-testimonial-slider__tab {
	appearance: none;
	margin: 0;
	padding: 8px 4px;
	border: 0;
	background: none;
	color: var(--q-testimonial-tab);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.14em;
	line-height: 1.2;
	text-transform: uppercase;
	cursor: pointer;
}

.q-testimonial-slider__tab:hover {
	color: #a8b0ae;
}

.q-testimonial-slider__tab[aria-selected='true'],
.q-testimonial-slider__tab[aria-selected='true']:hover {
	color: #fff;
}

.q-testimonial-slider__tab:focus-visible {
	outline: 2px solid var(--q-testimonial-green);
	outline-offset: 4px;
}

@media (max-width: 768px) {
	.q-testimonial-slider__slide {
		grid-template-columns: 1fr;
	}

	.q-testimonial-slider__portrait {
		width: min(260px, 70%);
		height: auto;
		aspect-ratio: 360 / 450;
		margin-left: 0;
		margin-right: auto;
		justify-self: start;
	}

	.q-testimonial-slider__logo {
		max-height: 40px;
	}

	.q-testimonial-slider__logo[alt="Spartan"],
	.q-testimonial-slider__logo[alt="HARVN"],
	.q-testimonial-slider__logo[alt="Manpower"] {
		max-height: none;
	}

	.q-testimonial-slider__body {
		padding-right: 0;
	}
}

/* Phones: keep the three brand tabs on one row (they wrapped at 375px). */
@media (max-width: 480px) {
	.q-testimonial-slider__tabs {
		gap: 12px 20px;
	}

	.q-testimonial-slider__tab {
		font-size: 13px;
		letter-spacing: 0.1em;
	}
}

/* Desktop card, from the HTML prototype the designer signed off (review
   2026-11-19): more room inside the card, a fixed space between the logo
   and the green quote mark, and a heading → card gap of 40px instead of the
   section's 80px, so the pinned block keeps clear space above and below. */
@media (min-width: 769px) {
	/* The section's block gap (heading → slider) is copied into --q-tsc-gap.
	   Two classes on the section so this beats the plain gap rule further
	   down, whatever the order. */
	.q-testimonial-scroll.q-testimonial-scroll--section > .q-testimonial-slider__pin > * + * {
		margin-block-start: min(var(--q-tsc-gap, 0px), 40px);
	}

	.q-testimonial-slider__card {
		padding: clamp(28px, 3.4vw, 48px);
		border-radius: 24px;
	}

	.q-testimonial-slider__slide {
		gap: clamp(40px, 4.5vw, 64px);
	}

	.q-testimonial-slider__body {
		padding: 0;
	}

	/* The mark is a fixed block: its top padding is the space under the
	   logo, its height decides where the quote starts. */
	.q-testimonial-slider .q-testimonial-slider__marks {
		height: 68px;
		margin: 0;
		padding-top: 28px;
		font-size: 96px;
		line-height: 57.6px;
	}

	.q-testimonial-slider p.q-testimonial-slider__quote {
		margin: 0;
		margin-block-start: 0;
	}

	.q-testimonial-slider__rule {
		margin: 36px 0 24px;
	}

	/* 32px + the tab's own 8px top padding = 40px under the card. */
	.q-testimonial-slider__tabs {
		margin-top: 32px;
	}
}

/* Short screens from tablet landscape up: 16:10 laptops and monitors
   (1280×800, 1440×900, 1680×1050 minus browser chrome) and tablets on their
   side (1024×768). While pinned, the heading, card and names have to fit the
   viewport, so the portrait follows the viewport height (4:5 artwork ratio
   kept, 280×350 at most as in the prototype) and spacing and type tighten.
   Taller screens keep the full 360×450 layout. */
@media (min-width: 769px) and (max-height: 959px) {
	.q-testimonial-slider {
		--q-ts-portrait-h: clamp(240px, calc(100vh - 390px), 350px);
	}

	.q-testimonial-scroll.q-testimonial-scroll--section > .q-testimonial-slider__pin > * + * {
		margin-block-start: min(var(--q-tsc-gap, 0px), 28px);
	}

	.q-testimonial-slider__card {
		padding: clamp(24px, 3.4vw, 36px);
	}

	.q-testimonial-slider__slide {
		grid-template-columns: calc(var(--q-ts-portrait-h) * 0.8) minmax(0, 1fr);
		gap: clamp(32px, 4vw, 56px);
	}

	.q-testimonial-slider__portrait {
		width: calc(var(--q-ts-portrait-h) * 0.8);
		height: var(--q-ts-portrait-h);
	}

	.q-testimonial-slider .q-testimonial-slider__marks {
		height: 56px;
		padding-top: 20px;
		font-size: 80px;
	}

	.q-testimonial-slider p.q-testimonial-slider__quote {
		font-size: 24px;
		line-height: 31px;
	}

	.q-testimonial-slider__rule {
		margin: 28px 0 20px;
	}

	.q-testimonial-slider__tabs {
		margin-top: 20px;
	}
}

/* Very short screens (1366×768 and 1280×720 minus browser chrome, 1152×620):
   tighter spacing so the pinned block still fits. Checked 2026-11-19: about
   45px free above and below at 1152×620, 75px at 1280×700. */
@media (min-width: 769px) and (max-height: 719px) {
	.q-testimonial-slider__card {
		padding: 28px;
	}

	.q-testimonial-slider__slide {
		gap: 32px;
	}

	.q-testimonial-slider .q-testimonial-slider__marks {
		height: 48px;
		padding-top: 16px;
		font-size: 72px;
		line-height: 43.2px;
	}

	.q-testimonial-slider__rule {
		margin: 20px 0 16px;
	}

	.q-testimonial-slider__tabs {
		margin-top: 16px;
	}
}

/* ============================================================================
   Scroll-driven switcher. Everything below is gated so the resting card
   matches the no-JS markup until view.js marks the block ready.
   ========================================================================== */

/* The entrance slide uses a transform, which traps sticky inside the section.
   Keep the fade, but leave this section in normal flow so the pin can hold
   the viewport from the first scroll. */
.entry-content > .wp-block-group.q-testimonial-scroll.qfse-reveal,
.entry-content > .wp-block-group.q-testimonial-scroll.qfse-reveal.is-inview {
	transform: none;
}

.q-testimonial-scroll.is-pinned {
	height: var(--q-tsc-h, auto);
	box-sizing: border-box;
}

.q-testimonial-scroll.is-pinned > .q-testimonial-slider__pin {
	position: sticky;
	top: var(--q-tsc-top, 0px);
}

/* Wrapping the section's children drops the direct-child layout rules.
   Put the page gutters and the group's own block gap back. */
.q-testimonial-scroll--section > .q-testimonial-slider__pin {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wp--style--global--content-size, 1440px);
	margin-left: auto;
	margin-right: auto;
}

.wp-block-post-content > .q-testimonial-scroll--section > .q-testimonial-slider__pin > .wp-block-group {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	padding: var(--main-content-padding-y, 0) var(--main-content-padding-x, 80px);
}

.q-testimonial-scroll--section > .q-testimonial-slider__pin > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

.q-testimonial-scroll--section > .q-testimonial-slider__pin > * + * {
	margin-block-start: var(--q-tsc-gap, 0px);
}

.q-testimonial-slider.is-ready .q-testimonial-slider__tab {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding-bottom: 0;
}

/* Grey track under the active name only. The green fill grows with scroll. */
.q-testimonial-slider.is-ready .q-testimonial-slider__bar {
	display: block;
	width: 100%;
	min-width: 56px;
	height: 2px;
	border-radius: 2px;
	background: rgba(118, 129, 128, 0.35);
	overflow: hidden;
	opacity: 0;
	transition: opacity 0.3s;
}

.q-testimonial-slider.is-ready .q-testimonial-slider__tab[aria-selected='true'] .q-testimonial-slider__bar {
	opacity: 1;
}

.q-testimonial-slider.is-ready .q-testimonial-slider__bar i {
	display: block;
	height: 100%;
	background: var(--q-testimonial-green);
	transform-origin: left center;
	transform: scaleX(var(--p, 0));
}

.q-testimonial-slider.is-ready .q-testimonial-slider__card {
	overflow: hidden;
}

.q-testimonial-slider__viewport {
	overflow: hidden;
	width: 100%;
}

.q-testimonial-slider__track {
	display: flex;
	flex-flow: row nowrap;
	align-items: stretch;
	width: 100%;
	margin: 0;
	touch-action: pan-y;
}

.q-testimonial-slider__track > .q-testimonial-slider__slide {
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	margin: 0;
}

.q-testimonial-slider.is-ready .q-testimonial-slider__track {
	transform: translate3d(calc(var(--q-tsc-i, 0) * -100%), 0, 0);
	transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.q-testimonial-slider.is-ready .q-testimonial-slider__slide {
	transition: opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

.q-testimonial-slider.is-ready .q-testimonial-slider__slide:not(.is-active) {
	opacity: 0.25;
}

.q-testimonial-slider.is-ready .q-testimonial-slider__portrait img {
	transform: scale(1.08);
	transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}

.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active .q-testimonial-slider__portrait img {
	transform: none;
}

.q-testimonial-slider.is-ready .q-testimonial-slider__logo,
.q-testimonial-slider.is-ready p.q-testimonial-slider__quote,
.q-testimonial-slider.is-ready .q-testimonial-slider__rule,
.q-testimonial-slider.is-ready p.q-testimonial-slider__name,
.q-testimonial-slider.is-ready p.q-testimonial-slider__role {
	opacity: 0;
	transform: translateY(18px);
	transition:
		opacity 0.5s ease,
		transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
}

.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active .q-testimonial-slider__logo,
.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active p.q-testimonial-slider__quote,
.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active .q-testimonial-slider__rule,
.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active p.q-testimonial-slider__name,
.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active p.q-testimonial-slider__role {
	opacity: 1;
	transform: none;
}

.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active .q-testimonial-slider__logo {
	transition-delay: 0.25s;
}

.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active p.q-testimonial-slider__quote {
	transition-delay: 0.34s;
}

.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active .q-testimonial-slider__rule,
.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active p.q-testimonial-slider__name,
.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active p.q-testimonial-slider__role {
	transition-delay: 0.43s;
}

/* The highlighted sentence arrives white with the quote, then cyan sweeps
   over it left → right, line after line (as in the HTML prototype). The
   gradient is twice the text's width: half cyan, half white; moving it from
   the right end to the left end paints the text cyan. On an inline element
   the background runs across all its lines as one strip, hence line after
   line. A slide that leaves snaps back to white for its next entrance. */
.q-testimonial-slider.is-ready .q-testimonial-slider__mark {
	color: transparent;
	-webkit-text-fill-color: transparent;
	background: linear-gradient(90deg, var(--q-testimonial-cyan) 0 50%, #fff 50% 100%) 100% 0 / 200% 100% no-repeat;
	-webkit-background-clip: text;
	background-clip: text;
}

.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active .q-testimonial-slider__mark {
	background-position: 0 0;
	transition: background-position 0.7s cubic-bezier(0.6, 0, 0.2, 1) 1.05s;
}

@media (prefers-reduced-motion: reduce) {
	.q-testimonial-slider.is-ready .q-testimonial-slider__track,
	.q-testimonial-slider.is-ready .q-testimonial-slider__slide,
	.q-testimonial-slider.is-ready .q-testimonial-slider__portrait img,
	.q-testimonial-slider.is-ready .q-testimonial-slider__logo,
	.q-testimonial-slider.is-ready p.q-testimonial-slider__quote,
	.q-testimonial-slider.is-ready .q-testimonial-slider__rule,
	.q-testimonial-slider.is-ready p.q-testimonial-slider__name,
	.q-testimonial-slider.is-ready p.q-testimonial-slider__role,
	.q-testimonial-slider.is-ready .q-testimonial-slider__mark,
	.q-testimonial-slider.is-ready .q-testimonial-slider__slide.is-active .q-testimonial-slider__mark,
	.q-testimonial-slider.is-ready .q-testimonial-slider__bar {
		transition: none;
	}
}
