/* zoom.css */
body {
  background-color: white;
  padding: 1rem;
  margin: 0;
  font-family: Arial, sans-serif;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 4rem;
  color: #222;
  text-align: center; 
  font-family: Arial, sans-serif;
}

.container {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
}

/* Masonry-style layout */
.image-grid {
  column-count: 1;
  column-gap: 1rem;
}

@media (min-width: 640px) {
  .image-grid {
    column-count: 2;
  }
}

@media (min-width: 768px) {
  .image-grid {
    column-count: 3;
  }
}

@media (min-width: 1024px) {
  .image-grid {
    column-count: 4;
  }
}

/* Gambar mengikuti ukuran asli */
.image-grid img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
  border-radius: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

/* Efek hover seperti Pinterest */
.image-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

/* Animasi fade masuk latar belakang */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Animasi zoom saat gambar dibuka */
@keyframes scaleZoom {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Overlay hitam untuk zoom */
.zoom-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: zoom-out;
  animation: fadeIn 0.3s ease;
}

/* Container gambar zoom dengan animasi */
.zoom-container {
  position: relative;
  display: inline-block;
  animation: scaleZoom 0.3s ease forwards;
  transform-origin: center center;
}

/* Gambar di dalam zoom */
.zoom-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease;
  cursor: default;
}

/* Tombol close di kanan atas gambar */
.zoom-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 24px;
  font-weight: bold;
  line-height: 32px;
  text-align: center;
  color: #333;
  cursor: pointer;
  z-index: 10000;
  transition: background-color 0.3s ease;
}

.zoom-close-btn:hover {
  background: rgba(255, 255, 255, 1);
}

/* Untuk layar kecil (HP), maksimal lebar 639px, jadi 2 kolom */
@media (max-width: 639px) {
  .image-grid {
    column-count: 2 !important;
  }
}