/* Gallery page: lightweight, CSS-first layout with a graceful no-JavaScript fallback. */
.slh-gallery {
	--gallery-ink: #04142b;
	--gallery-muted: #6f6b64;
	--gallery-gold: #9f8c5f;
	--gallery-gap: clamp(10px, 1.6vw, 22px);
	max-width: 1170px;
	margin: 0 auto 80px;
	padding: 0 15px;
	box-sizing: border-box;
}

.slh-gallery__header {
	max-width: 720px;
	margin: 0 auto clamp(30px, 5vw, 60px);
	text-align: center;
}

.slh-gallery__eyebrow {
	margin: 0 0 12px;
	color: var(--gallery-gold);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 2.4px;
	line-height: 1.4;
	text-transform: uppercase;
}

.slh-gallery__intro {
	margin: 0;
	color: var(--gallery-ink);
	font-family: "Prata", Georgia, serif;
	font-size: clamp(20px, 2.5vw, 30px);
	line-height: 1.45;
}

.slh-gallery__count {
	margin: 18px 0 0;
	color: var(--gallery-muted);
	font-size: 12px;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.slh-gallery-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 auto clamp(28px, 4vw, 48px);
}

.slh-gallery-filter {
	padding: 10px 14px;
	border: 1px solid #d9d4ca;
	border-radius: 999px;
	background: transparent;
	color: var(--gallery-muted);
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .06em;
	line-height: 1.2;
	text-transform: uppercase;
	transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.slh-gallery-filter span {
	margin-left: 4px;
	color: var(--gallery-gold);
	font-weight: 400;
}

.slh-gallery-filter:hover,
.slh-gallery-filter:focus-visible,
.slh-gallery-filter.is-active {
	border-color: var(--gallery-ink);
	background: var(--gallery-ink);
	color: #fff;
}

.slh-gallery-filter:focus-visible {
	outline: 3px solid var(--gallery-gold);
	outline-offset: 3px;
}

.slh-gallery-grid {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: var(--gallery-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.slh-gallery-card {
	grid-column: span 4;
	min-width: 0;
	margin: 0;
	content-visibility: auto;
	contain-intrinsic-size: 280px 210px;
}

.slh-gallery-card[hidden] {
	display: none;
}

.slh-gallery-card--wide {
	grid-column: span 8;
}

.slh-gallery-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.slh-gallery-card__figure {
	position: relative;
	overflow: hidden;
	margin: 0;
	background: #ebe9e4;
	aspect-ratio: 4 / 3;
}

.slh-gallery-card--wide .slh-gallery-card__figure {
	aspect-ratio: 8 / 3;
}

.slh-gallery-card__link img {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: cover;
	transform: scale(1.001);
	transition: transform .55s cubic-bezier(.2, .65, .25, 1), filter .55s ease;
}

.slh-gallery-card__overlay {
	display: flex;
	position: absolute;
	inset: 0;
	align-items: flex-end;
	justify-content: space-between;
	padding: 18px;
	background: linear-gradient(180deg, rgba(4,20,43,0) 48%, rgba(4,20,43,.78) 100%);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.3;
	text-transform: uppercase;
	opacity: 0;
	transition: opacity .3s ease;
}

.slh-gallery-card__arrow {
	display: inline-block;
	margin-left: 4px;
	font-size: 17px;
	font-weight: 400;
	line-height: 0;
}

.slh-gallery-card__caption {
	margin-top: 10px;
	color: var(--gallery-muted);
	font-size: 13px;
	line-height: 1.45;
}

.slh-gallery-card__link:hover img,
.slh-gallery-card__link:focus-visible img {
	filter: saturate(1.05);
	transform: scale(1.035);
}

.slh-gallery-card__link:hover .slh-gallery-card__overlay,
.slh-gallery-card__link:focus-visible .slh-gallery-card__overlay {
	opacity: 1;
}

.slh-gallery-card__link:focus-visible {
	outline: 3px solid var(--gallery-gold);
	outline-offset: 4px;
}

.slh-gallery__empty {
	margin: 0;
	padding: 60px 20px;
	background: #f6f4f0;
	color: var(--gallery-muted);
	text-align: center;
}

@media (hover: none) {
	.slh-gallery-card__overlay {
		opacity: 1;
	}
}

@media (max-width: 991px) {
	.slh-gallery-card,
	.slh-gallery-card--wide {
		grid-column: span 6;
	}

	.slh-gallery-card--wide .slh-gallery-card__figure {
		aspect-ratio: 4 / 3;
	}
}

@media (max-width: 767px) {
	.slh-gallery {
		margin-bottom: 52px;
	}

	.slh-gallery__header {
		margin-bottom: 30px;
	}

	.slh-gallery-filters {
		justify-content: flex-start;
		overflow-x: auto;
		flex-wrap: nowrap;
		margin-right: -15px;
		margin-left: -15px;
		padding: 0 15px 4px;
		-webkit-overflow-scrolling: touch;
	}

	.slh-gallery-filter {
		flex: 0 0 auto;
	}

	.slh-gallery-grid {
		gap: 10px;
	}

	.slh-gallery-card__overlay {
		padding: 12px;
		font-size: 10px;
	}

	.slh-gallery-card__caption {
		font-size: 12px;
	}
}

@media (max-width: 420px) {
	.slh-gallery-card,
	.slh-gallery-card--wide {
		grid-column: span 12;
	}
}

@media (prefers-reduced-motion: reduce) {
	.slh-gallery-card__link img,
	.slh-gallery-card__overlay {
		transition: none;
	}
}
