/* Testimonials block (ffp/testimonials) and its child ffp/testimonial. Design tokens only. */
.ffp-testimonials {
	padding-block: var(--wp--preset--spacing--70);
	color: var(--wp--preset--color--navy-700);
	background-color: var(--wp--preset--color--cream);
}
.ffp-testimonials__head { display: flex; flex-direction: column; align-items: center; gap: 1.25rem; margin: 0 auto var(--wp--preset--spacing--60); padding-inline: var(--wp--preset--spacing--40); text-align: center; }
.ffp-testimonials__head .ffp-heading--center { max-width: 982px; } /* design: breaks after "Clarity" */
.ffp-testimonials__head .ffp-lead { max-width: 804px; margin: 0; }

/* Swipeable row: cards bleed off both edges; native scroll + snap, no library. */
.ffp-testimonials__track {
	--ffp-gutter: max(var(--wp--preset--spacing--40), calc((100% - var(--wp--style--global--wide-size, 1240px)) / 2));
	display: flex;
	gap: 12px;
	padding: 2.5rem var(--ffp-gutter) 5rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--ffp-gutter);
	scrollbar-width: none;
}
.ffp-testimonials__track::-webkit-scrollbar { display: none; }
.ffp-testimonials:not(.ffp-testimonials--grid) .ffp-testimonials__track { cursor: grab; }
.ffp-testimonials__track.is-dragging,
.ffp-testimonials:not(.ffp-testimonials--grid) .ffp-testimonials__track.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.ffp-testimonials__track img { -webkit-user-drag: none; user-select: none; }
.ffp-testimonials__track:focus-visible { outline: 2px solid var(--wp--preset--color--gold); outline-offset: -2px; }

.ffp-testimonial {
	position: relative;
	display: flex;
	flex: 0 0 min(407px, 86vw);
	flex-direction: column;
	scroll-snap-align: start;
	padding: 2.5rem 2rem 3rem 2.4rem; /* text column 337px wide, as in the design */
	background: var(--wp--preset--color--white);
	box-shadow: 0 34px 50px -22px color-mix(in srgb, var(--wp--preset--color--navy-700) 28%, transparent);
	transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.ffp-testimonial:hover { transform: translateY(-5px); box-shadow: 0 40px 56px -22px color-mix(in srgb, var(--wp--preset--color--navy-700) 36%, transparent); }
.ffp-testimonial::after { /* gold bar along the bottom edge */
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 5px;
	background: var(--wp--preset--gradient--gold);
}
.ffp-testimonial__quote { position: absolute; top: -20px; left: 2.4rem; width: 50px; height: 40px; }
.ffp-testimonial__title {
	margin: 1rem 0 1rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--lead);
	font-style: italic;
	font-weight: 700;
	line-height: var(--wp--custom--line-height--lead);
	background: var(--wp--preset--gradient--gold);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: transparent;
}
.ffp-testimonial__text { margin: 0 0 2rem; line-height: 1.5; }
.ffp-testimonial__text > * { margin: 0 0 0.75rem; }
.ffp-testimonial__text > :last-child { margin-bottom: 0; }
.ffp-testimonial__by { margin-top: auto; padding-right: 7rem; }
.ffp-testimonial__name {
	display: inline-block;
	min-width: 12.4rem;
	margin: 0;
	padding-top: 0.6rem;
	border-top: 1px solid var(--wp--preset--color--gold);
	font-weight: 700;
	line-height: 1.5;
	text-transform: uppercase;
	letter-spacing: 0.27em;
}
.ffp-testimonial__role { margin: 0; line-height: 1.5; }
.ffp-testimonial__avatar {
	position: absolute;
	right: 2.4rem;
	bottom: -14px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 115px;
	height: 115px;
	margin: 0;
	border-radius: 50%;
	overflow: hidden;
	background: var(--wp--preset--gradient--gold);
	color: var(--wp--preset--color--navy-900);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 2.75rem;
	font-weight: 600;
}
.ffp-testimonial__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }

