.popup {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 11;
}

.popup_bg {
    position: absolute;
    inset: 0;
    background: rgba(34, 34, 34, 0.8);
    opacity: 0;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(0px);
    cursor: pointer;
}

#popup:target {
    pointer-events: auto;
}

#popup:target .popup_bg {
    opacity: 1;
    backdrop-filter: blur(6px);
}

#popup:target .block_quize {
    opacity: 1;
    max-width: 1320px;
    transform: translate(-50%, -50%);
}

#popup .block_quize {
    position: absolute;z-index: 1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, calc(-50% + 30px));
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}



.block_quize {
    width: 100%;
    margin: 40px 0;
}

.block_quize .container {
    display: flex;
    min-height: 400px;
}

.block_quize_left {
    width: 100%;
    max-width: 742px;
    padding: 20px 55px 20px 80px;
    background: #413F4B;
    display: flex;
    position: relative;
    align-items: center;
}

.block_quize_content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.block_quize_content h2 {
    color: #FFF;
    font-family: "Times New Roman";
    font-size: 40px;
    font-weight: 400;
    line-height: 120.4%;
    margin-bottom: 0;
}

.block_quize_content h2 span {
    color: #CAAF8F;
}

.block_quize_content p {
    color: #FFF;
    font-family: "Montserrat";
    font-size: 20px;
    margin-bottom: 0;
    font-weight: 500;
}

