/**
 * Future Flow — Related Case Studies Carousel
 * A 1:1 port of the source HTML's `.related-sec` block, scoped under .ffrc
 * and prefixed so theme styles neither bleed in nor leak out.
 */

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

.ffrc {
	/* Palette — overridable from the Elementor Style tab */
	--ffrc-g1: #9CC17E;
	--ffrc-g2: #69A95F;
	--ffrc-g3: #263F2F;
	--ffrc-black: #000;
	--ffrc-light-bg: #fff;
	--ffrc-light-surface: #F7F7F7;
	--ffrc-light-border: #E4E4E4;
	--ffrc-light-muted: rgba(0, 0, 0, .45);
	--ffrc-font-h: 'IBM Plex Sans', sans-serif;
	--ffrc-font-b: 'Nunito Sans', sans-serif;

	/* Carousel maths — --ffrc-vw mirrors the container's CONTENT width */
	--ffrc-vw: min(calc(100vw - 56px), 1104px);
	--ffrc-gap: 20px;
	--ffrc-per-view: 3.5;
	--ffrc-cols: 3;
	--ffrc-img-h: 170px;
	--ffrc-card-radius: 12px;

	background: var(--ffrc-light-bg);
	padding: 76px 0;
	font-family: var(--ffrc-font-b);
	position: relative;
	/* The carousel bleeds to the viewport edges; clip so the page itself
	   never gains a horizontal scrollbar (the source page relied on
	   body{overflow-x:hidden}, which a widget cannot assume). */
	overflow-x: clip;
}

.ffrc__container {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 28px;
}

.ffrc--no-container .ffrc__container {
	max-width: none;
	padding: 0;
}

/* ── Reveal ───────────────────────────────────────────── */
.ffrc .ffrc-r {
	opacity: 0;
	transform: translateY(16px);
	transition: opacity .5s cubic-bezier(.4, 0, .2, 1), transform .5s cubic-bezier(.4, 0, .2, 1);
}

