/* ============================================================
	TESTIMONIALS SECTION
	============================================================ */

.sarathi-testimonials {
	width: 100%;
	background-color: var(--bg-light);
	padding: 3rem 1rem 4rem 1rem;
	overflow: hidden;
}

@media (min-width: 640px) {
	.sarathi-testimonials {
		padding-left: 1.5rem;
		padding-right: 1.5rem;
	}
}

@media (min-width: 768px) {
	.sarathi-testimonials {
		padding-top: 4rem;
		padding-bottom: 5rem;
	}
}

@media (min-width: 1024px) {
	.sarathi-testimonials {
		padding-top: 5rem;
		padding-bottom: 6rem;
		padding-left: 2rem;
		padding-right: 2rem;
	}
}

.sarathi-testimonials-container {
	max-width: 1440px;
	margin-left: auto;
	margin-right: auto;
}

.sarathi-testimonials-heading {
	font-family: var(--font-heading);
	font-size: 36px;
	line-height: 1.2;
	font-weight: 700;
	color: var(--text-main);
	text-align: center;
	margin-top: 0;
	margin-bottom: 2rem;
}

@media (min-width: 768px) {
	.sarathi-testimonials-heading {
		font-size: 42px;
		margin-bottom: 3rem;
	}
}

/* Carousel Wrapper */
.sarathi-testimonials-carousel-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	margin-left: -1rem;
	margin-right: -1rem;
	padding: 1rem;
	/* For hover shadows */
}

@media (min-width: 768px) {
	.sarathi-testimonials-carousel-wrapper {
		margin-left: 0;
		margin-right: 0;
		padding: 1rem 3rem;
		/* Space for arrows */
	}
}

/* Arrows */
.sarathi-testimonials-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: var(--bg-white);
	border: 1px solid var(--border-color);
	color: var(--color-primary);
	font-size: 1.2rem;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 10;
	transition: all 0.3s ease;
	box-shadow: var(--shadow-sm);
}

.sarathi-testimonials-arrow:hover {
	background-color: var(--color-primary);
	color: var(--bg-white);
	border-color: var(--color-primary);
	box-shadow: var(--shadow-md);
}

.sarathi-testimonials-arrow.is-disabled {
	opacity: 0.3;
	cursor: not-allowed;
	pointer-events: none;
}

.sarathi-testimonials-arrow-prev {
	left: 0;
}

.sarathi-testimonials-arrow-next {
	right: 0;
}

/* Keep arrows visible on smaller screens but scale them down to avoid covering text */
@media (max-width: 767px) {
	.sarathi-testimonials-arrow {
		width: 36px;
		height: 36px;
		font-size: 1rem;
	}

	.sarathi-testimonials-arrow-prev {
		left: -0.5rem;
	}

	.sarathi-testimonials-arrow-next {
		right: -0.5rem;
	}
}

