/*
 * TIS Testimonials. Desktop: Figma frame 1672 x 941 — centred heading, a 1527 x 115 statistics bar and three
 * 500 x 365 review cards, then a centred button with a tagline to its right.
 * Slider: 3 cards (desktop), 2 (tablet), 1 (mobile).
 */

.tis-testi {
	--tis-per-view: 3;
	background: var(--tis-bg);
}

.tis-testi__inner {
	padding-right: calc(70 * var(--tis-u));
	padding-left: calc(75 * var(--tis-u));
}

/* Heading */
.tis-testi__head { text-align: center; }

.tis-testi__eyebrow { gap: calc(35 * var(--tis-u)); margin: 0 auto; }
.tis-testi__eyebrow .tis-eyebrow__line { width: calc(73 * var(--tis-u)); }

.tis-testi__title {
	margin: calc(17.6 * var(--tis-u)) auto 0;
	font-family: var(--tis-font-display);
	font-size: max(28px, calc(57 * var(--tis-u)));
	font-weight: 900;
	line-height: 1.02;
	color: var(--tis-ink);
}

.tis-testi__text {
	max-width: calc(870 * var(--tis-u));
	margin: calc(19 * var(--tis-u)) auto 0;
	font-size: max(15px, calc(21 * var(--tis-u)));
	font-weight: 400;
	line-height: 1.35;
	color: #454d61;
}

.tis-testi__text p { margin: 0 0 0.5em; }
.tis-testi__text p:last-child { margin-bottom: 0; }

/* Statistics bar */
.tis-testi__stats {
	display: grid;
	grid-template-columns: var(--tis-cols, repeat(4, 1fr));
	align-items: center;
	height: calc(115 * var(--tis-u));
	margin-top: calc(28.3 * var(--tis-u));
	border: 1px solid var(--tis-line);
	border-radius: calc(17 * var(--tis-u));
	background: var(--tis-white);
}

.tis-testi__stat {
	position: relative;
	display: flex;
	align-items: center;
	gap: calc(29 * var(--tis-u));
	min-width: 0;
	margin-top: calc(-6 * var(--tis-u));
	padding-left: calc(var(--tis-off, 40) * var(--tis-u));
}

.tis-testi__stat + .tis-testi__stat::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	width: 1px;
	height: calc(62 * var(--tis-u));
	background: #cad8fa;
	transform: translateY(-50%);
}

.tis-testi__stat-icon {
	width: max(50px, calc(75 * var(--tis-u)));
	height: max(50px, calc(75 * var(--tis-u)));
	color: var(--tis-primary);
}

.tis-testi__stat-icon svg {
	width: max(26px, calc(37 * var(--tis-u)));
	height: max(26px, calc(37 * var(--tis-u)));
}

.tis-testi__stat-copy { display: flex; flex-direction: column; min-width: 0; row-gap: 10px; }

.tis-testi__stat-value {
	font-size: max(22px, calc(29 * var(--tis-u)));
	font-weight: 700;
	line-height: 1.4;
	color: #081060;
	font-variant-numeric: tabular-nums;
}

.tis-testi__stat-label {
	margin-top: calc(-3.6 * var(--tis-u));
	font-size: max(14px, calc(18 * var(--tis-u)));
	font-weight: 400;
	line-height: 1.4;
	color: #101a5c;
}

.tis-testi__stat-sub {
	margin-top: calc(0.8 * var(--tis-u));
	font-size: max(12px, calc(14 * var(--tis-u)));
	font-weight: 400;
	line-height: 1.4;
	color: #59617c;
}

/* Review slider */
.tis-testi__viewport { margin-top: var(--tis-gap); overflow: hidden; touch-action: pan-y; padding-bottom: calc(10 * var(--tis-u)); margin-bottom: calc(-10 * var(--tis-u)); }

.tis-testi__track {
	display: flex;
	gap: calc(25 * var(--tis-u));
	transition: transform 0.55s cubic-bezier(0.22, 0.8, 0.3, 1);
	will-change: transform;
}

