/**
 * FoxStudy Testimonial Carousel - frontend styles.
 * BEM naming; all motion runs on transform/opacity/filter only (GPU-friendly).
 */

.fstc-carousel,
.fstc-carousel *,
.fstc-carousel *::before,
.fstc-carousel *::after {
	box-sizing: border-box;
}

.fstc-carousel {
	--fstc-visible-stack: 3;
	--fstc-stack-offset-y: 19px;
	--fstc-stack-scale-step: 6;
	--fstc-stack-opacity-step: 0.25;
	--fstc-stack-blur: 0px;
	--fstc-stack-rotation: 0;
	--fstc-duration: 600ms;
	--fstc-easing: cubic-bezier(0.22, 1, 0.36, 1);

	position: relative;
	width: 100%;
}

.fstc-carousel__viewport {
	position: relative;
	perspective: 1200px;
}

.fstc-carousel__stack {
	display: grid;
	position: relative;
}

.fstc-card {
	grid-area: 1 / 1 / 2 / 2;
	width: 100%;
	transform-origin: top center;
	will-change: transform, opacity;
	transition:
		transform var(--fstc-duration) var(--fstc-easing),
		opacity var(--fstc-duration) var(--fstc-easing),
		filter var(--fstc-duration) var(--fstc-easing);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* Static fallback for the very first paint, before JS attaches and takes over
   per-card inline transforms based on the live active index. */
.fstc-card[data-index='0'] {
	transform: none;
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	z-index: 50;
}

.fstc-card[data-index='1'] {
	visibility: visible;
	z-index: 49;
	opacity: calc(1 - var(--fstc-stack-opacity-step));
	filter: blur(var(--fstc-stack-blur));
	transform: translateY(calc(var(--fstc-stack-offset-y) * -1))
		scale(calc(1 - (var(--fstc-stack-scale-step) / 100)))
		rotate(calc(var(--fstc-stack-rotation) * 1deg));
}

.fstc-card[data-index='2'] {
	visibility: visible;
	z-index: 48;
	opacity: calc(1 - (var(--fstc-stack-opacity-step) * 2));
	filter: blur(calc(var(--fstc-stack-blur) * 2));
	transform: translateY(calc(var(--fstc-stack-offset-y) * -2))
		scale(calc(1 - (var(--fstc-stack-scale-step) / 100 * 2)))
		rotate(calc(var(--fstc-stack-rotation) * 2deg));
}

.fstc-card[data-index='3'] {
	visibility: visible;
	z-index: 47;
	opacity: calc(1 - (var(--fstc-stack-opacity-step) * 3));
	filter: blur(calc(var(--fstc-stack-blur) * 3));
	transform: translateY(calc(var(--fstc-stack-offset-y) * -3))
		scale(calc(1 - (var(--fstc-stack-scale-step) / 100 * 3)))
		rotate(calc(var(--fstc-stack-rotation) * 3deg));
}

.fstc-card[data-index='4'] {
	visibility: visible;
	z-index: 46;
	opacity: calc(1 - (var(--fstc-stack-opacity-step) * 4));
	filter: blur(calc(var(--fstc-stack-blur) * 4));
	transform: translateY(calc(var(--fstc-stack-offset-y) * -4))
		scale(calc(1 - (var(--fstc-stack-scale-step) / 100 * 4)))
		rotate(calc(var(--fstc-stack-rotation) * 4deg));
}

.fstc-card--dragging {
	transition: none;
}

.fstc-card__inner {
	position: relative;
	padding: 56px 60px 40px 60px;
	overflow: hidden;
}

.fstc-quote {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 42px;
	line-height: 1;
	color: #dc4329;
	pointer-events: none;
}

.fstc-quote svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.fstc-quote--top {
	top: 30px;
	left: 26px;
}

.fstc-quote--bottom {
	bottom: 24px;
	right: 22px;
	transform: rotate(180deg);
}

.fstc-rating {
	display: flex;
	align-items: center;
	gap: 3px;
	margin: 0 0 20px;
	font-size: 18px;
	line-height: 1;
}

.fstc-rating__star {
	position: relative;
	display: inline-block;
	width: 1em;
	height: 1em;
}

.fstc-rating__star::before,
.fstc-rating__star::after {
	position: absolute;
	inset: 0;
	content: '\2605';
	font-size: 1em;
	line-height: 1;
}

.fstc-rating__star::before {
	color: #e7dcd3;
}

.fstc-rating__star::after {
	width: 0;
	overflow: hidden;
	white-space: nowrap;
	color: #dc4329;
}

.fstc-rating__star--full::after {
	width: 100%;
}

.fstc-rating__star--half::after {
	width: 50%;
}

.fstc-card__content {
	margin: 0 0 32px;
	font-family: 'Plus Jakarta Sans', sans-serif;
	font-weight: 500;
	font-size: 22px;
	line-height: 34px;
	color: #575250;
}

.fstc-author {
	display: flex;
	align-items: center;
	gap: 20px;
}

.fstc-author__image {
	flex: none;
	display: inline-block;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
}

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

.fstc-author__meta {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	min-width: 0;
}

.fstc-author__name {
	font-weight: 600;
	font-size: 17px;
	line-height: 26px;
	color: #1e1810;
}

.fstc-author__designation {
	font-weight: 400;
	font-size: 13px;
	line-height: 19px;
	color: #575250;
}

/* Navigation */

.fstc-nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: 28px;
}

