

/*css lightbox */

/* Disable scroll ketika lightbox open */
body.lb-open {
  overflow: hidden;
}


.grid-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
}

.lb-container {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 99999;
}

.lb-container.open {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.lb-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lb-image {
  width: auto;
  height: auto;

  max-width: 80vw;   /* 80% dari lebar layar */
  max-height: 80vh;  /* 80% dari tinggi layar */

  border-radius: 10px;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}



.lb-image.show {
  opacity: 1;
  transform: scale(1);
}

.lb-caption {
    color: white;
    font-size: 15px;
    margin-top: 10px;
}

.lb-counter {
    color: white;
    font-size: 13px;
    margin-top: 4px;
}

.lb-btn {
    background: none;
    border: none;
    color: white;
    font-size: 50px;
    cursor: pointer;
    padding: 10px 16px;
    transition: 0.2s;
}

.lb-btn:active {
    transform: scale(1.2);
}

.lb-prev { margin-left: 6px }
.lb-next { margin-right: 6px }



/* Tombol close */
.lb-close {
  position: absolute;
  top: 30px;
  right: 32px;
  background: transparent;
  border: 1px solid white;
  color: white;
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.3s;
}
.lb-close:hover {
  background: white;
  color: black;
}



@media (max-width: 480px) {
  .lb-image { width: 95% }
  .lb-btn { font-size: 50px; padding: 8px 12px }
}
