.games{
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: em(24);
    &__heading_block{
        position: relative;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }
    &__heading{
        position: relative;
        max-width: em(350);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: em(8);
        span{
            font-size: em(16);
            font-weight: 500;
            line-height: 1.2;
            color: $main-light-100;
        }
    }
    &__sort{
        position: relative;
        margin-left: em(50);
    }
    &__nav{
        position: relative;
        width: em(102);
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-left: auto;
        margin-top: em(-16);
    }
    &__arrow{
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        background: $main-tint-200;
        width: em(44);
        height: em(44);
        border-radius: 50%;
        transition: transform .2s ease-in-out;
        cursor: pointer;
        img{
            width: em(12);
            height: em(20);
            object-fit: contain;
            transition: filter .2s ease-in-out;
            pointer-events: none;
            user-select: none;
        }
        &:hover{
            img{
                filter: brightness(2);
            }
        }
        &:active{
            transform: scale(.9);
        }
    }
    &__slider{
        position: relative;
        width: 100%;
        overflow: hidden;
        .swiper-slide {
            width: auto !important; // для работы slidesPerView: 'auto'
            flex-shrink: 0;
        }
    }
    &__slide_container{
        position: relative;
        width: em(260);
        height: em(348);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-end;
        overflow: hidden;
        border-radius: em(14);
        flex-shrink: 0;
    }
    &__image{
        position: absolute;
        left: 0;
        top: 0;
        width: em(260);
        height: em(348);
        z-index: 1;
        pointer-events: none;
        user-select: none;
        img{
            width: em(260);
            height: em(348); 
            object-fit: cover;
            display: block;
            position: relative;
            z-index: 0;
        }
        &:after{
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: em(70);
            z-index: 1;
            pointer-events: none;
            user-select: none;
        }
        &.green-item{
            &:after{
                background: $main-gradient-1;
            }
        }
        &.purple-item{
            &:after{
                background: $main-gradient-2;
            }
        }
        &.orange-item{
            &:after{
                background: $main-gradient-3;
            }
        }
        &.red-item{
            &:after{
                background: $main-gradient-4;
            }
        }
        &.blue-item{
            &:after{
                background: $main-gradient-5;
            }
        }
    }
    &__name{
        position: relative;
        width: 100%;
        z-index: 3;
        text-align: center;
        padding: em(0) em(8);
        span{
            font-size: em(14);
            line-height: 1.2;
            font-weight: 900;
            text-transform: uppercase;
        }
    }
    &__braing{
        position: relative;
        width: 100%;
        z-index: 3;
        text-align: center;
        margin-top: em(2);
        margin-bottom: em(8);
        padding: em(0) em(8);
        span{
            font-size: em(8);
            line-height: 1.2;
            font-weight: 700;
            text-transform: uppercase;
        }
    }
    &__like{
        position: absolute;
        top: em(12);
        right: em(12);
        z-index: 3;
        cursor: pointer;
        width: em(18);
        height: em(16);
        transition: .2s ease-in-out;
        svg{
            width: em(18);
            height: em(16);
            path{
                transition: .2s ease-in-out;
                fill: $main-tint-white;
                opacity: 0.8;
            }
        }
        &:hover{
            svg{
                filter: drop-shadow(em(0) em(2) em(6) rgba(221, 18, 18, 0.8));
                path{
                    fill: #dd1212;
                    opacity: 1;
                }
            }
        }
    }
}

@media(max-width:500px) and (orientation:portrait){
    .games{
        &__heading_block{
            flex-wrap: wrap;
            gap: em(20);
        }
        &__heading{
            max-width: 100%;
            width: 100%;
        }
        &__sort{
            margin-top: em(0);
            width: em(100);
            margin-left: 0;
        }
        &__nav{
             margin-top: em(0);
        }
    }
}