/**
 * Photo album page styles (single-album.php) — not designed in Figma; built
 * from the inner-page hero (components/page-hero.css), the crest-rule section
 * heads and the album cards (components/album-card.css).
 *
 * 1. Album Hero
 * 2. Album Gallery
 * 3. Album Lightbox
 * 4. More Albums
 * 5. Responsive
 */

/* ============================ ALBUM HERO ============================ */
.album-hero__title {
	font-size: var(--fs-96);
	text-transform: none;
}

.album-hero__facts {
	text-transform: none;
}

/* ============================ ALBUM GALLERY ============================ */
.album-gallery__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-30);
	margin: 0;
	padding: 0;
	list-style: none;
}

.album-gallery__link {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--light-bg-alt);
	cursor: zoom-in;
}

.album-gallery__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--transition-slow), opacity var(--transition-base);
}

.album-gallery__link:hover .album-gallery__img,
.album-gallery__link:focus-visible .album-gallery__img {
	transform: scale(1.04);
}

/* ============================ ALBUM LIGHTBOX ============================ */
body.lightbox-open {
	overflow: hidden;
}

.album-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1080;
	display: grid;
	grid-template-rows: auto minmax(0, 1fr);
	background: var(--overlay-black);
}

.album-lightbox[hidden] {
	display: none;
}

.album-lightbox__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-20);
	padding: var(--space-20) var(--space-32);
	color: var(--white);
}

.album-lightbox__counter {
	font-size: var(--fs-24);
	font-weight: var(--font-weight-bold);
	letter-spacing: 0.02em;
}

.album-lightbox__stage {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: var(--space-16);
	min-height: 0;
	margin: 0;
	padding: 0 calc(120 * var(--u)) var(--space-40);
}

.album-lightbox__frame {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
	max-width: 100%;
	flex: 1;
}

.album-lightbox__img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-lg);
}

.album-lightbox__caption {
	font-size: var(--fs-20);
	line-height: 1.5;
	color: var(--text-color-light);
	text-align: center;
}

.album-lightbox__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: calc(64 * var(--u));
	height: calc(64 * var(--u));
	min-width: 44px;
	min-height: 44px;
	padding: 0;
	color: var(--white);
	background: var(--dark-surface);
	border: 0;
	border-radius: var(--radius-full);
	cursor: pointer;
	transition: background-color var(--transition-fast);
}

.album-lightbox__btn:hover,
.album-lightbox__btn:focus-visible {
	background: var(--primary-color);
}

.album-lightbox__btn svg {
	width: 45%;
	height: 45%;
}

.album-lightbox__btn--prev,
.album-lightbox__btn--next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
}

.album-lightbox__btn--prev {
	left: var(--space-32);
}

.album-lightbox__btn--next {
	right: var(--space-32);
}

/* ============================ MORE ALBUMS ============================ */
.more-albums__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: var(--space-40) var(--space-30);
	align-items: start;
}

/* ============================ RESPONSIVE ============================ */

/* --- MD / Tablet --- */
@media (max-width: 992px) {
	.album-gallery__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.more-albums__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 20px;
	}
}

/* --- SM / Mobile --- */
@media (max-width: 768px) {
	.album-lightbox__bar {
		padding: 12px 16px;
	}

	.album-lightbox__stage {
		padding: 0 12px 76px;
	}

	.album-lightbox__btn--prev,
	.album-lightbox__btn--next {
		top: auto;
		bottom: 16px;
		transform: none;
	}

	.album-lightbox__btn--prev {
		left: calc(50% - 56px);
	}

	.album-lightbox__btn--next {
		right: calc(50% - 56px);
	}
}

/* --- XS / Small Mobile --- */
@media (max-width: 575px) {
	.album-gallery__grid {
		gap: 10px;
	}

	.more-albums__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
