/* ================================================================
   JESSY SAFETY INVISIBLE GRILLS
   Gallery Page — gallery.css
   ================================================================ */

.gallery-page { padding: var(--section-py) 0; background: var(--white); }

/* ── Filter bar ─────────────────────────────────────────────────── */
.gallery-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
}
.gfb-btn {
  padding: 9px 22px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--grey-200);
  background: var(--white);
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--grey-700);
  cursor: pointer;
  transition: all var(--t);
}
.gfb-btn:hover, .gfb-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow-blue);
}

/* ── Gallery masonry grid ───────────────────────────────────────── */
.gallery-masonry {
  columns: 4;
  column-gap: 1rem;
}
.gallery-masonry-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  display: block;
}
.gallery-masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s var(--ease);
}
.gallery-masonry-item:hover img { transform: scale(1.05); }

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(13,27,62,.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity var(--t);
  color: var(--white);
}
.gallery-masonry-item:hover .gallery-item-overlay { opacity: 1; }
.gio-icon { font-size: 1.75rem; }
.gio-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255,255,255,.15);
  padding: 3px 10px;
  border-radius: var(--r-full);
}
.gallery-masonry-item.hidden { display: none; }

/* ── Lightbox ───────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--ease);
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-xl);
}
.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--tf);
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  color: var(--white);
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t);
}
.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,.25); }
.lightbox-caption {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.6);
  color: rgba(255,255,255,.85);
  font-size: 0.85rem;
  padding: 8px 20px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) { .gallery-masonry { columns: 3; } }
@media (max-width: 768px)  { .gallery-masonry { columns: 2; } .lightbox-prev { left: 0.5rem; } .lightbox-next { right: 0.5rem; } }
@media (max-width: 480px)  { .gallery-masonry { columns: 2; } .gallery-filter-bar { gap: 0.4rem; } .gfb-btn { padding: 7px 14px; font-size: 0.78rem; } }
