/* Testimonials Carousel
   All colours are CSS variables — override them in your theme to restyle. */

.tcar {
	--tcar-accent: #e8542f;          /* Name + headline orange */
	--tcar-mark: #f4886a;            /* Quote mark salmon */
	--tcar-blob: #ddefac;            /* Light green circle */
	--tcar-arrow-prev-bg: #c2e05f;   /* Left arrow */
	--tcar-arrow-next-bg: #7cb800;   /* Right arrow */
	--tcar-arrow-icon: #17330a;
	--tcar-dot: #17330a;
	--tcar-dot-active: #7cb800;
	--tcar-star: #f4b400;
	--tcar-star-off: #dcdcdc;
	--tcar-card-bg: #ffffff;
	--tcar-text: #3f3f46;
	--tcar-muted: #767680;
	--tcar-radius: 14px;
	--tcar-gap: 24px;
	--tcar-shadow: 0 2px 12px rgba(19, 20, 18, 0.06);

	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	box-sizing: border-box;
}

.tcar *,
.tcar *::before,
.tcar *::after {
	box-sizing: border-box;
}

/* ---------- Viewport / track ---------- */

.tcar__viewport {
	overflow: hidden;
	padding-block: 8px;
	margin-block: -8px;
	transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.tcar__track {
	display: flex;
	align-items: flex-start;
	transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.tcar__slide {
	flex: 0 0 100%;
	min-width: 100%;
	display: grid;
	grid-template-columns: minmax(300px, 33%) 1fr;
	gap: var(--tcar-gap);
	align-items: start;
}

/* Opt back into the old full-height photo card with align="stretch". */
.tcar--align-stretch .tcar__slide {
	align-items: stretch;
}

/* ---------- Left card: the person ---------- */

.tcar__person {
	position: relative;
	overflow: hidden;
	background: var(--tcar-card-bg);
	border-radius: var(--tcar-radius);
	box-shadow: var(--tcar-shadow);
	padding: 22px;
	height: 260px;
}

.tcar__blob {
	position: absolute;
	top: -74px;
	right: -58px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: var(--tcar-blob);
	z-index: 0;
}

/* Photo on the left, name / role / stars in a column beside it. */
.tcar__person-inner {
	position: relative;
	z-index: 1;
	/*height: 100%;*/
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: 20px;
	align-items: end;
}

.tcar__photo img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 12px;
	height: auto;
}

.tcar__meta {
	padding-bottom: 6px;
	min-width: 0;
}

.tcar__name {
	margin: 0 0 2px;
	font-size: 19px;
	line-height: 1.3;
	font-weight: 700;
	color: var(--tcar-accent);
}

.tcar__role {
	margin: 0 0 10px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--tcar-muted);
}

.tcar__stars {
	display: flex;
	gap: 2px;
	font-size: 17px;
	line-height: 1;
	color: var(--tcar-star-off);
}

.tcar__star.is-on {
	color: var(--tcar-star);
}

/* ---------- Right card: the quote ---------- */

.tcar__quote {
	background: var(--tcar-card-bg);
	border-radius: var(--tcar-radius);
	box-shadow: var(--tcar-shadow);
	padding: 34px 38px 38px;
}

.tcar__mark {
	display: block;
	width: 84px;
	height: 66px;
	margin-bottom: 22px;
	fill: var(--tcar-mark);
}

.tcar__title {
	margin: 0 0 12px;
	font-size: 26px;
	line-height: 1.25;
	font-weight: 700;
	color: var(--tcar-accent);
}

/* ---------- Clampable body + Read more ---------- */

.tcar__body {
	position: relative;
	font-size: 17px;
	line-height: var(--tcar-line, 1.65);
}

/* Clamp to N lines. --tcar-clamp is set inline from the shortcode. */
.tcar__body--clamp {
	max-height: calc(var(--tcar-clamp, 10) * var(--tcar-line, 1.65) * 1em);
	overflow: hidden;
}

/* JS adds .is-short when the text fits anyway, .is-open when expanded. */
.tcar__body--clamp.is-open,
.tcar__body--clamp.is-short {
	max-height: none;
	overflow: visible;
}

.tcar__fade {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 76px;
	pointer-events: none;
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--tcar-card-bg) 82%);
}

.tcar__body--clamp.is-open .tcar__fade,
.tcar__body--clamp.is-short .tcar__fade,
.tcar__body:not(.tcar__body--clamp) .tcar__fade {
	display: none;
}

.tcar--merged .tcar__fade {
	background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--tcar-card-bg) 82%);
}

.tcar__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 16px;
	padding: 9px 18px;
	border: 1px solid var(--tcar-accent);
	border-radius: 999px;
	background: transparent;
	color: var(--tcar-accent);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tcar__more:focus {
    background: var(--tcar-accent);
    color: #fff!important;
}

.tcar__more[hidden] {
	display: none;
}

.tcar__more:hover {
	background: var(--tcar-accent);
	color: #fff!important;
}

.tcar__more:active {
	transform: scale(0.97);
	color: #fff;
}

