@charset "UTF-8";
/* CSS Document */

.gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
	padding: 0;
	margin: 0;
	list-style: none;
}

.photo {
	margin: 0;
	background-color: #111;
	border: 1px solid #222;
	overflow: hidden;
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.photo:hover,
.photo:focus-within {
	border-color: #093;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.photo img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	background-color: #000;
	cursor: zoom-in;
	transition: transform 0.35s ease;
}

.photo:hover img,
.photo:focus-within img {
	transform: scale(1.04);
}

.photo figcaption {
	padding: 10px 12px;
	font-size: 0.9rem;
	color: #ccc;
	line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
	.photo,
	.photo img {
		transition: none !important;
	}
}

/* Lightbox */

.lightbox {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.92);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px 40px;
	z-index: 1000;
}

.lightbox[hidden] {
	display: none;
}

.lightbox-img {
	display: block;
	max-width: 100%;
	max-height: 80vh;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.lightbox-caption {
	color: #eee;
	margin: 16px 0 0;
	max-width: 700px;
	text-align: center;
	font-size: 0.95rem;
}

.lightbox-close {
	position: absolute;
	top: 16px;
	right: 20px;
	background: rgba(255, 255, 255, 0.1);
	border: 2px solid #fff;
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-close:focus {
	background-color: rgba(255, 255, 255, 0.25);
}
