.gallery-page {
	background: #f4f7f9;
}

.gallery-hero {
	position: relative;
	overflow: hidden;
	padding: 88px 0 82px;
	color: #fff;
	background:
		radial-gradient(circle at 84% 20%, rgba(0, 137, 255, .2), transparent 34%),
		linear-gradient(135deg, #07131f 0%, #0a1c2a 58%, #0d283d 100%);
}

.gallery-hero::after {
	position: absolute;
	right: 8%;
	bottom: -160px;
	width: 440px;
	height: 440px;
	border: 1px solid rgba(0, 153, 255, .2);
	content: "";
	transform: rotate(45deg);
}

.gallery-hero__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
	align-items: end;
	gap: 72px;
}

.gallery-hero h1 {
	max-width: 820px;
	margin: 20px 0 0;
	font-size: clamp(42px, 5vw, 72px);
	line-height: 1.04;
	letter-spacing: -.045em;
}

.gallery-hero__inner > p {
	max-width: 480px;
	margin: 0;
	color: #bdcbd5;
	font-size: 17px;
	line-height: 1.75;
}

.gallery-content {
	padding: 84px 0 104px;
}

.gallery-editor-content {
	max-width: none;
}

.gallery-catalog-nav {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: start;
	gap: 14px 34px;
	margin: 0 0 72px;
	padding: 0 0 24px;
	border-bottom: 1px solid #ced9e0;
}

.gallery-catalog-nav > span {
	padding-top: 8px;
	color: #536875;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
}

.gallery-catalog-nav > div {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 24px;
}

.gallery-catalog-nav a {
	padding: 7px 0 5px;
	color: #3f5868;
	border-bottom: 2px solid transparent;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
	transition: color .2s ease, border-color .2s ease;
}

.gallery-catalog-nav a:hover,
.gallery-catalog-nav a:focus-visible {
	color: #087fe5;
	border-color: #087fe5;
	outline: none;
}

.gallery-editor-content > .wp-block-group,
.gallery-editor-content > .gallery-group {
	margin: 0 0 92px;
}

.gallery-group {
	content-visibility: auto;
	contain-intrinsic-size: 760px;
	scroll-margin-top: 110px;
}

.gallery-group__number {
	margin: 0 0 12px !important;
	color: #0785ee !important;
	font-size: 11px !important;
	font-weight: 800;
	letter-spacing: .16em;
}

.gallery-editor-content > :last-child {
	margin-bottom: 0;
}

.gallery-editor-content h2 {
	max-width: 900px;
	margin: 0 0 14px;
	color: #102334;
	font-size: clamp(29px, 3vw, 44px);
	line-height: 1.15;
	letter-spacing: -.035em;
}

.gallery-editor-content h2 + p,
.gallery-editor-content .gallery-group > p {
	max-width: 760px;
	margin: 0 0 32px;
	color: #5d6d79;
	font-size: 15px;
	line-height: 1.75;
}

.gallery-editor-content .wp-block-gallery.has-nested-images,
.gallery-media-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 32px 0 0;
}

.gallery-editor-content .wp-block-gallery.has-nested-images figure.wp-block-image,
.gallery-editor-content > figure.wp-block-image {
	position: relative;
	width: 100% !important;
	margin: 0 !important;
	overflow: hidden;
	background: #d9e2e8;
	border-radius: 3px;
	box-shadow: 0 12px 32px rgba(7, 28, 43, .08);
}

.gallery-editor-content .wp-block-gallery.has-nested-images figure.wp-block-image {
	aspect-ratio: 4 / 3;
}

.gallery-editor-content > figure.wp-block-image {
	margin-bottom: 44px !important;
}

.gallery-media-item {
	position: relative;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	margin: 0;
	overflow: hidden;
	background: #0a1823;
	border-radius: 3px;
	box-shadow: 0 12px 32px rgba(7, 28, 43, .08);
}

.gallery-media-item--image {
	aspect-ratio: 4 / 3;
}

.gallery-media-item--image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease, filter .35s ease;
}

.gallery-media-item--image:hover img {
	filter: brightness(.9);
	transform: scale(1.025);
}

.gallery-media-item--video.wp-block-video {
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	width: 100% !important;
	min-width: 0;
	max-width: 100% !important;
	aspect-ratio: 4 / 3;
	margin: 0 !important;
}

.gallery-media-item--video video {
	display: block;
	width: 100%;
	min-width: 0;
	max-width: 100%;
	height: 100%;
	max-height: none;
	object-fit: contain;
	background: #07131f;
}

.gallery-editor-content .wp-block-gallery img,
.gallery-editor-content > .wp-block-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .35s ease, filter .35s ease;
}

.gallery-editor-content .wp-block-gallery a,
.gallery-editor-content .gallery-zoomable {
	cursor: zoom-in;
}

.gallery-editor-content .wp-block-gallery figure:hover img,
.gallery-editor-content > .wp-block-image:hover img {
	filter: brightness(.9);
	transform: scale(1.025);
}

.gallery-editor-content .wp-block-gallery figcaption,
.gallery-media-item--image figcaption {
	position: absolute;
	z-index: 1;
	right: 0;
	bottom: 0;
	left: 0;
	margin: 0;
	padding: 32px 18px 14px;
	color: #fff;
	background: linear-gradient(transparent, rgba(4, 14, 23, .82));
	font-size: 12px;
	line-height: 1.45;
	text-align: left;
}

