/* FGS Gallery — scoped, mobile-first. Brand tokens match the existing Frenzy palette. */
.fgs-page {
	--fgs-navy: #032f5d;
	--fgs-red: #e02b20;
	--fgs-red-dark: #b8221a;
	--fgs-ink: #1d2733;
	--fgs-muted: #4a5868;
	--fgs-surface: #f3f6f9;
	--fgs-radius: 6px;
	--fgs-gap: 0.5rem;
	--fgs-focus: 0 0 0 3px #fff, 0 0 0 6px var(--fgs-red);
	background: #fff;
	color: var(--fgs-ink);
	padding: 1.5rem 0 2rem; /* 32px between the final CTA box and the footer (64px from 768px) */
}
@media (min-width: 768px) { .fgs-page { padding-bottom: 4rem; } }
.fgs-page *,
.fgs-page *::before,
.fgs-page *::after { box-sizing: border-box; }

.fgs-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Intro */
.fgs-page .fgs-intro { text-align: center; padding-block: 0.5rem 1rem; }
.fgs-page .fgs-intro__title {
	margin: 0; padding: 0; color: var(--fgs-navy); font-size: clamp(2rem, 6vw, 2.75rem);
	line-height: 1.1; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
}
.fgs-page .fgs-intro__title::after {
	content: ""; display: block; width: 3.5rem; height: 3px; margin: 0.6rem auto 0; background: var(--fgs-red);
}
.fgs-page .fgs-intro__text {
	max-width: 42rem; margin: 0.75rem auto 0; padding: 0; color: var(--fgs-muted);
	font-size: 1rem; line-height: 1.55; font-weight: 400;
}

/* Filters: one scrollable row on mobile, wrapped and centred on larger screens */
.fgs-filters { margin: 0 0 1rem; }
.fgs-filters__list {
	position: relative; /* containing block for the visually-hidden (absolute) labels, so the scroller clips them */
	display: flex; gap: 0.5rem; overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x proximity; padding: 0.35rem 0.25rem 0.6rem; margin-inline: -0.25rem;
	scrollbar-width: thin;
}
.fgs-page .fgs-filter {
	position: relative; flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 0.4em;
	min-height: 44px; padding: 0.5rem 0.95rem; border: 0; border-radius: var(--fgs-radius);
	background: var(--fgs-navy); color: #fff; font: inherit; font-size: 0.95rem; font-weight: 400;
	line-height: 1; cursor: pointer; box-shadow: 0 2px 4px rgb(3 47 93 / 0.25);
	transition: background-color 0.15s ease, transform 0.15s ease;
}
.fgs-page .fgs-filter:hover { background: #0a4686; }
.fgs-page .fgs-filter[aria-pressed="true"] { background: var(--fgs-red); }
.fgs-page .fgs-filter:focus-visible { outline: 0; box-shadow: var(--fgs-focus); }
.fgs-filter__count {
	font-size: 0.75rem; font-weight: 400; padding: 0.2em 0.45em; border-radius: 999px;
	background: rgb(255 255 255 / 0.2);
}
@media (min-width: 700px) {
	.fgs-filters__list { flex-wrap: wrap; justify-content: center; overflow: visible; }
}

/* Grid: uniform tiles = no layout shift, no masonry library */
.fgs-page ul.fgs-grid {
	list-style: none; margin: 0; padding: 0; display: grid; gap: var(--fgs-gap);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	transition: opacity 0.2s ease;
}
.fgs-page ul.fgs-grid[aria-busy="true"] { opacity: 0.45; }
@media (min-width: 700px) { .fgs-page ul.fgs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .fgs-page ul.fgs-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); --fgs-gap: 0.75rem; } }
.fgs-page .fgs-item { margin: 0; padding: 0; list-style: none; scroll-margin-top: 6rem; }
.fgs-page .fgs-item::before { content: none; }
.fgs-item__link {
	display: block; position: relative; aspect-ratio: 3 / 4; overflow: hidden;
	border-radius: var(--fgs-radius); background: var(--fgs-surface);
}
.fgs-page .fgs-item__img {
	display: block; width: 100%; height: 100%; max-width: none; object-fit: cover;
	transition: opacity 0.12s linear; /* only for images still loading (JS adds .is-pending); never delayed */
}
.fgs-page .fgs-item__img.is-pending { opacity: 0; }
.fgs-item__link:hover .fgs-item__img { filter: brightness(1.06); }
.fgs-item__link:focus-visible { outline: 0; box-shadow: var(--fgs-focus); }

