/* ===================================================
   GALLERY PAGE CSS
   =================================================== */

/* ── Filter Tabs ── */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 48px;
}
.filter-btn {
  padding: 10px 22px;
  border-radius: 100px;
  border: 2px solid var(--border);
  font-family: var(--font-head);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: white;
  transition: var(--transition);
  cursor: pointer;
}
.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-blue);
}

/* ── Masonry Grid ── */
.gallery-masonry {
  columns: 4;
  column-gap: 20px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: var(--transition);
  display: block;
}
.gallery-item.hidden {
  display: none;
}
.gallery-item.fade-in {
  animation: fadeIn .4s ease both;
}
.gallery-item img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,110,253,.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity .3s ease;
  border-radius: var(--radius-md);
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay-content { color: white; }
.gallery-overlay h4 { font-size: .95rem; font-family: var(--font-head); margin-bottom: 4px; }
.gallery-overlay span { font-size: .78rem; opacity: .8; }
.gallery-zoom-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 52px; height: 52px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: var(--shadow-md);
  transition: transform .3s ease;
}
.gallery-item:hover .gallery-zoom-icon { transform: translate(-50%, -50%) scale(1); }

/* Tall items */
.gallery-item.tall img { aspect-ratio: 3/4; object-fit: cover; }
.gallery-item.wide img { aspect-ratio: 16/9; object-fit: cover; }
.gallery-item.sq img { aspect-ratio: 1/1; object-fit: cover; }

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.lightbox-caption {
  color: white;
  text-align: center;
  font-family: var(--font-head);
  font-size: .95rem;
}
.lightbox-close {
  position: absolute;
  top: -50px; right: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-nav {
  position: fixed;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,.15);
  border: none;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.lightbox-nav:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .gallery-masonry { columns: 3; }
}
@media (max-width: 768px) {
  .gallery-masonry { columns: 2; }
  .filter-btn { padding: 8px 16px; font-size: .82rem; }
}
@media (max-width: 480px) {
  .gallery-masonry { columns: 2; column-gap: 12px; }
  .gallery-item { margin-bottom: 12px; }
}
