/* ─────────────────────────────
   GALLERY PAGE
───────────────────────────── */

.gallery-hero {
  background: var(--forest);

  padding-top: 180px;
  padding-bottom: 80px;

  border-bottom: 1px solid rgba(168, 184, 154, .08);
}

.gallery-page {
  background: var(--forest);

  padding-bottom: 100px;
}

/* Masonry layout */

.photo-grid {
  column-count: 4;
  column-gap: 18px;
}

/* Responsive */

@media (max-width: 1100px) {
  .photo-grid {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  .photo-grid {
    column-count: 2;
  }
}

@media (max-width: 520px) {
  .photo-grid {
    column-count: 1;
  }
}

/* Individual photo */

.photo-item {
  position: relative;

  margin-bottom: 18px;

  overflow: hidden;

  border-radius: var(--radius-lg);

  break-inside: avoid;

  cursor: pointer;

  background: var(--deep);

  border: 1px solid rgba(168, 184, 154, .08);

  transition:
    transform .35s ease,
    box-shadow .35s ease;
}

.photo-item:hover {
  transform: translateY(-4px);

  box-shadow:
    0 18px 40px rgba(0, 0, 0, .28);
}

.photo-item img {
  width: 100%;
  height: auto;

  display: block;

  transition:
    transform 1.2s ease,
    filter .6s ease;
}

.photo-item:hover img {
  transform: scale(1.04);
}

/* Soft overlay */

.photo-item::after {
  content: "";

  position: absolute;
  inset: 0;

  background:
    linear-gradient(to top,
      rgba(0, 0, 0, .18),
      transparent 45%);

  opacity: 0;

  transition: opacity .4s ease;
}

.photo-item:hover::after {
  opacity: 1;
}

/* ─────────────────────────────
   LIGHTBOX
───────────────────────────── */

.lightbox {
  position: fixed;
  inset: 0;

  background: rgba(0, 0, 0, .92);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;

  transition:
    opacity .35s ease,
    visibility .35s ease;

  z-index: 9999;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 88%;
  max-height: 88vh;

  border-radius: 12px;

  object-fit: contain;
}

/* Close button */

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;

  background: none;
  border: none;

  color: white;

  font-size: 42px;

  cursor: pointer;

  z-index: 10;
}

/* Navigation */

.lightbox-btn {
  position: absolute;
  top: 50%;

  transform: translateY(-50%);

  width: 54px;
  height: 54px;

  border-radius: 50%;

  border: 1px solid rgba(255, 255, 255, .15);

  background: rgba(255, 255, 255, .08);

  color: white;

  font-size: 28px;

  cursor: pointer;

  backdrop-filter: blur(10px);

  transition:
    background .25s ease,
    transform .25s ease;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, .16);
}

.lightbox-btn.prev {
  left: 30px;
}

.lightbox-btn.next {
  right: 30px;
}

/* Mobile */

@media (max-width: 768px) {

  .lightbox-image {
    max-width: 94%;
  }

  .lightbox-btn {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .lightbox-btn.prev {
    left: 12px;
  }

  .lightbox-btn.next {
    right: 12px;
  }
}