/* ──────────────────────────────────────────────────────────────────────────
   Testimonials block
   JS-paged carousel of testimonial cards (from the Testimonials CPT) — the
   track is clipped (overflow: hidden) and paged via transform: translateX()
   by uw-carousel.js's "paged" mode (see render.php's data-uw-mode="paged"),
   not native scroll. Requires JS; there is no no-JS fallback to slides past
   the first. Two layouts: small tinted cards (alternating) + large image
   feature. Tokens only — no raw hex.
   ────────────────────────────────────────────────────────────────────────── */

.uw-tst {
	color: var(--wp--preset--color--deep-navy);
	overflow: hidden;
}
.uw-tst--bg-porcelain { background: var(--wp--preset--color--porcelain); }
.uw-tst--bg-white { background: var(--wp--preset--color--white); }
.uw-tst--bg-parchment { background: var(--wp--preset--color--parchment); }
.uw-tst__inner {
	position: relative;
    padding-top: clamp(40px, 5vw, 80px);
    padding-bottom: clamp(40px, 5vw, 80px);
    display: flex;
    flex-direction: column;
    gap: clamp(2rem, 4vw, 2.5rem);
}
/* Optional top border, matching the content width only — excludes the left/right padding. */
.uw-tst--top-border .uw-tst__inner::before {
	content: '';
	position: absolute;
	top: 0;
	left: clamp(24px, 4.94vw, 80px);
	right: clamp(24px, 4.94vw, 80px);
	height: 1px;
	background: color-mix(in srgb, var(--wp--preset--color--deep-navy) 10%, transparent);
}
.uw-tst--no-top-pad .uw-tst__inner { padding-top: 0; }
.uw-tst--no-bottom-pad .uw-tst__inner { padding-bottom: 0; }
.uw-tst__heading {
	margin: 0 0 clamp(1.5rem, 3vw, 40px);
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: clamp(42px, 4.4vw, 64px);
	line-height: 1;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

/* ── Inline editing ──
   The section heading is an inner block. ACF wraps the inner blocks in a div
   carrying the class named on the <InnerBlocks /> tag. .uw-tst__inner is a flex
   column, and the legacy <h2> was a direct flex item of it — subject to the
   column `gap` on top of .uw-tst__heading's own bottom margin. display: contents
   dissolves the wrapper so the <h2> stays that same direct flex item and every
   rule above keeps matching the same box. Do NOT give this region a `margin: 0`
   reset: .uw-tst__heading's bottom margin is load-bearing. */
.uw-tst__head { display: contents; }

/* Editor bridge. In the canvas ACF nests the blocks inside
   .block-editor-inner-blocks > .block-editor-block-list__layout, which would sit
   between .uw-tst__inner and the heading; on the front end the heading is a
   direct child of .uw-tst__head. display: contents makes both DOMs lay out
   identically. */
.uw-tst__head > .block-editor-inner-blocks,
.uw-tst__head > .block-editor-inner-blocks > .block-editor-block-list__layout { display: contents; }

/* An untouched template placeholder serializes as an empty <h2>: a WCAG
   violation, and it would still consume .uw-tst__inner's flex gap plus its own
   bottom margin above the carousel. The contenteditable guard keeps this off the
   editor canvas, where an empty block must stay visible and clickable. */
.uw-tst__heading:empty:not([contenteditable]) { display: none; }

/* ── Carousel shell ── */
.uw-tst__carousel { position: relative; }
.uw-tst__track {
	display: flex;
	gap: clamp(16px, 1.6vw, 24px);
	margin: 0;
	/* Left gutter aligns the first card to the 1620 content edge; no right
	   padding so the track bleeds off the screen's right edge (next card peeks). */
	padding-left: 0;
	padding-right: 0;
	list-style: none; 
	width: 80%;
	transition: transform 0.4s ease;
}
.uw-tst__slide {
	flex: 0 0 auto;
}
.uw-tst__card {
	position: relative;
	overflow: hidden;
	margin: 0;
	border-radius: 16px;
	background: var(--wp--preset--color--icy-blue);
}

/* Decorative white ring arc — anchored to the bottom-right corner so only the
   arc sweeps across it (sits behind the text). */
.uw-tst__ring {
    position: absolute;
    right: -450px;
    bottom: -490px;
    width: 800px;
    aspect-ratio: 1;
    border-radius: 50%;
    border: clamp(26px, 2.6vw, 56px) solid var(--wp--preset--color--white);
    opacity: 0.8;
    z-index: 0;
    pointer-events: none;
}

.uw-tst--small .uw-tst__ring { right: -520px; bottom: -530px; }

.uw-tst__panel { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-content: space-between; }
/* Keep the copy above the decorative ring within the panel's stacking context. */
.uw-tst__mark,
.uw-tst__quote,
.uw-tst__cite,
.uw-tst__avatar { position: relative; z-index: 1; }
.uw-tst__mark {
	display: block;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 700;
	line-height: 0.6;
	color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 22%, transparent);
}
.uw-tst__quote {
	margin: 0;
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	color: var(--wp--preset--color--deep-navy);
	letter-spacing: -0.005em;
	padding-top: 30px;
}
.uw-tst__cite { display: flex; flex-direction: column; gap: 2px; font-style: normal;  }
.uw-tst__name {
	font-family: var(--wp--preset--font-family--marr-sans-cond);
	font-weight: 600;
	font-size: 30px;
	color: var(--wp--preset--color--deep-navy);
}
.uw-tst__role {
	font-family: var(--wp--preset--font-family--pp-mori);
	font-size: 16px;
	color: color-mix(in srgb, var(--wp--preset--color--deep-navy) 75%, transparent);
}

