/* ========== 客户见证卡片（about + 首页） ========== */

body.about-page #about_testimonials .ywx-testimonial-card-grid,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card-grid,
section#testimonials .ywx-testimonial-card-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1.5rem;
	margin: 1.5rem auto 0;
	max-width: 1200px;
	text-align: left;
}

/* 关于我们：客户见证卡片与下一模块之间留白 */
body.about-page #about_testimonials.ywx-about-band-root > .ywx-about-band-inner,
body.about-page #about_testimonials.ywx-about-band-root > .container.ywx-about-band-inner {
	padding-bottom: var(--ywx-about-section-pb, 24px);
}

body.about-page #about_testimonials .ywx-testimonial-card-grid {
	margin-bottom: var(--ywx-about-section-pb, 24px);
}

body.about-page #about_testimonials.ywx-about-band-root + .ywx-about-band-root,
body.about-page #about_testimonials.ywx-about-band-root + .team-wrap,
body.about-page #about_testimonials.ywx-about-band-root + .about-single-custom-merge,
body.about-page #about_testimonials.ywx-about-band-root + [id^="company_graphic_merged_"],
body.about-page #about_testimonials.ywx-about-band-root + #company_graphic_wrap {
	padding-top: calc(var(--ywx-about-section-gap, 32px) + var(--ywx-about-section-pb, 24px));
}

body.about-page #about_testimonials .ywx-testimonial-card,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card,
section#testimonials .ywx-testimonial-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
	padding: 1.5rem;
	min-height: 220px;
	margin: 0;
	text-align: left;
}

body.about-page #about_testimonials .ywx-testimonial-card__stars,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card__stars,
section#testimonials .ywx-testimonial-card__stars {
	font-size: 0.95rem;
	line-height: 1;
	color: #111827;
	letter-spacing: 0.08em;
	margin: 0 0 1rem;
}

body.about-page #about_testimonials .ywx-testimonial-card__quote,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card__quote,
section#testimonials .ywx-testimonial-card__quote {
	flex: 1;
	margin: 0 0 1rem;
	font-size: 0.95rem;
	line-height: 1.65;
	color: #5a6b7d;
	text-align: left;
}

body.about-page #about_testimonials .ywx-testimonial-card__company,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card__company,
section#testimonials .ywx-testimonial-card__company {
	display: block;
	width: 100%;
	margin: 0 0 0.85rem;
	padding: 0;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.35;
	color: #111827;
	text-align: left;
}

body.about-page #about_testimonials .ywx-testimonial-card__footer,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card__footer,
section#testimonials .ywx-testimonial-card__footer {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-top: auto;
	text-align: left;
}

body.about-page #about_testimonials .ywx-testimonial-card__avatar,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card__avatar,
section#testimonials .ywx-testimonial-card__avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background: #f3f4f6;
}

body.about-page #about_testimonials .ywx-testimonial-card__avatar--placeholder,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card__avatar--placeholder,
section#testimonials .ywx-testimonial-card__avatar--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	font-weight: 700;
	color: #64748b;
}

body.about-page #about_testimonials .ywx-testimonial-card__meta,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card__meta,
section#testimonials .ywx-testimonial-card__meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
	flex: 1;
	text-align: left;
}

body.about-page #about_testimonials .ywx-testimonial-card__reviewer,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card__reviewer,
section#testimonials .ywx-testimonial-card__reviewer {
	font-size: 0.85rem;
	color: #475569;
	line-height: 1.35;
}

body.about-page #about_testimonials .ywx-testimonial-card__role,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card__role,
section#testimonials .ywx-testimonial-card__role {
	font-size: 0.82rem;
	color: #94a3b8;
	line-height: 1.35;
}

body.about-page #about_testimonials .ywx-testimonial-card--logo-only,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card--logo-only,
section#testimonials .ywx-testimonial-card--logo-only {
	align-items: center;
	text-align: center;
}

body.about-page #about_testimonials .ywx-testimonial-card--logo-only .ywx-testimonial-card__company,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card--logo-only .ywx-testimonial-card__company,
section#testimonials .ywx-testimonial-card--logo-only .ywx-testimonial-card__company {
	text-align: center;
}

body.about-page #about_testimonials .ywx-testimonial-card--logo-only .ywx-testimonial-card__footer,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card--logo-only .ywx-testimonial-card__footer,
section#testimonials .ywx-testimonial-card--logo-only .ywx-testimonial-card__footer {
	flex-direction: column;
	justify-content: center;
}

body.about-page #about_testimonials .ywx-testimonial-card--logo-only .ywx-testimonial-card__avatar,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card--logo-only .ywx-testimonial-card__avatar,
section#testimonials .ywx-testimonial-card--logo-only .ywx-testimonial-card__avatar {
	width: 72px;
	height: 72px;
	border-radius: 12px;
	object-fit: contain;
	padding: 0.35rem;
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

body.about-page #about_testimonials .ywx-home-testimonial-more-wrap,
.index-page section[ywx-variable="total-home-testimonials"] .ywx-home-testimonial-more-wrap,
section#testimonials .ywx-home-testimonial-more-wrap {
	text-align: center;
	margin-top: 0.75rem;
}

/* 覆盖 style.css 旧轮播居中样式 */
body.about-page #about_testimonials.team-wrap .ywx-testimonial-card-grid {
	text-align: left;
}

.index-page section#testimonials .ywx-testimonial-card-grid {
	text-align: left;
}

@media (max-width: 1199px) {
	body.about-page #about_testimonials .ywx-testimonial-card-grid,
	.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card-grid,
	section#testimonials .ywx-testimonial-card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 991px) {
	body.about-page #about_testimonials .ywx-testimonial-card-grid,
	.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card-grid,
	section#testimonials .ywx-testimonial-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 575px) {
	body.about-page #about_testimonials .ywx-testimonial-card-grid,
	.index-page section[ywx-variable="total-home-testimonials"] .ywx-testimonial-card-grid,
	section#testimonials .ywx-testimonial-card-grid {
		grid-template-columns: 1fr;
	}
}