.fstc-arrow {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 33px;
	height: 33px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #575250;
	color: #ffffff;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.fstc-arrow:hover,
.fstc-arrow:focus-visible {
	background-color: #dc4329;
}

.fstc-arrow:active {
	transform: scale(0.94);
}

.fstc-arrow:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.fstc-arrow svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.fstc-arrow[disabled] {
	opacity: 0.4;
	cursor: not-allowed;
}

/* "Overlay" arrow position mode: arrows float over the card's vertical center. */
.fstc-arrows-pos-overlay .fstc-carousel__viewport {
	position: relative;
}

.fstc-arrows-pos-overlay .fstc-nav {
	position: absolute;
	inset: 0;
	margin: 0;
	justify-content: space-between;
	pointer-events: none;
}

.fstc-arrows-pos-overlay .fstc-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: auto;
}

.fstc-arrows-pos-overlay .fstc-arrow--prev {
	left: 12px;
}

.fstc-arrows-pos-overlay .fstc-arrow--next {
	right: 12px;
}

.fstc-arrows-pos-overlay .fstc-dots {
	position: absolute;
	left: 50%;
	bottom: -36px;
	transform: translateX(-50%);
	pointer-events: auto;
}

.fstc-arrows-pos-custom .fstc-arrow {
	position: absolute;
	top: 50%;
	left: 50%;
}

.fstc-dots {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.fstc-dot {
	flex: none;
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #575250;
	cursor: pointer;
	transition: background-color 0.25s ease, width 0.25s ease;
}

.fstc-dot--active {
	background-color: #1e1810;
}

.fstc-dots--pill .fstc-dot--active {
	border-radius: 999px;
	width: 26px;
}

.fstc-dots--line .fstc-dot {
	border-radius: 2px;
	height: 4px;
}

.fstc-dot:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.fstc-empty-notice {
	padding: 24px;
	border: 1px dashed rgba(0, 0, 0, 0.2);
	border-radius: 8px;
	text-align: center;
	color: #575250;
}

/* RTL */

.fstc-carousel[dir='rtl'] .fstc-nav {
	flex-direction: row-reverse;
}

.fstc-carousel[dir='rtl'] .fstc-arrow svg,
.fstc-carousel[dir='rtl'] .fstc-arrow i {
	transform: scaleX(-1);
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
	.fstc-card,
	.fstc-arrow,
	.fstc-dot {
		transition-duration: 0.01ms !important;
	}
}

/* Sensible fluid baseline so the widget still adapts even if a site never
   customizes the responsive Style controls. Elementor's own generated,
   higher-specificity rules win wherever a breakpoint value is customized. */
@media (max-width: 1024px) {
	.fstc-card__inner {
		padding: clamp(32px, 6vw, 56px) clamp(28px, 6vw, 60px);
	}

	.fstc-card__content {
		font-size: clamp(17px, 2.4vw, 22px);
		line-height: 1.55;
	}
}

@media (max-width: 600px) {
	.fstc-card__inner {
		padding: 28px 22px;
	}

	.fstc-quote {
		font-size: 30px;
	}

	.fstc-quote--top {
		top: 16px;
		left: 16px;
	}

	.fstc-quote--bottom {
		bottom: 14px;
		right: 14px;
	}

	.fstc-author {
		gap: 14px;
	}
}
