/* =============================================================================
   Client Says V2 — testimonial section
   Markup:  template-parts/client-says-v2.php
   Script:  assets/js/client-says-v2.js

   Namespaced to .ldv-tst throughout. Swiper 11 classes are only ever styled as
   descendants of it, so the theme's five other carousels are untouched.

   Light, two-column layout: badge + heading + intro + arrows on the left, one
   large card on the right (Swiper, one slide visible at a time, looped).

   Contents
     1. Tokens + section shell
     2. Layout      — lead column, stage, swiper container
     3. Components  — card, quote, footer, arrows
     4. State       — entrance stagger
     5. Media queries  (one block per breakpoint, widest first)
   ========================================================================== */


/* -----------------------------------------------------------------------------
   1. Tokens + section shell
   -------------------------------------------------------------------------- */

.ldv-tst {
	--ldv-tst-ink: #333333;
	--ldv-tst-muted: #767b82;
	--ldv-tst-ease: cubic-bezier(0.25, 0.8, 0.25, 1);
	--ldv-tst-dur: 0.4s;
	--ldv-tst-dur-in: 0.6s;

	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: 110px 0 120px;
	background: #f9f9f9;
	color: var(--ldv-tst-ink);
}

/* soft photographic texture behind everything, matching the Figma source */
.ldv-tst::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-image: url("../images/testimonials-bg-texture.jpg");
	background-size: cover;
	background-position: center;
	opacity: 0.51;
}

.ldv-tst .max-con {
	position: relative;
	z-index: 1;
}

/* large outline-only "TESTIMONIALS" watermark, bottom-left of the section */
.ldv-tst__watermark {
	position: absolute;
	left: -74px;
	bottom: -70px;
	z-index: 0;
	margin: 0;
	color: transparent;
	-webkit-text-stroke: 1.5px rgba(51, 51, 51, 0.5);
	font-family: "Guminert", serif;
	font-weight: 700;
	font-size: clamp(90px, 18vw, 288px);
	line-height: 1;
	white-space: nowrap;
	text-transform: uppercase;
	opacity: 0.2;
	pointer-events: none;
	user-select: none;
}


/* -----------------------------------------------------------------------------
   2. Layout
   -------------------------------------------------------------------------- */

.ldv-tst__stage {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 60px;
}

/* 2.1 Lead — badge, heading, intro, arrows */

.ldv-tst__lead {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1 1 380px;
	max-width: 574px;
	min-width: 280px;
}

.ldv-tst__head {
	margin-bottom: 28px;
	text-align: left;
}

.ldv-tst__badge {
	display: inline-flex;
	align-items: center;
	height: 40px;
	margin-bottom: 10px;
	padding: 0 24px;
	border-radius: 100px;
	background: rgba(208, 31, 48, 0.1);
	color: #d01f30;
	font-family: "Guminert", serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
}

.ldv-tst__title {
	margin: 0 0 20px;
	color: #333;
	font-size: 46px;
	font-weight: 500;
	line-height: 1.2;
}

.ldv-tst__title span {
	position: relative;
	z-index: 1;
	font-family: "Scotch Text Comp Sm It", serif;
	font-size: 58px;
}

.ldv-tst__title span::before {
	content: "";
	position: absolute;
	bottom: 8px;
	z-index: -1;
	width: 100%;
	border-bottom: 6px solid #e3725d;
}

.ldv-tst__intro,
.ldv-tst__intro p {
	margin: 0;
	color: #333;
	font-size: 20px;
	font-weight: 500;
	line-height: 28px;
}

.ldv-tst__intro p + p {
	margin-top: 12px;
}

.ldv-tst__nav-group {
	display: flex;
	align-items: center;
	gap: 10px;
}

/* 2.2 Card carousel — one slide visible, capped to the Figma card width */

.ldv-tst__swiper {
	flex: 1 1 500px;
	min-width: 0;
	max-width: 925px;
}

.ldv-tst .swiper-wrapper {
	transition-timing-function: var(--ldv-tst-ease);
}

.ldv-tst__slide {
	display: flex;
	height: 100%;
}


/* -----------------------------------------------------------------------------
   3. Components
   -------------------------------------------------------------------------- */

/* 3.1 Card */

.ldv-tst__card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 100%;
	padding: 40px 30px;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 0 25px rgba(0, 0, 0, 0.1);
}

/* 3.2 Card top — quote mark and platform logo / rating */

.ldv-tst__card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.ldv-tst__mark {
	display: block;
	flex: 0 0 auto;
	width: 92px;
	color: #d01f30;
}

.ldv-tst__mark svg {
	display: block;
	width: 100%;
	height: auto;
}

.ldv-tst__brandmark {
	flex: 0 1 auto;
	transition:
		opacity var(--ldv-tst-dur) var(--ldv-tst-ease),
		transform var(--ldv-tst-dur) var(--ldv-tst-ease);
}

