/* Systical — Testimonials Slider */

.sys-tm {
	--tm-accent: #9afd0d;
	--tm-max: 1320px;
	--tm-per: 3;
	--tm-gap: 24px;
	--tm-speed: 550ms;
	--tm-avatar: 38px;

	--tm-arrow: 52px;
	--tm-arrow-fg: #0b0b0b;
	--tm-arrow-bg: rgba(0, 0, 0, 0);
	--tm-arrow-bd: #0b0b0b;
	--tm-arrow-fg-hover: #0b0b0b;
	--tm-arrow-bg-hover: #9afd0d;

	--tm-prog-h: 3px;
	--tm-prog-w: 100%;
	--tm-prog-track: #e2e2e2;
	--tm-prog-fill: #0b0b0b;

	--tm-bar-w: 1300px;
	--tm-mark: 120px;
	--tm-mark-color: #e8e8ec;

	position: relative;
	padding: 100px 0 110px;
	background: #f7f8f9;
}

.sys-tm__inner {
	max-width: var(--tm-max);
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- heading ---------- */

.sys-tm__head {
	margin-bottom: 48px;
	text-align: center;
}

.sys-tm__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 20px;
	padding: 8px 16px;
	border-radius: 40px;
	background: #1a1a1a;
	color: #fff;
	font-family: Inter, system-ui, sans-serif;
	font-size: 14px;
	font-weight: 600;
}

.sys-tm__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--tm-accent);
}

.sys-tm__title {
	margin: 0;
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	font-size: clamp(32.5px, 4.2vw, 57.5px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: #0b0b0b;
}

/* ---------- track ---------- */

.sys-tm__viewport {
	overflow: hidden;
}

.sys-tm__track {
	display: flex;
	align-items: stretch;
	gap: var(--tm-gap);
	transform: translate3d(0, 0, 0);
	transition: transform var(--tm-speed) cubic-bezier(0.22, 1, 0.36, 1);
	will-change: transform;
}

/* No transition while a finger is down, and none for the silent reset that
   puts a looping track back to the top. */
.sys-tm__track.is-instant {
	transition: none;
}

.sys-tm--draggable .sys-tm__viewport {
	cursor: grab;
}

.sys-tm--draggable .sys-tm__viewport.is-dragging {
	cursor: grabbing;
	user-select: none;
}

/* ---------- card ---------- */

.sys-tm__card {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 0 0 calc((100% - (var(--tm-per) - 1) * var(--tm-gap)) / var(--tm-per));
	min-width: 0;
	overflow: hidden;
	padding: 26px 28px 54px;
	border-radius: 18px;
	/* White on a white section needs an edge of its own to read as a card. */
	background: #fff;
	border: 1px solid #ececef;
	box-shadow: 0 1px 2px rgba(16, 16, 20, 0.04);
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.sys-tm__person {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 26px;
}

.sys-tm__quote {
	position: relative;
	z-index: 1;
	margin: 0;
	color: #1a1a1a;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	flex: 1 1 auto;
}

/* Sits behind the text, so a long quote runs over it rather than being
   pushed around by it. The negative offset is font metrics, not a nudge: a
   closing quote's ink sits near the top of its em box, so aligning the box to
   the card floor would leave the glyph floating mid-card. */
.sys-tm__mark {
	position: absolute;
	right: 26px;
	bottom: -0.4em;
	z-index: 0;
	color: var(--tm-mark-color);
	font-family: Georgia, "Times New Roman", Times, serif;
	font-size: var(--tm-mark);
	line-height: 1;
	pointer-events: none;
	user-select: none;
}

.sys-tm img.sys-tm__avatar {
	display: block;
	width: var(--tm-avatar);
	height: var(--tm-avatar);
	flex: 0 0 auto;
	border-radius: 50%;
	object-fit: cover;
}

.sys-tm__name {
	min-width: 0;
	color: #0b0b0b;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
}

/* ---------- control bar ---------- */

.sys-tm__bar {
	display: flex;
	align-items: center;
	gap: 24px;
	/* Centred and held to its own width rather than spanning the whole
	   track — a full-width rule reads as a divider, not a control. */
	max-width: var(--tm-bar-w);
	margin: 44px auto 0;
}

.sys-tm__nav {
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
}

.sys-tm__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--tm-arrow);
	height: var(--tm-arrow);
	padding: 0;
	border: 1px solid var(--tm-arrow-bd);
	border-radius: 50%;
	background: var(--tm-arrow-bg);
	color: var(--tm-arrow-fg);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

/* Background and colour are restated because Hello Elementor's reset styles
   `button:hover` pink, and that beats the base rule for anything left unset. */
.sys-tm__arrow:hover,
.sys-tm__arrow:focus {
	border-color: var(--tm-arrow-bg-hover);
	background-color: var(--tm-arrow-bg-hover);
	color: var(--tm-arrow-fg-hover);
}

.sys-tm__arrow:focus-visible {
	outline: 2px solid var(--tm-accent);
	outline-offset: 3px;
}

.sys-tm__arrow svg {
	width: 42%;
	height: 42%;
}

.sys-tm__arrow[disabled] {
	opacity: 0.32;
	cursor: default;
}

.sys-tm__arrow[disabled]:hover {
	border-color: var(--tm-arrow-bd);
	background-color: var(--tm-arrow-bg);
	color: var(--tm-arrow-fg);
}

.sys-tm__progress {
	position: relative;
	flex: 1 1 auto;
	max-width: var(--tm-prog-w);
	height: var(--tm-prog-h);
	overflow: hidden;
	border-radius: calc(var(--tm-prog-h) / 2);
	background: var(--tm-prog-track);
}

.sys-tm__progress-fill {
	display: block;
	width: var(--tm-fill, 0%);
	height: 100%;
	border-radius: inherit;
	background: var(--tm-prog-fill);
	transition: width var(--tm-speed) cubic-bezier(0.22, 1, 0.36, 1);
}

/* The timer variant runs the fill over the autoplay interval instead, so its
   duration comes from JS rather than the slide speed. */
.sys-tm__progress-fill.is-timing {
	transition: width var(--tm-timer, 5000ms) linear;
}

.sys-tm__progress-fill.is-reset {
	transition: none;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
	.sys-tm {
		--tm-gap: 18px;
		--tm-arrow: 46px;
		padding: 80px 0 88px;
	}

	.sys-tm__card {
		padding: 24px 24px 46px;
	}

	.sys-tm__quote {
		font-size: 15px;
	}
}

@media (max-width: 767px) {
	.sys-tm {
		--tm-gap: 14px;
		--tm-arrow: 44px;
		padding: 64px 0 70px;
	}

	.sys-tm__inner {
		padding: 0 18px;
	}

	.sys-tm__head {
		margin-bottom: 30px;
	}

	.sys-tm__quote {
		font-size: 15px;
		line-height: 1.55;
	}

	.sys-tm__bar {
		gap: 18px;
		margin-top: 28px;
		max-width: none;
	}

	.sys-tm__nav {
		gap: 8px;
	}

	/* The bar keeps its shape on a phone — arrows left, bar filling the rest —
	   because stacking them wastes the height the cards need. */
	.sys-tm__progress {
		max-width: none;
	}

	.sys-tm__card {
		padding: 22px 22px 44px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sys-tm__track,
	.sys-tm__progress-fill {
		transition: none;
	}
}
