/* Paginated 2x2 gallery */
.gallery-wrap {
	max-width: 52em;
	width: 100%;
	margin: 0 auto 1.5em;
	position: relative;
}

.gallery.gallery-carousel {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
}

.gallery-viewport {
	overflow: hidden;
	width: 100%;
	border-radius: 4px;
}

.gallery-track {
	display: flex;
	transition: transform 0.45s ease;
	will-change: transform;
}

.gallery-page {
	flex: 0 0 100%;
	width: 100%;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.85rem;
	box-sizing: border-box;
	padding: 0 0.15rem;
}

.gallery-page article {
	width: 100% !important;
	margin: 0 !important;
	opacity: 1 !important;
	transform: none !important;
	transition: none !important;
	position: relative;
	overflow: hidden;
	border-radius: 3px;
	background: #1a1a1a;
}

.gallery-page article .image {
	margin: 0;
	display: block;
	width: 100%;
	height: 100%;
}

.gallery-page article img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.35s ease, filter 0.35s ease;
}

.gallery-page article:hover img {
	transform: scale(1.04);
	filter: brightness(1.05);
}

.gallery.inactive .gallery-page article,
.gallery.inactive .gallery-page article.from-left,
.gallery.inactive .gallery-page article.from-right {
	opacity: 1 !important;
	transform: none !important;
}

.gallery-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	margin-top: 1.35rem;
	flex-wrap: wrap;
}

.gallery-nav {
	appearance: none;
	border: 2px solid rgba(255, 255, 255, 0.55);
	background: rgba(0, 0, 0, 0.25);
	color: #fff;
	width: 2.75rem;
	height: 2.75rem;
	border-radius: 50%;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
	padding: 0;
}

.gallery-nav:hover:not(:disabled) {
	background: rgba(255, 255, 255, 0.15);
	border-color: #fff;
}

.gallery-nav:disabled {
	opacity: 0.35;
	cursor: default;
}

.gallery-dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.45rem;
	max-width: 16rem;
}

.gallery-dot {
	appearance: none;
	border: none;
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	padding: 0;
	background: rgba(255, 255, 255, 0.35);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-dot.is-active {
	background: #fff;
	transform: scale(1.25);
}

.gallery-page-info {
	text-align: center;
	margin: 0.85rem 0 0;
	font-size: 0.95rem;
	opacity: 0.8;
	letter-spacing: 0.04em;
}

@media screen and (max-width: 736px) {
	.gallery-page {
		gap: 0.5rem;
	}

	.gallery-nav {
		width: 2.4rem;
		height: 2.4rem;
		font-size: 1.35rem;
	}
}