.ffp-testimonials__actions { display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.ffp-testimonials__actions .wp-block-buttons { margin: 0; }
.ffp-testimonials__nav {
	display: none; /* desktop: no arrows (design); drag or swipe instead. Shown on tablet + mobile below. */
	place-items: center;
	width: 3rem;
	height: 3rem;
	padding: 0 0 0.2rem;
	border: 1px solid var(--wp--preset--color--gold);
	border-radius: 50%;
	background: transparent;
	color: var(--wp--preset--color--navy-700);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color var(--wp--custom--transition, 200ms ease), color var(--wp--custom--transition, 200ms ease);
}
.ffp-testimonials__nav:hover,
.ffp-testimonials__nav:focus-visible { background: var(--wp--preset--color--navy-700); color: var(--wp--preset--color--cream); }

/* Shortcode embed: a self-contained cream band at the site's wide width, wherever it is placed. */
.ffp-testimonials.ffp-testimonials--embed { /* two classes: must outrank the page layout's content-width rule */
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1240px);
	margin-inline: auto;
	padding-block: var(--wp--preset--spacing--60);
}
.ffp-testimonials--embed .ffp-testimonials__head { margin-bottom: var(--wp--preset--spacing--40); }
.ffp-testimonials__empty { text-align: center; opacity: 0.7; }

/* layout="grid": cards wrap into columns (e.g. a full testimonials page). */
.ffp-testimonials--grid .ffp-testimonials__track {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 3.5rem 12px;
	padding-bottom: 3.5rem;
	overflow: visible;
	scroll-snap-type: none;
}
.ffp-testimonials--grid .ffp-testimonial { flex: none; }

@media (max-width: 1024px) {
	.ffp-testimonials__nav { display: grid; }
	.ffp-testimonials--grid .ffp-testimonials__track { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
	.ffp-testimonial { box-sizing: border-box; flex-basis: 100%; min-width: 0; padding-inline: 1.75rem; } /* one card fills the screen between the gutters */
}
@media (max-width: 781px) {
	.ffp-testimonials--grid .ffp-testimonials__track { grid-template-columns: minmax(0, 1fr); }
}

/* Disclaimer line under the button (design: italic, one line, centred). */
.ffp-testimonials__note {
	max-width: 1244px;
	margin: 2rem auto 0;
	padding-inline: var(--wp--preset--spacing--40);
	text-align: center;
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1rem;
	font-style: italic;
	line-height: 1.3;
	letter-spacing: var(--wp--custom--letter-spacing--heading);
}

/* Desktop: spacing and card height of the 1920px design. */
@media (min-width: 1100px) {
	.ffp-testimonials:not(.ffp-testimonials--embed) { padding-top: 153px; padding-bottom: 109px; }
	.ffp-testimonials:not(.ffp-testimonials--embed) .ffp-testimonials__track { padding-top: 23px; padding-bottom: 66px; }
	.ffp-testimonials:not(.ffp-testimonials--grid) .ffp-testimonial { box-sizing: border-box; min-height: 405px; padding-bottom: 2.25rem; }
}

/* Style "White background": for pages where the neighbouring sections are cream. */
.ffp-testimonials.is-style-white { background-color: var(--wp--preset--color--white); }
.ffp-testimonials--no-avatar .ffp-testimonial__avatar { display: none; } /* option: Show round photo / initial */

/* "White background" is also the Speaking page layout: slightly more air around the headline and cards (Figma). */
.ffp-testimonials.is-style-white .ffp-testimonials__head .ffp-eyebrow { margin-bottom: 1.5rem; }
.ffp-testimonials.is-style-white .ffp-testimonials__head .ffp-lead { margin-top: 0.25rem; }
.ffp-testimonials.is-style-white .ffp-testimonials__head { margin-bottom: calc(var(--wp--preset--spacing--60) + 18px); }
@media (min-width: 1100px) {
	.ffp-testimonials.is-style-white:not(.ffp-testimonials--embed) { padding-top: 131px; }
	.ffp-testimonials.is-style-white:not(.ffp-testimonials--embed) .ffp-testimonials__track { padding-bottom: 66px; }
}
.ffp-testimonials.is-style-white .ffp-testimonials__actions .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 57px; }
@media (min-width: 1100px) { .ffp-testimonials.is-style-white .ffp-testimonials__actions .wp-block-button__link { min-width: 310px; } }

.ffp-testimonials__nav { flex: none; } /* never squeezed by a wide button */
@media (max-width: 700px) {
	/* phone: the two arrows sit centred above the button, which gets its own row (they never get squeezed off screen) */
	.ffp-testimonials__actions { flex-wrap: wrap; gap: 1.25rem 0.75rem; padding-inline: var(--wp--preset--spacing--40); }
	.ffp-testimonials__actions .wp-block-buttons { order: 3; flex: 0 0 100%; display: flex; justify-content: center; }
	.ffp-testimonials__nav--prev { order: 1; }
	.ffp-testimonials__nav--next { order: 2; }
	.ffp-testimonials__actions .wp-block-button__link { padding-inline: 1.25rem; white-space: nowrap; max-width: 100%; box-sizing: border-box; }
}

