#primary section.cases {
    padding-top: 80px;
    padding-bottom: 80px;
}

.cases__title {
    margin-top: 24px;
    color: var(--black-color);
}

.cases__accordion {
    display: flex;
    gap: 16px;
    width: 100%;
    overflow: hidden;
    margin-top: 40px;
}

.cases__item {
    position: relative;
    flex: 1 1 184px;
    height: 608px;
    background-size: cover;
    background-position: center;
    border-radius: 16px;
    cursor: pointer;
    transition: all 1.2s ease;
    overflow: hidden;
    color: #fefefe;
    display: flex;
    align-items: flex-end;
}

.cases__item.active {
    flex: 2 1 560px;
}

.cases__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
    transition: background 1s ease;
    z-index: 0;
    pointer-events: none;
}

.cases__item.active .cases__overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.15));
}

.cases__content {
    position: relative;
    z-index: 1;
    padding: 24px;
    opacity: 0;
    transform: translateX(40px);
    pointer-events: none;
    overflow: hidden;
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.cases__content::before {
    content: "";
    position: absolute;
    inset: 0;
    backdrop-filter: blur(16px);
    background: #ffffff03;
    mask-image: linear-gradient(to top, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to top, black 80%, transparent 100%);
    z-index: -1;
    transition: backdrop-filter 1s ease;
}

.cases__item.active .cases__content::before {
    backdrop-filter: blur(16px);
}

.cases__item.active .cases__content {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 1s;
}

.cases__item {
    transition:
        flex 1.2s ease,
        background 1s ease;
}

.cases__item.active .cases__content {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 1s;
}

.cases__item-title,
.cases__item-text {
    opacity: 0;
    transform: translateX(40px);
    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.cases__item-title {
    color: #fefefe;
}

.cases__item.active .cases__item-title,
.cases__item.active .cases__item-text {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 1s;
}

.cases__item-title {
    margin-bottom: 16px;
}

.cases__item-text {
    font-size: 18px;
    line-height: 150%;
}

.cases__swiper {
    display: none;
}

.cases__swiper .swiper-slide {
    min-height: 418px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    box-sizing: border-box;
    border-radius: 16px;
}

.swiper-cases__item-title {
    color: #fefefe;
}

.swiper-cases__item-text {
    color: #fefefe;
    margin-top: 18px;
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    letter-spacing: 0;
}

.cases__swiper {
    margin-top: 40px;
}

.cases__swiper .swiper-pagination {
    position: static;
    margin-top: 40px;
}

.cases__swiper .swiper-pagination-bullet-active {
    background: #1629d6;
}

@media screen and (max-width: 1300px) {
    .cases__swiper {
        display: block;
    }

    .cases__accordion {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    #primary section.cases {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .cases__item-text {
        font-size: 16px;
    }
}
