/* Site Builder — Law Firm Testimonials widget styles */

.sb-lf-ts {
	--sb-ts-cols: 4;
	--sb-ts-gap: 26px;
	position: relative;
	width: 100%;
	background-color: #ffffff;
	font-family: var(--sb-font-sans);
	/* The full-bleed tracks below are sized in `vw`, which counts the
	   scrollbar; on a browser with classic (space-taking) scrollbars that
	   overhangs by a few pixels and gives the whole page a horizontal
	   scrollbar. `clip` rather than `hidden` on purpose — `hidden` on one
	   axis forces the other to compute to `auto`, which would clip the
	   cards enlarged on hover. */
	overflow-x: clip;
}

.sb-lf-ts * {
	box-sizing: border-box;
}

.sb-lf-stretch {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.sb-lf-ts-inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 96px 48px;
}

/* Header — Playfair Display is already on the page (the page title widget
   uses it), so the section headings can pick it up and match the masthead
   instead of falling back to a flat system serif. Georgia carries it if the
   webfont is ever absent. */
.sb-lf-ts-header {
	max-width: 820px;
	margin: 0 auto 52px;
	text-align: center;
}

.sb-lf-ts-heading {
	margin: 0;
	color: #151312;
	font-family: var(--sb-font-serif);
	font-weight: 600;
	font-size: clamp(28px, 3.4vw, 44px);
	line-height: 1.18;
	letter-spacing: -0.005em;
}

/* Short gold rule under the heading — gives the block a deliberate finish
   rather than heading-then-paragraph. */
.sb-lf-ts-heading-rule {
	display: block;
	width: 72px;
	height: 2px;
	margin: 20px auto 0;
	color: #c9a227;
	background: currentColor;
	opacity: 0.9;
}

.sb-lf-ts-description {
	margin: 20px auto 0;
	max-width: 720px;
	color: #5f5c57;
	font-size: 16.5px;
	line-height: 1.75;
}

.sb-lf-ts-google-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
	padding: 10px 20px;
	border: 1px solid rgba(201, 162, 39, 0.4);
	border-radius: 999px;
	color: #c9a227;
	font-weight: 700;
	font-size: 13.5px;
	letter-spacing: 0.02em;
	text-decoration: none;
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.sb-lf-ts-google-link:hover {
	background: rgba(201, 162, 39, 0.09);
	border-color: rgba(201, 162, 39, 0.75);
	text-decoration: none;
}

.sb-lf-ts-google-link svg {
	display: block;
	width: 1.15em;
	height: 1.15em;
}

/* Breathing room between the two slideshows, in whichever order the
   "Section Order" setting puts them in. */
.sb-lf-ts-carousel + .sb-lf-ts-header-rec,
.sb-lf-ts-carousel + .sb-lf-ts-header-google {
	margin-top: 86px;
}

/* ---------------------------------------------------------------------
   Carousel

   The track is a real scroll container, not a transformed strip — the
   autoplay in law-firm-testimonials.js drives `scrollLeft`, which keeps
   touch swiping and trackpad scrolling working for free. Two consequences
   are load-bearing here:

   1. Snapping has to be off while it drifts, or every frame gets yanked
      back to the nearest card. `.is-autoplay` (set by the JS) turns it off,
      so a page with autoplay disabled still snaps like a normal carousel.
   2. `overflow-x: auto` forces `overflow-y` to compute to `auto` too, so a
      card scaled up on hover would be clipped and would trip a vertical
      scrollbar. The vertical padding on the viewport is the room that
      enlargement grows into — it is not decorative spacing.
   --------------------------------------------------------------------- */
.sb-lf-ts-carousel {
	position: relative;
}

.sb-lf-ts-track-viewport {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding: 26px clamp(20px, 4vw, 68px);
}

.sb-lf-ts-carousel.is-autoplay .sb-lf-ts-track-viewport {
	scroll-snap-type: none;
}

.sb-lf-ts-track-viewport::-webkit-scrollbar {
	display: none;
}

.sb-lf-ts-track {
	display: flex;
	align-items: stretch;
	gap: var(--sb-ts-gap, 26px);
	width: max-content;
}

/* Full-bleed tracks: the headings stay in the centered content column while
   the cards run to both screen edges. `50%` here resolves against the inner
   wrapper's content box, which is itself centered in the viewport, so this
   lands exactly on the viewport edge. */
