/* Lightbox CSS */
.lightbox-trigger {
	cursor: pointer;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.lightbox-trigger:hover {
	opacity: 0.9;
	transform: scale(1.02);
}

/* Lightbox overlay */
.lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-overlay.active {
	opacity: 1;
	visibility: visible;
}

/* Lightbox content container */
.lightbox-content {
	position: relative;
	max-width: 90vw;
	max-height: 90vh;
	transform: scale(0.8);
	transition: transform 0.3s ease;
}

.lightbox-overlay.active .lightbox-content {
	transform: scale(1);
}

/* Lightbox image */
.lightbox-image {
	max-width: 100%;
	width: auto;
	height: auto;
	display: block;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);

	max-height: 90vh;
}

/* Close button */
.lightbox-close {
	position: absolute;
	top: -15px;
	right: -15px;
	width: 40px;
	height: 40px;
	background-color: #fff;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	font-weight: bold;
	color: #333;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
	transition: background-color 0.2s ease, transform 0.2s ease;
	z-index: 10001;
}

.lightbox-close:hover {
	background-color: #f0f0f0;
	transform: scale(1.1);
}

.lightbox-close:active {
	transform: scale(0.95);
}

/* Close button icon (X) */
.lightbox-close::before {
	content: '×';
	font-size: 24px;
	line-height: 1;
}

/* Loading spinner */
.lightbox-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	border: 4px solid rgba(255, 255, 255, 0.3);
	border-top: 4px solid #fff;
	border-radius: 50%;
	animation: lightbox-spin 1s linear infinite;
}

@keyframes lightbox-spin {
	0% {
		transform: translate(-50%, -50%) rotate(0deg);
	}

	100% {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

/* Navigation arrows (for multiple images) */
.lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-color: rgba(255, 255, 255, 0.9);
	border: none;
	border-radius: 50%;
	width: 50px;
	height: 50px;
	cursor: pointer;
	font-size: 18px;
	font-weight: bold;
	color: #333;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, transform 0.2s ease;
	user-select: none;
}

.lightbox-nav:hover {
	background-color: #fff;
	transform: translateY(-50%) scale(1.1);
}

.lightbox-nav.prev {
	left: -25px;
}

.lightbox-nav.next {
	right: -25px;
}

.lightbox-nav.prev::before {
	content: '‹';
}

.lightbox-nav.next::before {
	content: '›';
}

/* Hide navigation if only one image */
.lightbox-overlay.single-image .lightbox-nav {
	display: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
	.lightbox-content {
		max-width: 95vw;
		max-height: 95vh;
	}

	.lightbox-close {
		top: -10px;
		right: -10px;
		width: 35px;
		height: 35px;
	}

	.lightbox-nav {
		width: 40px;
		height: 40px;
		font-size: 16px;
	}

	.lightbox-nav.prev {
		left: 10px;
	}

	.lightbox-nav.next {
		right: 10px;
	}
}

/* Prevent body scrolling when lightbox is open */
body.lightbox-open {
	overflow: hidden;
}
