/* ════════════════════════════════════════════════════════
   ALBIR — pages/gallery.css
════════════════════════════════════════════════════════ */

/* ── Gallery Hero ─────────────────────────────────────── */
.gallery-hero {
  padding: calc(var(--header-h) + var(--space-3xl)) 0 var(--space-2xl);
  background: var(--black);
  color: var(--white);
  text-align: center;
}

.gallery-hero__title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.gallery-hero__sub {
  color: rgba(255,255,255,0.45);
  font-size: 0.95rem;
  max-width: none;
}

[data-theme="light"] .gallery-hero {
  background: #1a1a1a;
}

/* ── Gallery Grid ─────────────────────────────────────── */
.gallery-grid-section {
  padding: var(--space-2xl) 0 var(--space-3xl);
}

.gallery-grid {
  columns: 3;
  column-gap: var(--space-md);
}

@media (max-width: 900px) {
  .gallery-grid { columns: 2; column-gap: var(--space-sm); }
}

@media (max-width: 480px) {
  .gallery-grid { columns: 2; column-gap: 8px; }
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: var(--space-md);
  cursor: pointer;
}

@media (max-width: 480px) {
  .gallery-item { margin-bottom: 8px; }
}

.gallery-item__inner {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--gray-100);
}

.gallery-item__inner img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s var(--ease);
}

.gallery-item:hover .gallery-item__inner img {
  transform: scale(1.04);
}

.gallery-item__caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: var(--space-md);
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition), transform var(--transition);
}

.gallery-item:hover .gallery-item__caption {
  opacity: 1;
  transform: translateY(0);
}

/* Gold border glow on hover */
.gallery-item__inner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 0 rgba(200,169,110,0);
  transition: box-shadow 0.4s var(--ease);
  pointer-events: none;
}
.gallery-item:hover .gallery-item__inner::after {
  box-shadow: inset 0 0 0 2px rgba(200,169,110,0.5);
}

/* ── Empty state ──────────────────────────────────────── */
.gallery-empty {
  padding: var(--space-3xl) 0;
}

/* ── Lightbox ─────────────────────────────────────────── */
.lightbox__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  backdrop-filter: blur(6px);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9001;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.lightbox__overlay.active,
.gallery-lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img-wrap {
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img-wrap img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 80px rgba(0,0,0,0.5);
  transition: opacity 0.2s;
}

.lightbox__close {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  border: none;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(255,255,255,0.2); }

.lightbox__prev,
.lightbox__next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 80px;
  background: rgba(255,255,255,0.08);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.lightbox__prev { left: var(--space-md); }
.lightbox__next { right: var(--space-md); }
.lightbox__prev:hover,
.lightbox__next:hover { background: rgba(255,255,255,0.15); }

@media (max-width: 480px) {
  .lightbox__prev,
  .lightbox__next { display: none; }
}