.fgs-page .fgs-status { margin: 1rem 0 0; padding: 0; text-align: center; color: var(--fgs-muted); font-size: 0.9rem; font-weight: 400; }
.fgs-more-wrap { display: flex; justify-content: center; padding: 0.75rem 0 2rem; }

/* Buttons and the final coastal CTA are shared components: see site.css */

/* Hide the floating booking button while page CTAs/Load more are on screen (prevents overlap) */
body.fgs-hide-float .vally-overlay-button { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; transition: opacity 0.2s, visibility 0.2s; }

/* Lightbox */
html:has(.fgs-lb[open]) { overflow: hidden; }
.fgs-lb {
	width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
	background: rgb(2 16 33 / 0.96); color: #fff;
}
.fgs-lb::backdrop { background: rgb(0 0 0 / 0.6); }
.fgs-lb__inner { position: relative; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; padding: 3.5rem 0.5rem 5rem; }
.fgs-lb__figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 0.6rem; max-width: 100%; max-height: 100%; }
.fgs-lb__stage { display: flex; align-items: center; justify-content: center; min-height: 0; touch-action: pan-y; }
.fgs-lb__img { display: block; max-width: min(100%, 1400px); max-height: calc(100dvh - 13rem); width: auto; height: auto; object-fit: contain; border-radius: 4px; }
.fgs-lb__caption { font-weight: 400; font-size: 0.9rem; text-align: center; max-width: 40rem; color: rgb(255 255 255 / 0.85); }
.fgs-lb__caption:empty { display: none; }
.fgs-lb__counter { position: absolute; top: 1rem; left: 1rem; margin: 0; font-size: 0.9rem; color: rgb(255 255 255 / 0.85); font-weight: 400; }
.fgs-lb__btn {
	position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
	border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.14); color: #fff; cursor: pointer;
}
.fgs-lb__btn:hover { background: rgb(255 255 255 / 0.26); }
.fgs-lb__btn:disabled { opacity: 0.3; cursor: default; }
.fgs-lb__btn:focus-visible, .fgs-lb__cta:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.fgs-lb__btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.fgs-lb__close { top: 0.5rem; right: 0.5rem; }
.fgs-lb__prev, .fgs-lb__next { bottom: 1rem; }
.fgs-lb__prev { left: 1rem; }
.fgs-lb__next { right: 1rem; }
@media (min-width: 800px) {
	.fgs-lb__prev, .fgs-lb__next { bottom: auto; top: 50%; transform: translateY(-50%); }
	.fgs-lb__inner { padding-inline: 5rem; }
}
.fgs-lb__cta {
	position: static; flex: none; /* in flow, directly below the photo and caption */
	padding: 0.55rem 1.1rem; border: 1px solid rgb(255 255 255 / 0.6); border-radius: 999px;
	color: #fff; font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.fgs-lb__cta:hover { background: var(--fgs-red); border-color: var(--fgs-red); color: #fff; }

@media (prefers-reduced-motion: reduce) {
	.fgs-page *, .fgs-lb * { transition: none !important; }
	.fgs-item__link:hover .fgs-item__img { filter: none; }
}

/* ---------- Typography baseline (Divi body is 300; use loaded weights 400/600/700 only) ---------- */
.fgs-page, .fgs-lb { font-weight: 400; }
.fgs-page .fgs-intro__title { font-weight: 700; }

/* ---------- Motion: lightbox opening only (gallery photos and the CTA render without entrance motion) ---------- */
@keyframes fgs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fgs-zoom { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.fgs-lb[open] { animation: fgs-fade 0.2s ease-out; }
.fgs-lb[open] .fgs-lb__figure { animation: fgs-zoom 0.25s ease-out; }

@media (prefers-reduced-motion: reduce) {
	.fgs-lb[open], .fgs-lb[open] .fgs-lb__figure { animation: none; }
	.fgs-page .fgs-item__img.is-pending { opacity: 1; }
}
