.bw-testimonial-wall {
	--bwtw-columns: 3;
	--bwtw-gap: var(--bw-gap, 24px);
	--bwtw-content-gap: 18px;
	--bwtw-ink: #172033;
	--bwtw-muted: #667085;
	--bwtw-accent: #14b8a6;
	position: relative;
	width: 100%;
	min-width: 0;
	background: var(--bw-bg, transparent);
}

.bw-testimonial-wall *,
.bw-testimonial-wall *::before,
.bw-testimonial-wall *::after { box-sizing: border-box; }

.bw-testimonial-track {
	display: grid;
	grid-template-columns: repeat(var(--bwtw-columns), minmax(0, 1fr));
	gap: var(--bwtw-gap);
	align-items: stretch;
}

.bw-testimonial-item { min-width: 0; height: auto; }

.bw-testimonial-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--bwtw-content-gap);
	width: 100%;
	height: auto;
	min-width: 0;
	padding: clamp(22px, 3vw, 32px);
	color: var(--bw-text, var(--bwtw-ink));
	background: var(--bw-card-bg, #fff);
	border: 1px solid #e7ebf1;
	border-radius: var(--bw-radius, 18px);
	box-shadow: 0 16px 45px rgba(15, 23, 42, .08);
	overflow: hidden;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.bw-testimonial-wall.is-equal-height .bw-testimonial-item,
.bw-testimonial-wall.is-equal-height .bw-testimonial-card { height: 100%; }

.bw-testimonial-card-top,
.bw-testimonial-footer,
.bw-testimonial-author {
	display: flex;
	align-items: center;
}

.bw-testimonial-card-top { justify-content: space-between; gap: 16px; min-height: 24px; }
.bw-testimonial-footer { flex-wrap: wrap; gap: 8px 12px; margin-top: auto; }
.bw-testimonial-author { justify-content: var(--bwtw-align, start); gap: 13px; min-width: 0; }

.bw-testimonial-review,
.bw-testimonial-review p {
	margin: 0;
	color: #344054;
	font-size: 15px;
	line-height: 1.75;
	overflow-wrap: anywhere;
}

.bw-testimonial-read-more {
	align-self: flex-start;
	margin-top: -10px;
	padding: 0;
	color: var(--bwtw-accent);
	background: none;
	border: 0;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
}

.bw-testimonial-avatar {
	display: grid !important;
	flex: 0 0 var(--bwtw-avatar-size, 54px);
	place-items: center;
	width: var(--bwtw-avatar-size, 54px) !important;
	height: var(--bwtw-avatar-size, 54px) !important;
	min-width: var(--bwtw-avatar-size, 54px);
	min-height: var(--bwtw-avatar-size, 54px);
	max-width: var(--bwtw-avatar-size, 54px) !important;
	max-height: var(--bwtw-avatar-size, 54px) !important;
	margin: 0;
	object-fit: cover;
	aspect-ratio: 1 / 1;
	background: linear-gradient(135deg, #ccfbf1, #99f6e4);
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 0 0 1px #dce5eb;
	overflow: hidden;
}

.bw-testimonial-avatar-placeholder {
	color: #0f766e;
	font-size: calc(var(--bwtw-avatar-size, 54px) * .32);
	font-weight: 800;
	line-height: 1;
}

.bw-testimonial-author-copy { display: grid; gap: 3px; min-width: 0; }
.bw-testimonial-name { color: var(--bw-text, var(--bwtw-ink)); font-size: 15px; font-weight: 800; line-height: 1.3; text-decoration: none; }
.bw-testimonial-name:hover { color: var(--bw-primary, var(--bwtw-accent)); }
.bw-testimonial-meta { color: var(--bw-muted, var(--bwtw-muted)); font-size: 12px; line-height: 1.45; }
.bw-testimonial-stars { color: #f59e0b; font-size: 16px; letter-spacing: 2px; line-height: 1; white-space: nowrap; }
.bw-testimonial-company-logo { display: block; width: auto; max-width: 92px; height: 28px; object-fit: contain; }

.bw-testimonial-source,
.bw-testimonial-verified {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 26px;
	padding: 5px 9px;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}
.bw-testimonial-source { color: #344054; background: #f2f4f7; }
.bw-source-google { color: #174ea6; background: #e8f0fe; }
.bw-source-facebook { color: #0866ff; background: #e7f0ff; }
.bw-source-trustpilot { color: #006b54; background: #dff8ef; }
.bw-source-yelp { color: #b91c1c; background: #feecec; }
.bw-testimonial-source i,
.bw-testimonial-source svg { width: 13px; height: 13px; }
.bw-testimonial-verified { color: #08775d; background: #dffbf2; }
.bw-testimonial-footer time { margin-inline-start: auto; color: var(--bwtw-muted); font-size: 11px; }

.bw-testimonial-quote { position: absolute; top: 8px; right: 20px; color: rgba(20, 184, 166, .12); font: 800 92px/1 Georgia, serif; pointer-events: none; }
.bw-testimonial-video { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; background: #0f172a; overflow: hidden; }
.bw-testimonial-video iframe,
.bw-testimonial-video video { width: 100%; height: 100%; border: 0; object-fit: cover; }
.bw-testimonial-video > a { display: grid; place-items: center; height: 100%; color: #fff; }

/* Masonry deliberately uses CSS columns so editor and frontend stay in sync. */
.bw-testimonial-wall.is-masonry:not(.bw-testimonial-layout-carousel):not(.bw-testimonial-layout-centered-carousel) .bw-testimonial-track {
	display: block;
	columns: var(--bwtw-columns);
	column-gap: var(--bwtw-gap);
}
.bw-testimonial-wall.is-masonry .bw-testimonial-item { display: inline-block; width: 100%; height: auto; margin: 0 0 var(--bwtw-gap); break-inside: avoid; }
.bw-testimonial-wall.is-masonry .bw-testimonial-card { height: auto; }

/* Carousel */
.bw-testimonial-layout-carousel .bw-testimonial-viewport,
.bw-testimonial-layout-centered-carousel .bw-testimonial-viewport { position: relative; padding: 10px 5px 52px; overflow: hidden; }
.bw-testimonial-layout-carousel .bw-testimonial-track,
.bw-testimonial-layout-centered-carousel .bw-testimonial-track { display: flex; gap: 0; align-items: stretch; }
.bw-testimonial-layout-carousel .swiper-slide,
.bw-testimonial-layout-centered-carousel .swiper-slide { height: auto; }
.bw-testimonial-layout-centered-carousel .swiper-slide { opacity: .55; transform: scale(.94); transition: opacity .3s ease, transform .3s ease; }
.bw-testimonial-layout-centered-carousel .swiper-slide-active { opacity: 1; transform: scale(1); }
.bw-testimonial-arrow { position: absolute; z-index: 4; bottom: 4px; display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: #172033; border: 0; border-radius: 50%; cursor: pointer; }
.bw-testimonial-prev { left: 5px; }
.bw-testimonial-next { right: 5px; }
.bw-testimonial-pagination { position: absolute; z-index: 3; bottom: 15px !important; left: 50% !important; width: auto !important; transform: translateX(-50%); }
.bw-testimonial-pagination .swiper-pagination-bullet { width: 8px; height: 8px; margin: 0 4px; background: #cbd5e1; opacity: 1; }
.bw-testimonial-pagination .swiper-pagination-bullet-active { width: 22px; background: var(--bwtw-accent); border-radius: 999px; }
.bw-testimonial-wall.is-carousel-fallback .bw-testimonial-viewport { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.bw-testimonial-wall.is-carousel-fallback .bw-testimonial-track { display: flex; gap: var(--bwtw-gap); }
.bw-testimonial-wall.is-carousel-fallback .bw-testimonial-item { flex: 0 0 min(86vw, 380px); scroll-snap-align: center; }
.bw-testimonial-wall.is-carousel-fallback .bw-testimonial-arrow,
.bw-testimonial-wall.is-carousel-fallback .bw-testimonial-pagination { display: none; }

/* Layout variations */
.bw-testimonial-layout-minimal .bw-testimonial-card { padding: 22px 0; background: transparent; border-width: 0 0 1px; border-radius: 0; box-shadow: none; }
.bw-testimonial-layout-quote .bw-testimonial-review { position: relative; z-index: 1; font-family: Georgia, serif; font-size: 18px; }
.bw-testimonial-layout-avatar-focus .bw-testimonial-author { flex-direction: column; text-align: center; }
.bw-testimonial-layout-avatar-focus .bw-testimonial-avatar { --bwtw-avatar-size: 84px; }
.bw-testimonial-layout-avatar-focus .bw-testimonial-card-top,
.bw-testimonial-layout-avatar-focus .bw-testimonial-footer { justify-content: center; }
.bw-testimonial-layout-social .bw-testimonial-card { border-top: 4px solid var(--bwtw-accent); }
.bw-testimonial-layout-video .bw-testimonial-track { grid-template-columns: repeat(var(--bwtw-columns), minmax(280px, 1fr)); }
.bw-testimonial-layout-grid:not(.is-masonry) .bw-testimonial-item.is-featured-item { grid-column: span 2; }

/* Presets */
.bw-testimonial-preset-glass { padding: 24px; background: radial-gradient(circle at 20% 10%, #ccfbf1, transparent 35%), linear-gradient(135deg, #e0f2fe, #f5f3ff); border-radius: 24px; }
.bw-testimonial-preset-glass .bw-testimonial-card { background: rgba(255,255,255,.56); border-color: rgba(255,255,255,.8); backdrop-filter: blur(16px); }
.bw-testimonial-preset-dark { padding: 24px; background: #08111f; border-radius: 24px; }
.bw-testimonial-preset-dark .bw-testimonial-card { color: #fff; background: linear-gradient(145deg, #172235, #0f172a); border-color: rgba(255,255,255,.1); }
.bw-testimonial-preset-dark .bw-testimonial-review,
.bw-testimonial-preset-dark .bw-testimonial-review p,
.bw-testimonial-preset-dark .bw-testimonial-name { color: #f8fafc; }
.bw-testimonial-preset-dark .bw-testimonial-meta { color: #94a3b8; }
.bw-testimonial-preset-soft-shadow .bw-testimonial-card { border-color: transparent; box-shadow: 0 22px 60px rgba(15,23,42,.12); }
.bw-testimonial-preset-border-only .bw-testimonial-card { box-shadow: none; border: 2px solid #e2e8f0; }
.bw-testimonial-preset-social-proof .bw-testimonial-card { border-top: 4px solid #4285f4; }
.bw-testimonial-preset-quote-focus .bw-testimonial-card { padding-top: 50px; background: #fffbeb; border-color: #fde68a; }

.bwtw-hover-lift .bw-testimonial-card:hover { transform: translateY(-7px); box-shadow: 0 24px 55px rgba(15,23,42,.14); }
.bwtw-hover-scale .bw-testimonial-card:hover { transform: scale(1.025); }
.bwtw-hover-tilt .bw-testimonial-card:hover { transform: rotate(-.5deg) translateY(-4px); }

@media (max-width: 767px) {
	.bw-testimonial-card { padding: 22px 18px; border-radius: 15px; }
	.bw-testimonial-footer time { width: 100%; margin-inline-start: 0; }
	.bw-testimonial-wall.is-masonry .bw-testimonial-track { columns: 1; }
	.bw-testimonial-layout-grid:not(.is-masonry) .bw-testimonial-item.is-featured-item { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
	.bw-testimonial-card,
	.bw-testimonial-layout-centered-carousel .swiper-slide { transition: none !important; }
}
