/*
 * Home testimonials — two-column layout: heading + arrows (left column) and
 * the carousel (right column), the whole thing constrained to the content
 * width like the rest of the site (not bleeding to the viewport edge).
 * Typography (font family, weight) for the heading/company/body comes from
 * theme.json (h2/paragraph element styles) — only component-specific sizes
 * and the carousel mechanics live here.
 */

.home-testimonials {
	padding-top: clamp(48px, 6vw, 88px);
	padding-bottom: clamp(96px, 10vw, 164px);
}

.home-testimonials__grid {
	display: grid;
	grid-template-columns: minmax(240px, 380px) 1fr;
	align-items: start;
	column-gap: clamp(24px, 4vw, 64px);
	max-width: var(--wp--style--global--content-size);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--wp--preset--spacing--container-lg);
	padding-right: var(--wp--preset--spacing--container-lg);
}

.home-testimonials__heading-col {
	padding-top: 8px;
}

.testimonials-nav {
	display: flex;
	gap: 12px;
	margin-top: var(--wp--preset--spacing--40);
}

.testimonials-nav__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	padding: 0;
	background: transparent;
	cursor: pointer;
	transition: opacity 0.2s ease;
}

/* Recolor the arrow artwork with our palette via mask, instead of a background
   chip behind it: prev in primary-dark, next in secondary (the orange). */
.testimonials-nav__icon {
	display: block;
	width: 44px;
	height: 34px;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-position: center;
	mask-position: center;
}

.testimonials-nav__icon--left {
	-webkit-mask-image: url('../images/arrow-left.svg');
	mask-image: url('../images/arrow-left.svg');
	background-color: var(--wp--preset--color--primary-dark);
}

.testimonials-nav__icon--right {
	-webkit-mask-image: url('../images/arrow-right.svg');
	mask-image: url('../images/arrow-right.svg');
	background-color: var(--wp--preset--color--secondary);
}

.testimonials-nav__btn:hover {
	opacity: 0.85;
}

.testimonials-nav__btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.home-testimonials__carousel-col {
	overflow: hidden;
}

.testimonials-carousel {
	overflow: hidden;
}

.testimonials-carousel__track {
	display: flex;
	gap: clamp(20px, 2.2vw, 40px);
	transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
	cursor: grab;
	touch-action: pan-y;
	user-select: none;
}

.testimonials-carousel__track.is-dragging {
	cursor: grabbing;
}

.testimonials-carousel__slide {
	flex-grow: 0;
	flex-shrink: 0;
	flex-basis: clamp(230px, 25vw, 340px);
	align-self: flex-start;
	opacity: 0.55;
	transition: flex-basis 0.35s ease, opacity 0.35s ease;
}

.testimonials-carousel__slide:last-child {
	margin-right: var(--wp--preset--spacing--container-lg);
}

.testimonials-carousel__slide.is-active {
	flex-basis: clamp(280px, 30vw, 400px);
	opacity: 1;
}

.testimonial-card--showcase {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto 1fr auto;
	width: 100%;
	min-height: 400px;
	padding: 47px 45px 36px;
	box-sizing: border-box;
	background: var(--wp--preset--color--white);
	border-radius: 24px;
	overflow: hidden;
	gap: 0 20px;
}

.testimonial-card__company {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 17px;
	color: rgba(22, 22, 74, 0.5);
}

.testimonial-card__quote {
	grid-column: 1 / -1;
	width: 55px;
	margin: 35px 0 24px;
}

.testimonial-card__quote img {
	display: block;
	width: 55px;
	height: 55px;
}

.testimonial-card__body {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 15.58px;
	color: var(--wp--preset--color--primary-dark);
}

.testimonial-card__body strong {
	font-weight: 800;
}

.testimonial-card__stars {
	display: block;
	font-size: 16px;
	color: var(--wp--preset--color--secondary);
	line-height: 1;
	margin-bottom: 6px;
}

.testimonial-card__rating {
	grid-column: 1;
	grid-row: 4;
	width: 140px;
	align-self: end;
	margin: 0;
}

.testimonial-card__rating img {
	display: block;
	width: 52px;
	height: auto;
}

.testimonial-card__device {
	grid-column: 2;
	grid-row: 4;
	align-self: end;
	justify-self: end;
	margin: 0;
	pointer-events: none;
}

.testimonial-card__device img {
	display: block;
	width: clamp(64px, 8vw, 100px);
	height: auto;
}

@media (max-width: 1200px) {
	.home-testimonials__grid {
		grid-template-columns: 1fr;
		padding-left: 0;
	}

	.home-testimonials__heading-col {
		padding-left: var(--wp--preset--spacing--container-lg);
		padding-right: var(--wp--preset--spacing--container-lg);
		margin-bottom: var(--wp--preset--spacing--40);
	}

}

@media (max-width: 781px) {
	.testimonials-carousel__track {
		gap: 0;
	}

	.testimonials-carousel__slide,
	.testimonials-carousel__slide.is-active {
		flex-basis: calc(100vw - (var(--wp--preset--spacing--container-lg) * 2));
	}

	.testimonial-card--showcase {
		min-height: 0;
		padding: 32px 26px 28px;
	}
}
