/* Mobile: slider; desktop: masonry-ish grid */
.gallery-grid {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-sm);
  margin: 0 -24px;
  padding-left: 24px;
  padding-right: 24px;
}
.gallery-grid::-webkit-scrollbar { display: none; }
.gallery-item {
  flex: 0 0 70%;
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1/1;
  background: var(--color-bg-warm);
  padding: 0;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.4s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item.is-extra { display: none; }

@media (min-width: 720px) {
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
    overflow: visible;
    margin: 0;
    padding: 0;
  }
  .gallery-item { flex: unset; }
}

.gallery-more { display: flex; justify-content: center; margin-top: var(--space-lg); }
.gallery-grid.show-all .gallery-item.is-extra { display: block; }

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,12,11,0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lightbox__btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: background var(--transition);
}
.lightbox__btn:hover { background: rgba(255,255,255,0.22); }
.lightbox__btn svg { width: 26px; height: 26px; }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
.lightbox__close { top: 20px; right: 20px; transform: none; }
@media (max-width: 640px) {
  .lightbox__btn { width: 44px; height: 44px; }
  .lightbox__prev { left: 6px; }
  .lightbox__next { right: 6px; }
}
