/**
 * AshikhaSoft Testimonials Carousel – frontend styles.
 */

.ahst-testimonials {
	--ahst-card-bg: #ffffff;
	--ahst-card-border: #e5e7eb;
	--ahst-text: #374151;
	--ahst-meta: #6b7280;
	--ahst-name: #111827;
	--ahst-star: #f5a623;
	--ahst-accent: #6366f1;
	--ahst-nav-bg: #ffffff;
	--ahst-nav-color: #111827;
	--ahst-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
	--ahst-bubble-bg: #f3f4f6;
	--ahst-accent-border: 4px;
	position: relative;
	width: 100%;
	padding: 0 48px;
	box-sizing: border-box;
}

.ahst-testimonials *,
.ahst-testimonials *::before,
.ahst-testimonials *::after {
	box-sizing: border-box;
}

.ahst-carousel__swiper {
	overflow: hidden;
	padding-bottom: 40px;
	touch-action: pan-y pinch-zoom;
}

.ahst-carousel--grid {
	padding: 0;
}

.ahst-carousel--grid .ahst-carousel__swiper {
	overflow: visible;
	padding-bottom: 0;
}

.ahst-carousel--grid .swiper-wrapper {
	display: grid;
	gap: var(--ahst-gap, 24px);
	grid-template-columns: repeat(var(--ahst-cols, 1), minmax(0, 1fr));
	transform: none !important;
}

.ahst-carousel--grid .swiper-slide {
	height: auto !important;
	margin: 0 !important;
	width: auto !important;
}

