.gallery {
    position: relative;
}

.gallery--homepage {
    margin: 60px 0;
}

.gallery__text {
    padding: 16px 48px 4px;
    position: relative;
}

.gallery-svg {
    position: absolute;
    top: -8px;
    left: -20px;
    height: 186px;
    width: auto;
}

.gallery__wrapper h2 {
    padding-bottom: 56px;
    max-width: 252px;
}

.gallery__image {
    position: relative;
    padding-left: 22px;
}

.gallery__item {
    position: relative;
    margin-top: 52px;
    display: block;
    background: none;
    height: 160px;
}
.gallery__item::before {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    border-radius: 25px 0 0 25px;
    background: linear-gradient(to bottom,  rgba(39,39,47,0) 0%,rgba(39,39,47,0.7) 100%);
    z-index: 10;
}

.gallery-img {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    border-radius: 25px 0 0 25px;
}

.gallery__item h3 {
    font-family: 'brandon_grotesquemedium';
    font-size: 30px;
    font-weight: normal;
    color: #fff;
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
    padding: 0 81px 9px 24px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 0 0 0 25px;
    z-index: 40;
}

.gallery__item h3::after {
    content: '\e902';
    font-family: 'icomoon';
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translate(0, -50%);
    font-size: 17px;
    color: #111112;
    line-height: 1em;
    width: 36px;
    height: 36px;
    padding-left: 5px;
    padding-bottom: 1px;
    border-radius: 50%;
    background-color: #31F4C5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery__tag {
    position: absolute;
    width: 100%;
    top: -16px;
    left: 0;
    padding: 0 30px;
}

.gallery__tag ul {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 5px;
}

.gallery__tag ul li {
    margin: 0;
    padding: 0;
    width: 40px;
    height: 40px;
    background-color: #31F4C5;
    border-radius: 11px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery__tag ul li i {
    font-size: 20px;
}

.gallery__tag ul li img {
    max-width: 20px;
    margin-right: 5px;
}

.gallery__tag ul li::before,
.gallery__tag ul li::after {
    display: none;
}

@media (min-width: 768px) {
    .gallery--homepage {
        margin: 90px 0;
    }
    
    .gallery__text {
        padding: 23px 78px 16px;
    }

    .gallery-svg {
        top: -40px;
        left: -8px;
        height: 235px;
    }

    .gallery__image {
        padding-left: 52px;
    }
    
    .gallery__item {
        margin-top: 54px;
    }

    .gallery__item h3 {
        padding: 0 82px 22px 32px;
        /*background: linear-gradient(to bottom,  rgba(39,39,47,0) 0%,rgba(39,39,47,0.7) 100%);*/
    }
    
    .gallery__item h3::after {
        right: 52px;
        margin-top: -11px;
    }

    .gallery__wrapper h2 {
        max-width: 363px;
    }
    
}

@media (min-width: 1200px) {
    .gallery__wrapper h2 {
        max-width: 100%;
    }

    .gallery {
        display: flex;
    }

    .gallery.left {
        flex-direction: row-reverse;
    }

    .gallery--homepage {
        margin: 150px 0;
    }
    
    .gallery__text {
        padding: 0 130px 0 0;
        width: 50%;
    }

    .gallery.left .gallery__text {
        padding: 0 0 0 130px;
    }

    .gallery__image {
        width: 50%;
        padding-left: 15px;
    }

    .gallery.left .gallery__image {
        padding-left: unset;
        padding-right: 15px;
    }

    .gallery.left .gallery-img {
        border-radius: 0 25px 25px 0;
    }

    .gallery__image .gallery__item:first-child {
        margin-top: 0;
    }

    .gallery__wrapper {
        padding-top: 0;
        margin-left: auto;
        max-width: 533px;
    }

    .gallery.left .gallery__wrapper {
        margin-left: unset;
        margin-right: auto;
    }

    .gallery-svg {
        top: -60px;
        left: auto;
        right: 583px;
        height: 279px;
    }

    .gallery.left .gallery-svg {
        right: unset;
        left: 40px;
    }

    .gallery.left .gallery__tag ul {
        justify-content: right;
    }

    .gallery__tag ul li {
        margin: 0;
        padding: 0 10px;
        width: auto;
        height: 36px;
        color: #111112;
        font-size: 16px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }
    
    .gallery__tag ul li i,
    .gallery__tag ul li svg {
        margin-right: 5px;
    }

    .gallery__item:hover h3::after {
        transition: all 0.3s ease-in-out;
        right: -10px;
    }

    .gallery__item:hover:after {
        content: '';
        height: 100%;
        width: 100%;
        position: absolute;
        top: 0;
        left: 0;
        background: linear-gradient(rgba(39, 39, 47, 0) 0%, rgba(39, 39, 47, 0.7) 100%);
        opacity: 0.2;
        border-radius: 25px 0 0 25px;
    }

    .gallery__item h3 {
        max-width: 635px;
    }

    .gallery.left .gallery__item h3 {
        text-align: right;
        padding: 0 32px 22px 82px;
        left: unset;
        right: 0;
    }

    .gallery__item h3::after {
        right: 0;
    }

    .gallery.left .gallery__item h3::after {
        right: unset;
    }
        
}

@media (min-width: 1201px) and (max-width: 1440px)  {
    .gallery__text {
        padding: 0 30px 0 0;
    }

    .gallery-svg {
        right: 447px;
    }

    .gallery__wrapper {
        max-width: 489px;
    }

    .gallery__item h3 {
        max-width: 522px;
    }
}
