/* ==========================================
   GALERI.CSS
   ========================================== */

.galeri-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.galeri-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: zoom-in;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.galeri-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.galeri-item:hover img {
  transform: scale(1.08);
}

.galeri-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent);
  color: #fff;
  font-size: 0.85rem;
  padding: 24px 14px 10px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s ease;
}

.galeri-item:hover .galeri-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Ikon "zoom" muncul di tengah saat hover */
.galeri-item::after {
  content: "\f00e";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.3rem;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.galeri-item:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ---------- LIGHTBOX (MODAL ZOOM) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background-color: var(--lightbox-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 90vw;
  max-height: 78vh;
  border-radius: 10px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-caption {
  color: #fff;
  margin-top: 18px;
  font-size: 0.95rem;
  text-align: center;
  max-width: 700px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.lightbox-close:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 600px) {
  .galeri-item img {
    height: 160px;
  }

  /* Di mobile, caption langsung tampil (tidak perlu hover karena tidak ada kursor) */
  .galeri-caption {
    opacity: 1;
    transform: translateY(0);
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent);
  }
}
