.row_modal {
    width: 100vw;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7vw;
}

.container {
    min-width: 300px;
    max-width: 800px;
    text-align: center;
    margin: 5vh 0;
}

.thumbnail {
    width: 300px;
    height: 420px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content:center;
    align-items: center;
}

.modal-content_img {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    animation: zoomIn 0.3s ease;
}

.modal-image {
    width: auto;
    height: 100%;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(232, 172, 221, 0.169);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: #549dda;
    border: none;
    color: white;
    font-size: 46px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.close-btn:hover {
    background: rgb(154, 154, 154);
    transform: rotate(90deg);
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { 
        opacity: 0;
        transform: scale(0.5);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.fade-out {
    animation: fadeOut 0.3s ease;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}


@media (max-width: 800px) {
    .row_modal {
        gap: 1vw;
    }

    .thumbnail {
        width: 70vw;
        height: auto;
    }

    .modal-image {
        width: 100%;
        height: auto;
    }    
    
    .close-btn {
        top: 20px;
        font-size: 32px;
    }
}