/* ==========================================
   GALERI.CSS
   ========================================== */

/* ── Hero (centered, tanpa gambar) ── */
.gl-hero {
  background: var(--bg-soft);
  padding: 72px 0 56px;
  text-align: center;
}
.gl-breadcrumb {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 20px;
}
.gl-breadcrumb a { color: var(--ink-soft); }
.gl-breadcrumb a:hover { color: var(--primary); }
.gl-breadcrumb svg { width: 13px; height: 13px; }
.gl-breadcrumb .current { color: var(--ink); font-weight: 600; }
.gl-hero-body h1 {
  font-size: 3rem; font-weight: 800;
  line-height: 1.1; margin: 0 0 16px; color: var(--ink);
}
.gl-hero-body h1 .red { color: var(--primary); }
.gl-hero-body p {
  font-size: 1rem; color: var(--ink-soft);
  line-height: 1.75; margin: 0 auto; max-width: 560px;
}

/* ── Filter ── */
.gl-main { padding: 56px 0 80px; }
.gl-filter {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 36px; justify-content: center;
}
.gl-filter-btn {
  padding: 8px 24px; border-radius: 24px;
  border: 1.5px solid var(--border);
  background: #fff; font-size: 0.88rem; font-weight: 600;
  color: var(--ink-soft); cursor: pointer;
  transition: all .15s; font-family: inherit;
}
.gl-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.gl-filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ── Grid ── */
.gl-grid {
  columns: 4;
  column-gap: 16px;
}
.gl-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--bg-soft-2);
}
.gl-item img {
  width: 100%; display: block;
  transition: transform .35s ease;
}
.gl-item:hover img { transform: scale(1.05); }

/* Fallback saat gambar error */
.gl-item--fallback {
  aspect-ratio: 4/3;
  background: var(--bg-soft-2);
  display: flex; align-items: center; justify-content: center;
}
.gl-item--fallback::after {
  content: '🖼️';
  font-size: 2.5rem;
}

/* ── Overlay ── */
.gl-item-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 55%);
  opacity: 1;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  gap: 3px;
}
.gl-item-kat {
  font-size: 0.7rem; font-weight: 700; color: #fff;
  background: var(--primary); border-radius: 20px;
  padding: 2px 10px; width: fit-content;
}
.gl-item-judul { font-size: 0.88rem; font-weight: 700; color: #fff; line-height: 1.3; }
.gl-item-tahun { font-size: 0.75rem; color: rgba(255,255,255,.7); }
.gl-item-zoom {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px;
  background: rgba(255,255,255,.2); border-radius: 50%;
  padding: 5px; stroke: #fff;
  display: none;
}

/* ── Lightbox ── */
.gl-lb-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 1000;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.gl-lb-backdrop.active { opacity: 1; pointer-events: all; }

.gl-lightbox {
  position: fixed; inset: 0;
  z-index: 1001;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.gl-lightbox.active { opacity: 1; pointer-events: all; }

.gl-lb-content {
  max-width: 860px; width: 90%;
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
}
.gl-lb-content img {
  max-height: 75vh; width: 100%;
  object-fit: contain; border-radius: 12px;
  display: block;
}
.gl-lb-info {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: center;
}
.gl-lb-kat {
  font-size: 0.72rem; font-weight: 700; color: #fff;
  background: var(--primary); border-radius: 20px; padding: 3px 12px;
}
.gl-lb-judul { font-size: 1rem; font-weight: 700; color: #fff; }
.gl-lb-tahun { font-size: 0.85rem; color: rgba(255,255,255,.6); }

.gl-lb-close {
  position: fixed; top: 20px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.gl-lb-close:hover { background: rgba(255,255,255,.3); }
.gl-lb-close svg { width: 20px; height: 20px; stroke: #fff; }

.gl-lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.15); border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.gl-lb-nav:hover { background: rgba(255,255,255,.3); }
.gl-lb-nav svg { width: 22px; height: 22px; stroke: #fff; }
.gl-lb-prev { left: 20px; }
.gl-lb-next { right: 20px; }

/* ── Responsive ── */
@media (max-width: 1100px) { .gl-grid { columns: 3; } }
@media (max-width: 768px)  { .gl-grid { columns: 2; } }
@media (max-width: 991px) {
  .gl-hero-body h1 { font-size: 2.2rem; }
  .gl-lb-prev { left: 8px; }
  .gl-lb-next { right: 8px; }
}
@media (max-width: 480px) {
  .gl-grid { columns: 2; column-gap: 10px; }
  .gl-item { margin-bottom: 10px; }
  .gl-hero-body h1 { font-size: 1.8rem; }
}
