/*
 * Pippin Testimonials. One featured quote (Section- Tint panel) and the next two as cards; every testimonial is a
 * slide, stacked in one grid cell so the height never jumps. Colours and type follow the Kit globals.
 */
.pt-testimonials {
	--pt-t-text: var(--e-global-color-text, #22294e);
	--pt-t-muted: var(--e-global-color-e4427e8, #757575);
	--pt-t-border: var(--e-global-color-b0de001, #d9d9d9);
	--pt-t-accent: var(--e-global-color-accent, #d83040);
	color: var(--pt-t-text);
}

.pt-testimonials__slides {
	display: grid;
	overflow-x: clip;
}
.pt-testimonials__slide {
	grid-area: 1 / 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: var(--pt-columns, 32px);
	align-items: stretch;
	opacity: 0;
	visibility: hidden;
	transform: translateX(var(--pt-t-in, 0));
	transition: opacity 0.6s ease, visibility 0.6s ease;
}
.pt-testimonials__slide.is-active {
	opacity: 1;
	visibility: visible;
	transform: none;
}
/* Swiped or stepped: the new slide moves in from the side it came from, the old one out the other way (testimonials.js
 * sets --pt-t-in and --pt-t-out). Only these two animate their position, so the others wait at the start point. */
.pt-testimonials__slide:is(.is-active, .is-leaving) {
	transition: opacity 0.6s ease, visibility 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.pt-testimonials__slide.is-leaving {
	transform: translateX(var(--pt-t-out, 0));
}

/* Swipe on touch, drag with a mouse; vertical scrolling stays with the page. */
.pt-testimonials.is-swipeable .pt-testimonials__slides {
	touch-action: pan-y;
	cursor: grab;
}
.pt-testimonials.is-dragging .pt-testimonials__slides {
	cursor: grabbing;
	user-select: none;
}
.pt-testimonials.is-dragging .pt-testimonials__slide {
	transition: none;
}

.pt-testimonials__cards {
	display: flex;
	flex-direction: column;
	gap: var(--pt-columns, 32px);
}

.pt-testimonial {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 24px;
	margin: 0;
	padding: 32px;
	border: 1px solid var(--pt-t-border);
	border-radius: 12px;
	background: var(--e-global-color-5f0ace0, #fff);
}
.pt-testimonial--featured {
	gap: 32px;
	padding: clamp(28px, 3.5vw, 48px);
	border: 0;
	border-radius: 30px;
	background: var(--e-global-color-5ec0003, #f5fbfe);
}
.pt-testimonials__cards .pt-testimonial {
	flex: 1;
}
.pt-testimonial__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.pt-testimonial__quote {
	margin: 0;
	padding: 0;
	border: 0;
	quotes: none;
}
.pt-testimonial__quote::before,
.pt-testimonial__quote::after {
	content: none;
}
.pt-testimonial__quote p {
	margin: 0;
	color: var(--pt-t-text);
	font-size: 1rem;
	font-style: normal;
	line-height: 1.5;
	letter-spacing: -0.011em;
}
.pt-testimonial--featured .pt-testimonial__quote p {
	font-size: var(--e-global-typography-3bc6d1e-font-size, 1.5rem);
	font-style: italic;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: -0.019em;
}
.pt-testimonial__byline {
	display: flex;
	flex-wrap: wrap;
	gap: 0 8px;
	margin: 0;
	color: var(--pt-t-text);
	font-size: 0.875rem;
	font-style: normal;
	font-weight: 700;
	line-height: 1.4;
}
.pt-testimonial__position {
	flex-basis: 100%;
	padding-left: 1.25em;
	color: var(--pt-t-muted);
	font-weight: 400;
}
.pt-testimonial__logo {
	display: flex;
	justify-content: flex-end;
}
.pt-testimonial__logo img {
	display: block;
	width: auto;
	max-width: 200px;
	height: auto;
	max-height: 40px;
	object-fit: contain;
}
.pt-testimonial__logo--badge img {
	max-width: 110px;
	max-height: 72px;
}

/* Wall (the Testimonials page): the featured quote across the top, then every other testimonial as a card in columns.
 * Columns, not a grid, so each card keeps its own height and long quotes leave no holes. */
.pt-testimonials--wall {
	display: flex;
	flex-direction: column;
	gap: var(--pt-columns, 32px);
}
.pt-testimonials__wall {
	columns: 3;
	column-gap: var(--pt-columns, 32px);
}
/* The cards are <figure>s, and Elementor zeroes figure margins inside widgets
   (.elementor .elementor-widget:not(…):not(…) figure), so this rule needs more weight to space the cards. */
.elementor .elementor-widget .pt-testimonials--wall .pt-testimonials__wall .pt-testimonial,
.pt-testimonials__wall .pt-testimonial {
	break-inside: avoid;
	margin-bottom: var(--pt-columns, 32px);
}
.pt-testimonials--wall .pt-testimonial--featured {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	column-gap: clamp(32px, 5vw, 96px);
}
.pt-testimonials--wall .pt-testimonial--featured .pt-testimonial__quote p {
	max-width: 36ch;
}

/* Dots: one per testimonial; the active one stretches and fills while it plays. */
.pt-testimonials__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: var(--pt-section-xs, 24px);
}
.pt-testimonials .pt-testimonials__dot,
.pt-testimonials .pt-testimonials__dot:is(:hover, :focus, :active) {
	position: relative;
	width: 10px;
	height: 10px;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 999px;
	background: var(--pt-t-border);
	box-shadow: none;
	cursor: pointer;
	transition: width 0.3s ease, background-color 0.2s ease;
}
.pt-testimonials .pt-testimonials__dot:hover {
	background: var(--e-global-color-83d46dd, #b6b6b6);
}
.pt-testimonials .pt-testimonials__dot:focus-visible {
	outline: 2px solid var(--e-global-color-primary, #37aada);
	outline-offset: 3px;
}
.pt-testimonials .pt-testimonials__dot.is-active {
	width: 40px;
	background: var(--pt-t-border);
}
.pt-testimonials__fill {
	position: absolute;
	inset: 0;
	width: 0;
	border-radius: inherit;
	background: var(--pt-t-accent);
}
.pt-testimonials__dot.is-active .pt-testimonials__fill {
	width: 100%;
}
.pt-testimonials[data-autoplay="1"] .pt-testimonials__dot.is-active .pt-testimonials__fill {
	width: 0;
	animation: pt-t-progress var(--pt-t-interval, 8s) linear forwards;
}
.pt-testimonials.is-paused .pt-testimonials__dot.is-active .pt-testimonials__fill {
	animation-play-state: paused;
}
@keyframes pt-t-progress {
	to {
		width: 100%;
	}
}
@keyframes pt-t-fade {
	from {
		opacity: 0;
		transform: translateX(var(--pt-t-in, 0));
	}
}

@media (prefers-reduced-motion: reduce) {
	.pt-testimonials__slide,
	.pt-testimonials__slide:is(.is-active, .is-leaving) {
		transition: none;
		transform: none;
	}
	.pt-testimonials[data-autoplay="1"] .pt-testimonials__dot.is-active .pt-testimonials__fill {
		width: 100%;
		animation: none;
	}
}

/* Tablet: the featured quote on top, the two cards side by side under it. */
@media (max-width: 1024px) {
	.pt-testimonials__slide {
		grid-template-columns: minmax(0, 1fr);
	}
	.pt-testimonials__cards {
		flex-direction: row;
		gap: var(--pt-columns, 24px);
	}
	.pt-testimonials__wall {
		columns: 2;
	}
}

/* Phone: the featured quote only; the dots still step through every testimonial. */
@media (max-width: 767px) {
	.pt-testimonials__cards {
		display: none;
	}
	/* One slide at a time, so the dots sit right under the quote (the section's height follows the quote). */
	.pt-testimonials__slides {
		display: block;
	}
	.pt-testimonials__slide {
		display: none;
	}
	.pt-testimonials__slide.is-active {
		display: grid;
		animation: pt-t-fade 0.5s ease;
	}
	.pt-testimonial--featured {
		justify-content: flex-start;
	}
	.pt-testimonial--featured .pt-testimonial__logo {
		justify-content: flex-start;
	}
	.pt-testimonial--featured .pt-testimonial__quote p {
		font-size: 1.25rem;
	}
	.pt-testimonials__wall {
		columns: 1;
	}
	.pt-testimonials--wall .pt-testimonial--featured {
		display: flex;
	}
}
