@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Poppins', sans-serif;
	background-color: #ffffff;
	padding: 80px 20px;
}

.testimonial-section {
	max-width: 1440px;
	margin: 0 auto;
	padding: 10px 0;
}

h1 {
	text-align: center;
	font-size: 48px;
	font-weight: 600;
	margin-bottom: 80px;
	color: #000000;
	letter-spacing: -0.5px;
	font-family: 'Poppins', sans-serif;
	padding: 5px 0;
}

.carousel-container {
	position: relative;
	padding: 0 80px;
	padding-top: 20px;
	padding-bottom: 20px;
}

.carousel-wrapper {
	overflow: hidden;
}

.carousel-track {
	display: flex;
	gap: 30px;
	transition: transform 0.5s ease-in-out;
	align-items: stretch;
}

/* ✅ Fixed height so all cards are exactly the same size */
.testimonial-card {
	flex: 0 0 calc(33.333% - 20px);
	background: #ffffff;
	display: flex;
	flex-direction: column;
	height: 260px;
	min-height: 260px;
	max-height: 260px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.03);
	padding: 20px 18px 18px 18px;
	overflow: hidden;
	transition: height 0.3s ease, max-height 0.3s ease;
}

/* ✅ When expanded, card grows to fit full content */
.testimonial-card.expanded {
	height: auto;
	max-height: 600px;
	overflow: visible;
	z-index: 2;
}

.stars {
	display: flex;
	gap: 5px;
	margin-top: 0;
	margin-bottom: 10px;
	flex-shrink: 0;
}

.star {
	color: #27ae60;
	font-size: 20px;
}

/* ✅ Text is clamped to 3 lines, flex-grow fills remaining card space */
.testimonial-text {
	font-size: 16px;
	line-height: 1.7;
	color: #000000;
	font-weight: 400;
	font-style: italic;
	margin: 0;
	flex-grow: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-overflow: ellipsis;
}

.testimonial-card.expanded .testimonial-text {
	-webkit-line-clamp: unset;
	overflow: visible;
	flex-grow: 0;
}

/* ✅ user-info always pinned at bottom with consistent spacing */
.user-info {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding-top: 16px;
	flex-shrink: 0;
}

.user-avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.user-details {
	display: flex;
	flex-direction: column;
	gap: 2px;
	justify-content: center;
	flex: 1;
}

.user-name {
	font-weight: 600;
	font-size: 15px;
	color: #000000;
}

.user-company a {
	color: #7ca7c7;
	text-decoration: none;
	font-size: 14px;
}

/* ✅ see-more hidden by default, shown via JS only when text actually overflows */
/* Placed inside .user-info, aligned to the right of the company name */
.see-more {
	color: #27ae60;
	cursor: pointer;
	font-size: 14px;
	background: none;
	border: none;
	padding: 0;
	font-family: inherit;
	margin-left: auto;
	white-space: nowrap;
	flex-shrink: 0;
	align-self: flex-end;
	display: none;
}

.carousel-button {
	position: absolute;
	top: 35%;
	transform: translateY(-50%);
	background-color: transparent;
	border: none;
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: opacity 0.3s ease;
	z-index: 10;
	padding: 0;
}

.carousel-button:hover {
	opacity: 0.7;
}

.carousel-button.prev {
	left: 10px;
}

.carousel-button.next {
	right: 10px;
}

.chevron {
	width: 16px;
	height: 16px;
	border-top: 3px solid #000000;
	border-right: 3px solid #000000;
}

.chevron-left {
	transform: rotate(-135deg);
}

.chevron-right {
	transform: rotate(45deg);
}

@media (max-width: 1024px) {
	.testimonial-card {
		flex: 0 0 calc(50% - 15px);
	}
}

@media (max-width: 640px) {
	.testimonial-card {
		flex: 0 0 100%;
	}
	h1 {
		font-size: 36px;
	}
	.carousel-container {
		padding: 0 60px;
	}
}