@media (min-width: 768px) {
	.ahst-carousel--grid .swiper-wrapper {
		grid-template-columns: repeat(var(--ahst-cols-tablet, 2), minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.ahst-carousel--grid .swiper-wrapper {
		grid-template-columns: repeat(var(--ahst-cols-desktop, 3), minmax(0, 1fr));
	}
}

.ahst-carousel__swiper .swiper-wrapper {
	align-items: stretch;
}

.ahst-carousel__swiper .swiper-slide {
	box-sizing: border-box;
	display: flex;
	height: auto;
}

.ahst-testimonial {
	background: var(--ahst-card-bg);
	border: 1px solid var(--ahst-card-border);
	border-radius: 16px;
	box-shadow: var(--ahst-shadow);
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 16px;
	height: 100%;
	min-height: 100%;
	padding: 28px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	width: 100%;
}

.ahst-testimonial:hover {
	box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
	transform: translateY(-2px);
}

.ahst-testimonial__quote-icon {
	color: var(--ahst-accent);
	line-height: 1;
	opacity: 0.85;
}

.ahst-testimonial__rating {
	display: flex;
	gap: 2px;
}

.ahst-star {
	color: #d1d5db;
	font-size: 16px;
	line-height: 1;
}

.ahst-star--filled {
	color: var(--ahst-star);
}

.ahst-testimonial__content {
	color: var(--ahst-text);
	flex: 1;
	font-size: 16px;
	line-height: 1.7;
	margin: 0;
}

.ahst-testimonial__content p {
	margin: 0;
}

.ahst-testimonial__footer {
	align-items: center;
	display: flex;
	gap: 14px;
	margin-top: auto;
}

.ahst-testimonial__avatar-wrap {
	flex-shrink: 0;
}

.ahst-testimonial__avatar {
	border-radius: 50%;
	display: block;
	height: 56px;
	object-fit: cover;
	width: 56px;
}

.ahst-testimonial__avatar--placeholder {
	align-items: center;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	color: #fff;
	display: flex;
	font-size: 20px;
	font-weight: 700;
	justify-content: center;
	text-transform: uppercase;
}

.ahst-testimonial__name {
	color: var(--ahst-name);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 4px;
}

.ahst-testimonial__meta {
	color: var(--ahst-meta);
	font-size: 14px;
	line-height: 1.4;
	margin: 0;
}

.ahst-carousel__nav {
	align-items: center;
	background: var(--ahst-nav-bg);
	border: 1px solid var(--ahst-card-border);
	border-radius: 50%;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
	color: var(--ahst-nav-color);
	cursor: pointer;
	display: flex;
	height: 44px;
	justify-content: center;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
	width: 44px;
	z-index: 10;
}

.ahst-carousel__nav:hover,
.ahst-carousel__nav:focus-visible {
	background: var(--ahst-accent);
	border-color: var(--ahst-accent);
	box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
	color: #fff;
	outline: none;
}

.ahst-carousel__nav--prev {
	left: 0;
}

.ahst-carousel__nav--next {
	right: 0;
}

.ahst-carousel__pagination.swiper-pagination-bullets {
	bottom: 0 !important;
	line-height: 1;
}

.ahst-carousel__pagination .swiper-pagination-bullet {
	background: #cbd5e1;
	height: 8px;
	opacity: 1;
	transition: width 0.3s ease, background 0.3s ease;
	width: 8px;
}

.ahst-carousel__pagination .swiper-pagination-bullet-active {
	background: var(--ahst-accent);
	border-radius: 4px;
	width: 24px;
}

.ahst-testimonials-empty {
	color: var(--ahst-meta);
	font-style: italic;
	text-align: center;
}

/* Layout 1: Modern Card (default) */
.ahst-testimonials--card .ahst-testimonial {
	background: var(--ahst-card-bg);
	border: 1px solid var(--ahst-card-border);
	border-radius: 16px;
	box-shadow: var(--ahst-shadow);
}

.ahst-testimonials--card .ahst-testimonial:hover {
	box-shadow: 0 16px 48px rgba(15, 23, 42, 0.12);
	transform: translateY(-2px);
}

/* Layout 2: Classic Quote — Trustpilot / Google Reviews style */
.ahst-testimonials--classic .ahst-testimonial {
	align-items: center;
	background: var(--ahst-card-bg);
	border: 1px solid var(--ahst-card-border);
	border-radius: 12px;
	box-shadow: none;
	padding: 36px 32px 28px;
	text-align: center;
}

.ahst-testimonials--classic .ahst-testimonial:hover {
	box-shadow: var(--ahst-shadow);
	transform: none;
}

.ahst-testimonials--classic .ahst-testimonial__quote-icon {
	margin-bottom: 4px;
	opacity: 0.35;
}

.ahst-testimonials--classic .ahst-testimonial__quote-icon svg {
	height: 48px;
	width: 48px;
}

.ahst-testimonials--classic .ahst-testimonial__rating {
	justify-content: center;
	margin-bottom: 4px;
}

.ahst-testimonials--classic .ahst-testimonial__content {
	font-size: 17px;
	font-style: italic;
	line-height: 1.75;
	max-width: 36ch;
}

.ahst-testimonials--classic .ahst-testimonial__footer {
	flex-direction: column;
	justify-content: center;
	margin-top: 8px;
	text-align: center;
}

.ahst-testimonials--classic .ahst-testimonial__avatar {
	height: 52px;
	width: 52px;
}

/* Layout 3: Side Profile — LinkedIn / review site style */
.ahst-testimonials--profile .ahst-testimonial {
	background: var(--ahst-card-bg);
	border: 1px solid var(--ahst-card-border);
	border-radius: 14px;
	box-shadow: var(--ahst-shadow);
	display: grid;
	gap: 12px 20px;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto 1fr;
	height: 100%;
	padding: 24px;
}

.ahst-testimonials--profile .ahst-testimonial:hover {
	box-shadow: 0 14px 40px rgba(15, 23, 42, 0.1);
	transform: translateY(-1px);
}

.ahst-testimonials--profile .ahst-testimonial__quote-icon {
	display: none;
}

.ahst-testimonials--profile .ahst-testimonial__footer {
	align-items: center;
	flex-direction: column;
	grid-column: 1;
	grid-row: 1 / -1;
	justify-content: center;
	margin-top: 0;
	text-align: center;
	width: 88px;
}

.ahst-testimonials--profile .ahst-testimonial__avatar {
	height: 64px;
	width: 64px;
}

.ahst-testimonials--profile .ahst-testimonial__avatar--placeholder {
	height: 64px;
	width: 64px;
}

.ahst-testimonials--profile .ahst-testimonial__rating {
	grid-column: 2;
	grid-row: 1;
}

.ahst-testimonials--profile .ahst-testimonial__content {
	grid-column: 2;
	grid-row: 2 / -1;
}

.ahst-testimonials--profile .ahst-testimonial__author {
	width: 100%;
}

.ahst-testimonials--profile .ahst-testimonial__name {
	font-size: 15px;
}

.ahst-testimonials--profile .ahst-testimonial__meta {
	font-size: 12px;
}

/* Layout 4: Speech Bubble — chat / conversational style */
.ahst-testimonials--bubble .ahst-testimonial {
	background: transparent;
	border: none;
	box-shadow: none;
	gap: 12px;
	height: 100%;
	padding: 8px 4px 16px;
}

.ahst-testimonials--bubble .ahst-testimonial:hover {
	box-shadow: none;
	transform: none;
}

.ahst-testimonials--bubble .ahst-testimonial__quote-icon {
	display: none;
}

.ahst-testimonials--bubble .ahst-testimonial__rating {
	order: 2;
}

.ahst-testimonials--bubble .ahst-testimonial__content {
	background: var(--ahst-bubble-bg);
	border-radius: 18px 18px 18px 4px;
	order: 1;
	padding: 20px 22px;
	position: relative;
}

.ahst-testimonials--bubble .ahst-testimonial__content::after {
	border-color: var(--ahst-bubble-bg) transparent transparent transparent;
	border-style: solid;
	border-width: 10px 12px 0 0;
	bottom: -10px;
	content: "";
	height: 0;
	left: 20px;
	position: absolute;
	width: 0;
}

.ahst-testimonials--bubble .ahst-testimonial__footer {
	margin-top: auto;
	order: 3;
	padding-left: 8px;
}

/* Legacy layout aliases (backward compatibility) */
.ahst-testimonials--minimal .ahst-testimonial,
.ahst-testimonials--centered .ahst-testimonial {
	align-items: center;
	background: var(--ahst-card-bg);
	border: 1px solid var(--ahst-card-border);
	border-radius: 12px;
	box-shadow: none;
	padding: 36px 32px 28px;
	text-align: center;
}

.ahst-testimonials--minimal .ahst-testimonial__content,
.ahst-testimonials--centered .ahst-testimonial__content {
	font-size: 17px;
	font-style: italic;
}

.ahst-testimonials--minimal .ahst-testimonial__footer,
.ahst-testimonials--centered .ahst-testimonial__footer {
	flex-direction: column;
	justify-content: center;
}

.ahst-testimonials--minimal .ahst-testimonial__rating,
.ahst-testimonials--centered .ahst-testimonial__rating {
	justify-content: center;
}

@media (max-width: 767px) {
	.ahst-testimonials:not(.ahst-carousel--grid) {
		padding: 0 36px;
	}

	.ahst-carousel__nav {
		height: 36px;
		width: 36px;
	}

	.ahst-testimonial {
		padding: 20px;
	}

	.ahst-testimonials--profile .ahst-testimonial {
		grid-template-columns: 1fr;
		grid-template-rows: auto;
		text-align: center;
	}

	.ahst-testimonials--profile .ahst-testimonial__footer {
		grid-column: 1;
		grid-row: auto;
		width: auto;
	}

	.ahst-testimonials--profile .ahst-testimonial__rating,
	.ahst-testimonials--profile .ahst-testimonial__content {
		grid-column: 1;
		grid-row: auto;
	}

	.ahst-testimonials--profile .ahst-testimonial__rating {
		justify-content: center;
	}

	.ahst-testimonials--classic .ahst-testimonial__content {
		max-width: none;
	}
}

@media (max-width: 480px) {
	.ahst-testimonials:not(.ahst-carousel--grid) {
		padding: 0 8px;
	}

	.ahst-carousel__nav {
		display: none;
	}
}
