/**
 * Customer Success Testimonial Slider — WPBakery element.
 * Mirrors the hero slider's crossfade panel + numbered pagination + autoplay
 * progress bar, restyled for a testimonial card on a gradient background.
 * Colours come from the central palette in style.css (:root --field-first-*).
 */

.cs-tslider {
	--cs-tslider-pink: var(--field-first-pink, #ce75fa);
	--cs-tslider-lavender: var(--field-first-lavender, #ae80e4);
	--cs-tslider-ease: cubic-bezier(.22, 1, .36, 1);
	position: relative;
	width: 100%;
	color: #fff;
}

/* ---------- Stage ---------- */
.cs-tslider__media {
	position: relative;
	width: 100%;
	display: flex;
	overflow: hidden;
}

/* Full-bleed gradient backdrop. Tweak freely. */
.cs-tslider__scrim {
	position: absolute;
	inset: 0;
	z-index: 0;
	margin-left: -50vw;
	left: 50%;
	width: 100vw;
	pointer-events: none;
	user-select: none;
}

.cs-tslider__inner {
	position: relative;
	z-index: 2;
	width: 100%;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
}

.cs-tslider__title {
	margin: 0 0 45px;
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: -0.03em;
	font-size: 44px;
	color: #fff;
}

/* ---------- Row: card + side nav ---------- */
.cs-tslider__row {
	display: flex;
	flex-wrap: nowrap;
	gap: 60px;
	align-items: stretch;
}

/* ---------- Testimonial card (crossfading panel) ---------- */
.cs-tslider__panel {
	position: relative;
	flex: 2.5;
	min-height: 320px;
	border-radius: 20px;
	padding: 50px;
	background: var(--blurred-bg-color, rgba(255, 255, 255, .06));
	border: 1px solid rgba(255, 255, 255, .14);
	-webkit-backdrop-filter: blur(16px) saturate(120%);
	backdrop-filter: blur(16px) saturate(120%);
	box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .5);
}

.cs-tslider__slide {
	position: absolute;
	inset: clamp(40px, 4vw, 60px);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 26px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px);
	transition: opacity .6s var(--cs-tslider-ease), transform .6s var(--cs-tslider-ease);
	pointer-events: none;
}

.cs-tslider__slide.is-active {
	position: relative;
	inset: auto;
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
}

/* Staggered reveal of the active card's children. */
.cs-tslider__slide.is-active > * {
	animation: cs-tslider-rise .7s var(--cs-tslider-ease) both;
}
.cs-tslider__slide.is-active > *:nth-child(1) { animation-delay: .05s; }
.cs-tslider__slide.is-active > *:nth-child(2) { animation-delay: .12s; }
.cs-tslider__slide.is-active > *:nth-child(3) { animation-delay: .19s; }

@keyframes cs-tslider-rise {
	from { opacity: 0; transform: translateY(16px); }
	to   { opacity: 1; transform: none; }
}

