/* ====== базовая обёртка ====== */
.qb {
    position: relative;
    display: flex;
    gap: 48rem;
    height: 770rem;
    border-radius: 50rem;
    border: 1rem solid rgba(0, 0, 0, 0.10);
    background: #FFF;
    box-shadow: 0 6rem 25rem 0 rgba(0, 0, 0, 0.10);
    padding: 50rem;
}
.qb__work{
    flex:1;
    display: flex;
    flex-direction: column;
}
.qb__footer{
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}
/* когда финальный слайд активен — растягиваем на всю ширину */
.qb--finish .qb__aside,
.qb--finish .qb__footer {
    display: none;
}
.qb--finish .qb__slides {
    width: 100%;
}

/* ====== слайды ====== */
.qb__slides {
    flex: 1 1 auto;
    min-width: 0;
}
.qb__slide { display: none; }
.qb__slide--active { display: block; }

/* ====== плавный fade подключён через JS ====== */
.qb__slide--finish{
    height: 100%;
}

/* ====== прогресс ====== */

.qb__progress{
    position:relative;
    height:40rem;
    background:#f1f1f1;
    border-radius: 50rem;
    overflow:hidden;
    
}

/* заполненная часть */
.qb__bar{
    position:relative;
    height:100%;
    width:0;                                  /* меняет JS */
    border-radius:inherit;
    background:linear-gradient(90deg,#ffb347 0%,#ff8600 100%);
    transition:width .45s cubic-bezier(.4,0,.2,1);
    box-shadow:inset 0 0 4px rgba(0,0,0,.12);
    display: block;
}

/* диагональные полосы — БЕЗ «квадратов» */
.qb__bar::before{
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(-60deg, rgba(255, 255, 255, .22) 0 6px, rgba(255, 255, 255, 0) 7px 14px);
    background-size: 16rem 100%;
    animation: qb-stripes 30s linear infinite;
    pointer-events: none;
}

@keyframes qb-stripes{
    to{background-position:1000rem 0;}          /* сдвиг строго на шаг */
}

/* процент */
.qb__percent{
    position:absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font: 500 13px / 1 sans-serif;
    color: #444;
}
/* ====== кнопки ====== */
.qb__btn {
    min-width: 160px;
    padding: 12px 32px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(90deg,#ff8a00,#ff5000);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}
.qb__btn--prev { background: #ddd; color: #000; }
.qb__btn:disabled { opacity: .5; cursor: not-allowed; }

/* ====== правый блок ====== */
.qb__aside {
    width: 550rem;
    flex-shrink: 0;
    position: relative;
}
.qb__aside h3 { 
    font-size: 24rem;
    color: #fff;
    font-weight: 500;
    text-align: center;
    margin-bottom: 30rem;
}
.qb__aside ul { 
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 24rem;
    justify-content: space-between;
}
.qb__aside ul li{
    width: 180rem;
    color: #fff;
    font-size: 20rem;
    line-height: 120%;
}
.qb__aside img { width: 100%; border-radius: 30rem; height: 100%; object-fit: cover;}

/* ====== финальный экран ====== */
.qb-finish {
    border-radius: 20rem;
    background-size: cover;
    background-position: center;
    color: #fff;
    height: 100%;
}
.qb-finish__title   { 
    font-size: 36rem;
    line-height: 120%;
    font-weight: 500;
    color: #fff;
}
.qb-finish__text p{ 
    color: #fff;
    margin-top: 24rem;
    font-size: 24rem;
    font-weight: 500;
}
.qb-finish form     { margin-top: 16rem; }

/* остальной BЭM-стиль для choice / image / counter — без изменений */
.qb-img{
    display: flex;
    gap: 16rem;
}
.qb__work-header{
    display: flex;
    flex-direction: column;
    gap: 24rem;
    height: 100%;
}
.qb__question{
    font-size: 36rem;
    line-height: 100%;
    font-weight: 500;
    text-align: center;
    margin-bottom: 32rem;
}
.qb-img__item{
    width: calc(100% / 3 - 32rem / 3);
    text-align: center;
}
.qb-img__item input{
    display: none;
}
.qb-img__check{
    width: 72rem;
    display: block;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    top: -46rem;
    height: 72rem;
    border: 1rem solid rgba(0, 0, 0, 0.20);
    border-radius: 100rem;
    padding: 15rem;
    margin-bottom: -34rem;
    background-color: #fff;
    cursor: pointer;
}
.qb-img__check svg{
    width: 40rem;
    height: 40rem;
}
.qb-img__check path{
    transition: all .3s;
}
.qb-img__item input:checked ~ .qb-img__check path,
.qb-img__item input:hover ~ .qb-img__check path{
    fill: #ff8a00;
    fill-opacity:1;
}
.qb__aside-top{
    position: absolute;
    padding: 32rem;
    width: 100%;
    z-index: 20;
}
.qb__aside::before{
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:  linear-gradient(0deg, rgba(0, 0, 0, 0.50) 15.14%, rgba(0, 0, 0, 0.00) 27.58%), linear-gradient(180deg, rgba(0, 0, 0, 0.50) 12.41%, rgba(0, 0, 0, 0.00) 32.34%), #d3d3d300 0px -117.174px / 100% 154.463% no-repeat;
    border-radius: inherit;
    z-index: 10;
    border-radius: 30rem;
}
.qb__aside-bot{
    padding: 34rem 40rem;
    position: absolute;
    z-index: 20;
    width: 100%;
    bottom: 0;
    color: #fff;
    font-size: 24rem;
    font-weight: 500;
    left: 0;
    text-align: center;
    line-height: 130%;
}
.qb__hint{
    display: flex;
    align-items: center;
    gap: 8rem;
}
.qb__hint span{
    width: 210rem;
    display: block;

}
.qb-img__pic{
    transition: opacity .25s ease;
    width: 100%;
    height: 320rem;
    object-fit: cover;
    object-position: center;
    border-radius: 20rem;
    cursor: pointer;
}
.qb-counter{
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16rem;
}
.qb-counter__row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24rem;
}
.qb-counter__input{
    width: 50rem;
    text-align: center;
}
.qb-counter__btn{
    width: 45rem;
    height: 45rem;
    border-radius: 50rem;
    border: none;
    background-color: #ff8a00;
    color: #fff;
    font-size: 24rem;
    text-align: center;
    cursor: pointer;
    transition: all .3s;
}
.qb-counter__btn:hover{
    background-color: #F0A344;
}
.qb-counter__row-left{
    display: flex;
    gap: 32rem;
    align-items: center;
}
.qb-counter__icon{
    display: block;
    width: 55rem;
    height: 55rem;
    border-radius: 50rem;
    box-shadow: 0 6rem 25rem rgba(0, 0, 0, 0.10);
    padding: 10.5rem;
}
.qb-counter__input::-webkit-outer-spin-button,
.qb-counter__input::-webkit-inner-spin-button{
    -webkit-appearance: none;
    margin: 0;
}
.qb-counter__label{
    font-size: 24rem;
    font-weight: 500;
}
.qb-choice{
    display: flex;
    list-style-type: none;
    margin: 0;
    padding: 0;
    flex-direction: column;
    gap: 16rem;
}
.qb-choice__item{
    position: relative;
    border-radius: 50rem;
    background: #FFF;
    box-shadow: 0 6rem 25rem 0 rgba(0, 0, 0, 0.10);
    font-size: 24rem;
    font-weight: 500;
    line-height: 120%;
    display: block;
}
.qb-choice__item input{
    display: none;
}
.qb-choice__check{
    position: absolute;
    z-index: 10;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 60rem;
    height: 60rem;
    border-radius: 50rem;
    pointer-events: none;
}
.qb-choice__check svg{
    width: 100%;
    height: 100%;
}
.qb-choice__check path{
    transition: all .3s;
}
.qb-choice__item input:checked ~ .qb-choice__check path,
.qb-choice__item input:hover ~ .qb-choice__check path{
    fill: #ff8a00;
    fill-opacity:1;
}
.qb-choice__text{
    padding: 16rem 24rem;
    display: block;
    cursor: pointer;
}
.qb-finish__inner{
    height: 100%;
    width: 475rem;
    background: rgba(0, 0, 0, 0.40);
    padding: 32rem 26rem;
    border-radius: 20rem 0 0 20rem;
}
.qb-finish__inner select,
.qb-finish__inner input{
    width: 100%;
    padding: 17rem 20rem;
    font-size: 16rem;
    margin-bottom: 16rem;
    border: none;
    border-radius: 50rem;
    font-weight: 400;
}
.qb-finish__inner .wpcf7-submit{
    padding: 20rem;
    text-align: center;
    color: #fff;
    font-size: 20rem;
    font-weight: 600;
    background-color: var(--green);
    cursor: pointer;
    transition: all .3s;
}
.qb-finish__inner .wpcf7-submit:hover{
    background-color: #4c974f;
}
@media(max-width: 600px){
    html{
        font-size: 0.166666666vw;
    }
    .qb{
        flex-direction: column;
        height: auto;
    }
    .qb__aside{
        width: 100%;
        height: 390rem;
    }
    .qb-img__pic{
        height: 220rem;
    }
    .qb__footer{
        margin-top: 24rem;
    }
    .qb__question{
        font-size: 26rem;
    }
    .qb-counter__label{
        font-size: 20rem;
    }
    .qb-counter__row-right{
        width: 150rem;
    }
    .qb-counter__row-left{
        width: calc(100% - 174rem);
    }
    .qb__hint{
        width: 180rem;
    }
    .qb__btn{
        min-width: auto;
    }
    .qb-finish__inner{
        width: 100%;
        border-radius: 20rem;
    }
}