/* Gallery page, Figma 1113:3216. */

.gallery {
	overflow-x: clip;
	background: #fff;
}

.gallery-head {
	width: 100%;
	max-width: 848px;
	margin: 138px auto 0;
	padding: 0 40px;
	box-sizing: border-box;
	text-align: center;
}

.gallery-head h1 {
	max-width: 600px;
	margin: 0 auto;
	color: var(--bronze);
}

.gallery-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 32px;
	margin: 60px 0 0;
}

.gallery-filters__button,
.gallery-pager button {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	cursor: pointer;
}

.gallery-filters__button {
	color: var(--muted);
	font-size: 18px;
	font-weight: 400;
	letter-spacing: 1.8px;
	line-height: 1;
	text-transform: uppercase;
}

.gallery-filters__button.is-active {
	color: var(--ink);
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 2.2px;
	text-decoration: underline;
	text-underline-offset: 6px;
}

.gallery-filters__button:hover,
.gallery-filters__button:focus-visible {
	color: var(--ink);
}

.gallery-filters__button:focus-visible,
.gallery-pager button:focus-visible {
	outline: 2px solid var(--bronze);
	outline-offset: 4px;
}

.gallery-mosaic {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 12px;
	row-gap: 15px;
	width: var(--wrap);
	margin: 56px auto 0;
	padding: 0;
	list-style: none;
}

.gallery-mosaic__item {
	min-width: 0;
	height: 579px;
	overflow: hidden;
	background: #d9d9d9;
}

.gallery-mosaic__item--wide {
	grid-column: span 2;
}

.gallery-mosaic__item--full {
	grid-column: 1 / -1;
	height: 677px;
}

.gallery-mosaic__item img {
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
}

.gallery-mosaic__item img.is-focus-right {
	object-position: 72% center;
}

.gallery-empty {
	width: var(--wrap);
	margin: 48px auto 0;
	color: var(--muted);
	font-size: 16px;
	line-height: 24px;
	text-align: center;
}

.gallery-pager {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 60px auto 150px;
}

.gallery-pager button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border: 1.26px solid rgba(2, 6, 5, 0.03);
	border-radius: 50%;
	color: #020605;
	font-size: 20px;
	line-height: 1;
}

.gallery-pager__page.is-current {
	border-color: #816955;
	background: #816955;
	color: #fff;
	font-weight: 600;
}

.gallery-pager__arrow {
	border-color: rgba(2, 6, 5, 0.05);
	background: rgba(2, 6, 5, 0.03);
	font-size: 22px;
}

.gallery-pager button:disabled {
	opacity: 0.35;
	cursor: default;
}

.gallery-pager__gap {
	color: #020605;
	font-size: 20px;
	line-height: 1;
	letter-spacing: 2px;
}

/* No blank cells: rows that cannot be finished are filled by gallery.js; dense packing is the fallback without JS. */
.gallery-mosaic {
	grid-auto-flow: row dense;
}

/* Photo popup (QA #19). */
.gallery-mosaic__item[role="button"] {
	cursor: zoom-in;
}

.gallery-mosaic__item img {
	transition: transform 600ms cubic-bezier(0.22, 0.8, 0.2, 1);
}

.gallery-mosaic__item[role="button"]:hover img,
.gallery-mosaic__item[role="button"]:focus-visible img {
	transform: scale(1.03);
}

.gallery-mosaic__item:focus-visible {
	outline: 2px solid var(--bronze);
	outline-offset: 3px;
}

.has-lightbox,
.has-lightbox body {
	overflow: hidden;
}

.gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 72px 96px;
	background: rgba(17, 15, 13, 0.92);
	animation: gallery-lightbox-in 250ms ease;
}

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

.gallery-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	width: 100%;
	height: 100%;
	margin: 0;
	justify-content: center;
}

.gallery-lightbox__img {
	max-width: 100%;
	max-height: calc(100% - 40px);
	object-fit: contain;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox__count {
	color: rgba(255, 255, 255, 0.7);
	font-size: 14px;
	letter-spacing: 2px;
}

.gallery-lightbox__close,
.gallery-lightbox__nav {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 200ms ease, border-color 200ms ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__nav:hover,
.gallery-lightbox__close:focus-visible,
.gallery-lightbox__nav:focus-visible {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.12);
	outline: none;
}

.gallery-lightbox__close {
	top: 20px;
	right: 20px;
	font-size: 30px;
}

.gallery-lightbox__nav {
	top: 50%;
	translate: 0 -50%;
}

.gallery-lightbox__nav--prev {
	left: 24px;
}

.gallery-lightbox__nav--next {
	right: 24px;
}

.gallery-lightbox.is-single .gallery-lightbox__nav,
.gallery-lightbox.is-single .gallery-lightbox__count {
	display: none;
}

@keyframes gallery-lightbox-in {
	from {
		opacity: 0;
	}
}

@media (max-width: 767px) {
	.gallery-lightbox {
		padding: 72px 12px 96px;
	}

	.gallery-lightbox__nav {
		top: auto;
		bottom: 24px;
		translate: none;
		width: 46px;
		height: 46px;
	}

	.gallery-lightbox__nav--prev {
		left: calc(50% - 60px);
	}

	.gallery-lightbox__nav--next {
		right: calc(50% - 60px);
	}

	.gallery-lightbox__count {
		position: absolute;
		bottom: 38px;
		left: 50%;
		translate: -50% 0;
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gallery-lightbox {
		animation: none;
	}

	.gallery-mosaic__item img {
		transition: none;
	}
}
