.gallery-page {
  padding-top: var(--nav-h);
  background-color: var(--black);
}

/* ── Masonry grid ── */
.gallery {
  padding: 4rem 0 6rem;
}

.gallery__columns {
  columns: 4 220px;
  column-gap: 1rem;
  width: min(1300px, 100% - 2rem);
  margin-inline: auto;
}

.gallery__item {
  break-inside: avoid;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(212, 160, 23, 0);
  transition: background var(--transition);
}

.gallery__item:hover::after {
  background: rgba(212, 160, 23, 0.12);
}

.gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.55s ease, filter 0.55s ease;
  filter: brightness(0.88);
}

.gallery__item:hover img {
  transform: scale(1.04);
  filter: brightness(1);
}

.gallery__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 1;
}

.gallery__item:hover .gallery__overlay {
  opacity: 1;
}

.gallery__overlay-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(13, 13, 13, 0.72);
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gold);
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 13, 0.93);
  cursor: pointer;
}

.lightbox__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1000px;
  padding: 2rem;
}

.lightbox__img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 85vh;
  display: flex;
}

.lightbox__img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid rgba(212, 160, 23, 0.3);
  color: var(--gold);
  font-size: 1.4rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition), border-color var(--transition), transform var(--transition);
  z-index: 2;
}

.lightbox__btn:hover {
  background: var(--gold);
  color: var(--black);
  transform: translateY(-50%) scale(1.08);
}

.lightbox__btn--prev {
  left: 0.5rem;
}

.lightbox__btn--next {
  right: 0.5rem;
}

.lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(30, 30, 30, 0.85);
  border: 1px solid rgba(212, 160, 23, 0.25);
  color: var(--white);
  font-size: 1.2rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition), color var(--transition);
  z-index: 2;
}

.lightbox__close:hover {
  background: var(--red);
  color: var(--white);
}

.lightbox__counter {
  position: absolute;
  bottom: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: var(--grey);
  font-family: 'Barlow', sans-serif;
  letter-spacing: 0.1em;
}

@media (max-width: 860px) {
  .gallery__columns {
    columns: 2 160px;
  }
}

@media (max-width: 480px) {
  .gallery__columns {
    columns: 2 120px;
    column-gap: 0.5rem;
  }

  .gallery__item {
    margin-bottom: 0.5rem;
  }
}
