/**
 * Portfolio Gallery Lightbox
 *
 * Full-screen image viewer triggered on .portfolio-gallery__carousel
 * image clicks. Built to be self-contained — no theme dependencies.
 */

.portfolio-gallery .gallery-image img {
	cursor: zoom-in;
}

.civic-lightbox {
	position: fixed;
	inset: 0;
	background: rgba( 13, 13, 13, 0.94 );
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	box-sizing: border-box;
}

.civic-lightbox.is-open {
	display: flex;
}

.civic-lightbox__figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 100%;
	max-height: 100%;
}

.civic-lightbox__image {
	max-width: min( 90vw, 1600px );
	max-height: 82vh;
	object-fit: contain;
	display: block;
}

.civic-lightbox__caption {
	color: #fdfffc;
	margin-top: 1rem;
	font-size: 0.95rem;
	line-height: 1.4;
	text-align: center;
	max-width: 70ch;
}

.civic-lightbox__close,
.civic-lightbox__prev,
.civic-lightbox__next {
	position: absolute;
	background: transparent;
	border: 0;
	color: #fdfffc;
	cursor: pointer;
	font-size: 2.5rem;
	line-height: 1;
	padding: 0.5rem 1rem;
	font-family: inherit;
	transition: opacity 150ms ease;
	opacity: 0.85;
}

.civic-lightbox__close:hover,
.civic-lightbox__prev:hover,
.civic-lightbox__next:hover,
.civic-lightbox__close:focus,
.civic-lightbox__prev:focus,
.civic-lightbox__next:focus {
	opacity: 1;
	outline: 1px solid rgba( 253, 255, 252, 0.4 );
	outline-offset: 4px;
}

.civic-lightbox__close {
	top: 1rem;
	right: 1rem;
	font-size: 2rem;
}

.civic-lightbox__prev {
	left: 1rem;
	top: 50%;
	transform: translateY( -50% );
}

.civic-lightbox__next {
	right: 1rem;
	top: 50%;
	transform: translateY( -50% );
}

@media ( max-width: 640px ) {
	.civic-lightbox__close,
	.civic-lightbox__prev,
	.civic-lightbox__next {
		font-size: 2rem;
	}
	.civic-lightbox__image {
		max-height: 70vh;
	}
}
