/* ------------------------------------------------------------------
   Lightbox – Blocksy Child (janadamski.eu)
------------------------------------------------------------------ */

.ja-lb-trigger {
	cursor: zoom-in;
}

html.ja-lb-open {
	overflow: hidden;
}

.ja-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: clamp(12px, 3vw, 40px);
	background: rgba(8, 8, 10, 0.96);
	backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 200ms ease;
}

.ja-lb.is-open {
	display: flex;
	opacity: 1;
}

.ja-lb__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	max-width: 100%;
	max-height: 100%;
	margin: 0;
}

.ja-lb__img {
	max-width: min(100%, 1600px);
	max-height: 82vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 2px;
	background: #1a1a1c;
	transition: opacity 180ms ease;
}

.ja-lb.is-loading .ja-lb__img {
	opacity: 0.35;
}

.ja-lb__caption {
	max-width: 68ch;
	color: rgba(255, 255, 255, 0.88);
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
}

.ja-lb__caption[hidden] {
	display: none;
}

.ja-lb__counter {
	position: absolute;
	top: 18px;
	left: 20px;
	color: rgba(255, 255, 255, 0.7);
	font-size: 13px;
	letter-spacing: 0.03em;
}

.ja-lb__btn {
	position: absolute;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	cursor: pointer;
	transition: background 180ms ease, transform 180ms ease;
}

.ja-lb__btn:hover {
	background: rgba(255, 255, 255, 0.24);
}

.ja-lb__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.ja-lb__btn[hidden] {
	display: none;
}

.ja-lb__btn svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.ja-lb__close { top: 14px; right: 16px; }
.ja-lb__prev  { left: 16px; top: 50%; transform: translateY(-50%); }
.ja-lb__next  { right: 16px; top: 50%; transform: translateY(-50%); }

.ja-lb__prev:hover,
.ja-lb__next:hover {
	transform: translateY(-50%) scale(1.06);
}

@media (max-width: 600px) {
	.ja-lb__btn { width: 38px; height: 38px; }
	.ja-lb__prev { left: 6px; }
	.ja-lb__next { right: 6px; }
	.ja-lb__img { max-height: 74vh; }
}

@media (prefers-reduced-motion: reduce) {
	.ja-lb,
	.ja-lb__img,
	.ja-lb__btn {
		transition: none;
	}
}