.tis-testi__card {
	position: relative;
	display: flex;
	flex: 0 0 calc((100% - (var(--tis-per-view) - 1) * 25 * var(--tis-u)) / var(--tis-per-view));
	flex-direction: column;
	min-width: 0;
	min-height: calc(365 * var(--tis-u));
	padding: calc(18 * var(--tis-u)) calc(33 * var(--tis-u)) calc(23 * var(--tis-u)) calc(34 * var(--tis-u));
	border-radius: calc(17 * var(--tis-u));
	background: var(--tis-white);
	box-shadow: 0 12px 30px rgba(61, 111, 181, 0.04);
	overflow: hidden;
	transition: box-shadow 0.3s ease;
}

.tis-testi__card:hover { box-shadow: 0 18px 44px rgba(61, 111, 181, 0.12); }

.tis-testi__stars {
	display: inline-flex;
	align-items: center;
	gap: calc(6 * var(--tis-u));
	height: calc(38 * var(--tis-u));
	font-size: max(18px, calc(26 * var(--tis-u)));
	color: var(--tis-primary);
}

.tis-testi__stars .tis-star { width: 1em; height: 1em; }

.tis-testi__qmark {
	position: absolute;
	top: calc(6 * var(--tis-u));
	right: calc(22 * var(--tis-u));
	font-size: max(44px, calc(70 * var(--tis-u)));
	font-weight: 700;
	line-height: 1.4;
	color: #ccddfe;
	pointer-events: none;
}

.tis-testi__quote {
	margin: calc(9 * var(--tis-u)) 0 0 calc(1 * var(--tis-u));
	font-size: max(15px, calc(21 * var(--tis-u)));
	font-weight: 400;
	line-height: 1.46;
	color: #171d30;
}

.tis-testi__author {
	display: flex;
	align-items: flex-start;
	gap: calc(26 * var(--tis-u));
	margin-top: auto;
	padding-top: calc(16 * var(--tis-u));
}

.tis-testi__photo {
	display: block;
	flex: none;
	width: max(64px, calc(102 * var(--tis-u)));
	height: max(64px, calc(102 * var(--tis-u)));
	border-radius: 50%;
	overflow: hidden;
}

.tis-testi__photo .tis-testi__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tis-testi__who { display: flex; flex-direction: column; min-width: 0; margin-top: calc(9 * var(--tis-u)); }

.tis-testi__name-row { display: flex; align-items: center; gap: calc(16 * var(--tis-u)); }

.tis-testi__name {
	font-size: max(15px, calc(20 * var(--tis-u)));
	font-weight: 600;
	line-height: 1.4;
	color: var(--tis-ink);
}

.tis-testi__verified {
	display: inline-flex;
	flex: none;
	font-size: max(16px, calc(22 * var(--tis-u)));
	color: var(--tis-primary);
}

.tis-testi__role {
	margin: calc(3 * var(--tis-u)) 0 0 calc(2 * var(--tis-u));
	font-size: max(13px, calc(17 * var(--tis-u)));
	font-weight: 400;
	line-height: 1.4;
	color: #495b85;
}

.tis-testi__loc {
	display: flex;
	align-items: center;
	gap: calc(9 * var(--tis-u));
	margin: calc(7.2 * var(--tis-u)) 0 0 calc(2 * var(--tis-u));
}

.tis-testi__loc-icon {
	display: inline-flex;
	flex: none;
	font-size: max(13px, calc(18 * var(--tis-u)));
	color: var(--tis-primary);
}

.tis-testi__loc-text {
	font-size: max(12px, calc(16 * var(--tis-u)));
	font-weight: 400;
	line-height: 1.4;
	color: #59678a;
}

/* Dots (only visible when there are more cards than fit) */
.tis-testi__dots { display: flex; justify-content: center; gap: 10px; margin-top: 26px; }
.tis-testi__dots[hidden] { display: none; }
.tis-slider__dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #c8d6f2; cursor: pointer; transition: background-color 0.2s ease, transform 0.2s ease; }
.tis-slider__dot.is-active { background: var(--tis-primary); transform: scale(1.25); }

/* Footer: centred button + tagline on its right */
.tis-testi__foot {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	margin-top: calc(24 * var(--tis-u));
}