.gallery-media-item--video figcaption {
	margin: 0;
	padding: 12px 16px;
	color: #d8e2e9;
	background: #0d2130;
	font-size: 12px;
	line-height: 1.45;
}

.gallery-media-item[hidden] {
	display: none !important;
}

.gallery-load-more {
	display: block;
	min-width: 190px;
	min-height: 48px;
	margin: 24px auto 0;
	padding: 0 22px;
	color: #123044;
	background: transparent;
	border: 1px solid #aebec8;
	border-radius: 2px;
	cursor: pointer;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: .06em;
	text-transform: uppercase;
	transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.gallery-load-more:hover,
.gallery-load-more:focus-visible {
	color: #fff;
	background: #087fe5;
	border-color: #087fe5;
	outline: none;
}

.gallery-editor-content .wp-block-video:not(.gallery-media-item--video) {
	margin: 32px 0 44px;
	overflow: hidden;
	background: #07131f;
	border-radius: 3px;
	box-shadow: 0 16px 42px rgba(7, 28, 43, .12);
}

.gallery-editor-content .wp-block-video:not(.gallery-media-item--video) video {
	display: block;
	width: 100%;
	max-height: 720px;
	background: #07131f;
}

.gallery-editor-content .wp-block-video:not(.gallery-media-item--video) figcaption {
	margin: 0;
	padding: 14px 18px;
	color: #d8e2e9;
	background: #0d2130;
	font-size: 12px;
}

.gallery-empty {
	padding: 72px 32px;
	background: #fff;
	border: 1px solid #dbe4ea;
	text-align: center;
}

.gallery-empty h2,
.gallery-empty p {
	margin-right: auto;
	margin-left: auto;
}

.gallery-lightbox {
	position: fixed;
	inset: 0;
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 52px 92px;
	color: #fff;
	background: rgba(3, 10, 16, .96);
	border: 0;
}

.gallery-lightbox::backdrop {
	background: rgba(3, 10, 16, .96);
}

.gallery-lightbox[open] {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 56px;
	align-items: center;
	gap: 28px;
}

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

.gallery-lightbox figure img {
	max-width: 100%;
	max-height: calc(100vh - 138px);
	object-fit: contain;
}

.gallery-lightbox figcaption {
	max-width: 820px;
	color: #c6d2da;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

.gallery-lightbox button {
	display: grid;
	width: 52px;
	height: 52px;
	padding: 0;
	place-items: center;
	color: #fff;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .24);
	border-radius: 50%;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease;
}

.gallery-lightbox button:hover,
.gallery-lightbox button:focus-visible {
	background: #087fe5;
	border-color: #087fe5;
	outline: none;
}

.gallery-lightbox__close {
	position: absolute;
	z-index: 2;
	top: 22px;
	right: 24px;
	font-size: 30px;
	font-weight: 300;
}

.gallery-lightbox__nav {
	font-size: 40px;
	font-weight: 300;
}

.gallery-lightbox-open {
	overflow: hidden;
}

@media (max-width: 980px) {
	.gallery-hero {
		padding: 68px 0;
	}

	.gallery-hero__inner {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.gallery-content {
		padding: 68px 0 84px;
	}

	.gallery-catalog-nav {
		grid-template-columns: 1fr;
		margin-bottom: 64px;
	}

	.gallery-editor-content .wp-block-gallery.has-nested-images,
	.gallery-media-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.gallery-lightbox {
		padding: 52px 20px 24px;
	}

	.gallery-lightbox[open] {
		grid-template-columns: 48px minmax(0, 1fr) 48px;
		gap: 12px;
	}
}

@media (min-width: 981px) {
	.gallery-media-grid > .gallery-media-item:first-child:nth-last-child(n + 3) {
		grid-column: span 2;
		grid-row: span 2;
	}
}

@media (max-width: 600px) {
	.gallery-hero {
		padding: 52px 0 56px;
	}

	.gallery-hero h1 {
		font-size: 38px;
	}

	.gallery-hero__inner > p {
		font-size: 14px;
	}

	.gallery-content {
		padding: 52px 0 64px;
	}

	.gallery-catalog-nav {
		gap: 10px;
		margin-bottom: 48px;
		padding-bottom: 20px;
	}

	.gallery-catalog-nav > div {
		display: flex;
		gap: 2px 18px;
	}

	.gallery-editor-content > .wp-block-group,
	.gallery-editor-content > .gallery-group {
		margin-bottom: 64px;
	}

	.gallery-editor-content .wp-block-gallery.has-nested-images,
	.gallery-media-grid {
		gap: 9px;
	}

	.gallery-editor-content h2 + p,
	.gallery-editor-content .gallery-group > p {
		margin-bottom: 24px;
	}

	.gallery-lightbox {
		padding: 70px 12px 18px;
	}

	.gallery-lightbox[open] {
		grid-template-columns: 1fr 1fr;
		align-content: center;
		gap: 14px;
	}

	.gallery-lightbox figure {
		grid-column: 1 / -1;
		grid-row: 1;
		height: auto;
	}

	.gallery-lightbox figure img {
		max-height: calc(100vh - 190px);
	}

	.gallery-lightbox__nav {
		grid-row: 2;
	}

	.gallery-lightbox__nav--prev {
		justify-self: end;
	}

	.gallery-lightbox__nav--next {
		justify-self: start;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gallery-editor-content .wp-block-gallery img,
	.gallery-editor-content > .wp-block-image img,
	.gallery-media-item--image img {
		transition: none;
	}
}
