.gallery-container {
  max-width: 1200px;
  margin: auto;
  padding: 25px;
  margin-top: 25px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.gallery-item {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  text-align: center;

  display: flex;
  flex-direction: column;
}

.gallery-item img {
  width: 100%;
  height: 600px;
  object-fit: cover;
}

.gallery-item h3 {
  font-size: 16px;
  margin: 10px 0 5px;
}

.gallery-item p {
  font-size: 14px;
  color: #666;
  padding: 0 10px 15px;
}

/* Pagination */
.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination a {
  display: inline-block;
  margin: 0 5px;
  padding: 8px 12px;
  border-radius: 5px;
  background: #f1f1f1;
  text-decoration: none;
  color: #333;
}

.pagination a.active {
  background: #3EC381;
  color: #fff;
}

/* SLIDER */
.slider-wrapper {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

.slider-wrapper img {
  width: 100%;
  height: 600px;
  object-fit: cover;
  display: none;
}

/* SLIDER CONTROL INSIDE IMAGE */
.slider-controls {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  align-items: center;
  background: rgba(0,0,0,0.35);
  padding: 5px 12px;
  border-radius: 20px;
}

.slider-btn {
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  user-select: none;
}

.slider-number {
  color: #fff;
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 5px;
  transition: 0.2s;
}

.slider-number.active {
  background: white;
  color: black;
}

/* TOMBOL 3D */
.btn-3d {
  margin-bottom: 15px;
  padding: 8px 16px;
  background: #3EC381;
  border: none;
  border-radius: 20px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-3d:hover {
  background: #2fa96d;
}

/* MODAL 3D */
.modal-3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-3d-content {
  position: relative;
  width: 80%;
  max-width: 900px;
  height: 500px;
  background: #000;
  border-radius: 10px;
  overflow: hidden;
}

.modal-3d-content iframe {
  width: 100%;
  height: 100%;
}

/* TOMBOL CLOSE */
.close-3d {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 28px;
  color: #fff;
  cursor: pointer;
  z-index: 10;
}

.btn-3d-wrapper {
  margin-top: auto;      /* INI KUNCINYA */
  padding-bottom: 15px;
}
@media (max-width: 990px) {
  .gallery {
    grid-template-columns: 1fr !important;
  }

  /* Pendekkan gambar tanpa memaksa height */
  .gallery-item img {
    height: auto !important;
    max-height: 350px; /* Batas aman */
    object-fit: cover;
  }

  /* Perbaikan slider */
  .slider-wrapper {
    height: auto !important;
  }

  .slider-wrapper img {
    height: auto !important;
    max-height: 350px;
  }
    .modal-3d-content {
    width: 95%;
    height: 350px;
  }
}