.cs-tslider__logo {
	max-height: 46px;
	max-width: 150px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

.cs-tslider__quote {
	margin: 0;
	font-size: 27px;
	line-height: 1.4;
	font-weight: 300;
	letter-spacing: -0.02em;
	color: #fff;
	max-width: 43ch;
	padding: 0;
}

/* Suppress the theme's decorative quote mark on this blockquote. */
.cs-tslider__quote:before,
.cs-tslider__quote:after {
	content: none;
	display: none;
}

/* ---------- Person row ---------- */
.cs-tslider__person {
	display: flex;
	align-items: center;
	gap: 15px;
	width: 100%;
	margin-top: auto;
}

.cs-tslider__avatar {
	flex: 0 0 auto;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background-size: cover;
	background-position: center;
	background: #fff;
}

.cs-tslider__person-meta {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.cs-tslider__name {
	font-size: 17px;
	line-height: 1;
	font-weight: 500;
	color: #fff;
}

.cs-tslider__role {
	font-size: 15px;
	line-height: 1;
	font-weight: 300;
	color: var(--cs-tslider-lavender);
}

/* Circular arrow link to the case study. */
.cs-tslider__go {
	flex: 0 0 auto;
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--cs-tslider-lavender);
	color: #fff;
	text-decoration: none;
	transition: transform .35s var(--cs-tslider-ease), background .35s var(--cs-tslider-ease);
}

.cs-tslider__go:hover {
	transform: translateY(-3px);
	color: #fff;
}

.cs-tslider__go-arrow {
	display: inline-flex;
	line-height: 1;
}

.cs-tslider__go-arrow svg {
	width: 14px;
	height: 14px;
	display: block;
}

/* ---------- Side: numbered nav + button ---------- */
.cs-tslider__side {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 30px;
}

.cs-tslider__nav {
	display: flex;
	flex-direction: column;
}

.cs-tslider__dot {
	position: relative;
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: center;
	gap: 0 22px;
	width: 100%;
	background: none;
	border: 0;
	color: rgba(255, 255, 255, .6);
	text-align: left;
	cursor: pointer;
	font: inherit;
	padding: 22px 0;
	transition: color .35s var(--cs-tslider-ease);
}

.cs-tslider__dot:hover,
.cs-tslider__dot.is-active { color: #fff; }

.cs-tslider__dot-num {
	font-size: 30px;
	font-weight: 300;
	line-height: 1;
	color: var(--cs-tslider-lavender);
	opacity: .8;
	transition: opacity .35s var(--cs-tslider-ease);
}
.cs-tslider__dot.is-active .cs-tslider__dot-num { opacity: 1; }

.cs-tslider__dot-copy {
	grid-column: 2;
	min-width: 0;
}

.cs-tslider__dot-heading {
	font-size: 16px;
	font-weight: 400;
	letter-spacing: -0.01em;
}

/* Autoplay progress bar doubles as the row separator. */
.cs-tslider__dot-track {
	grid-column: 1 / -1;
	display: block;
	height: 1.5px;
	margin-top: 22px;
	margin-bottom: -22px; /* Sit the line on the row's bottom edge. */
	border-radius: 2px;
	background: rgba(255, 255, 255, .18);
	overflow: hidden;
}

.cs-tslider__dot:last-child .cs-tslider__dot-track {}

.cs-tslider__dot-fill {
	display: block;
	height: 100%;
	width: 100%;
	transform: scaleX(0);
	transform-origin: left center;
	background: linear-gradient(90deg, var(--cs-tslider-lavender), var(--cs-tslider-pink));
}

.cs-tslider__dot.is-active .cs-tslider__dot-fill.is-running {
	animation: cs-tslider-progress linear forwards;
	animation-duration: var(--cs-tslider-duration, 6s);
}

@keyframes cs-tslider-progress {
	from { transform: scaleX(0); }
	to   { transform: scaleX(1); }
}

/* ---------- Button ---------- */
.cs-tslider__cta {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 20px 30px;
	border-radius: 7.5px;
	font-size: 14px;
	line-height: 1;
	font-weight: 500;
	letter-spacing: 1px;
	width: 100%;
	color: #fff;
	text-decoration: none;
	text-transform: uppercase;
	background: var(--cs-tslider-lavender);
	transition: transform .35s var(--cs-tslider-ease), filter .35s var(--cs-tslider-ease);
}

.cs-tslider__cta:hover {
	transform: translateY(-2px);
	filter: brightness(1.08);
	color: #fff;
}

/* ---------- Responsive ---------- */
@media (max-width: 1300px) {
	.cs-tslider__quote { font-size: 25px; }
	.cs-tslider__row { gap: 40px; }
	.cs-tslider__panel {padding: 45px;}
	body .cs-hero__logo,
	body img.cs-company-logo {max-height: 70px;max-width: 130px;}
	.cs-tslider__quote {font-size: 23px;}
	.cs-tslider__panel {padding: 45px;}
	.cs-tslider__logo {max-height: 44px;max-width: 110px !important;margin-bottom: 0px !important;}
	.cs-tslider__cta {font-size: 13px;padding: 20px 25px;}
}

@media (max-width: 999px) {
	.cs-tslider__media {padding: 0;}
	.cs-tslider__row {
		flex-direction: column;
		gap: 32px;
	}
		.cs-tslider__quote {font-size: 22px;}
	.cs-tslider__row {gap: 30px;}
	.cs-tslider__panel {padding: 45px;}
	.cs-tslider__slide { inset: clamp(30px, 6vw, 45px); }
	.cs-tslider__nav {flex-direction: row;gap: 20px;}
	.cs-tslider__dot { flex: 1; padding: 0; grid-template-columns: 1fr; gap: 0; }
	.cs-tslider__dot-num,
	.cs-tslider__dot-copy { display: none; }
	.cs-tslider__dot-track {
		grid-column: 1;
		margin: 0;
		width: 100%;
	}
	.cs-tslider__dot:last-child .cs-tslider__dot-track { display: block; }
	.cs-tslider__side {gap: 24px;}
}

@media (max-width: 690px) {
	.cs-tslider__panel {padding: 32px;min-height: unset;}
	.cs-tslider__quote { font-size: 21px; }
	.cs-tslider__title { font-size: 32px; }
	.cs-tslider__cta { width: 100%; }
}

@media (max-width: 479px) {
	.cs-tslider__panel {padding: 25px;min-height: unset;}
	.cs-tslider__quote {font-size: 17px;}
	.cs-tslider__title { font-size: 32px; }
	.cs-tslider__cta {width: 100%;font-size: 12px;}
	.cs-tslider__logo {max-height: 40px;max-width: 95px !important;margin-bottom: 0px !important;}
	.cs-tslider__slide {gap:20px;}
	.cs-tslider__name {
	font-size: 15px;
	line-height: 1;
	font-weight: 500;
	color: #fff;
}

.cs-tslider__role {
	font-size: 13px;
	line-height: 1;
	font-weight: 300;
	color: var(--cs-tslider-lavender);
}
	.cs-tslider__avatar,
	.cs-tslider__go {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

	.cs-tslider__go-arrow svg {
    width: 11px;
    height: 11px;
    display: block;
}

}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
	.cs-tslider__slide,
	.cs-tslider__slide.is-active > *,
	.cs-tslider__dot-fill.is-running {
		animation: none !important;
		transition: opacity .2s linear !important;
		transform: none !important;
	}
}