.block_quize_content button {
    margin-top: 20px;
    color: #FFF;
    font-family: Montserrat;
    font-size: 16px;
    font-weight: 400;
    line-height: 122.523%;
    width: 100%;
    max-width: 205px;
    padding: 10px 20px;
    background-color: transparent;
    border: 1px solid #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.block_quize_image,
.block_quize_slide_intro img {
    position: absolute;
    position: relative;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
    object-position: center center;
    transition: 0.2s all ease-in-out;
}

.block_quize_image {
    opacity: 1;
}

.popup .block_quize_left {
    padding: 0;
}

.block_quize_right {
    background: #fff;
}

.block_quize.first .block_quize_image {
    z-index: -1;
    opacity: 0;
}

.block_quize_right {
    width: 100%;
    max-width: 567px;
    position: relative;
}

.block_quize_slide_intro,
.block_quize .swiper-slide {
    width: 100%;
    display: flex;
    min-height: 400px;
    height: auto;
    max-width: 567px;
}

.block_quize .swiper-slide {
    padding: 40px 50px 45px 50px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.quiz-question {
    color: #000;
    font-family: "Times New Roman";
    font-size: 28px;
    font-weight: 400;
    line-height: 130%;
}

.quiz-question.small {
    font-size: 24px;
}

.block_quize .quiz-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quiz-option {
    padding-bottom: 14px;
    width: 100%;
    border-bottom: 1px solid #C1AF91;
    color: #413F4B;
    font-family: "Montserrat";
    font-size: 16px;
    font-weight: 500;
    line-height: 140%;
    padding-left: 4px;
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 16px;
    position: relative;
}

.quiz-option:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.quiz-option::placeholder {
    color: #413F4B;
    font-family: "Montserrat";
    font-size: 16px;
    font-weight: 500;
    line-height: 140%;
}

.quiz-option input[type="radio"] {
    display: none;
}

.quiz-option span {
    display: flex;
    align-items: center;
}

.quiz-option span::before {
    content: "";
    min-width: 18px;
    height: 18px;
    border: 2px solid #C1AF91;
    border-radius: 50%;
    margin-right: 10px;
    box-sizing: border-box;
    transition: 0.3s all linear;
}

.quiz-option input[type="radio"]:checked+span::before {
    background-color: #C1AF91;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="9" height="7" viewBox="0 0 9 7" fill="none"><path d="M3.14724 7L0 3.68191L0.78681 2.85239L3.14724 5.34096L8.21319 0L9 0.829522L3.14724 7Z" fill="white"/></svg>');
    background-position: center center;
    background-repeat: no-repeat;
}

.quiz-option input[type="radio"]:checked+span {
    font-weight: 600;
    transition: 0.3s all linear;
}

.block_quize_last_form {
    background: #CAAF8F;
    gap: 16px;
    padding-bottom: 15px;
}

.quiz-final-form_title {
    color: #000;
    font-family: "Times New Roman";
    font-size: 24px;
    font-weight: 400;
    line-height: 130%;
}

.quiz-final-form_desc {
    color: #413F4B;
    font-family: "Montserrat";
    font-size: 16px;
    font-weight: 500;
    line-height: 140%;
}

.block_quize .main-form {
    margin-top: 14px;
    padding: 0;
    max-width: 330px;
}

.block_quize input[type="submit"] {
    margin-top: 15px;
    max-width: 240px;
}

.block_quize .swiper_row {
    position: absolute;
    width: calc(100% - 110px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    left: 55px;
    right: 55px;
    bottom: 15px;
    z-index: 1;
    opacity: 1;
    transition: 0.3s all linear;
}

.block_quize.first .swiper_row,
.block_quize.last .swiper_row,
.block_quize.error .swiper_row {
    z-index: -1;
    opacity: 0;
}

.swiper-prev,
.block_quize_error-restart {
    color: #616161;
    font-family: "Montserrat";
    font-size: 16px;
    font-weight: 400;
    line-height: 23.4px;
}

.block_quize_error-restart {
    position: absolute;
    left: 55px;
    bottom: 25px;
    background-color: transparent;
    border: none;
}

.block_quize_error {
    background: #CAAF8F;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-error-form_title {
    color: #000;
    font-family: "Times New Roman";
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 35px;
    line-height: 130%;
    display: none;
}

.answer1.open,
.answer3.open {
    display: block;
}

.swiper-next {
    cursor: pointer;
    color: #000;
    font-family: "Montserrat";
    font-size: 16px;
    border: 1px solid #000;
    font-weight: 400;
    line-height: 146.25%;
    width: 115px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 26px;
}

.swiper-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: static;
}

.swiper-pagination span {
    background: rgba(65, 63, 75, 0.70);
    width: 12px;
    height: 12px;
    border-radius: 0;
    margin: 0 !important;
}

.swiper-pagination-bullet-active {
    background: #413F4B;
}

.close_quize {
    position: absolute;
    top: 20px;
    right: 24px;
    cursor: pointer;
    opacity: 1;
    z-index: 1;
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
}

.block_quize.first .close_quize {
    opacity: 0;
    z-index: -1;
}

@keyframes shakeAnim {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

.quiz-option span.shake::before {
    animation: shakeAnim 0.6s ease;
    border-color: brown;
}

@media (max-width: 992px) {
    .block_quize .container {
        flex-direction: column;
    }


    .block_quize_left,
    .block_quize_left.first {
        padding: 50px 15px 50px 15px;
    }

    .block_quize_left.first {
        display: flex;
    }

    .block_quize.first .block_quize_image {
        display: none;
    }

    .quiz-question.small {
        font-size: 20px;
    }

    .block_quize_right {
        width: 100%;
        max-width: 742px;
        position: relative;
    }


    .block_quize_content {
        gap: 24px;
    }

    .block_quize_content h2 {
        font-size: 30px;
        max-width: 250px;
    }

    .block_quize_content p {
        font-weight: 500;
        font-size: 16px;
        margin-bottom: 0;
    }

    .block_quize_content button {
        margin: 0;
    }

    .block_quize .swiper-slide {
        padding: 60px 15px 15px 15px;
        min-height: 145px;
        max-width: 100%;
    }


    .block_quize_slide_intro {
        min-height: auto;
        max-width: 100%;
    }

    .block_quize_slide_intro img {
        object-position: top center;
        position: static;
    }

    .block_quize:not(.first) .block_quize_left {
        display: none !important;
    }

    .block_quize:not(.first) .swiper-slide {
        min-height: 500px;
    }

    .block_quize.first .swiper {
        max-height: 145px;
    }

    .quiz-final-form_desc {
        padding-right: 20px;
    }

    .quiz-final-form_desc br {
        display: none;
    }

    .block_quize_last_form,
    .block_quize_error {
        background: #CAAF8F;
    }

    .block_quize_error {
        justify-content: flex-start;
    }

    .quiz-option span::before {
        min-width: 16px;
        height: 16px;
    }

    .quiz-question {
        font-size: 20px;
    }

    .quiz-option {
        padding-bottom: 20px;
        font-size: 14px;
    }

    .block_quize .main-form *,
    .block_quize .main-form *::placeholder {
        color: #000 !important;
        border-color: #000;
    }

    .block_quize input[type="submit"] {
        border: 1px solid #000;
    }

    .block_quize .main-form-1 input[type="submit"] {
        background-image: url("data:image/svg+xml,%3Csvg width='30' height='8' viewBox='0 0 30 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M29.3708 4.35355C29.5661 4.15829 29.5661 3.84171 29.3708 3.64645L26.1888 0.464466C25.9935 0.269204 25.677 0.269204 25.4817 0.464466C25.2864 0.659728 25.2864 0.976311 25.4817 1.17157L28.3101 4L25.4817 6.82843C25.2864 7.02369 25.2864 7.34027 25.4817 7.53553C25.677 7.7308 25.9935 7.7308 26.1888 7.53553L29.3708 4.35355ZM0 4.5H29.0172V3.5H0L0 4.5Z' fill='%23000'/%3E%3C/svg%3E");
    }

    .quiz-error-form_title {
        font-size: 24px;
        padding-right: 40px;
    }

    .block_quize_error-restart {
        left: 15px;
    }

    .block_quize .swiper_row {
        width: calc(100% - 30px);
        display: flex;
        width: calc(100% / 1 - 30px);
        align-items: center;
        justify-content: space-between;
        left: 15px;
        right: 15px;
        bottom: 15px;
        position: absolute;
        z-index: 1;
    }

    .swiper-next span {
        display: none;
    }

    .swiper-next {
        max-width: 40px;
        height: 40px;
    }

    .swiper-next {
        max-width: 40px;
        position: relative;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
    }

    /* .block_quize_right {
        height: 20px;
        min-width: 18px;
        position: absolute;
        left: 10px;
    } */

    .swiper-next svg {
        max-width: 40px;
        position: relative;
        height: 40px;
        padding: 0;
    }

    .block_quize .quiz-form {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding-right: 15px;
    }
}

@media (max-width: 768px) {
    .block_quize_slide_intro img {
        max-height: 145px;
    }
}