/**
 * Future Flow — Gallery Section
 * A 1:1 port of the source HTML's `.gallery-sec` block, scoped under .ffg
 * and prefixed so theme styles neither bleed in nor leak out.
 */

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

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

	--ffg-cols: 4;
	--ffg-gap: 14px;
	--ffg-radius: 10px;
	--ffg-ratio: 1;

	background: var(--ffg-light-surface);
	position: relative;
	overflow: hidden;
	padding: 76px 0;
	font-family: var(--ffg-font-b);
}

.ffg__container {
	max-width: 1160px;
	margin: 0 auto;
	padding: 0 28px;
	position: relative;
	z-index: 2;
}

.ffg--no-container .ffg__container {
	max-width: none;
	padding: 0;
}

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

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

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

/* ── Head ─────────────────────────────────────────────── */
.ffg__head {
	margin-bottom: 36px;
}

/* Tag pill with the pulsing dot */
@keyframes ffg-pulse-light {
	0% {
		box-shadow: 0 0 0 0 rgba(105, 169, 95, .65);
	}
	70% {
		box-shadow: 0 0 0 7px rgba(105, 169, 95, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(105, 169, 95, 0);
	}
}

@keyframes ffg-pulse-dark {
	0% {
		box-shadow: 0 0 0 0 rgba(156, 193, 126, .8);
	}
	70% {
		box-shadow: 0 0 0 7px rgba(156, 193, 126, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(156, 193, 126, 0);
	}
}

.ffg__tag {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--ffg-font-b);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	padding: 6px 14px 6px 8px;
	border-radius: 999px;
	color: var(--ffg-g3);
	background: rgba(38, 63, 47, .06);
	border: 1px solid rgba(38, 63, 47, .16);
}

.ffg__tag--dark {
	color: var(--ffg-g1);
	background: rgba(156, 193, 126, .08);
	border-color: rgba(156, 193, 126, .22);
}

.ffg__dot-wrap {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: rgba(38, 63, 47, .1);
}

.ffg__tag--dark .ffg__dot-wrap {
	background: rgba(156, 193, 126, .18);
}

.ffg__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--ffg-g2);
	animation: ffg-pulse-light 2.2s ease-out infinite;
}

.ffg__tag--dark .ffg__dot {
	background: var(--ffg-g1);
	animation-name: ffg-pulse-dark;
}

.ffg--no-pulse .ffg__dot {
	animation: none;
}

.ffg__title {
	font-family: var(--ffg-font-h);
	font-size: clamp(24px, 3vw, 34px);
	font-weight: 700;
	color: var(--ffg-black);
	margin: 13px 0 10px;
	letter-spacing: -.02em;
}

.ffg__desc {
	font-size: 15px;
	color: var(--ffg-light-muted);
	max-width: 520px;
	line-height: 1.7;
}

.ffg__desc p {
	margin: 0 0 .8em;
}

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

/* ── Grid ─────────────────────────────────────────────── */
.ffg__grid {
	display: grid;
	grid-template-columns: repeat(var(--ffg-cols), minmax(0, 1fr));
	gap: var(--ffg-gap);
}

.ffg__item {
	position: relative;
	aspect-ratio: var(--ffg-ratio);
	border-radius: var(--ffg-radius);
	overflow: hidden;
	border: 1px solid var(--ffg-light-border);
	cursor: pointer;
	transition: border-color .22s, transform .22s;
	background: linear-gradient(135deg, #0d1f14, #1a3828);
	display: block;
	padding: 0;
	margin: 0;
	width: 100%;
	text-decoration: none;
	color: inherit;
	font: inherit;
	appearance: none;
	-webkit-appearance: none;
}

.ffg__item:hover {
	border-color: rgba(105, 169, 95, .5);
	transform: translateY(-3px);
}

.ffg--static .ffg__item {
	cursor: default;
}

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

.ffg__ph {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #0d1f14 0%, #1a3828 100%);
}

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

.ffg__item--feature {
	grid-column: span 2;
	grid-row: span 2;
	aspect-ratio: auto;
}

/* Caption overlay (only rendered when a caption exists) */
.ffg__cap {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 26px 14px 12px;
	background: linear-gradient(to top, rgba(0, 0, 0, .78) 0%, rgba(0, 0, 0, .35) 55%, transparent 100%);
	color: #fff;
	font-size: 12px;
	line-height: 1.45;
	text-align: left;
	opacity: 1;
	transition: opacity .22s;
}

.ffg--cap-hover .ffg__cap {
	opacity: 0;
}

.ffg--cap-hover .ffg__item:hover .ffg__cap,
.ffg--cap-hover .ffg__item:focus-visible .ffg__cap {
	opacity: 1;
}

/* Zoom hint icon */
.ffg__zoom {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	width: 28px;
	height: 28px;
	border-radius: 7px;
	background: rgba(0, 0, 0, .45);
	backdrop-filter: blur(6px);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	opacity: 0;
	transition: opacity .22s;
	pointer-events: none;
}

.ffg__item:hover .ffg__zoom,
.ffg__item:focus-visible .ffg__zoom {
	opacity: 1;
}

/* "+N more" badge on the last visible tile */
.ffg__more {
	position: absolute;
	inset: 0;
	z-index: 3;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	font-family: var(--ffg-font-h);
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.01em;
}

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

/* ── Lightbox ─────────────────────────────────────────── */
.ffg-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, .92);
	padding: 5vh 6vw;
	opacity: 0;
	transition: opacity .22s;
	font-family: 'Nunito Sans', sans-serif;
}

.ffg-lb.is-open {
	display: flex;
}

.ffg-lb.is-visible {
	opacity: 1;
}

.ffg-lb__figure {
	position: relative;
	max-width: 100%;
	max-height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.ffg-lb__img {
	max-width: 100%;
	max-height: 78vh;
	display: block;
	border-radius: 8px;
	object-fit: contain;
	user-select: none;
	-webkit-user-drag: none;
}

.ffg-lb__cap {
	color: rgba(255, 255, 255, .78);
	font-size: 13.5px;
	line-height: 1.5;
	text-align: center;
	max-width: 720px;
}

.ffg-lb__btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .2);
	background: rgba(255, 255, 255, .08);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background .18s, border-color .18s;
	padding: 0;
}

.ffg-lb__btn:hover {
	background: rgba(255, 255, 255, .18);
	border-color: rgba(255, 255, 255, .4);
}

.ffg-lb__btn[disabled] {
	opacity: .25;
	cursor: default;
}

.ffg-lb__prev {
	left: 16px;
}

.ffg-lb__next {
	right: 16px;
}

.ffg-lb__close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .2);
	background: rgba(255, 255, 255, .08);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background .18s;
}

.ffg-lb__close:hover {
	background: rgba(255, 255, 255, .18);
}

.ffg-lb__count {
	position: absolute;
	top: 22px;
	left: 22px;
	color: rgba(255, 255, 255, .55);
	font-size: 13px;
	letter-spacing: .04em;
}

@media (max-width: 600px) {
	.ffg-lb {
		padding: 8vh 12px;
	}

	.ffg-lb__prev {
		left: 6px;
	}

	.ffg-lb__next {
		right: 6px;
	}

	.ffg-lb__btn {
		width: 38px;
		height: 38px;
	}
}

/* Responsive columns are printed per instance by the widget so both the
   counts and the breakpoint stay configurable (default: 2 cols @768px,
   feature tile 16/10 across the full row). */

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