/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0; /* top right bottom left = 0 */
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    z-index: 9999;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

#lightbox-img {
    /* Gunakan contain supaya gambar selalu kelihatan 100% tanpa kepotong */
    object-fit: contain !important; 
    
    /* Maksimalkan ukuran ke layar */
    width: 100vw !important;
    height: 100vh !important;
    
    /* Hilangkan batasan ukuran lainnya */
    max-width: 100% !important;
    max-height: 100% !important;
    
    /* Biar transisinya halus pas ganti gambar */
    transition: opacity 0.3s ease;
    display: block;
}

.lightbox-content {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000; /* Area sisa bakal jadi hitam pekat */
}

/* Alternatif: Jika ingin gambar tidak terpotong sama sekali, ganti object-fit: cover dengan object-fit: contain */

/* Caption melayang di atas gambar */
.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 30px;
    border-radius: 8px;
    width: auto;
    max-width: 80%;
    z-index: 10000;
}

.lightbox-caption h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.lightbox-caption p {
    font-size: 16px;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
}

.lightbox-close:hover {
    transform: rotate(90deg);
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 32px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}