/* ==========================================================================
   Testimonials Slider (Swiper.js powered — same visual design as before)
   ========================================================================== */

.ts-slider-section {
	--ts-bg: #c7cabb;          /* sage background — change to match your site */
	--ts-card-bg: #ffffff;
	--ts-text: #1a1a1a;
	--ts-text-muted: #4a4a4a;
	--ts-accent: #e8563f;      /* star / quote-mark red */
	--ts-arrow: #000000;
	--ts-radius: 14px;
	--ts-gap: 32px;
	--ts-sidebar-width: 330px;

	background: var(--ts-bg);
	padding: 90px 12px;
	box-sizing: border-box;
}

.ts-slider-section * {
	box-sizing: border-box;
}

.ts-slider-inner {
	max-width: 1380px;
	margin: 0 auto;
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 40px;
}

/* ---------- Sidebar (quote icon + title) ---------- */

.ts-slider-header {
	flex: 0 0 var(--ts-sidebar-width);
	display: flex;
	flex-direction: column;
	margin-bottom: 0;
}

.ts-quote-icon {
	width: 90px;
	height: 60px;
	fill: var(--ts-accent);
	margin-bottom: 24px;
	flex-shrink: 0;
}

.ts-title {
	margin: 0;
	font-size: 34px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--ts-text);
	text-transform: none;
	max-width: 280px;
}

/* ---------- Arrows — pinned top-right of the whole section ---------- */

.ts-nav-desktop {
	position: absolute;
	top: -50px;
	right: 0;
	display: flex;
	align-items: center;
	gap: 28px;
}

.ts-arrow {
	width: 36px;
	height: 24px;
	border-radius: 0;
	border: none;
	background: transparent;
	padding: 0;
	color: var(--ts-arrow);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	position: relative;
	/* Prevents mobile browsers from swallowing the tap into a
	   double-tap-to-zoom gesture / delaying the click ~300ms. */
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	user-select: none;
	transition: opacity 0.2s ease, color 0.2s ease, transform 0.12s ease;
}

/* Invisible larger hit-area so a slightly off-target tap still registers,
   without changing the visible icon size. */
.ts-arrow::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 44px;
	height: 44px;
	transform: translate(-50%, -50%);
}

.ts-arrow svg {
	width: 30px;
	height: auto;   /* icon's natural 36:23 ratio, no stretching */
	display: block;
	pointer-events: none; /* clicks always resolve to the button, not the svg/path */
}

.ts-arrow svg path {
	fill: currentColor;
}

.ts-arrow:hover {
	opacity: 0.75;
}

.ts-arrow:focus-visible {
	outline: 2px solid var(--ts-accent);
	outline-offset: 4px;
}

/* Swiper adds this automatically to nav elements it controls once a
   slider reaches either end — kept for when Swiper's own navigation
   module is used, harmless otherwise since our JS drives clicks itself. */
.ts-arrow.swiper-button-disabled {
	opacity: 0.35;
	cursor: default;
}

/* Pressed / tapped feedback — this is the "hover" equivalent for touch.
   .is-active is toggled by JS on pointerdown/pointerup since real :hover
   doesn't exist on touchscreens. */
.ts-arrow:active,
.ts-arrow.is-active {
	opacity: 0.5;
	transform: scale(0.9);
}

.ts-nav-mobile {
	display: none;
	justify-content: space-between;
	width: 100%;
	align-items: center;
	gap: 20px;
	margin-top: 28px;
	position: relative;
	z-index: 5;
}

/* ---------- Swiper viewport / track ---------- */

.ts-viewport.swiper {
	flex: 1 1 auto;
	min-width: 0;
	width: 100%;
	/* Swiper's own CSS sets overflow/position on .swiper; this just
	   makes sure card drop-shadows aren't clipped vertically. */
	padding: 4px 2px 14px;
	margin: -4px -2px -14px;
}

.ts-track.swiper-wrapper {
	/* Swiper positions slides via transform on this element — do not
	   add display/flex/gap overrides here, Swiper manages the layout. */
}

/* ---------- Card / slide ---------- */

.ts-card.swiper-slide {
	flex-shrink: 0;
	width: 380px;
	background: var(--ts-card-bg);
	border-radius: var(--ts-radius);
	padding: 30px 32px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
	height: auto;
}

.ts-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.ts-card-title {
	margin: 0;
	font-size: 19px;
	line-height: 1.35;
	font-weight: 700;
	color: var(--ts-text);
	text-transform: none;
}

.ts-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	padding-top: 2px;
}

.ts-star {
	width: 18px;
	height: 18px;
	fill: var(--ts-accent);
	flex-shrink: 0;
}

.ts-rating-number {
	font-size: 15px;
	font-weight: 600;
	color: var(--ts-text);
}

.ts-card-desc {
	font-size: 15px;
	line-height: 1.65;
	color: var(--ts-text-muted);
}

.ts-card-desc p {
	margin: 0 0 14px;
}

.ts-card-desc p:last-child {
	margin-bottom: 0;
}

.ts-card-desc strong,
.ts-card-desc b {
	color: var(--ts-text);
	font-weight: 700;
}

.ts-card-name {
	margin: 18px 0 0;
	font-size: 15px;
	font-weight: 700;
	color: var(--ts-text);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.ts-slider-section {
		padding: 72px 32px;
	}

	.ts-slider-inner {
		gap: 28px;
	}

	.ts-slider-header {
		--ts-sidebar-width: 240px;
	}

	.ts-card.swiper-slide {
		width: 340px;
	}
}

/* Tablet: switch to the stacked layout + bottom nav a bit earlier than
   mobile, since the top-right arrows get cramped once the sidebar
   narrows below the title's width. */
@media (max-width: 820px) {
	.ts-slider-section {
		padding: 64px 24px;
	}

	.ts-slider-inner {
		flex-direction: column;
		gap: 0;
	}

	.ts-slider-header {
		flex-basis: auto;
		margin-bottom: 28px;
	}

	.ts-nav-desktop {
		display: none !important;
	}

	.ts-nav-mobile {
		display: flex !important;
	}

	.ts-card.swiper-slide {
		width: 300px;
	}
}

/* Mobile: stack header above the slider, one card per view, arrows below */
@media (max-width: 640px) {
	.ts-slider-section {
		padding: 56px 20px;
	}

	.ts-slider-inner {
		flex-direction: column;
		gap: 0;
	}

	.ts-slider-header {
		flex-basis: auto;
		margin-bottom: 28px;
	}

	.ts-quote-icon {
		width: 44px;
		height: 30px;
		margin-bottom: 14px;
	}

	.ts-title {
		font-size: 26px;
		max-width: none;
	}

	.ts-nav-desktop {
		display: none !important;
	}

	.ts-nav-mobile {
		display: flex !important;
	}

	/* Real (not just visual) 44x44 tap target on touchscreens, where
	   accuracy matters most. Desktop keeps the smaller 36x24 arrows. */
	.ts-nav-mobile .ts-arrow {
		width: 44px;
		height: 44px;
	}

	.ts-card.swiper-slide {
		width: 84vw;
		padding: 26px 24px;
	}

	.ts-card-title {
		font-size: 17px;
	}
}

@media (max-width: 380px) {
	.ts-card.swiper-slide {
		width: 88vw;
		padding: 22px 20px;
	}
}