/* Structure only.
 *
 * Colour, type, border, shadow and decorative treatment were stripped when
 * this became the blank starter. The design comes from the build's own
 * Figma / Claude Design work, not from here.
 *
 * Spacing and sizing are exposed as --fw-<selector>-<property> tokens that
 * default to 0, so the starter asserts nothing and the design layer sets
 * them. Everything left is layout mechanics the block needs to function.
 */

/* Block: framework/testimonials */

.fw-testimonials {
	padding: var(--fw-section-py, 48px) 20px;
}

.fw-testimonials__inner {
	max-width: var(--fw-testimonials-inner-max-width, 0);
	margin: var(--fw-testimonials-inner-margin, 0);
	display: grid;
	grid-template-columns: 1fr 1fr 1.2fr;
	grid-template-rows: auto;
	gap: 0;
	align-items: stretch;
}

/* Intro group sits in column 1, row 1 */
.fw-testimonials__intro {
	grid-column: 1;
	grid-row: 1;
	padding: var(--fw-testimonials-intro-padding, 0);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.fw-testimonials__intro :is(h1, h2) {
	margin: var(--fw-testimonials-intro-margin, 0);
}

.fw-testimonials__intro p {
	margin: 0;
}

.fw-testimonials__nav-fe {
	display: flex;
	gap: var(--fw-testimonials-nav-fe-gap, 0);
	margin-top: var(--fw-testimonials-nav-fe-margin-top, 0);
}

.fw-testimonials__nav-btn {
	width: var(--fw-testimonials-nav-btn-width, 0);
	height: var(--fw-testimonials-nav-btn-height, 0);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.2s ease;
	padding: 0;
}

/* Hover = the arrow slides (not a turquoise fill), per Figma. */
.fw-testimonials__nav-btn svg {
	transition: transform 0.25s ease;
}
.fw-testimonials__nav-btn[data-direction="prev"]:hover svg {
	transform: translateX(-4px);
}
.fw-testimonials__nav-btn[data-direction="next"]:hover svg {
	transform: translateX(4px);
}

/* Each testimonial child uses display: contents to escape into the parent
   grid; its image and quote land in columns 2 & 3 of row 1, all stacked. */
.fw-testimonial {
	display: contents;
}

.fw-testimonial__image {
	grid-column: 2;
	grid-row: 1;
	min-width: var(--fw-testimonial-image-min-width, 0);
	min-height: var(--fw-testimonial-image-min-height, 0);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.fw-testimonial__quote {
	grid-column: 3;
	grid-row: 1;
	padding: var(--fw-testimonial-quote-padding, 0);
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.fw-testimonial.is-active .fw-testimonial__image,
.fw-testimonial.is-active .fw-testimonial__quote {
	opacity: 1;
	pointer-events: auto;
}

/* Text-only testimonial (no image) — quote spans the media + quote columns
   instead of leaving a grey placeholder where the image would be. */
.fw-testimonial--textonly .fw-testimonial__quote {
	grid-column: 2 / -1;
}

.fw-testimonial__stars {
	display: flex;
	gap: var(--fw-testimonial-stars-gap, 0);
	margin-bottom: var(--fw-testimonial-stars-margin-bottom, 0);
}

.fw-testimonial__quote-text {
	margin: var(--fw-testimonial-quote-text-margin, 0);
}

.fw-testimonial__quote-text.is-clamped {
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.fw-testimonial__readmore {
	display: inline-block;
	margin: var(--fw-testimonial-readmore-margin, 0);
	padding: 0;
	cursor: pointer;
	align-self: flex-start;
}
/* Author (role) + company grouped at the bottom of the quote panel. */
.fw-testimonial__author {
	margin: var(--fw-testimonial-author-margin, 0);
}

.fw-testimonial__company {
	margin: 0;
}

.fw-testimonial__date {
	margin: var(--fw-testimonial-date-margin, 0);
}

/* Pause autoplay when the inner blocks are interacted with on the front-end */
.fw-testimonials:hover .fw-testimonial.is-active .fw-testimonial__image,
.fw-testimonials:hover .fw-testimonial.is-active .fw-testimonial__quote {
	transition-duration: 0s;
}

/* ---- Responsive ----------------------------------------------------------
 * From 1080 down: the title + intro + nav controls move ABOVE the slider, and
 * the image/quote sit side by side beneath. From 768 down they stack fully
 * (intro → image → quote). The `display: contents` testimonials keep stacking
 * their image/quote into the same cells, so the crossfade slider still works.
 * ------------------------------------------------------------------------- */
@media (max-width: 1080px) {
	.fw-testimonials__inner {
	grid-template-columns: 1fr 1fr;
}
	.fw-testimonials__intro {
	grid-column: 1 / -1;
	grid-row: 1;
	padding: var(--fw-testimonials-intro-padding, 0);
}
	.fw-testimonials__nav-fe {
	margin-top: var(--fw-testimonials-nav-fe-margin-top, 0);
}
	.fw-testimonial__image {
	grid-column: 1;
	grid-row: 2;
}
	.fw-testimonial__quote {
	grid-column: 2;
	grid-row: 2;
}
	.fw-testimonial--textonly .fw-testimonial__quote {
	grid-column: 1 / -1;
	grid-row: 2;
}
}
@media (max-width: 768px) {
	.fw-testimonials__inner {
	grid-template-columns: 1fr;
}
	.fw-testimonial__image {
	grid-column: 1;
	grid-row: 2;
}
	.fw-testimonial__quote,
	.fw-testimonial--textonly .fw-testimonial__quote {
	grid-column: 1;
	grid-row: 3;
}
}
