/* ===== Global ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
            font-family: 'Open Sans', sans-serif;
            line-height: 1.6;
            color: #333;
            overflow-x: hidden;
        }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 10px;
        }

/* Header */
        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 1rem 0;
            position: fixed;
            width: 100%;
            top: 0;
            z-index: 1000;
            box-shadow: 0 2px 20px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
        }

header h1 {
  font-size: 2em;
  margin-bottom: 10px;
}

header nav a {
  color: white;
  text-decoration: none;
  margin: 0 15px;
  font-weight: bold;
}

header nav a:hover {
  text-decoration: underline;
}

/* ===== Main Content ===== */
main {
  padding: 20px;
}

.section {
  padding: 60px 0;
}

h2 {
  color: #ffffff;
  margin-bottom: 5px;   /* jarak kecil ke bawah */
  line-height: 0.5;     /* mengatur tinggi baris */
}
.hero h3 {
  font-size: 4em;
  margin-top: 5px;
  color: #ffffff; /* sesuaikan dengan desain */
}


/* ===== Gallery Section ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 kolom per baris */
  gap: 15px;
  padding: 10px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: scale(1.02);
}

.gallery-thumb {
  width: 100%;
  height: 200px; /* tinggi fix untuk thumbnail */
  object-fit: cover; /* gambar dipotong rapi */
  display: block;
  border-radius: 10px;
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  transition: transform 0.3s ease;
  transform: translateY(100%);
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

/* ===== Buttons ===== */
button, .btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 1em;
}

button:hover, .btn:hover {
  background: #45a049;
}

/* ===== Footer ===== */
footer {
  background: #333;
  color: white;
  padding: 15px;
  margin-top: 40px;
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr); /* tablet: 2 kolom */
  }
}

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr; /* hp: 1 kolom */
  }

  header h1 {
    font-size: 1.5em;
  }

  header nav a {
    display: block;
    margin: 5px 0;
  }
}

/* Modal overlay - default hidden */
#galleryModal {
  display: none;            /* jangan pakai !important di sini */
  position: fixed;
  inset: 0;                 /* top:0; right:0; bottom:0; left:0; */
  background: rgba(0,0,0,0.75);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

/* Saat terbuka, gunakan flex untuk centering */
#galleryModal.open {
  display: flex;
}

/* Konten modal */
#galleryModal .modal-content {
  width: 90%;
  max-width: 1000px;
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* Header & close */
#galleryModal .modal-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}
#galleryModal .close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  cursor: pointer;
}

/* Grid isi gambar di modal */
#galleryItems.modal-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1rem;
}
#galleryItems .modal-gallery-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

/* =======================
   Fullscreen Image Viewer
   ======================= */
#imageViewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#imageViewer.open {
  display: flex;
  opacity: 1;
}

#imageViewer img {
  max-width: 90%;
  max-height: 80vh;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  animation: zoomIn 0.4s ease;
}

#viewerCaption {
  color: #fff;
  font-size: 16px;
  text-align: center;
  max-width: 80%;
  line-height: 1.4;
}

#imageViewer .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 35px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  transition: transform 0.3s ease, color 0.3s ease;
}

#imageViewer .close:hover {
  color: #ff4d4d;
  transform: scale(1.2);
}

/* Animasi zoom */
@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#imageViewer .prev,
#imageViewer .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 30px;
  transition: 0.3s;
  user-select: none;
  border-radius: 0 3px 3px 0;
}

#imageViewer .next {
  right: 10px;
  border-radius: 3px 0 0 3px;
}

#imageViewer .prev {
  left: 10px;
}

#imageViewer .prev:hover,
#imageViewer .next:hover {
  background-color: rgba(0,0,0,0.6);
}
