/*
 * Sticky-based freeze instead of GSAP's JS-driven pin (position:fixed<->
 * relative toggling). GSAP's pin can still show a one-frame hitch right at
 * the moment it un-pins, even with matched heights; native position:sticky
 * has no such toggle at all — the browser handles the release natively and
 * continuously, so there's nothing to jump.
 *
 * .gts-wrap is a real, normal-flow box tall enough to provide the scroll
 * distance for the whole animation; .gts-sticky (100vh) sticks to the top
 * of the viewport for as long as .gts-wrap is being scrolled through, then
 * releases on its own once .gts-wrap's bottom passes.
 */
.testimonials {
	position: relative;
}

.gts-wrap {
	position: relative;
	width: 100%;
	height: calc((var(--gts-scroll-length, 3) + 1) * 100vh);
}

/*
 * --gts-header-offset is set by JS to the height of a fixed/sticky site
 * header, if any, so the circle isn't rendered underneath it.
 */
.gts-sticky {
	position: sticky;
	top: 0;
	width: 100%;
	height: 100vh;
	padding-top: var(--gts-header-offset, 0px);
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	/* Only clip vertically; .gts-text is allowed to break out horizontally past gts-stage's own width. */
	overflow-x: hidden;
	overflow-y: hidden;
}

.gts-stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: min(90vw, 70vh, 600px);
	margin: 0 auto 0;
}

/* Square area holding the 4 photos + the circle */
.gts-circle-area {
	position: relative;
	width: 100%;
	aspect-ratio: 1 / 1;
}

/* The 4 fixed photos */
.gts-images {
	position: absolute;
	inset: 0;
}

.gts-img {
	position: absolute;
	width: 15%;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	overflow: hidden;
	border: 3px solid rgba(255, 255, 255, 0.9);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	background: #eee;
}

.gts-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.gts-img-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #e2e2e2, #cfcfcf);
}

.gts-img-1 { top: 8%;  left: 4%; }
.gts-img-2 { top: 4%;  right: 4%; }
.gts-img-3 { bottom: 20%; left: 10%; }
.gts-img-4 { bottom: 16%; right: 8%; }

/* Center circle + gradient progress ring */
.gts-circle {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 46%;
	aspect-ratio: 1 / 1;
}

.gts-ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	transform: rotate(-90deg);
	overflow: visible;
}

.gts-ring-bg {
	fill: #ffffff;
	stroke: #000000;
	stroke-width: 10;
}

.gts-ring-progress {
	fill: none;
	stroke-width: 10;
	stroke-linecap: round;
	transition: stroke-dashoffset 0.05s linear;
}

.gts-circle-inner {
	position: absolute;
	inset: 14%;
	border-radius: 50%;
	background: #fdfdfd;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 8%;
}

/*
 * !important here because the host site's own generated per-widget CSS
 * otherwise wins the cascade and can render this text white-on-white
 * (invisible).
 */
.gts-title {
	font-weight: 800;
	font-size: clamp(15px, 2.6vw, 22px);
	color: #111 !important;
	line-height: 1.3;
	margin: 0;
}

/*
 * Intentionally NOT a percentage of .gts-stage (which is capped at 600px) —
 * width is viewport-relative so the text isn't constrained to the stage's
 * own (narrower) box. .gts-stage's own align-items:center still keeps it
 * centered, since gts-stage itself is centered on the viewport.
 */
.gts-content {
	width: 600px;
	margin-top: 4%;
	text-align: center;
}

.gts-text {
	font-size: clamp(13px, 1.7vw, 18px);
	line-height: 1.5;
	color: #000 !important;
	margin: 0;
	font-weight: 600;
}

@media (max-width: 767px) {
	.gts-stage {
		width: min(92vw, 68vh, 420px);
	}

	.gts-content {
		margin-top: 5%;
	}

	.gts-img {
		width: 17%;
		border-width: 2px;
	}
}

@media (max-width: 420px) {
	.gts-stage {
		width: min(96vw, 62vh);
	}
}
