/* Gallery category archive (taxonomy-gallery_category.php), single album
   page (single-gallery_album.php), and Gallery landing page
   (templates/page-gallery.php). Reuses .page-hero (page-hero.css) for every
   header and the .gallery-modal shell (modals.css) for the lightbox — only
   the album-card/photo grids and lightbox prev/next arrows are new. */

.gallery-archive { background: var(--cream); padding: 80px 0 120px; }
.gallery-archive__empty { text-align: center; color: #595959; padding: 40px 0; }

/* Album teaser card — the category archive's grid and the "Other Albums"
   section (template-parts/gallery/album-card.php + other-albums.php) both
   use this. */
.gallery-album-card__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.gallery-album-card { display: block; color: inherit; }
.gallery-album-card__cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; margin-bottom: 12px; }
.gallery-album-card__cover img,
.gallery-album-card__placeholder { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.gallery-album-card__placeholder { background: linear-gradient(160deg, var(--dark-card), #1a1a18); }
.gallery-album-card:hover .gallery-album-card__cover img { transform: scale(1.06); }
.gallery-album-card__count {
	position: absolute;
	right: 12px; bottom: 12px;
	background: rgba(21, 20, 15, 0.7);
	color: #ffffff;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 4px 10px;
}
.gallery-album-card__category { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #936900; margin-bottom: 6px; }
.gallery-album-card__name { font-family: var(--font-serif); font-size: 18px; color: var(--ink); margin: 0 0 4px; }
.gallery-album-card__date { font-size: 13px; color: #595959; }

@media (max-width: 1024px) {
	.gallery-album-card__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
	.gallery-album-card__grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}

/* Other Albums (single-gallery_album.php footer section) ------------------- */

.gallery-other-albums { background: #ffffff; padding: 120px 0; }
.gallery-other-albums__title { font-family: var(--font-serif); font-size: 28px; color: var(--ink); margin: 0 0 32px; }

@media (max-width: 640px) {
	.gallery-other-albums { padding: 40px 0; }
	.gallery-other-albums__title { font-size: 22px; margin-bottom: 20px; }
}

/* Single album photo grid --------------------------------------------------- */

.gallery-album__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
}
.gallery-album__photo {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
}
.gallery-album__photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.gallery-album__photo:hover img { transform: scale(1.06); }

@media (max-width: 900px) {
	.gallery-album__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
	.gallery-archive { padding: 40px 0; }
	.gallery-album { margin-bottom: 40px; }
	.gallery-album__grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* Lightbox prev/next arrows (over .gallery-modal__main, see modals.css) --- */

.gallery-lightbox__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(21, 20, 15, 0.6);
	color: #ffffff;
	font-size: 24px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 2;
}
.gallery-lightbox__nav--prev { left: 12px; }
.gallery-lightbox__nav--next { right: 12px; }
.gallery-lightbox__nav:hover { background: rgba(21, 20, 15, 0.85); }

@media (max-width: 640px) {
	.gallery-lightbox__nav { width: 32px; height: 32px; font-size: 18px; }
}

/* Gallery landing page ------------------------------------------------------ */

.gallery-landing { background: var(--cream); padding: 80px 0 120px; }
.gallery-landing__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.gallery-landing__cell {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	color: #ffffff;
}
.gallery-landing__cell img,
.gallery-landing__placeholder { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.gallery-landing__placeholder { background: linear-gradient(160deg, var(--dark-card), #1a1a18); }
.gallery-landing__cell:hover img { transform: scale(1.05); }
.gallery-landing__cell::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(0deg, rgba(0,0,0,0.7), transparent 55%);
}
.gallery-landing__label {
	position: absolute;
	left: 20px; bottom: 40px;
	z-index: 1;
	font-family: var(--font-serif);
	font-size: 20px;
}
.gallery-landing__count {
	position: absolute;
	left: 20px; bottom: 16px;
	z-index: 1;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: rgba(245, 241, 235, 0.75);
}

@media (max-width: 900px) {
	.gallery-landing__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
	.gallery-landing { padding: 40px 0; }
	.gallery-landing__grid { grid-template-columns: 1fr; gap: 16px; }
}
