/* ============================================================
   new-blocks.css — баннер (преимущества + 2 кнопки) и блок «Квиз»
   Стилистика согласована с блоком .line_triggers:
   зелёные акценты, курсив, фирменная тень 17px 18px 0 #cdcdcd.
   Подключается в index.php ПОСЛЕ style.css и adaptive.css.
   ============================================================ */

/* ---------- Баннер: подзаголовок ---------- */
.line_main h2 {
    margin-top: 10px;
    font-weight: 300;
}

/* ---------- Баннер: три преимущества (как блок с цифрами) ---------- */
.hero_adv {
    display: flex;
    justify-content: center;
    gap: 56px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto 56px;
}

.hero_adv__item {
    position: relative;
    text-align: left;
    max-width: 270px;
}

.hero_adv__item:before {
    content: '';
    position: absolute;
    top: -26px;
    left: -34px;
    width: 80px;
    height: 80px;
    background-image: url(/assets/files/before_triggers.png);
    background-size: contain;
    background-repeat: no-repeat;
    z-index: -1;
}

.hero_adv__item h4 {
    font-size: 23px;
    font-weight: bold;
    color: var(--color-main);
    margin-bottom: 6px;
}

.hero_adv__item p {
    margin: 0;
    font-size: 19px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.3;
    color: var(--color-dark);
}

/* ---------- Баннер: две кнопки + подсказка под ними ---------- */
.line_main .cta {
    flex-direction: column;
    align-items: center;
}

.line_main .cta .content.hero_cta {
    gap: 26px;
    flex-wrap: wrap;
    justify-content: center;
}

.line_main .cta .content.hero_cta .btn_one {
    margin-right: 0;
}

.hero_cta__hint {
    margin-top: 20px !important;
    font-size: 16px;
    font-weight: 300;
    font-style: italic;
    color: var(--color-muted);
    max-width: 540px;
    text-align: center;
}

/* Вторичная кнопка (контурная, в тон фирменному зелёному) */
.btn_two,
.btn_two:active,
.btn_two:focus {
    color: var(--color-second) !important;
    background: #fff;
    border: 2px solid var(--color-main) !important;
    transition: var(--all-transition);
    cursor: pointer;
}

.btn_two:hover {
    color: #fff !important;
    background: var(--color-main);
    transition: var(--all-transition);
}

/* ============================================================
   Блок «Квиз»
   ============================================================ */
.line_quiz {
    padding-top: 220px;
    position: relative;
}

.line_quiz .quiz_sub {
    font-size: 19px;
    font-weight: 300;
    font-style: italic;
    max-width: 660px;
    margin: 16px auto 0;
    text-transform: none;
    color: var(--color-muted);
}

.line_quiz .quiz_sub b {
    color: var(--color-main);
    font-style: normal;
    font-weight: 600;
}

.quiz-card {
    max-width: 780px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 48px 50px;
    box-shadow: 17px 18px 0 #cdcdcd;
    isolation: isolate;            /* чтобы зелёный акцент лёг поверх белой карточки */
}

/* Прогресс */
.quiz-progress {
    margin-bottom: 34px;
}

.quiz-progress__bar {
    height: 10px;
    background: var(--color-light-muted);
    border-radius: 6px;
    overflow: hidden;
}

.quiz-progress__bar span {
    display: block;
    height: 100%;
    width: 20%;
    background: linear-gradient(90deg, var(--color-main) 0%, var(--color-second) 100%);
    border-radius: 6px;
    transition: width 0.35s ease;
}

.quiz-progress__label {
    margin-top: 10px;
    font-size: 14px;
    color: var(--color-muted);
}

/* Шаги */
.quiz-step {
    display: none;
}

.quiz-step.is-active {
    display: block;
    animation: quizFade 0.28s ease;
}

