/* =====================================================================
   TEXRON — Galeri (halaman publik)
   ===================================================================== */

.gallery-intro { margin-bottom: var(--sp-5); max-width: 70ch; }

/* --- Filter kategori --- */
.gallery-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.gallery-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.gallery-chip:hover { border-color: var(--brand-blue-300); color: var(--brand-blue); }
.gallery-chip.is-active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}
.gallery-chip__n {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--brand-blue-100);
  color: var(--brand-blue);
}
.gallery-chip.is-active .gallery-chip__n { background: rgba(255,255,255,.22); color: #fff; }

/* --- Grid foto --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}

.gallery-item {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
  border: 1px solid var(--line);
  cursor: zoom-in;
  outline: none;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s var(--ease);
}
.gallery-item:hover img,
.gallery-item:focus-visible img { transform: scale(1.06); }
.gallery-item:focus-visible { box-shadow: 0 0 0 3px var(--brand-blue-300); }

.gallery-item__tag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #fff;
  background: rgba(2, 47, 127, .88);
  padding: 4px 9px;
  border-radius: 999px;
}

.gallery-item__cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 26px 14px 12px;
  color: #fff;
  background: linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,0));
  transform: translateY(100%);
  transition: transform .3s var(--ease);
}
.gallery-item:hover .gallery-item__cap,
.gallery-item:focus-visible .gallery-item__cap { transform: translateY(0); }
.gallery-item__title { font-weight: 600; font-size: 0.95rem; line-height: 1.35; }

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 48px);
  background: rgba(8, 12, 24, .92);
}
.lightbox.is-open { display: flex; }
.lightbox__stage {
  margin: 0;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
}
.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox__cap {
  color: #e9edf6;
  text-align: center;
  max-width: 70ch;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.95rem;
}
.lightbox__cap strong { color: #fff; font-size: 1.05rem; }
.lightbox__cap span { color: #b9c2d6; }

.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s var(--ease);
  line-height: 1;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255,255,255,.26); }
.lightbox__close {
  top: 16px; right: 18px;
  width: 44px; height: 44px;
  font-size: 1.8rem;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 2rem;
}
.lightbox__prev { left: 14px; }
.lightbox__next { right: 14px; }

/* --- Responsif --- */
@media (max-width: 1100px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
  .gallery-item__cap { transform: translateY(0); padding: 20px 11px 10px; }
  .gallery-item__title { font-size: 0.82rem; }
  .lightbox__nav { width: 42px; height: 42px; font-size: 1.6rem; }
}
