/**
 * gallery.css — Gallery page styles
 * Requires: styles.css
 */

.section { padding: 80px 0; }
.section-alt { background: var(--bg); }
.section-hd { margin-bottom: 44px; }
.section-hd.center { text-align: center; }
.section-hd.center .section-sub { margin: 12px auto 0; }

/* Filter */
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 32px; }
.filter-btn {
  padding: 8px 18px; border-radius: 20px;
  border: 1.5px solid var(--border); background: white;
  color: var(--text-mid); font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all var(--t); letter-spacing: 0.03em;
}
.filter-btn:hover, .filter-btn.active { background: var(--blue); color: white; border-color: var(--blue); }

/* Gallery Grid — masonry-like using CSS columns */
.gallery-grid {
  columns: 3;
  column-gap: 16px;
}
.g-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--bg-alt);
}
.g-item img {
  width: 100%; height: auto; display: block;
  transition: transform 0.45s ease;
}
.g-item:hover img { transform: scale(1.05); }
.g-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,32,96,0.75) 0%, transparent 50%);
  opacity: 0; transition: opacity var(--t);
  display: flex; align-items: flex-end;
  padding: 16px;
}
.g-item:hover .g-overlay { opacity: 1; }
.g-label {
  font-family: 'Outfit', sans-serif;
  font-size: 13px; font-weight: 600; color: white;
  letter-spacing: 0.04em;
}
.g-cat-tag {
  position: absolute; top: 10px; right: 10px;
  background: rgba(20,32,96,0.78); backdrop-filter: blur(4px);
  color: white; font-family: 'Outfit', sans-serif;
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 3px;
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lb-img {
  max-width: 90vw; max-height: 85vh;
  object-fit: contain; border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.lb-close {
  position: absolute; top: 20px; right: 24px;
  color: white; font-size: 32px; cursor: pointer;
  background: none; border: none; line-height: 1;
  opacity: 0.7; transition: opacity var(--t);
}
.lb-close:hover { opacity: 1; }
.lb-caption {
  position: absolute; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
  color: white; padding: 8px 22px; border-radius: 20px;
  font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 500;
  white-space: nowrap;
}
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 22px; cursor: pointer;
  transition: all var(--t); user-select: none;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255,255,255,0.22); }

/* No results */
.no-results {
  text-align: center; padding: 60px 20px; display: none;
  font-size: 15px; color: var(--text-lt);
}
.no-results.visible { display: block; }

@media (max-width: 1024px) { .gallery-grid { columns: 2; } }
@media (max-width: 600px)  { .gallery-grid { columns: 1; } .section { padding: 56px 0; } }