.tis-testi__btn {
	grid-column: 2;
	min-width: calc(384 * var(--tis-u));
	min-height: calc(58 * var(--tis-u));
	padding: 0 calc(24 * var(--tis-u));
	border-radius: calc(12 * var(--tis-u));
	font-size: max(15px, calc(22 * var(--tis-u)));
}

.tis-testi__tagline-wrap {
	grid-column: 3;
	display: flex;
	align-items: center;
	gap: calc(17 * var(--tis-u));
	margin-left: calc(54 * var(--tis-u));
	min-width: 0;
}

.tis-testi__tagline-line { flex: none; display: block; width: calc(64 * var(--tis-u)); height: 1px; background: var(--tis-primary); }
.tis-testi__tagline-line--r { width: calc(89 * var(--tis-u)); }

.tis-testi__tagline {
	font-size: max(11px, calc(14 * var(--tis-u)));
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0.143em;
	color: var(--tis-primary);
	white-space: nowrap;
}

/* ---------------------------------------------------------------------
 * Tablet
 * ------------------------------------------------------------------ */
@media (max-width: 1024px) {
	.tis-testi { --tis-per-view: 2; }
	.tis-testi__inner { padding-left: var(--tis-gutter); padding-right: var(--tis-gutter); }
	.tis-testi__eyebrow { gap: 14px; }
	.tis-testi__eyebrow .tis-eyebrow__line { width: 40px; }
	.tis-testi__title { margin-top: 14px; font-size: 40px; }
	.tis-testi__text { margin-top: 16px; font-size: 18px; }
	.tis-testi__stats { height: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 0; margin-top: var(--tis-gap); padding: 18px 0; border-radius: 16px; }
	.tis-testi__stat { padding: 14px 24px; gap: 16px; }
	.tis-testi__stat + .tis-testi__stat::before { display: none; }
	.tis-testi__stat:nth-child(even) { border-left: 1px solid #cad8fa; }
	.tis-testi__stat-icon { width: 60px; height: 60px; }
	.tis-testi__stat-icon svg { width: 28px; height: 28px; }
	.tis-testi__stat-value { font-size: 24px; }
	.tis-testi__stat-label { font-size: 16px; }
	.tis-testi__viewport { margin-top: var(--tis-gap); }
	.tis-testi__track { gap: 20px; }
	.tis-testi__card { flex-basis: calc((100% - (var(--tis-per-view) - 1) * 20px) / var(--tis-per-view)); min-height: 0; padding: 22px 24px 24px; border-radius: 16px; }
	.tis-testi__stars { height: 32px; font-size: 22px; gap: 5px; }
	.tis-testi__qmark { top: 8px; right: 18px; font-size: 56px; }
	.tis-testi__quote { margin-top: 10px; font-size: 17px; }
	.tis-testi__author { gap: 16px; padding-top: 22px; }
	.tis-testi__photo { width: 76px; height: 76px; }
	.tis-testi__who { margin-top: 4px; }
	.tis-testi__name { font-size: 17px; }
	.tis-testi__role { font-size: 15px; }
	.tis-testi__loc-text { font-size: 14px; }
	.tis-testi__foot { display: flex; flex-direction: column; gap: 22px; margin-top: var(--tis-gap); }
	.tis-testi__btn { min-width: 0; min-height: 54px; padding: 0 40px; font-size: 18px; }
	.tis-testi__tagline-wrap { margin: 0; gap: 12px; }
	.tis-testi__tagline-line,
	.tis-testi__tagline-line--r { width: 40px; }
	.tis-testi__tagline { font-size: 12px; }
}

/* ---------------------------------------------------------------------
 * Mobile
 * ------------------------------------------------------------------ */
@media (max-width: 767px) {
	.tis-testi { --tis-per-view: 1; }
	.tis-testi__title { font-size: 28px; }
	.tis-testi__text { font-size: 16px; }
	.tis-testi__stats { grid-template-columns: 1fr; }
	.tis-testi__stat:nth-child(even) { border-left: 0; }
	.tis-testi__stat { padding: 10px 20px; }
	.tis-testi__btn { width: 100%; }
	.tis-testi__tagline { white-space: normal; text-align: center; }
	.tis-testi__tagline-line,
	.tis-testi__tagline-line--r { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.tis-testi__track { transition: none; }
}
