/* Style dasar Magnific Popup */
.mfp-bg {
    background: rgba(0, 0, 0, 0.8) !important; /* overlay gelap */
    z-index: 1040 !important;
}

.mfp-wrap {
    z-index: 1050 !important;
}

/* Efek fade */
.mfp-fade.mfp-bg {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.mfp-fade.mfp-bg.mfp-ready {
    opacity: 1;
}

.mfp-fade.mfp-bg.mfp-removing {
    opacity: 0;
}

.mfp-fade.mfp-wrap {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.mfp-fade.mfp-wrap.mfp-ready {
    opacity: 1;
}

.mfp-fade.mfp-wrap.mfp-removing {
    opacity: 0;
}

/* Styling popup content */
.mfp-content {
    max-width: 90vw;
    max-height: 90vh;
    margin: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Styling gambar di dalam popup */
.mfp-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

/* Tombol close */
.mfp-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    font-size: 28px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 1100;
}

.mfp-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #000;
}

/* Responsive tweaks */
@media (max-width: 576px) {
    .mfp-container {
        padding: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mfp-content {
        max-width: 95vw;
        max-height: 80vh;
    }

    .mfp-img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .mfp-close {
        top: 10px !important;
        right: 10px !important;
        font-size: 24px;
        width: 30px;
        height: 30px;
        line-height: 30px;
    }
}