.tcar__more:focus-visible {
	outline: 2px solid var(--tcar-accent);
	outline-offset: 3px;
}

.tcar__more-icon {
	width: 16px;
	height: 16px;
	transition: transform 0.25s ease;
}

.tcar__more[aria-expanded="true"] .tcar__more-icon {
	transform: rotate(180deg);
}

.tcar__text {
	color: var(--tcar-text);
}

.tcar__text p {
	margin: 0 0 14px;
}

.tcar__text p:last-child {
	margin-bottom: 0;
}

/* ---------- Arrows ---------- */

.tcar__nav {
	position: absolute;
	top: 26px;
	right: 30px;
	display: flex;
	gap: 5px;
	z-index: 3;
}

.tcar__arrow {
	width: 46px;
	height: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	padding: 0;
	color: var(--tcar-arrow-icon);
	transition: transform 0.2s ease, opacity 0.2s ease, filter 0.2s ease;
}

.tcar__arrow svg {
	width: 21px;
	height: 21px;
}

.tcar__arrow--prev {
	background: var(--tcar-arrow-prev-bg);
}

.tcar__arrow--next {
	background: var(--tcar-arrow-next-bg);
}

.tcar__arrow:hover {
	filter: brightness(0.94);
	background: #9AC900;
}

.tcar__arrow:focus {
	background: #9AC900;
}

.tcar__arrow:active {
	transform: scale(0.94);
	background: #9AC900;
}

.tcar__arrow:focus-visible {
	outline: 2px solid var(--tcar-arrow-icon);
	outline-offset: 3px;
	background: #9AC900;
}

.tcar__arrow[disabled] {
	opacity: 0.4;
	cursor: default;
	background: #9AC900;
}

/* ---------- Dots ---------- */

.tcar__dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 9px;
	margin-top: 26px;
}

.tcar__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--tcar-dot);
	cursor: pointer;
	transition: transform 0.2s ease, background 0.2s ease;
}

.tcar__dot.is-active {
	background: var(--tcar-dot-active);
	transform: scale(1.15);
}

.tcar__dot:focus-visible {
	outline: 2px solid var(--tcar-dot-active);
	outline-offset: 3px;
}

/* ---------- Merged layout: one card, photo in the header ---------- */

.tcar--merged .tcar__slide {
	grid-template-columns: 1fr;
	gap: 0;
	background: var(--tcar-card-bg);
	border-radius: var(--tcar-radius);
	box-shadow: var(--tcar-shadow);
	overflow: hidden;
}

.tcar--merged .tcar__person,
.tcar--merged .tcar__quote {
	background: none;
	box-shadow: none;
	border-radius: 0;
}

.tcar--merged .tcar__person {
	padding: 28px 140px 0 38px; /* right padding keeps the name clear of the arrows */
}

.tcar--merged .tcar__blob {
	display: none;
}

.tcar--merged .tcar__person-inner {
	grid-template-columns: 84px minmax(0, 1fr);
	align-items: center;
	gap: 16px;
}

.tcar--merged .tcar__photo img {
	aspect-ratio: 1 / 1;
	border-radius: 50%;
}

.tcar--merged .tcar__meta {
	padding-bottom: 0;
}

.tcar--merged .tcar__role {
	margin-bottom: 6px;
}

.tcar--merged .tcar__quote {
	padding: 18px 38px 34px;
}

.tcar--merged .tcar__mark {
	width: 54px;
	height: 42px;
	margin-bottom: 12px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
	.tcar__slide {
		grid-template-columns: 1fr;
	}

	/* Card is full width now, so keep the photo from ballooning. */
	.tcar__person-inner {
		grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
	}

	.tcar__quote {
		padding: 26px 24px 28px;
	}

	.tcar--merged .tcar__person {
		padding: 24px 24px 0;
	}

	.tcar--merged .tcar__quote {
		padding: 14px 24px 26px;
	}

	.tcar__title {
		font-size: 22px;
	}

	.tcar__mark {
		width: 62px;
		height: 49px;
		margin-bottom: 16px;
	}

	/* Arrows move under the cards so they never sit on top of the photo. */
	.tcar__nav {
		position: static;
		justify-content: center;
		margin-top: 22px;
		order: 2;
	}

	.tcar__dots {
		order: 3;
		margin-top: 18px;
	}
}

@media (max-width: 520px) {
	/* Only on genuinely narrow screens does the photo stack above the name. */
	.tcar__person-inner {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.tcar__photo img {
		aspect-ratio: 4 / 3;
	}

	.tcar__meta {
		padding-bottom: 0;
	}

	/* Merged keeps the small round avatar beside the name at every width. */
	.tcar--merged .tcar__person-inner {
		grid-template-columns: 68px minmax(0, 1fr);
		gap: 14px;
	}

	.tcar--merged .tcar__photo img {
		aspect-ratio: 1 / 1;
	}

	.tcar__blob {
		width: 170px;
		height: 170px;
		top: -60px;
		right: -48px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tcar__track,
	.tcar__viewport,
	.tcar__more-icon {
		transition: none;
	}
}