@keyframes quizFade {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Вопрос — с фирменным зелёным акцентом, как заголовки в блоке цифр */
.quiz-q {
    position: relative;
    font-size: 26px;
    font-weight: bold;
    margin-bottom: 28px;
    text-transform: none;
}

.quiz-q:before {
    content: '';
    position: absolute;
    top: -20px;
    left: -24px;
    width: 64px;
    height: 64px;
    background-image: url(/assets/files/before_triggers.png);
    background-size: contain;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Варианты ответа — мягкие «пилюли» */
.quiz-options {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.quiz-option {
    text-align: left;
    padding: 15px 24px;
    font-size: 17px;
    font-weight: 500;
    background: var(--color-light);
    border: 2px solid var(--color-light-muted);
    border-radius: 40px;
    cursor: pointer;
    transition: var(--all-transition);
}

.quiz-option:hover {
    border-color: var(--color-main);
    color: var(--color-main);
    transform: translateY(-1px);
}

.quiz-option.selected {
    border-color: var(--color-main);
    background: linear-gradient(167deg, var(--color-main) 0%, var(--color-second) 100%);
    color: #fff;
}

/* Контактный шаг */
.quiz-contact .form-floating {
    margin-bottom: 14px;
}

.quiz-contact .btn_one {
    margin: 8px 0 14px;
}

/* Навигация */
.quiz-nav {
    margin-top: 26px;
}

.quiz-back {
    background: none;
    border: none;
    color: var(--color-muted);
    font-size: 15px;
    cursor: pointer;
    padding: 6px 0;
    transition: var(--all-transition);
}

.quiz-back:hover {
    color: var(--color-main);
}

.quiz-back.is-hidden {
    visibility: hidden;
}

/* ВАЖНО: гасим wow-анимацию внутри квиза, иначе она прячет шаги */
.line_quiz [class*="animate__"],
.line_quiz .wow {
    visibility: visible !important;
    opacity: 1 !important;
    animation-name: none !important;
}

/* ============================================================
   Адаптив
   ============================================================ */
@media only screen and (max-width: 768px) {
    .hero_adv {
        gap: 30px;
        margin-bottom: 36px;
    }

    .hero_adv__item {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero_adv__item:before {
        width: 64px;
        height: 64px;
        top: -20px;
        left: -22px;
    }

    .hero_adv__item h4 { font-size: 21px; }
    .hero_adv__item p  { font-size: 17px; }

    .line_main .cta .content.hero_cta .btn_two { width: 100%; }

    .line_quiz {
        padding-top: 80px;
    }

    .quiz-card {
        padding: 28px 20px;
        box-shadow: 8px 9px 0 #cdcdcd;
    }

    .quiz-q {
        font-size: 21px;
    }

    .quiz-q:before {
        width: 52px; height: 52px; top: -16px; left: -16px;
    }

    .quiz-option {
        font-size: 16px;
        padding: 13px 20px;
    }
}

/* ============================================================
   Блок «Наши услуги»
   ============================================================ */
.line_services {
    padding-top: 220px;
    position: relative;
}

.line_services .services_sub {
    font-size: 19px;
    font-weight: 300;
    font-style: italic;
    max-width: 660px;
    margin: 16px auto 0;
    text-transform: none;
    color: var(--color-muted);
}

.services_grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.service_card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 17px 18px 0 #cdcdcd;
    display: flex;
    flex-direction: column;
    transition: var(--all-transition);
}

.service_card:hover {
    transform: translateY(-4px);
}

.service_card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.service_card__media a:first-child {
    display: block;
    width: 100%;
    height: 100%;
}

.service_card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service_card:hover .service_card__media img {
    transform: scale(1.05);
}

.service_card__count {
    position: absolute;
    right: 14px;
    bottom: 14px;
    background: rgba(14, 49, 19, 0.78);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 30px;
    backdrop-filter: blur(2px);
}

.service_card__body {
    padding: 26px 28px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.service_card__body h4 {
    font-size: 22px;
    font-weight: bold;
    color: var(--color-main);
    margin-bottom: 12px;
    text-transform: none;
}

.service_card__body p {
    font-size: 16px;
    font-weight: 300;
    color: var(--color-dark);
    line-height: 1.45;
    margin-bottom: 22px;
    flex: 1;
}

.service_card__btn {
    align-self: flex-start;
}

/* подпись услуги в модалке */
.service_modal_pick {
    font-size: 16px;
    margin-bottom: 18px;
    color: var(--color-muted);
}

.service_modal_pick b {
    color: var(--color-main);
}

@media only screen and (max-width: 768px) {
    .line_services { padding-top: 80px; }
    .services_grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .service_card { box-shadow: 8px 9px 0 #cdcdcd; }
    .service_card__body { padding: 22px 20px 26px; }
    .service_card__btn { align-self: stretch; }
}

/* ============================================================
   Блок «Бесплатный выезд на замер» + этапы работ
   ============================================================ */
.line_izmer {
    padding-top: 220px;
    position: relative;
}

.line_izmer .izmer_sub {
    font-size: 19px;
    font-weight: 300;
    font-style: italic;
    max-width: 680px;
    margin: 16px auto 0;
    text-transform: none;
    color: var(--color-muted);
}

.stages {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    margin-bottom: 48px;
}

.stage {
    flex: 1;
    text-align: center;
    position: relative;
}

/* соединительная линия между кружками */
.stage:not(:last-child):before {
    content: '';
    position: absolute;
    top: 31px;
    left: 50%;
    width: 100%;
    height: 3px;
    background: var(--color-light-muted);
    z-index: 0;
}

.stage__num {
    position: relative;
    z-index: 1;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(167deg, var(--color-main) 0%, var(--color-second) 100%);
    color: #fff;
    font-size: 26px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 4px 0 #cdcdcd;
}

.stage__body h4 {
    font-size: 19px;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: none;
}

.stage__body p {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.4;
    color: var(--color-muted);
    margin: 0;
}

.izmer_cta {
    text-align: center;
}

@media only screen and (max-width: 768px) {
    .line_izmer { padding-top: 80px; }

    .stages {
        flex-direction: column;
        gap: 0;
    }

    .stage {
        display: flex;
        text-align: left;
        align-items: flex-start;
        gap: 16px;
        padding-bottom: 28px;
    }

    .stage__num {
        margin: 0;
        flex: 0 0 auto;
        width: 52px;
        height: 52px;
        font-size: 22px;
    }

    /* вертикальная линия на мобиле */
    .stage:not(:last-child):before {
        top: 52px;
        left: 25px;
        width: 3px;
        height: calc(100% - 52px);
    }

    .izmer_cta .btn { width: 100%; }
}
