/*
 * gallery-layout.css
 * Full-width gallery layout override — linked after theme.css on gallery pages only.
 * Scoped to body.gallery-full-width so it never leaks into other pages.
 */

/* Remove side padding so the photo grid reaches the viewport edge */
body.gallery-full-width #main-content {
	padding: 0 0 3rem;
}

/* ─── Gallery sub-navigation — centered to match #site-navigation ───────── */

.gallery-subnav {
	max-width: 960px;
	margin: 0.75rem auto 0;
	padding: 0 1rem;
	text-align: center;
	box-sizing: border-box;
}

.gallery-subnav__label {
	font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	font-size: 0.68rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	opacity: 0.45;
	margin-right: 0.75rem;
}

.gallery-subnav__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.2rem 1.5rem;
}

.gallery-subnav__list a {
	font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	font-size: 0.78rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	text-decoration: none;
	opacity: 0.5;
	color: inherit;
}

.gallery-subnav__list a:hover,
.gallery-subnav__list a:focus-visible {
	opacity: 1;
	color: inherit !important;
	text-decoration: none;
}

/* Active gallery link */
.gallery-subnav__list a[aria-current="page"] {
	opacity: 1;
	font-weight: 700;
}

/* ─── Gallery title and intro ────────────────────────────────────────────── */

body.gallery-full-width .photo-gallery .main-content-title {
	padding: 1rem 1.25rem 0.5rem;
	margin: 0;
	text-align: left;
}

body.gallery-full-width .photo-gallery__intro {
	padding: 0 1.25rem 0.5rem;
	margin: 0;
}

/* ─── Full-width photo grid ─────────────────────────────────────────────── */

body.gallery-full-width .photo-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	grid-auto-rows: 8px;
	grid-auto-flow: dense;
	gap: 3px;
	width: 100%;
}

/* Preserve each image's native aspect while filling column width. */
body.gallery-full-width .photo-gallery__image {
	display: block;
	width: 100%;
	height: 100%;
	max-height: none;
	object-fit: cover;
	background-color: #111;
}

body.gallery-full-width .photo-gallery__item {
	margin: 0;
}

body.gallery-full-width .photo-gallery__trigger {
	display: block;
	height: 100%;
}

/* ─── Responsive ────────────────────────────────────────────────────────── */

@media screen and (max-width: 1000px) {
	body.gallery-full-width .photo-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media screen and (max-width: 560px) {
	.gallery-subnav {
		padding: 0 0.5rem;
	}

	body.gallery-full-width .photo-gallery__grid {
		grid-template-columns: 1fr;
		gap: 2px;
	}
}