/* Style "Sunset": cream fading into a sunset airport photo and navy (Landing page). The photo is baked (cream gradient included). */
.ffp-testimonials.is-style-sunset { position: relative; isolation: isolate; overflow: hidden; background-color: var(--wp--preset--color--navy-700); }
.ffp-testimonials__bg { position: absolute; inset: 0; z-index: -1; margin: 0; }
.ffp-testimonials__bg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.ffp-testimonials.is-style-sunset .ffp-testimonials__head .ffp-eyebrow { margin-bottom: 0; }
.ffp-testimonials.is-style-sunset .ffp-testimonials__note { color: var(--wp--preset--color--navy-700); }
.ffp-testimonials.is-style-sunset .ffp-testimonial { box-shadow: 40px 40px 80px color-mix(in srgb, var(--wp--preset--color--navy-700) 25%, transparent); } /* Figma: offset 40/40, blur 80 */
.ffp-testimonials.is-style-sunset .ffp-testimonial:hover { box-shadow: 40px 46px 80px color-mix(in srgb, var(--wp--preset--color--navy-700) 30%, transparent); }
.ffp-testimonials.is-style-sunset .ffp-testimonials__actions .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; min-height: 57px; }
@media (min-width: 1100px) {
	.ffp-testimonials.is-style-sunset:not(.ffp-testimonials--embed) { padding-top: 124px; padding-bottom: 126px; }
	.ffp-testimonials.is-style-sunset:not(.ffp-testimonials--embed) .ffp-testimonials__head { gap: 17px; margin-bottom: 0; }
	.ffp-testimonials.is-style-sunset:not(.ffp-testimonials--embed) .ffp-testimonials__track { padding-top: 58px; padding-bottom: 71px; }
	.ffp-testimonials.is-style-sunset .ffp-testimonial { box-sizing: border-box; min-height: 405px; padding-bottom: 2.25rem; }
	.ffp-testimonials.is-style-sunset .ffp-testimonials__actions .wp-block-button__link { min-width: 310px; }
	.ffp-testimonials.is-style-sunset .ffp-testimonials__note { margin-top: -40px; }
}
/* the baked photo is a 1920px canvas: it scales with the width and sits along the bottom (its top is cream, like the section), so the plane is never cropped */
.ffp-testimonials.is-style-sunset { background-color: var(--wp--preset--color--cream); }
.ffp-testimonials.is-style-sunset .ffp-testimonials__bg { inset: auto 0 0; height: auto; aspect-ratio: 1920 / 1133; }
.ffp-testimonials.is-style-sunset .ffp-testimonials__bg img { height: 100%; object-position: center bottom; }
@media (min-width: 701px) and (max-width: 1099px) {
	.ffp-testimonials.is-style-sunset .ffp-testimonials__track { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-inline: 1.5rem; padding-top: 2.5rem; padding-bottom: 3rem; }
	.ffp-testimonials.is-style-sunset .ffp-testimonial { padding: 2rem 1.25rem 1.75rem; box-shadow: 20px 20px 40px color-mix(in srgb, var(--wp--preset--color--navy-700) 25%, transparent); }
	.ffp-testimonials.is-style-sunset .ffp-testimonial__quote { left: 1.25rem; }
	.ffp-testimonials.is-style-sunset .ffp-testimonial__title { font-size: 1.125rem; }
	.ffp-testimonials.is-style-sunset .ffp-testimonial__text { font-size: 0.9375rem; }
	.ffp-testimonials.is-style-sunset .ffp-testimonial__by { padding-right: 0; }
}

/* Sunset style, tablet and up: three cards across (as in the design); only phones get the swipeable slider with arrows */
@media (min-width: 701px) {
	.ffp-testimonials.is-style-sunset .ffp-testimonials__track { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; overflow: visible; scroll-snap-type: none; cursor: auto; }
	.ffp-testimonials.is-style-sunset .ffp-testimonial { flex: none; }
	.ffp-testimonials.is-style-sunset .ffp-testimonials__nav { display: none; }
}

/* Phone slider: arrows sit close under the card */
@media (max-width: 700px) {
	.ffp-testimonials.is-style-sunset .ffp-testimonials__track { padding-bottom: 2.75rem; }
	/* the track clips overflowing shadows, so on phones the shadow stays small and soft inside the padding (no hard grey edge) */
	.ffp-testimonials.is-style-sunset .ffp-testimonial,
	.ffp-testimonials.is-style-sunset .ffp-testimonial:hover { box-shadow: 0 14px 26px -10px color-mix(in srgb, var(--wp--preset--color--navy-700) 30%, transparent); transform: none; }
	.ffp-testimonials.is-style-sunset .ffp-testimonials__actions { margin-top: 0; }
}
