@charset "utf-8";
/* --- Custom Lightbox Modal Styles --- */

.modal-wrapper {
    z-index: 9999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0.3s;
}

.modal-wrapper.modal-open {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-in-out, visibility 0s linear 0s;
}

.modal-window {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-window .modal-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-window .modal-content img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-wrapper .modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(30, 30, 30, 0.75);
    color: #fff !important;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
    z-index: 10000;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.modal-wrapper .modal-close:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

body.modal-active {
    overflow: hidden;
}

@media screen and (max-width: 767px) {
    .modal-wrapper {
        padding: 10px;
    }

    .modal-window {
        max-width: 98vw;
        max-height: 98vh;
    }

    .modal-wrapper .modal-close {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 18px;
    }
}