.ffrc .ffrc-r.ffrc-v {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.ffrc .ffrc-r {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

/* ── Head ─────────────────────────────────────────────── */
.ffrc__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}

.ffrc__head-title {
	font-family: var(--ffrc-font-h);
	font-size: 26px;
	font-weight: 700;
	color: var(--ffrc-black);
	letter-spacing: -.015em;
	margin: 0;
}

.ffrc__head-sub {
	font-size: 13.5px;
	color: var(--ffrc-light-muted);
	margin-top: 6px;
}

.ffrc__head-right {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ffrc__viewall {
	font-size: 13px;
	font-weight: 600;
	color: var(--ffrc-g2);
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}

.ffrc__viewall:hover {
	color: var(--ffrc-g3);
}

/* ── Nav ──────────────────────────────────────────────── */
.ffrc__nav {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ffrc__nav.is-hidden {
	display: none;
}

.ffrc__arrows {
	display: flex;
	gap: 8px;
}

.ffrc__arrow {
	width: 38px;
	height: 38px;
	border-radius: 9px;
	flex-shrink: 0;
	background: #fff;
	border: 1px solid var(--ffrc-light-border);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all .18s;
	padding: 0;
	font: inherit;
	color: inherit;
	box-shadow: none;
}

.ffrc__arrow:hover:not(:disabled) {
	border-color: var(--ffrc-g2);
	background: var(--ffrc-g2);
}

.ffrc__arrow:hover:not(:disabled) svg {
	color: #fff;
}

.ffrc__arrow svg {
	color: rgba(0, 0, 0, .5);
	transition: color .18s;
}

.ffrc__arrow:disabled {
	opacity: .28;
	cursor: not-allowed;
}

/* ── Track ────────────────────────────────────────────── */
.ffrc__track-wrap {
	position: relative;
}

.ffrc__track {
	display: grid;
	grid-template-columns: repeat(var(--ffrc-cols), minmax(0, 1fr));
	gap: var(--ffrc-gap);
	align-items: stretch;
}

.ffrc__track.is-carousel {
	display: flex;
	gap: var(--ffrc-gap);
	align-items: stretch;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-ms-overflow-style: none;
	padding-bottom: 4px;
	/* Full-bleed both edges so cards run off screen left and right,
	   while the first card still lines up with the container. */
	--ffrc-bleed: calc((100vw - var(--ffrc-vw)) / 2);
	margin-left: calc(var(--ffrc-bleed) * -1);
	margin-right: calc(var(--ffrc-bleed) * -1);
	padding-left: var(--ffrc-bleed);
	padding-right: var(--ffrc-bleed);
	scroll-padding-left: var(--ffrc-bleed);
	cursor: grab;
	touch-action: pan-y;
	-webkit-overflow-scrolling: touch;
}

.ffrc--no-bleed .ffrc__track.is-carousel {
	--ffrc-bleed: 0px;
}

.ffrc__track.is-carousel:active {
	cursor: grabbing;
}

.ffrc__track.is-carousel.is-dragging {
	scroll-snap-type: none;
	scroll-behavior: auto;
	user-select: none;
	-webkit-user-select: none;
}

.ffrc__track.is-carousel.is-dragging .ffrc__card {
	pointer-events: none;
}

.ffrc__track.is-carousel::-webkit-scrollbar {
	display: none;
}

.ffrc__track.is-carousel .ffrc__card {
	flex: 0 0 calc((var(--ffrc-vw) - (var(--ffrc-per-view) - 1) * var(--ffrc-gap)) / var(--ffrc-per-view));
	scroll-snap-align: start;
}

/* ── Card ─────────────────────────────────────────────── */
.ffrc__card {
	background: #fff;
	border: 1px solid var(--ffrc-light-border);
	border-radius: var(--ffrc-card-radius);
	overflow: hidden;
	text-decoration: none;
	display: flex;
	flex-direction: column;
	transition: border-color .22s, transform .22s;
	color: inherit;
}

.ffrc__card:hover {
	border-color: rgba(105, 169, 95, .45);
	transform: translateY(-4px);
}

.ffrc__img {
	width: 100%;
	height: var(--ffrc-img-h);
	flex-shrink: 0;
	background: linear-gradient(135deg, #0d1f14, #1a3828);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
}

.ffrc__img svg {
	color: rgba(105, 169, 95, .2);
}

.ffrc__img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0;
}

.ffrc__card img {
	-webkit-user-drag: none;
	user-select: none;
	pointer-events: none;
}

.ffrc__body {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ffrc__pill {
	display: inline-flex;
	align-items: center;
	background: rgba(105, 169, 95, .1);
	border: 1px solid rgba(105, 169, 95, .28);
	border-radius: 4px;
	padding: 3px 8px;
	font-size: 10px;
	font-weight: 700;
	color: var(--ffrc-g3);
	letter-spacing: .06em;
	text-transform: uppercase;
	margin-bottom: 10px;
	width: fit-content;
}

.ffrc__title {
	font-family: var(--ffrc-font-h);
	font-size: 15.5px;
	font-weight: 700;
	color: var(--ffrc-black);
	line-height: 1.28;
	margin: 0 0 8px;
	letter-spacing: -.01em;
}

.ffrc__excerpt {
	font-size: 12.5px;
	color: var(--ffrc-light-muted);
	line-height: 1.65;
	flex: 1;
}

.ffrc__excerpt p {
	margin: 0 0 .6em;
}

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

.ffrc__loc {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	color: var(--ffrc-light-muted);
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--ffrc-light-border);
}

.ffrc__loc--no-border {
	border-top: none;
}

.ffrc__loc svg {
	color: var(--ffrc-g2);
	flex-shrink: 0;
}

/* ── Empty ────────────────────────────────────────────── */
.ffrc__empty {
	text-align: center;
	padding: 48px 20px;
	color: var(--ffrc-light-muted);
	font-size: 15px;
}

/* Responsive per-view / column counts are printed per instance by the
   widget so both the values and the breakpoints stay configurable
   (defaults: 3.5 / 2.5 @1000 / 1.35 @640, grid 3 / 2 @860 / 1 @640). */

/* Elementor editor: never leave cards hidden behind the reveal */
.elementor-editor-active .ffrc .ffrc-r,
.elementor-editor-preview .ffrc .ffrc-r {
	opacity: 1;
	transform: none;
}
