/* =========================================
   Premium Glass Image Modal
========================================= */

.image-modal {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    display: none;

    justify-content: center;
    align-items: center;

    padding: 40px;

    z-index: 999999;

    /*
    |--------------------------------------------------------------------------
    | Frosted Japanese Glass Effect
    |--------------------------------------------------------------------------
    */

    background: rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    animation: modalFade 0.35s ease;
}

/* =========================================
   Wrapper
========================================= */

.image-modal-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================
   Image Frame
========================================= */

.modal-image {
    max-width: 92%;
    max-height: 92vh;

    object-fit: contain;

    border-radius: 24px;

    /*
    |--------------------------------------------------------------------------
    | Elegant Image Card
    |--------------------------------------------------------------------------
    */

    background: rgba(255, 255, 255, 0.08);

    padding: 12px;

    border: 1px solid rgba(255, 255, 255, 0.18);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.18),
        0 8px 30px rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(20px);

    animation: zoomInSmooth 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================
   Close Button
========================================= */

.close-modal {
    position: absolute;
    top: 25px;
    right: 35px;
    width: 62px;
    height: 62px;
    border: none;
    outline: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 34px;
    line-height: 1;
    color: #111;
    cursor: pointer;

    /*
    |--------------------------------------------------------------------------
    | Glass Button
    |--------------------------------------------------------------------------
    */

    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
    z-index: 9999999;
}

/* =========================================
   Hover
========================================= */

.close-modal:hover {
    transform: scale(1.08) rotate(90deg);

    background: rgba(255, 255, 255, 0.22);

    color: #111;
}

/* =========================================
   Modal Fade
========================================= */

@keyframes modalFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================================
   Smooth Zoom
========================================= */

@keyframes zoomInSmooth {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* =========================================
   Mobile Responsive
========================================= */

@media (max-width: 768px) {
    .image-modal {
        padding: 20px;
    }

    .modal-image {
        max-width: 100%;
        max-height: 85vh;

        border-radius: 18px;

        padding: 8px;
    }

    .close-modal {
        top: 10px;
        right: 10px;

        width: 52px;
        height: 52px;

        font-size: 28px;
    }
}
