/* About Gallery — pixel values from Figma (px → rem, base 16px) */

.about-gallery {
	background: #f5f5f5;
	padding-top:    var( --ag-pt, 3rem );
	padding-bottom: var( --ag-pb, 3rem );
	margin-top:     var( --ag-mt, 0rem );
	margin-bottom:  var( --ag-mb, 0rem );
}

.about-gallery__inner {
	max-width: 90rem;
	margin: 0 auto;
	padding: 0 5rem;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 3rem;
}

/* ── Heading area ── */
.about-gallery__heading-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem; /* 12px — site-standard eyebrow->heading gap */
	text-align: center;
}

.about-gallery__eyebrow {
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 1rem;         /* 16px */
	font-weight: 500;
	letter-spacing: 0.25em; /* 4px */
	text-transform: uppercase;
	color: rgba(0, 13, 38, 0.7);
	margin: 0;
	line-height: 1.35;
}

.about-gallery__heading {
	font-family: 'Quincy', Georgia, serif;
	font-size: 3.5rem;         /* 64px */
	font-weight: 400;
	line-height: 4.025rem;
	color: #000d26;
	margin: 0;
}

.about-gallery__body {
	font-family: 'Source Sans 3', system-ui, sans-serif;
	font-size: 1.125rem;     /* 18px */
	font-weight: 400;
	line-height: 1.55;
	color: #000d26;
	margin: 0;
	max-width: 46rem;
}

/* ── Photo grid — desktop: 2 flex rows with custom proportions ── */
.about-gallery__grid {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;             /* 24px */
	width: 100%;
}

.about-gallery__row {
	display: flex;
	gap: 1.5rem;
}

.about-gallery__cell {
	overflow: hidden;
	border-radius: 1rem;     /* 16px */
	min-width: 0;
	height: 24.0625rem;      /* 385px */
	flex-shrink: 1;
}

/* Row 1 Figma proportions: 302 : 628 : 302 */
.about-gallery__row--1 .about-gallery__cell:nth-child(1) { flex: 302; }
.about-gallery__row--1 .about-gallery__cell:nth-child(2) { flex: 628; }
.about-gallery__row--1 .about-gallery__cell:nth-child(3) { flex: 302; }

/* Row 2 Figma proportions: 519 : 411 : 302 */
.about-gallery__row--2 .about-gallery__cell:nth-child(1) { flex: 519; }
.about-gallery__row--2 .about-gallery__cell:nth-child(2) { flex: 411; }
.about-gallery__row--2 .about-gallery__cell:nth-child(3) { flex: 302; }

.about-gallery__cell img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Cell interaction ── */
.about-gallery__cell[data-src] {
	cursor: zoom-in;
}

.about-gallery__cell[data-src]::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 13, 38, 0);
	transition: background 0.2s ease;
	pointer-events: none;
}

/* need position:relative on cells for the overlay */
.about-gallery__cell {
	position: relative;
}

.about-gallery__cell[data-src]:hover::after,
.about-gallery__cell[data-src]:focus-visible::after {
	background: rgba(0, 13, 38, 0.32);
}

.about-gallery__cell[data-src]:focus-visible {
	outline: 3px solid #0b5cff;
	outline-offset: 3px;
}

/* ── Lightbox ── */
.ag-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ag-lightbox[hidden] { display: none; }

.ag-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 13, 38, 0.96);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.ag-lightbox__stage {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 90vw;
	max-height: 90vh;
}

.ag-lightbox__img {
	display: block;
	max-width: 90vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	border-radius: 0.5rem;
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.25s ease;
	box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
}
.ag-lightbox__img.is-loaded { opacity: 1; }

/* Close button */
.ag-lightbox__close {
	position: fixed;
	top: 1.25rem;
	right: 1.25rem;
	z-index: 2;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	border-radius: 50%;
	width: 2.75rem;
	height: 2.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.75rem;
	line-height: 1;
	color: #fff;
	cursor: pointer;
	transition: background 0.15s;
	padding: 0;
}
.ag-lightbox__close:hover { background: rgba(255, 255, 255, 0.24); }

