.section-gallery {
    overflow: hidden;
    margin-top: 20px;
}

.gallery {
    overflow: visible !important;
    padding: 0 19% !important;
    margin-top: 70px;
    position: relative;
}

.gallery .swiper-wrapper {
    margin-bottom: 80px;
}

.gallery .swiper-button-prev,
.gallery .swiper-button-next {
    top: auto;
    bottom: 5px;
    margin-top: 0;
}

.gallery__item {
    transform: scale(1) !important;
    transition: .4s;
    opacity: 0.6;
    outline: none;
    display: flex;
    overflow: hidden;
    border-radius: 10px;
    max-height: 475px;
}

.gallery__item.swiper-slide-active {
    transform: scale(1.1) !important;
    z-index: 2;
    opacity: 1;
    box-shadow: 0 30px 25px -20px #0000007a;
}

.gallery__title {
    position: absolute;
    bottom: 0;
    padding: 30px 35px;
    color: #ffffff;
    line-height: 1.2;
    font-size: 24px;
    font-weight: 700;
}

.gallery-button {
    position: absolute;
    right: 0;
    top: 0;
    bottom: calc(81px + 0.8vw);
    background: var(--primary);
    width: 20px;
    z-index: 2;
    border-radius: 3px;
    cursor: pointer;
    transition: .4s;
}

.gallery-button:hover {
    filter: brightness(1.3);
}

.gallery-button-next {
    right: 0;
    background: var(--primary);
    width: 20px;
}
.gallery-button-prev {
    left: 0;
    background: var(--primary);
    width: 20px;
}

.gallery-button:after {
    content: '';
    background: url(/local/templates/cf/images/back.svg);
    width: 20px;
    height: 19px;
    top: calc(50% - 20px);
}

.gallery-button-next::after {
    background: transparent;
    border: 12px solid transparent;
    border-left: 12px solid #ffffff;
    left: 0px;
    position: absolute;
}

.gallery-button-prev::after {
    background: transparent;
    border: 12px solid transparent;
    border-right: 12px solid #ffffff;
    left: -4px;
    position: absolute;
}

.gallery__item.swiper-slide-active .gallery__title {
    font-size: 30px;
    font-weight: 700;
}


.gallery__item.swiper-slide-active .videoblog__video {}
.gallery__item.swiper-slide-active .videoblog__video::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: black;
    opacity: .5;
}

.gallery__item.swiper-slide-prev::before {
    content: '';
    width: 24%;
    height: 100%;
    display: block;
    position: absolute;
    right: 0;
    top: 0;
    background: linear-gradient(90deg, #ffffff, transparent);
    z-index: 1;
}

.gallery__item.swiper-slide-next::before {
    content: '';
    width: 24%;
    height: 100%;
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(90deg, transparent, #ffffff);
    z-index: 1;

}


.gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery__item picture {
    width: 100%;
    height: 100%;
}

.gallery:not(.swiper-initialized) .swiper-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

.gallery:not(.swiper-initialized) .gallery__item {
    transform: scale(1.1) !important;
    opacity: 1;
    width: 100%;
    height: 100%;
}

.gallery:not(.swiper-initialized) .gallery__item:nth-child(n+2) {
    display: none;
}

.gallery__video {
    height: 100%;
    width: 100%;
}

.gallery__video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


@media screen and (max-width: 1024px) {

    .gallery__title {
        font-size: 17px;
    }

    .gallery__item.swiper-slide-active .gallery__title {
        font-size: 19px;
    }
}

@media screen and (max-width: 767px) {

    .gallery .swiper-wrapper {
        margin-bottom: 30px;
    }

    .gallery {
        padding: 0 !important;
        margin-top: 20px !important;
    }
    
    .gallery__item.swiper-slide-active,
    .gallery__item {
        transform: none !important;
    }

    .gallery__item.swiper-slide-active {
        box-shadow: 0 24px 19px -23px #0000007a;
    }

    .gallery-button {
        bottom: 43px;
        background: transparent;
    }

    .gallery__item .gallery__title,
    .gallery__item.swiper-slide-active .gallery__title {
        font-size: 13px;
        padding: 12px 18px;
        font-weight: 600;
    }

    .gallery-button:after {
        top: auto;
        background: url(/local/templates/cf/images/back.svg);
        width: 20px;
        height: 19px;
        border: 0;
        bottom: -43px;
    }

    .gallery-button-prev::after {
        -webkit-transform: rotate(180deg);
        -ms-transform: rotate(180deg);
        transform: rotate(180deg);
        left: 3px;
    }
}