/* ══════════════════════════════════════════════════════════════════════════════
   GALLERY  (masonry, filterable, with lightbox)
══════════════════════════════════════════════════════════════════════════════ */
.gallery { background: var(--light-bg); }

/* ─── Before/After highlight strip (sits above the masonry grid) ────────────── */
.gallery-ba-intro { margin-bottom: 44px; }

/* ─── Filter tabs ─────────────────────────────────────────────────────────────*/
.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.gallery-filter-btn {
  padding: 9px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--white);
  border: 1.5px solid var(--light-border);
  color: var(--muted);
  transition: all var(--transition);
}
.gallery-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.gallery-filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 16px var(--primary-glow);
}

/* ─── Masonry grid via CSS columns ────────────────────────────────────────────*/
.gallery-masonry {
  column-count: 4;
  column-gap: 20px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.gallery-item:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(15,23,42,0.75) 0%, rgba(15,23,42,0) 45%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }
.gallery-item-overlay span {
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
}
.gallery-item-category {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(255,255,255,0.92);
  color: var(--primary-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.gallery-item[hidden] { display: none; }

/* ─── Lightbox ────────────────────────────────────────────────────────────────*/
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10,14,25,0.92);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.lightbox.open { display: flex; }
.lightbox-content { max-width: 900px; max-height: 85vh; position: relative; }
.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  display: block;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.lightbox-caption {
  color: rgba(255,255,255,0.85);
  text-align: center;
  font-family: var(--font-display);
  font-size: 0.9rem;
  margin-top: 14px;
}
.lightbox-close {
  position: absolute;
  top: -18px; right: -18px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--white);
  color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .gallery-masonry { column-count: 3; }
}
@media (max-width: 768px) {
  .gallery-masonry { column-count: 2; column-gap: 14px; }
  .gallery-item { margin-bottom: 14px; }
  .lightbox-close { top: 12px; right: 12px; }
}
@media (max-width: 480px) {
  .gallery-masonry { column-count: 1; }
}