/* Track */
.sarathi-testimonials-track {
	display: flex;
	gap: 2rem;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	-ms-overflow-style: none;
	/* IE and Edge */
	scrollbar-width: none;
	/* Firefox */
	padding: 1rem 0;
	/* Padding for card box-shadows */
	align-items: stretch;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.sarathi-testimonials-track::-webkit-scrollbar {
	display: none;
}

/* Card */
.sarathi-testimonials-card {
	flex: 0 0 85%;
	scroll-snap-align: center;
	background-color: var(--bg-white);
	border-radius: var(--border-radius-md);
	padding: 2.5rem 2rem;
	box-shadow: var(--shadow-sm);
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border: 1px solid var(--border-color);
	height: 100%;
	/* Ensure cards can stretch to full height */
}

@media (min-width: 768px) {
	.sarathi-testimonials-card {
		flex: 0 0 calc(45% - 1rem);
	}
}

@media (min-width: 1024px) {
	.sarathi-testimonials-card {
		flex: 0 0 calc(30% - 1.3333rem);
	}
}

.sarathi-testimonials-card.is-active,
.sarathi-testimonials-card:hover {
	transform: scale(1.02);
	box-shadow: var(--shadow-md);
	border-color: transparent;
	z-index: 2;
}

/* Quote Icon */
.sarathi-testimonials-quote-icon {
	align-self: flex-start;
	color: var(--color-primary);
	font-size: 2.5rem;
	line-height: 1;
	opacity: 0.8;
	margin-bottom: -1rem;
}

/* Profile Photo */
.sarathi-testimonials-photo {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	overflow: hidden;
	margin-bottom: 1.5rem;
	background-color: var(--bg-light);
}

.sarathi-testimonials-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Content Container */
.sarathi-testimonials-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

/* Quote Text */
.sarathi-testimonials-quote {
	flex: 1;
	margin-bottom: 1.5rem;
}

.sarathi-testimonials-quote p {
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text-muted);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sarathi-testimonials-card.is-clickable {
	cursor: pointer;
}

/* Author Info */
.sarathi-testimonials-author {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.sarathi-testimonials-name {
	font-family: var(--font-heading);
	font-size: 18px;
	font-weight: 700;
	color: var(--text-main);
	margin-bottom: 0.25rem;
}

.sarathi-testimonials-role {
	font-family: var(--font-body);
	font-size: 14px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 500;
}

/* Pagination Dots */
.sarathi-testimonials-pagination {
	display: flex;
	justify-content: center;
	gap: 0.5rem;
	margin-top: 2rem;
}

.sarathi-testimonials-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: var(--border-color);
	cursor: pointer;
	transition: background-color 0.3s ease;
	padding: 0;
	border: none;
}

.sarathi-testimonials-dot.is-active,
.sarathi-testimonials-dot:hover {
	background-color: var(--color-primary);
}

/* 1 or 2 Cards Layout */
@media (min-width: 768px) {

	.sarathi-testimonials-carousel-wrapper.has-1-card .sarathi-testimonials-track,
	.sarathi-testimonials-carousel-wrapper.has-2-cards .sarathi-testimonials-track {
		justify-content: center;
		overflow: hidden;
	}

	.sarathi-testimonials-carousel-wrapper.has-1-card .sarathi-testimonials-arrow,
	.sarathi-testimonials-carousel-wrapper.has-2-cards .sarathi-testimonials-arrow {
		display: none;
	}

	.sarathi-testimonials-carousel-wrapper.has-1-card~.sarathi-testimonials-pagination,
	.sarathi-testimonials-carousel-wrapper.has-2-cards~.sarathi-testimonials-pagination {
		display: none;
	}

	.sarathi-testimonials-carousel-wrapper.has-1-card .sarathi-testimonials-card {
		flex: 0 0 100%;
		max-width: 800px;
	}

	.sarathi-testimonials-carousel-wrapper.has-2-cards .sarathi-testimonials-card {
		flex: 0 0 calc(50% - 1rem);
	}
}

/* 3 Cards Layout */
@media (min-width: 1024px) {
	.sarathi-testimonials-carousel-wrapper.has-3-cards .sarathi-testimonials-track {
		justify-content: center;
		overflow: auto;
	}

	.sarathi-testimonials-carousel-wrapper.has-3-cards .sarathi-testimonials-card {
		flex: 0 0 calc(33.3333% - 1.3333rem);
	}
}

/* ============================================================
	MODAL STYLES
	============================================================ */

.sarathi-testimonials-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sarathi-testimonials-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.sarathi-testimonials-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
}

.sarathi-testimonials-modal-content {
	position: relative;
	width: 90%;
	max-width: 600px;
	max-height: 90vh;
	overflow-y: auto;
	background-color: var(--bg-white);
	border-radius: var(--border-radius-md);
	padding: 3rem 2rem;
	box-shadow: var(--shadow-lg);
	z-index: 1;
	transform: translateY(20px);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	border: 1px solid var(--border-color);
}

.sarathi-testimonials-modal.is-open .sarathi-testimonials-modal-content {
	transform: translateY(0);
}

.sarathi-testimonials-modal-close {
	position: absolute;
	top: 1rem;
	right: 1.5rem;
	background: none;
	border: none;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	color: var(--text-muted);
	padding: 0;
	transition: color 0.3s ease;
}

.sarathi-testimonials-modal-close:hover {
	color: var(--color-primary);
}

.sarathi-testimonials-modal-body {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.sarathi-testimonials-modal-photo-wrapper .sarathi-testimonials-photo {
	margin: 0 auto 1.5rem auto;
}

.sarathi-testimonials-modal-text {
	font-family: var(--font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--text-main);
	margin-bottom: 2rem;
}

.sarathi-testimonials-modal-author {
	display: flex;
	flex-direction: column;
	align-items: center;
}