/* Project in-article galleries: open photos instead of dead WP attachment URLs */

.gallery .gallery-icon,
.gallery .gallery-icon a {
	cursor: zoom-in;
}

.gallery .gallery-icon a {
	display: block;
	text-decoration: none;
}

.gallery .gallery-icon img {
	transition: transform .35s ease, filter .35s ease;
}

.gallery .gallery-icon a:hover img,
.gallery .gallery-icon a:focus-visible img,
.gallery .gallery-item.is-lb-hit img {
	filter: brightness(1.06);
	transform: scale(1.02);
}

.sg-lb {
	align-items: center;
	background: rgba(0, 0, 0, .92);
	display: none;
	inset: 0;
	justify-content: center;
	padding: 24px;
	position: fixed;
	z-index: 2400;
}

.sg-lb.is-open {
	display: flex;
}

.sg-lb img {
	max-height: min(88vh, 920px);
	max-width: min(92vw, 1280px);
	object-fit: contain;
}

.sg-lb__cap {
	bottom: 18px;
	color: #fff;
	font-size: 14px;
	left: 50%;
	max-width: min(90vw, 720px);
	position: absolute;
	text-align: center;
	transform: translateX(-50%);
}

.sg-lb button {
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: 999px;
	color: #fff;
	cursor: pointer;
	font-size: 22px;
	height: 48px;
	position: absolute;
	width: 48px;
}

.sg-lb__x {
	right: 18px;
	top: 18px;
}

.sg-lb__prev,
.sg-lb__next {
	top: 50%;
	transform: translateY(-50%);
}

.sg-lb__prev {
	left: 18px;
}

.sg-lb__next {
	right: 18px;
}

html.sg-lb-lock,
body.sg-lb-lock {
	overflow: hidden;
	overscroll-behavior: none;
}

body.sg-lb-lock {
	left: 0;
	position: fixed;
	right: 0;
	width: 100%;
}

body.sg-lb-lock .sg-nav,
body.sg-lb-lock .sg-contact {
	visibility: hidden;
}

@media (max-width: 640px) {
	.sg-lb {
		padding: 12px;
	}

	.sg-lb__prev,
	.sg-lb__next {
		bottom: 56px;
		top: auto;
		transform: none;
	}
}
