:root {
    --color-case-primary: #9748FF;
    --color-case-bg-rgba: rgba(151, 72, 255, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.custom-case-single h2,
.custom-case-single p{
    margin: 0;
    padding: 0;
}

.custom-case-single h1,
.custom-case-single h2,
.custom-case-single h3,
.custom-case-single h4,
.custom-case-single h5,
.custom-case-single h6{
    margin-top: 20px;
    margin-bottom: 20px;
}

.custom-case-single {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 30px;
    align-items: flex-start;
    margin: 30px 0;
}

.case-single__image {
    flex: 0 0 400px; /* Фиксированная ширина изображения */
    max-width: 100%;
}

.case-single__image figure {
    margin: 0;
    float: right; /* Обтекание справа */
    shape-outside: margin-box;
    shape-margin: 20px;
}

.case-single__image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.case-single__content {
    flex: 1;
    min-width: 300px; /* Минимальная ширина контента */
}


.case-single__content a{
    color: var(--color-case-primary);
}

.case-single__content h1 {
    color: var(--color-case-primary);
    margin-top: 0;
    position: relative;
    padding-bottom: 15px;
}

.case-single__content h1:after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 80px;
    height: 4px;
    background: var(--color-case-primary);
}

/* Стили для текста */
.case-single__content-text {
    line-height: 1.6;
    text-align: justify;
}

.case-single__content-text p {
    margin-bottom: 1em;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .case-single__image {
        flex: 0 0 100%;
        float: none;
    }

    .case-single__image figure {
        float: none;
        text-align: center;
    }
}


/*Вопросы и ответы*/
.case-single_query{
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.case-single_query-item.active .case-single_query-item-text{
    max-height: 400px;
    padding: 20px;
    opacity: 1;
    z-index: 0;
}

.case-single_query-item-title{
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 20px;
    width: 100%;
    height: 60px;
    vertical-align: center;
    box-shadow: var(--shadow-md);
}

.case-single_query .custom-arrow{
    cursor: pointer;
    display: flex;
    position: relative;
    align-items: center;
    width: 30px;
    height: 30px;
    padding-right: 20px;
}

.case-single_query .custom-arrow:before,
.case-single_query .custom-arrow:after{
    position: relative;
    content: '';
    width: 3px;
    display: block;
    height: 70%;
    background: var(--color-case-primary);
}

.case-single_query .custom-arrow:before{
    transform: rotate(-35deg);
    left: -4px;
}

.case-single_query .custom-arrow:after{
    transform: rotate(35deg);
    right: -4px;
}

.case-single_query-item-title h2{
    font-size: 18px;
    font-weight: 600;
    padding-right: 20px;
}
.case-single_query-item-text{
    position: relative;
    max-height: 0;
    opacity: 0;
    padding: 0;
    z-index: -3;
    border-left: 3px solid var(--color-case-primary);
    background: var(--color-case-bg-rgba);
    transition: 0.5s all ease;
}


.case-single__wrap{
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}


.case-single_query{
    flex: auto;
    width: 100%;

}

.custom-form-wrap{
    flex: auto;
    max-width: 300px;
    width: 100%;
}

@media (max-width: 768px) {
    .case-single__wrap{
        flex-wrap: wrap;
    }

    .case-single__image{
        order: 1;
    }

    .case-single__content{
        order: 2;
    }

    .case-single__wrap{
        order: 3
    }

    .case-single_query,
    .custom-form-wrap{
        flex: auto;
    }
}


