/* ===================================
   GALLERY & LIGHTBOX
   =================================== */

.gallery {
  padding: 6rem 0;
  background: var(--dark);
  overflow: hidden;
}

.gallery-header {
  max-width: 1200px;
  margin: 0 auto 3rem;
  padding: 0 3rem;
}

.gallery-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--cream);
}

.gallery-heading em {
  font-style: italic;
  color: var(--gold-light);
}

.gallery-scroll-container {
  mask: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask: linear-gradient(90deg, transparent 0%, black 8%, black 92%, transparent 100%);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  padding: 0 3rem 1rem;
  scroll-behavior: auto;
}

.gallery-scroll-container::-webkit-scrollbar {
  display: none;
}

.gallery-scroll-track {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  padding-right: 3rem;
}

.gallery-item {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.4s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 0.4s ease;
}

.gallery-item:hover img {
  filter: brightness(1.1);
}

.gallery-scroll-container.is-dragging {
  cursor: grabbing;
}

.gallery-scroll-container.is-dragging .gallery-item img {
  pointer-events: none;
}

/* ===== LIGHTBOX ===== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.4s ease 0.1s, transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.1s;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox.active .lightbox-img {
  opacity: 1;
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--cream-dim);
  font-size: 2.2rem;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
  z-index: 10;
  line-height: 1;
  padding: 0.5rem;
}

.lightbox-close:hover {
  color: var(--cream);
  transform: scale(1.15);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cream-dim);
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  line-height: 1;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(196, 162, 101, 0.15);
  border-color: var(--gold-dark);
  color: var(--gold-light);
}

.lightbox-caption {
  margin-top: 1.2rem;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--cream-dim);
  text-align: center;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease 0.2s, transform 0.4s ease 0.2s;
}

.lightbox.active .lightbox-caption {
  opacity: 1;
  transform: translateY(0);
}
