/* ===== Testimonials / đánh giá khách hàng ([peter_testimonials]) ===== */
.peter-testimonials-grid {
	display: grid;
	grid-template-columns: repeat(var(--peter-testimonial-cols, 3), 1fr);
	gap: 24px;
}

.peter-testimonial-card {
	background: #fff;
	border: 1px solid rgba(135, 135, 135, .25);
	border-radius: 10px;
	padding: 28px 26px 22px;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.peter-testimonial-quote {
	color: var(--primary-color);
	margin-bottom: 14px;
}

.peter-testimonial-text {
	color: #333;
	font-size: 15px;
	line-height: 1.65;
	margin: 0 0 18px;
	flex-grow: 1;
	/* Reserve a 4-line minimum so short reviews don't shrink the card, but
	   don't cap the max — longer reviews show in full (see .js-equalized). */
	min-height: calc(1.65em * 4);
}

.peter-testimonial-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 16px;
	border-top: 1px solid rgba(135, 135, 135, .25);
}

.peter-testimonial-author {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.peter-testimonial-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.peter-testimonial-avatar--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--primary-color);
	color: #fff;
}

.peter-testimonial-meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.peter-testimonial-name {
	font-weight: 600;
	color: #333;
	font-size: 14px;
	line-height: 1.3;
	/* Full name, wrapping up to 2 lines instead of truncating with "…". */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

.peter-testimonial-course {
	color: #888;
	font-size: 12px;
	line-height: 1.4;
	margin-top: 2px;
}

.peter-testimonial-stars {
	display: flex;
	gap: 2px;
	flex-shrink: 0;
}

.peter-star {
	color: #FF8300;
}

.peter-star.is-filled {
	color: #FF8300;
}

@media (max-width: 849px) {
	.peter-testimonials-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 549px) {
	.peter-testimonials-grid {
		grid-template-columns: 1fr;
	}
}

/* Slider layout — cards become Flickity cells inside Flatsome's [ux_slider] */
.peter-testimonials-slider .peter-testimonial-card {
	/* height:100% has nothing to resolve against inside Flickity's absolutely
	   positioned track, which collapses adaptiveHeight to ~0. */
	height: auto;
}

/*
 * Flatsome's own flickity.css resets any plain <div> slide with
 * ".flickity-slider > div:not(.col) { margin:0; padding:0; }" — a higher
 * specificity (class+type+:not()) than a plain ".peter-testimonial-card"
 * rule, so it wins the cascade and strips our card's padding/gap. Match
 * that specificity here instead of reaching for !important.
 */
.peter-testimonials-slider .flickity-slider > .peter-testimonial-card {
	/* Gap goes between cards (margin-right only), not around them, so the
	   first card sits flush left and the row edges line up like the grid. */
	margin: 0 24px 0 0;
	padding: 28px 26px 22px;
}

/*
 * Flatsome positions .flickity-page-dots absolutely over the slider
 * ("nav_pos: outside" only moves the prev/next arrows, not the dots), which
 * overlaps the bottom of the cards. Drop it into normal flow below instead.
 */
.peter-testimonials-slider .flickity-page-dots {
	position: static;
	margin-top: 20px;
}
