@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

/* Reset dan dasar styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Poppins', sans-serif;
  background-color: #fff; /* Background putih */
  color: #333; /* Warna teks abu gelap */
  line-height: 1.6;
  scroll-behavior: smooth;
}
a {
  text-decoration: none;
  color: inherit;
}

.lightbox-caption {
  color: rgb(0, 0, 0);
  margin-top: 10px;
  font-size: 1.1em;
  font-family: 'Poppins';
  text-align: center;
  font-weight: 300px;
   margin-bottom: 10px;
}

/* Header */
#header {
  background: linear-gradient(135deg, #2c3e50, #4ca1af);
  color: #fff;
  padding: 40px 20px;
  text-align: center;
}
#header h1 {
  font-size: 2em;
  margin-bottom: 10px;
}
#header p {
  font-size: 1em;
  opacity: 0.85;
}

/* Gallery */
#gallery {
  padding: 40px 20px;
  max-width: 1200px;
  margin: auto;
  background-color: #fff;
}
#gallery h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.8em;
  color: #222;
}
.thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.thumbnails article {
  flex: 1 1 calc(33.333% - 15px);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  display: block;
}
.thumbnails article:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.thumbnails .image {
  width: 100%;
}
.thumbnails .image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 10px 10px 0 0;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Efek saat gambar disentuh di perangkat mobile */
@media (max-width: 768px) {
  .thumbnails article {
    flex: 1 1 calc(50% - 10px);
  }
  .thumbnails .image img:active {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  }
}

/* Responsive Grid */
@media (max-width: 768px) {
  .thumbnails article {
    flex: 1 1 calc(50% - 10px);
  }
}
@media (max-width: 480px) {
  .thumbnails article {
    flex: 1 1 calc(50% - 10px);
  }
}

/* Footer */
#footer {
  background-color: #222;
  color: #fff;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
}
#footer a {
  color: #fff;
  font-weight: bold;
}
#footer a:hover {
  text-decoration: underline;
}

/* Lightbox Style */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  padding: 20px;
}
#lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}
#lightbox p {
  color: #fff;
  margin-top: 15px;
  text-align: center;
  font-size: 1.1em;
}
#close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  transition: color 0.2s;
}
#close:hover {
  color: #f66;
}

/* Posisi khusus gambar */
.thumbnails article:nth-child(5) {
  order: -1;
}
.thumbnails article:nth-child(3) {
  order: 10;
  flex: 1 1 calc(50% - 10px);
  align-self: flex-end;
}
.thumbnails article:nth-child(6) {
  order: 9;
  flex: 1 1 100%;
  display: flex;
  justify-content: center;
}
.thumbnails article:nth-child(3),
.thumbnails article:nth-child(6) {
  order: 10;
  flex: 1 1 calc(50% - 10px);
}
/* Tukar posisi gambar ke-1 dan ke-2 */
.thumbnails article:nth-child(1) {
  order: 2;
}
.thumbnails article:nth-child(2) {
  order: 1;
}