/* ── Small tinted-card variant ── */ 
.uw-tst--small .uw-tst__slide { width: clamp(280px, 48vw, 632px);  display: flex; }
.uw-tst--small .uw-tst__card {
	display: flex; 
    flex-wrap: wrap;
	min-height: clamp(360px, 30vw, 500px);
	padding: clamp(24px, 2.2vw, 36px);
}
.uw-tst__slide:nth-child(even) .uw-tst__card { background: var(--wp--preset--color--soft-blush); }
.uw-tst--small .uw-tst__mark {  margin-bottom: 0.5rem; }
.uw-tst--small .uw-tst__quote { font-size: clamp(24px, 1.6vw, var(--wp--preset--font-size--heading-5)); line-height: 1.18; }
 
.uw-tst--small .uw-tst__avatar {
	position: absolute;
	right: 0;
	bottom: 0;
	z-index: 1;
	width: 60px;
	height: 60px;
	border-radius: 8px;
	overflow: hidden;
}
.uw-tst--small .uw-tst__avatar .uw-tst__img { width: 100%; height: 100%; object-fit: cover; display: block; }
 
/* ── Large image variant ── */
.uw-tst--large .uw-tst__slide { width: min(92%, 1400px); }
.uw-tst--large .uw-tst__card {
	display: grid;
	grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); 
	border-radius: 20px; 
	gap: clamp(12px, 1.4vw, 20px);
	align-items: stretch;
	padding: 24px;
}
.uw-tst--large .uw-tst__photo {
	border-radius: 16px;
	overflow: hidden;
	height: clamp(280px, 32vw, 512px);
}
.uw-tst--large .uw-tst__photo .uw-tst__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uw-tst--large .uw-tst__panel {
	position: relative;
	overflow: hidden;  
	display: flex;
	flex-direction: column;
	padding: 20px 30px 0 10%;

}

.uw-tst__mark {
	color: color-mix(in srgb, var(--wp--preset--color--cobalt-blue) 22%, transparent);
}

.uw-tst__slide:nth-child(even) .uw-tst__mark { color: color-mix(in srgb, var(--wp--preset--color--red) 20%, transparent); }

.uw-tst--large .uw-tst__mark { margin-bottom: 0.75rem; }
.uw-tst--large .uw-tst__quote { font-size: clamp(22px, 2vw, var(--wp--preset--font-size--heading-5)); line-height: 1.18; }
.uw-tst--large .uw-tst__cite { margin-top: auto; padding-top: 2.5rem; }

.uw-tst__bottom { position: relative; padding-right: 60px; width: 100%; }

/* ── Controls ── */
.uw-tst__controls {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	margin-top: clamp(20px, 2.4vw, 36px); 
}
.uw-tst__progress {
	position: relative;
	width: min(250px, 60%);
	height: 2px;
	border-radius: 100px;
	/* Faint navy track on the light porcelain section (per Figma). */
	background: color-mix(in srgb, var(--wp--preset--color--deep-navy) 20%, transparent);
}
.uw-tst__progress-bar {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 30%;
	border-radius: 100px;
	/* Dark navy fill on the light section (per Figma). */
	background: var(--wp--preset--color--deep-navy);
	transition: left 0.2s ease, width 0.2s ease;
}
.uw-tst__nav { display: flex; gap: 0.75rem; }
.uw-tst__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	background: var(--wp--preset--color--cobalt-blue);
	color: var(--wp--preset--color--white);
	transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}
.uw-tst__btn svg { width: 13px; height: 13px; }
.uw-tst__btn:hover,
.uw-tst__btn:focus-visible { background: var(--wp--preset--color--deep-navy); color: var(--wp--preset--color--white); }
.uw-tst__btn[disabled] { background: var(--wp--preset--color--parchment); cursor: default; color: var(--wp--preset--color--deep-navy) } 

/* ── Mobile ── */
@media (max-width: 781px) { 
	.uw-tst--small .uw-tst__slide { width: 82vw; }
	.uw-tst--large .uw-tst__slide { width: 88vw; }
	.uw-tst--large .uw-tst__card { grid-template-columns: 1fr; padding: 12px; }
	.uw-tst--large .uw-tst__photo { max-height: 250px; }
	.uw-tst__progress { flex: 1; width: auto; margin-right: 1rem; }
	.uw-tst--large .uw-tst__quote { font-size: clamp(20px, 2vw, var(--wp--preset--font-size--heading-6)); line-height: 1.18; }
	.uw-tst--large .uw-tst__panel { padding: 20px 10px 20px; }
	.uw-tst__ring { display: none; }
	.uw-tst__quote { padding-top: 20px; }
	.uw-tst--small .uw-tst__card { min-height: 450px; }
	.uw-tst__name { font-size: 20px; }
	.uw-tst__role { font-size: 14px; }
	.uw-tst__heading { text-align: center; }
}
