/* ==========================================================================
   album.css — страница одного фотоальбома и лайтбокс.

   Лайтбокс свой (design/t1/js/lightbox.js), потому что вендорный стек
   донора снят целиком: ради одного просмотрщика jQuery в критический путь
   всех страниц не возвращаем.
   ========================================================================== */

.photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 14px;
	margin: 32px 0 64px;
}
.photo-item {
	display: block;
	overflow: hidden;
	border-radius: 14px;
	background: #eef2f7;
	aspect-ratio: 4 / 3;
}
.photo-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s ease;
}
.photo-item:hover img { transform: scale(1.04); }

.album-count {
	display: inline-block;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	opacity: .75;
}

/* ------------------------------------------------------------- лайтбокс -- */
.lightbox {
	position: fixed;
	inset: 0;
	z-index: 90;
	display: none;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 24px;
	background: rgba(2, 14, 32, .94);
	color: #fff;
}
.lightbox.open { display: flex; }

.lightbox-figure {
	margin: 0;
	max-width: min(1400px, 100%);
	max-height: 100%;
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: center;
}
.lightbox-image {
	max-width: 100%;
	max-height: calc(100vh - 140px);
	object-fit: contain;
	border-radius: 10px;
}
.lightbox-caption { font-size: 14px; color: rgba(255, 255, 255, .7); text-align: center; }

.lightbox-close,
.lightbox-prev,
.lightbox-next {
	width: 52px;
	height: 52px;
	flex: 0 0 auto;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, .22);
	background: rgba(255, 255, 255, .06);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	transition: .2s;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, .16); }

.lightbox-close { position: absolute; top: 20px; right: 20px; }

.lightbox-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	font-size: 13px;
	color: rgba(255, 255, 255, .6);
}

@media (max-width: 560px) {
	.lightbox-prev, .lightbox-next { position: absolute; bottom: 20px; }
	.lightbox-prev { left: 20px; }
	.lightbox-next { right: 20px; }
	.lightbox-counter { bottom: 34px; }
}
