/* APKLand Testimonials — theme-adaptive; colors via CSS variables + per-style overrides below. */

.apkland-testimonials {
	--testi-text: var(--text, var(--apkland-text, var(--feat-text, inherit)));
	--testi-muted: var(--text-muted, var(--apkland-muted, var(--feat-subtext, inherit)));
	--testi-surface: var(--surface, var(--feat-bg, transparent));
	--testi-border: var(--border, var(--feat-border, rgba(0, 0, 0, 0.1)));
	--testi-radius: var(--radius, var(--apkland-radius, 16px));
	--testi-on-primary: var(--testi-contrast-on-accent, #fff);
	padding: 48px 20px 56px;
	position: relative;
	overflow: hidden;
	background: transparent;
}

.testi-heading {
	text-align: center;
	font-size: clamp(1.4rem, 4vw, 2rem);
	font-weight: 700;
	margin-bottom: 36px;
	color: var(--testi-text);
}

/* ── Slider wrapper (flex: arrows + track row; dots full width) ── */
.testi-slider {
	position: relative;
	max-width: 600px;
	margin: 0 auto;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.testi-slider:focus-visible {
	outline: 2px solid var(--primary, #2563eb);
	outline-offset: 4px;
}

/* Track fills space between arrows (no .testi-track-wrap in markup — same role) */
.testi-track {
	position: relative;
	min-height: 260px;
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	order: 1;
}

.testi-arrow--left {
	order: 0;
}

.testi-arrow--right {
	order: 2;
}

.testi-slide {
	display: none;
	opacity: 0;
	transition: opacity 300ms ease;
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
}

.testi-slide.active {
	display: block;
	opacity: 1;
	position: relative;
	animation: testiIn 300ms ease forwards;
}

@keyframes testiIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.testi-card {
	background: var(--testi-surface);
	border: 1px solid var(--testi-border);
	border-radius: var(--testi-radius);
	padding: 28px 24px;
	text-align: center;
	box-shadow: var(--testi-card-shadow, 0 4px 24px var(--primary-glow, rgba(0, 0, 0, 0.08)));
}

.testi-avatar {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	margin: 0 auto 14px;
	overflow: hidden;
	border: 3px solid var(--primary, #2563eb);
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--primary, #2563eb);
}

.testi-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.testi-initials {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--testi-on-primary);
	line-height: 1;
}

.testi-stars {
	color: var(--primary, #2563eb);
	font-size: 1.1rem;
	letter-spacing: 2px;
	margin-bottom: 14px;
}

.testi-text {
	font-size: clamp(0.9rem, 2.5vw, 1rem);
	line-height: 1.7;
	color: var(--testi-text);
	margin: 0 0 16px;
	font-style: italic;
}

.testi-author {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	font-style: normal;
}

.testi-author strong {
	font-size: 0.95rem;
	color: var(--primary, #2563eb);
}

.testi-role {
	font-size: 0.8rem;
	color: var(--testi-muted);
}

/* ── Arrows ── */
.testi-arrow {
	position: static;
	transform: none;
	background: var(--surface, rgba(255, 255, 255, 0.1));
	border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
	color: var(--text, inherit);
	border-radius: 50%;
	width: 32px;
	height: 32px;
	font-size: 0.85rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 200ms, color 200ms;
	z-index: 2;
	padding: 0;
	flex-shrink: 0;
	align-self: center;
	box-sizing: border-box;
}

.testi-arrow:hover,
.testi-arrow:focus {
	background: var(--primary, #e87c23);
	color: #fff;
	outline: none;
}

.testi-dots {
	order: 3;
	flex-basis: 100%;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.testi-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: none;
	background: var(--testi-border);
	cursor: pointer;
	transition: background 200ms, transform 200ms;
	padding: 0;
	position: relative;
	box-sizing: content-box;
}

.testi-dot::after {
	content: '';
	position: absolute;
	inset: -17px;
}

.testi-dot.active {
	background: var(--primary, #2563eb);
	transform: scale(1.2);
}

@media (max-width: 767px) {
	.apkland-testimonials {
		padding: 28px 8px 36px;
	}

	/* Slider: arrows + card in a row — arrows DON'T overflow */
	.testi-slider {
		gap: 6px;
		padding: 0 4px;
	}

	.testi-arrow {
		width: 28px;
		height: 28px;
		font-size: 0.75rem;
		/* Make sure they stay inside viewport */
		flex-shrink: 0;
		position: static;
		transform: none;
		align-self: center;
	}

	/* Re-position arrows in flex layout */
	.testi-arrow--left {
		order: 0;
	}

	.testi-track {
		order: 1;
	}

	.testi-arrow--right {
		order: 2;
	}

	.testi-dots {
		order: 3;
	}

	.testi-card {
		padding: 20px 14px;
	}

	.testi-track {
		min-height: 260px;
	}

	.testi-heading {
		font-size: 1.2rem;
		margin-bottom: 20px;
		padding: 0 8px;
	}

	.testi-avatar {
		width: 52px;
		height: 52px;
	}

	.testi-initials {
		font-size: 1.2rem;
	}

	.testi-text {
		font-size: 0.88rem;
		line-height: 1.65;
	}

	.testi-dots {
		margin-top: 14px;
	}
}

/* ============================================
   PER-STYLE CARD OVERRIDES
   ============================================ */

/* Classic — light page, white card ✓ */
.style-classic .testi-card {
	background: #ffffff;
	border-color: rgba(0, 0, 0, 0.08);
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.07);
}

.style-classic .testi-text {
	color: #333333;
}

.style-classic .testi-role {
	color: #666666;
}

.style-classic .testi-arrow {
	background: rgba(0, 0, 0, 0.06);
	border-color: rgba(0, 0, 0, 0.12);
	color: #333;
}

/* Modern — dark background, dark card to match */
.style-modern .testi-card {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.1);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.style-modern .testi-text {
	color: rgba(255, 255, 255, 0.88);
}

.style-modern .testi-role {
	color: rgba(255, 255, 255, 0.5);
}

.style-modern .testi-arrow {
	background: rgba(255, 255, 255, 0.07);
	border-color: rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.85);
}

.style-modern .testi-dot {
	background: rgba(255, 255, 255, 0.2);
}

.style-modern .testi-heading {
	color: #ffffff;
}

/* Glass — frosted glass card */
.style-glass .testi-card,
.style-glass-pure .testi-card {
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-color: rgba(255, 255, 255, 0.15);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.style-glass .testi-text,
.style-glass-pure .testi-text {
	color: rgba(255, 255, 255, 0.88);
}

.style-glass .testi-role,
.style-glass-pure .testi-role {
	color: rgba(255, 255, 255, 0.5);
}

.style-glass .testi-arrow,
.style-glass-pure .testi-arrow {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.18);
	color: rgba(255, 255, 255, 0.85);
}

.style-glass .testi-dot,
.style-glass-pure .testi-dot {
	background: rgba(255, 255, 255, 0.2);
}

/* Neuromorphic — dark surface, soft shadow card */
.style-neu .testi-card {
	background: #1e2026;
	border-color: transparent;
	box-shadow:
		6px 6px 14px rgba(0, 0, 0, 0.35),
		-4px -4px 10px rgba(255, 255, 255, 0.04);
}

.style-neu .testi-text {
	color: rgba(255, 255, 255, 0.85);
}

.style-neu .testi-role {
	color: rgba(255, 255, 255, 0.45);
}

.style-neu .testi-arrow {
	background: #1e2235;
	border-color: transparent;
	color: rgba(255, 255, 255, 0.8);
	box-shadow:
		3px 3px 8px rgba(0, 0, 0, 0.3),
		-2px -2px 6px rgba(255, 255, 255, 0.04);
}

.style-neu .testi-dot {
	background: rgba(255, 255, 255, 0.2);
}