.ldv-tst__logo {
	display: block;
	width: auto;
	height: auto;
	max-width: 88px;
	max-height: 88px;
	object-fit: contain;
}

.ldv-tst__brand {
	display: block;
	text-align: right;
	line-height: 1;
}

.ldv-tst__brand strong {
	display: block;
	color: #333;
	font-size: 22px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.ldv-tst__brand em {
	display: block;
	margin-top: 6px;
	color: #666;
	font-size: 12px;
	font-style: normal;
	font-weight: 500;
	letter-spacing: 0.3em;
	text-transform: uppercase;
}

/* editor-supplied review-platform logo + rating, top-right of the card */

.ldv-tst__source {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	text-align: right;
}

.ldv-tst__platform {
	display: block;
	width: auto;
	height: auto;
	max-width: 150px;
	max-height: 22px;
	object-fit: contain;
}

.ldv-tst__score {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ldv-tst__rating {
	color: #333;
	font-size: 16px;
	font-weight: 600;
}

.ldv-tst__stars {
	display: inline-flex;
	align-items: center;
	gap: 2px;
}

.ldv-tst__star {
	display: block;
	width: 15px;
	height: 15px;
}

.ldv-tst__reviews {
	color: var(--ldv-tst-muted);
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* 3.3 Quote */

.ldv-tst__quote {
	/* Absorbs the difference once cards are equalized to the tallest one, so
	   the top (mark/rating) and bottom (person/logo) rows land in the same
	   spot on every card regardless of how long its quote is. */
	flex: 1 1 auto;
	margin: 0;
	padding: 0;
	border: 0;
	color: #666;
	font-size: 24px;
	font-style: italic;
	font-weight: 400;
	line-height: 42px;
}

.ldv-tst__quote span {
	color: #d01f30;
	font-style: italic;
	font-weight: 700;
}

/* 3.4 Footer — person, then the company logo/wordmark */

.ldv-tst__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.ldv-tst__person {
	display: flex;
	align-items: center;
	gap: 18px;
	min-width: 0;
}

.ldv-tst__avatar {
	flex: 0 0 auto;
	width: 70px;
	height: 70px;
	border-radius: 50%;
	object-fit: cover;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, 0.6),
		0 10px 24px -12px rgba(0, 0, 0, 0.3);
}

.ldv-tst__identity {
	min-width: 0;
}

.ldv-tst__name {
	margin: 0;
	color: #333;
	font-size: 22px;
	font-weight: 700;
	line-height: 26.4px;
}

.ldv-tst__role {
	margin: 0;
	padding-top: 4px;
	color: #333;
	font-size: 15px;
	font-weight: 400;
	line-height: 21px;
}

/* 3.5 Arrows */

.ldv-tst__nav {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition:
		transform var(--ldv-tst-dur) var(--ldv-tst-ease),
		background-color var(--ldv-tst-dur) var(--ldv-tst-ease);
}

.ldv-tst__nav--prev {
	background: #333333;
	color: #fff;
}

.ldv-tst__nav--next {
	background: #d01f30;
	color: #fff;
}

.ldv-tst__nav svg {
	width: 22px;
	height: 22px;
}

.ldv-tst__nav:hover {
	transform: scale(1.06);
}

.ldv-tst__nav--prev:hover {
	background: #111111;
}

.ldv-tst__nav--next:hover {
	background: #b81a2a;
}

.ldv-tst__nav:focus-visible {
	outline: 2px solid #d01f30;
	outline-offset: 2px;
}

/* only reachable if loop is ever switched off in the init */
.ldv-tst__nav.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
}


/* -----------------------------------------------------------------------------
   4. State — entrance stagger, released once Swiper marks the slide visible
   -------------------------------------------------------------------------- */

.ldv-tst__mark,
.ldv-tst__brandmark,
.ldv-tst__quote,
.ldv-tst__person,
.ldv-tst__source {
	opacity: 0;
	transform: translateY(14px);
}

/* .ldv-tst__brandmark is absent here on purpose: it carries its own shorter
   transition from 3.2, which doubles as its entrance. */
.ldv-tst__mark,
.ldv-tst__quote,
.ldv-tst__person,
.ldv-tst__source {
	transition:
		opacity var(--ldv-tst-dur-in) var(--ldv-tst-ease),
		transform var(--ldv-tst-dur-in) var(--ldv-tst-ease);
}

.swiper-slide-visible .ldv-tst__mark,
.swiper-slide-visible .ldv-tst__quote,
.swiper-slide-visible .ldv-tst__person,
.swiper-slide-visible .ldv-tst__source {
	opacity: 1;
	transform: translateY(0);
}

.swiper-slide-visible .ldv-tst__mark { transition-delay: 0.06s; }
.swiper-slide-visible .ldv-tst__brandmark {
	opacity: 1;
	transform: translateY(0);
	transition-delay: 0.12s;
}
.swiper-slide-visible .ldv-tst__quote { transition-delay: 0.18s; }
.swiper-slide-visible .ldv-tst__person { transition-delay: 0.24s; }
.swiper-slide-visible .ldv-tst__source { transition-delay: 0.3s; }

/* A failed Swiper boot should show the cards rather than a blank band. */
.swiper:not(.swiper-initialized) .ldv-tst__mark,
.swiper:not(.swiper-initialized) .ldv-tst__brandmark,
.swiper:not(.swiper-initialized) .ldv-tst__quote,
.swiper:not(.swiper-initialized) .ldv-tst__person,
.swiper:not(.swiper-initialized) .ldv-tst__source {
	opacity: 1;
	transform: none;
}


/* -----------------------------------------------------------------------------
   5. Media queries — one block per breakpoint, widest first. Ladder reused
      from the theme's own heading scale steps (1600/1440/1200/991/767/575).
   -------------------------------------------------------------------------- */

@media (max-width: 1600px) {
	.ldv-tst__title {
		font-size: 42px;
		line-height: 55px;
	}

	.ldv-tst__title span {
		font-size: 48px;
	}

	.ldv-tst__intro,
	.ldv-tst__intro p {
		font-size: 18px;
		line-height: 30px;
	}
}

@media (max-width: 1399px) {
	.ldv-tst__stage {
		gap: 40px;
	}

	.ldv-tst__card {
		padding: 32px;
	}
}

@media (max-width: 1440px) {
	.ldv-tst__title {
		font-size: 40px;
		line-height: 50px;
	}

	.ldv-tst__title span {
		font-size: 45px;
	}
}

@media (max-width: 1200px) {
	.ldv-tst__title {
		font-size: 35px;
		line-height: 1.2;
	}

	.ldv-tst__title span {
		font-size: 40px;
	}

	.ldv-tst__intro,
	.ldv-tst__intro p {
		font-size: 16px;
		line-height: 1.5;
	}
}

/* tablet — stack the lead column above the card */
@media (max-width: 991px) {
	.ldv-tst__title {
		font-size: 30px;
	}

	.ldv-tst__title span {
		font-size: 35px;
	}

	.ldv-tst__title span::before {
		display: none;
	}

	.ldv-tst__stage {
		flex-direction: column;
		align-items: flex-start;
		gap: 32px;
	}

	.ldv-tst__lead {
		width: 100%;
		max-width: 100%;
	}

	/* .ldv-tst__stage is now a column, so this item's main axis is vertical —
	   the desktop's fixed flex-basis (500px) would apply as a HEIGHT cap here,
	   and combined with Swiper's own overflow:hidden, silently clip any card
	   taller than 500px instead of growing to fit it. Reset to a content-sized
	   basis so it takes whatever height the active slide actually needs. */
	.ldv-tst__swiper {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
	}

	.ldv-tst__card {
		padding: 28px;
	}

	.ldv-tst__card-top {
		flex-wrap: wrap;
		gap: 16px;
	}

	.ldv-tst__mark {
		width: 60px;
	}

	.ldv-tst__quote {
		font-size: 17px;
		line-height: 1.7;
	}

	.ldv-tst__avatar {
		width: 64px;
		height: 64px;
	}

	.ldv-tst__name {
		font-size: 20px;
	}

	.ldv-tst__nav {
		width: 48px;
		height: 48px;
	}

	.ldv-tst__nav svg {
		width: 20px;
		height: 20px;
	}
}

@media (max-width: 767px) {
	.ldv-tst__title {
		font-size: 28px;
	}

	.ldv-tst__title span {
		font-size: 32px;
	}

	.ldv-tst__intro,
	.ldv-tst__intro p {
		font-size: 14px;
	}

	.ldv-tst__watermark {
		font-size: clamp(60px, 22vw, 140px);
	}
}

@media (max-width: 575px) {
	.ldv-tst {
		padding: 70px 0 80px;
	}

	.ldv-tst__watermark {
		display: none;
	}

	.ldv-tst__card {
		padding: 24px 22px;
		border-radius: 20px;
	}

	.ldv-tst__logo {
		max-width: 70px;
		max-height: 70px;
	}

	.ldv-tst__quote {
		font-size: 16px;
		line-height: 1.7;
	}

	.ldv-tst__foot {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
	}

	.ldv-tst__avatar {
		width: 56px;
		height: 56px;
	}

	.ldv-tst__name {
		font-size: 20px;
	}

	.ldv-tst__role {
		font-size: 15px;
	}
}

/* The !important here is load-bearing: it has to beat every transition and
   animation declared above. */
@media (prefers-reduced-motion: reduce) {
	.ldv-tst *,
	.ldv-tst *::before,
	.ldv-tst *::after {
		transition-duration: 0.01ms !important;
		transition-delay: 0ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}

	.ldv-tst__mark,
	.ldv-tst__brandmark,
	.ldv-tst__quote,
	.ldv-tst__person,
	.ldv-tst__source {
		opacity: 1;
		transform: none;
	}
}
