/* =========================================================
   Gallery Lightbox
   ========================================================= */
.gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
}

.gallery-lightbox.is-active {
	display: flex;
	align-items: center;
	justify-content: center;
}

.gallery-lightbox__overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	animation: fadeIn 0.3s ease;
}

.gallery-lightbox__container {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 90%;
	max-width: 90vw;
	aspect-ratio: auto;
	max-height: 90vh;
	animation: scaleIn 0.3s ease;
}

.gallery-lightbox__content {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
}

.gallery-lightbox__image {
	max-width: 100%;
	max-height: calc( 90vh - 80px );
	object-fit: contain;
	border-radius: 8px;
}

.gallery-lightbox__caption {
	color: rgba( 255, 255, 255, 0.9 );
	font-size: 1rem;
	margin-top: 1rem;
	text-align: center;
	max-width: 100%;
	padding: 0 2rem;
	word-break: break-word;
}

.gallery-lightbox__close {
	position: absolute;
	top: -40px;
	right: 0;
	width: 40px;
	height: 40px;
	background: none;
	border: none;
	color: white;
	font-size: 2.5rem;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.3s ease;
}

.gallery-lightbox__close:hover {
	opacity: 0.7;
}

.gallery-lightbox__prev,
.gallery-lightbox__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: white;
	font-size: 2rem;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: background 0.3s ease;
	z-index: 2;
}

.gallery-lightbox__prev:hover,
.gallery-lightbox__next:hover {
	background: rgba(255, 255, 255, 0.4);
}

.gallery-lightbox__prev {
	left: -70px;
}

.gallery-lightbox__next {
	right: -70px;
}

@media (max-width: 768px) {
	.gallery-lightbox__close {
		top: 10px;
		right: 10px;
	}

	.gallery-lightbox__prev,
	.gallery-lightbox__next {
		position: fixed;
		width: 44px;
		height: 44px;
		font-size: 1.5rem;
	}

	.gallery-lightbox__prev {
		left: 10px;
		transform: none;
		top: auto;
		bottom: 20px;
	}

	.gallery-lightbox__next {
		right: 10px;
		left: auto;
		transform: none;
		top: auto;
		bottom: 20px;
	}

	.gallery-lightbox__container {
		width: 100%;
		height: 100%;
		max-width: 100%;
		max-height: 100%;
	}

	.gallery-lightbox__image {
		max-height: calc( 100vh - 140px );
	}

	.gallery-lightbox__caption {
		font-size: 0.9375rem;
		padding: 0 1rem;
	}
}
