.section.ourworks {
    --jb-bg: #0C1B20;
    --jb-itog-bg: #000;
    --jb-text: #fff;
    --jb-text-muted: #85898a;
    --jb-accent: #BF9E77;
    --jb-green: #72ea9c;
    --jb-radius: 20px;
    --jb-gap: 30px;
    --jb-font-base: 20px;
}

.swiper-ourworks .swiper-wrapper {
    align-items: stretch;
}

.swiper-ourworks .swiper-slide {
    height: auto;
}

.jb-slide {
    width: 80%;
    max-width: 1620px;
    background-color: var(--jb-bg);
    border-radius: var(--jb-radius);
    padding: 40px;
    box-sizing: border-box;
    font-size: var(--jb-font-base);
    display: grid;
    grid-template-columns: 36% 1fr;
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas:
        "title   title"
        "geo     geo"
        "image   right"
        "gallery gallery";
    gap: 0 var(--jb-gap);
    align-items: start;
}

@media (max-width: 1700px) {
    .jb-slide {
        font-size: 18px;
    }
}

@media (max-width: 1543px) {
    .jb-slide {
        font-size: 16px;
        padding: 30px;
    }
}

@media (max-width: 1200px) {
    .jb-slide {
        font-size: 14px;
    }
}

.jb-slide__title {
    grid-area: title;
    font-size: 1.5em;
    font-weight: 400;
    margin: 0 0 0.5em 0;
    text-transform: uppercase;
    color: #fff;
    font-family: "Jost", sans-serif;
}

.jb-slide__geo {
    grid-area: geo;
    font-size: 1em;
    margin-bottom: 1em;
    padding-left: 1.5em;
    background-image: url(../images/icon-geo.svg);
    background-repeat: no-repeat;
    background-position: left center;
    background-size: 1em auto;
    color: var(--jb-text-muted);
}

.jb-slide__media {
    grid-area: image;
    align-self: start;
}

.jb-slide__media img {
    width: 100%;
    height: auto;
    border-radius: var(--jb-radius);
    display: block;
}

.jb-slide__media .swiper-pagination {
    display: none;
}

@media (min-width: 768px) {
    .jb-slide__media .swiper-ourworks-mobgal {
        overflow: hidden;
    }

    .jb-slide__media .swiper-wrapper {
        transform: none !important;
    }

    .jb-slide__media .swiper-slide {
        display: none;
    }

    .jb-slide__media .swiper-slide:first-child {
        display: block;
        width: 100% !important;
    }
}

.jb-slide__right {
    grid-area: right;
    display: flex;
    flex-direction: column;
    gap: 1em;
    min-width: 0;
}

.jb-slide__content {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.jb-slide__item {
    display: flex;
    justify-content: space-between;
    font-size: 1em;
}

.jb-slide__item-title {
    padding-left: 1.5em;
    background-repeat: no-repeat;
    background-position: left 0.25em;
    background-size: 1.1em auto;
    min-width: 7.25em;
    font-size: 1em;
    font-weight: 500;
    text-transform: uppercase;
    color: #fff;
    font-family: "Jost", sans-serif;
    flex-shrink: 0;
}

.jb-slide__item--problem .jb-slide__item-title {
    background-image: url(../images/ourworks-icon-probl.svg);
}

.jb-slide__item--solution .jb-slide__item-title {
    background-image: url(../images/ourworks-icon-reshenie.svg);
}

.jb-slide__item--result .jb-slide__item-title {
    background-image: url(../images/ourworks-icon-itog.svg);
}

.jb-slide__item-descr {
    padding-left: 1.5em;
    font-weight: 300;
    color: var(--jb-text);
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.jb-slide__economy {
    background-color: var(--jb-itog-bg);
    border-radius: var(--jb-radius);
    padding: 1em;
    min-width: 0;
    font-size: 1em;
}

.jb-slide__economy-row {
    display: flex;
    justify-content: space-between;
}

.jb-slide__economy-row--total {
    display: flex;
    justify-content: left;
    align-items: center;
}

.jb-slide__economy-row--total {
    margin-top: 0.6em;
}

.jb-slide__economy-label {
    text-transform: uppercase;
    font-weight: 500;
    color: var(--jb-text);
}

.jb-slide__economy-label--green {
    color: var(--jb-green);
}

.jb-slide__economy-value {
    color: var(--jb-text);
    padding-left: 0.5em;
}

.jb-slide__economy-sum {
    font-size: 1.2em;
    padding: 0.4em 0.8em;
    border-radius: 10px;
    border: 1px solid var(--jb-accent);
    margin-left: 1.5em;
    color: var(--jb-text);
    font-weight: 500;
    text-transform: uppercase;
}

.jb-slide__gallery {
    grid-area: gallery;
    display: flex;
    gap: 1.4em;
    margin-top: 1em;
}

.jb-slide__gallery-item {
    flex: 1;
}

.jb-slide__gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--jb-radius);
    display: block;
    aspect-ratio: 1 / 1;
}

@media (max-width: 767px) {
    .section.ourworks {
        --jb-radius: 8px;
    }

    .jb-slide {
        width: 90%;
        height: 100%;
        border-radius: var(--jb-radius);
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto auto auto 1fr;
        grid-template-areas:
            "image"
            "title"
            "geo"
            "right";
        padding: 5px;
    }

    .jb-slide__media {
        grid-area: image;
    }

    .jb-slide__media .swiper-pagination {
        display: block;
    }

    .jb-slide__media .swiper-slide {
        aspect-ratio: 4 / 3;
    }

    .jb-slide__media .swiper-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: var(--jb-radius);
    }

    .jb-slide__title {
        margin: 0 0 10px 0;
        font-size: 16px;
        /* padding: 0 10px; */
        line-height: 20px;
    }

    .jb-slide__geo {
        margin-bottom: 15px;
        font-size: 12px;
        padding-left: 1.5em;
        background-position: 0 center;
        line-height: 17px;
    }

    .jb-slide__gallery {
        display: none;
    }

    .jb-slide__content,
    .jb-slide__media {
        margin-bottom: 20px;
    }

    .jb-slide__economy {
        padding: 0.7em;
        font-size: 0.8em;
    }

    .jb-slide__item {
        flex-direction: column;
        gap: 0.5em;
    }

    .jb-slide__item-descr {
        padding-left: 0;
    }

    .swiper-ourworks-mobgal {
        border-radius: 6px;
        overflow: hidden;
    }

    .swiper-ourworks-mobgal .swiper-slide {
        aspect-ratio: 4 / 3;
    }

    .swiper-ourworks-mobgal .swiper-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}

@media (max-width: 1200px) and (min-width: 768px) {
    .jb-slide {
        grid-template-rows: auto auto 1fr auto auto;
        grid-template-areas:
            "title   title"
            "geo     geo"
            "image   content"
            "economy economy"
            "gallery gallery";
    }

    .jb-slide__right {
        display: contents;
    }

    .jb-slide__content {
        grid-area: content;
    }

    .jb-slide__economy {
        grid-area: economy;
    }

    .jb-slide__media {
        margin-bottom: 20px;
    }
}