/* Lightbox overlay for full-size image viewing */

.gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	box-sizing: border-box;
}

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

.gallery-lightbox__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 15, 24, 0.88);
	backdrop-filter: blur(2px);
	cursor: pointer;
}

.gallery-lightbox__content {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	max-width: 1100px;
	width: 100%;
}

.gallery-lightbox__figure {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	text-align: center;
}

.gallery-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 78vh;
	margin: 0 auto;
	border-radius: 10px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
	background: #1a2431;
}

.gallery-lightbox__caption {
	margin-top: 1rem;
	color: #eaf0f6;
	font-size: 1rem;
	line-height: 1.5;
}

.gallery-lightbox__close {
	position: absolute;
	top: -3.25rem;
	right: 0;
	width: 2.75rem;
	height: 2.75rem;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 1.9rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 200ms ease, transform 150ms ease;
}

.gallery-lightbox__close:hover {
	background: var(--gallery-accent, #d64528);
	transform: rotate(90deg);
}

.gallery-lightbox__nav {
	flex: 0 0 auto;
	width: 3rem;
	height: 3rem;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	transition: background-color 200ms ease, transform 150ms ease;
}

.gallery-lightbox__nav:hover {
	background: var(--gallery-accent, #d64528);
	transform: scale(1.08);
}

.gallery-lightbox__close:focus-visible,
.gallery-lightbox__nav:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.7);
	outline-offset: 2px;
}

@media (max-width: 640px) {
	.gallery-lightbox__nav {
		width: 2.5rem;
		height: 2.5rem;
		font-size: 1.6rem;
	}
	.gallery-lightbox__close {
		top: -3rem;
	}
	.gallery-lightbox__img {
		max-height: 68vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gallery-lightbox__close:hover,
	.gallery-lightbox__nav:hover {
		transform: none;
	}
}