/* Prev / Next */
.ag-lightbox__prev,
.ag-lightbox__next {
	position: fixed;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	border-radius: 50%;
	width: 3.25rem;
	height: 3.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	cursor: pointer;
	transition: background 0.15s;
	padding: 0;
}
.ag-lightbox__prev { left: 1.25rem; }
.ag-lightbox__next { right: 1.25rem; }
.ag-lightbox__prev:hover,
.ag-lightbox__next:hover { background: rgba(255, 255, 255, 0.28); }

.ag-lightbox__prev svg,
.ag-lightbox__next svg {
	display: block;
	flex-shrink: 0;
}

/* Counter */
.ag-lightbox__counter {
	position: fixed;
	bottom: 1.5rem;
	left: 50%;
	transform: translateX(-50%);
	z-index: 2;
	font-family: 'Inter', system-ui, sans-serif;
	font-size: 0.875rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.7);
	margin: 0;
	letter-spacing: 0.05em;
	white-space: nowrap;
}

@media (max-width: 600px) {
	.ag-lightbox__prev { left: 0.5rem; width: 2.5rem; height: 2.5rem; }
	.ag-lightbox__next { right: 0.5rem; width: 2.5rem; height: 2.5rem; }
	.ag-lightbox__close { top: 0.75rem; right: 0.75rem; }
	.ag-lightbox__img { max-width: 96vw; max-height: 82vh; }
}

/* ── CTA ── */
.about-gallery__cta-wrap {
	display: flex;
	justify-content: center;
}

/* ── Responsive ── */

@media (max-width: 1200px) {
	.about-gallery__inner {
		padding: 0 3rem;
	}
	.about-gallery__heading {
		font-size: 3.5rem; line-height: 4.025rem;
	}
}

/* Tablet: flatten to uniform 3-column grid */
@media (max-width: 900px) {
	.about-gallery__inner {
		padding: 0 2rem;
		gap: 2rem;
	}
	.about-gallery__heading {
		font-size: 3rem; line-height: 3.45rem;
	}
	/* Collapse rows — cells become direct grid children */
	.about-gallery__grid {
		display: grid;
		grid-template-columns: repeat(3, 1fr);
		gap: 1rem;
	}
	.about-gallery__row {
		display: contents;
	}
	.about-gallery__cell {
		height: auto;
		aspect-ratio: 3 / 4;
	}
}

/* Large mobile: 2 columns */
@media (max-width: 640px) {
	.about-gallery {
		padding-top:    var( --ag-pt-m, var( --ag-pt, 3rem ) );
		padding-bottom: var( --ag-pb-m, var( --ag-pb, 3rem ) );
		margin-top:     var( --ag-mt-m, var( --ag-mt, 0rem ) );
		margin-bottom:  var( --ag-mb-m, var( --ag-mb, 0rem ) );
	}
	.about-gallery__inner {
		padding: 0 1.25rem;
		gap: 1.5rem;
	}
	.about-gallery__heading {
		font-size: 2.5rem; line-height: 2.875rem;
	}
	.about-gallery__eyebrow {
		font-size: 0.8125rem;
		letter-spacing: 0.2em;
	}
	.about-gallery__body {
		font-size: 1rem;
	}
	.about-gallery__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
	.about-gallery__cell {
		aspect-ratio: 1;
	}
}

/* Small mobile: single column */
@media (max-width: 360px) {
	.about-gallery__inner {
		padding: 0 1rem;
	}
	.about-gallery__heading {
		font-size: 2rem; line-height: 2.3rem;
	}
	.about-gallery__grid {
		grid-template-columns: 1fr;
		gap: 0.625rem;
	}
	.about-gallery__cell {
		aspect-ratio: 4 / 3;
	}
}