.sb-lf-ts-bleed-yes .sb-lf-ts-carousel {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.sb-lf-ts-arrow {
	position: absolute;
	top: 50%;
	z-index: 6;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-top: -23px;
	border: none;
	border-radius: 50%;
	background: #ffffff;
	color: #151312;
	box-shadow: 0 8px 22px -10px rgba(21, 19, 18, 0.45);
	cursor: pointer;
	transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.sb-lf-ts-arrow-prev { left: clamp(6px, 1.2vw, 18px); }
.sb-lf-ts-arrow-next { right: clamp(6px, 1.2vw, 18px); }

.sb-lf-ts-arrow:hover {
	color: #c9a227;
	box-shadow: 0 12px 26px -10px rgba(21, 19, 18, 0.55);
}

.sb-lf-ts-arrow svg {
	display: block;
	width: 1.2em;
	height: 1.2em;
}

/* Card — width is a share of the viewport rather than of the track, because
   the track is `width: max-content` (it is as wide as all the cards laid
   end to end), so a percentage basis would have nothing meaningful to
   resolve against. */
.sb-lf-ts-card {
	--sb-ts-accent: #c9a227;
	--sb-ts-accent-rgb: 201, 162, 39;
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 0 0 calc((100vw - clamp(40px, 8vw, 136px) - (var(--sb-ts-cols) - 1) * var(--sb-ts-gap, 26px)) / var(--sb-ts-cols));
	max-width: 460px;
	scroll-snap-align: center;
	padding: 30px 30px 26px;
	background: #f6f3ea;
	border-radius: 8px;
	transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}

.sb-lf-ts-card:hover {
	z-index: 4;
	box-shadow: 0 26px 48px -22px rgba(var(--sb-ts-accent-rgb), 0.45);
}

.sb-lf-ts-zoom-yes .sb-lf-ts-card:hover,
.sb-lf-ts-zoom-yes .sb-lf-ts-card:focus-within {
	transform: scale(1.055);
}

/* Whole-card link. A single anchor covering the card keeps it to one link
   per review (no anchor nested inside another), which is why "Read more" is
   rendered as a span rather than its own link. */
.sb-lf-ts-card-link {
	position: absolute;
	inset: 0;
	z-index: 5;
	border-radius: inherit;
}

.sb-lf-ts-card-link:focus-visible {
	outline: 2px solid var(--sb-ts-accent);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.sb-lf-ts-card-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 18px;
}

.sb-lf-ts-stars {
	display: inline-flex;
	gap: 2px;
	font-size: 15px;
	color: rgba(21, 19, 18, 0.15);
}

.sb-lf-ts-star {
	display: block;
	width: 1em;
	height: 1em;
	color: inherit;
}

.sb-lf-ts-star.is-filled {
	color: #e7a13a;
}

.sb-lf-ts-google-badge {
	display: block;
	width: 20px;
	height: 20px;
	flex: none;
}

.sb-lf-ts-card-google .sb-lf-ts-quote {
	margin-top: 0;
}

.sb-lf-ts-quote-mark {
	display: block;
	color: var(--sb-ts-accent);
	font-family: var(--sb-font-serif);
	font-weight: 700;
	font-size: 54px;
	line-height: 0.6;
	margin-bottom: 18px;
	transition: color 0.3s ease;
}

.sb-lf-ts-card:hover .sb-lf-ts-quote-mark {
	color: #151312;
}

.sb-lf-ts-quote {
	margin: 0 0 24px;
	flex: 1 1 auto;
	color: #151312;
	font-size: 15.5px;
	line-height: 1.75;
}

.sb-lf-ts-read-more {
	display: inline-block;
	color: #c9a227;
	font-weight: 700;
	white-space: nowrap;
}

.sb-lf-ts-card:hover .sb-lf-ts-read-more {
	text-decoration: underline;
}

.sb-lf-ts-divider {
	display: block;
	height: 1px;
	margin-bottom: 20px;
	background: rgba(21, 19, 18, 0.12);
}

.sb-lf-ts-person {
	display: flex;
	align-items: center;
	gap: 14px;
}

.sb-lf-ts-avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--sb-ts-accent);
	color: #151312;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.02em;
	transition: transform 0.35s ease;
}

.sb-lf-ts-card:hover .sb-lf-ts-avatar {
	transform: scale(1.08);
}

.sb-lf-ts-avatar-image {
	background-size: cover;
	background-position: center;
}

.sb-lf-ts-person-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sb-lf-ts-name {
	color: #151312;
	font-weight: 700;
	font-size: 15px;
}

.sb-lf-ts-role {
	margin-top: 2px;
	color: #8a8680;
	font-size: 13px;
	line-height: 1.4;
}

/* Scroll-reveal utility — fails open by default (see law-firm-testimonials.js):
   `.sb-lf-reveal` alone is always fully visible; JS only adds `.sb-lf-pending`
   to items currently off-screen, then flips them to `.sb-lf-visible` as they
   scroll into view. `--sb-delay` staggers groups. */
.sb-lf-reveal {
	transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
	transition-delay: var(--sb-delay, 0s);
}

.sb-lf-reveal.sb-lf-pending {
	opacity: 0;
	transform: translateY(28px);
}

.sb-lf-reveal.sb-lf-visible {
	opacity: 1;
	transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
	.sb-lf-ts * {
		animation-duration: 0.001ms !important;
		transition-duration: 0.001ms !important;
	}

	.sb-lf-reveal.sb-lf-pending {
		opacity: 1;
		transform: none;
	}
}

/* Responsive */
@media (max-width: 1100px) {
	.sb-lf-ts {
		--sb-ts-cols: 3 !important;
	}
}

@media (max-width: 900px) {
	.sb-lf-ts {
		--sb-ts-cols: 2 !important;
	}
}

@media (max-width: 640px) {
	.sb-lf-ts-inner {
		padding: 64px 24px;
	}

	.sb-lf-ts {
		--sb-ts-cols: 1 !important;
		--sb-ts-gap: 16px !important;
	}

	.sb-lf-ts-track-viewport {
		padding: 18px 20px;
	}

	.sb-lf-ts-arrow {
		width: 38px;
		height: 38px;
		margin-top: -19px;
	}

	.sb-lf-ts-card {
		padding: 26px 24px 24px;
		max-width: none;
	}

	/* Touch devices have no hover to enlarge into, and the scaled card would
	   only crowd an already narrow screen. */
	.sb-lf-ts-zoom-yes .sb-lf-ts-card:hover,
	.sb-lf-ts-zoom-yes .sb-lf-ts-card:focus-within {
		transform: none;
	}
}
