/* ================================================================
   QUIZ STYLES
   ================================================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --brand: #1a2b4a;
    --brand-hover: #243761;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Geologica-Light', sans-serif;
    font-weight: 300;
    background: #fff;
    color: #1B1B1B;
}

/* ── Обёртка ── */
.promo-page {
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f2f4f7;
}

/* ── Карточка ── */
.promo-card {
    width: 100%;
    max-width: 960px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.18);
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 580px;
}

/* ── Левая колонка (квиз) ── */
.quiz-inner {
    display: flex;
    flex-direction: column;
    padding: 40px 44px 40px 44px;
    background: #fff;
    position: relative;
}

/* ── Правая колонка (фото) ── */
.promo-photo {
    background: url('../img/home.webp') center/cover no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px 36px 32px;
}

.promo-photo-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26,43,74,.72) 0%,
        rgba(26,43,74,.18) 45%,
        rgba(26,43,74,.55) 100%
    );
    height: 100%;
    overflow: hidden;
}

.promo-photo-top {
    position: relative;
    z-index: 1;
}

.promo-title {
    margin: 0;
    font-family: 'Geologica-Light', sans-serif;
    font-size: 22px;
    font-weight: 300;
    line-height: 1.4;
    color: #fff;
    letter-spacing: 0.01em;
}

.promo-logo {
    position: relative;
    z-index: 1;
}

.promo-logo img {
    max-width: 140px;
    filter: brightness(0) invert(1);
    opacity: .85;
    margin: auto;
}

/* ── Шапка квиза ── */
.quiz-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    min-height: 36px;
}

/* ── Кнопка Назад ── */
.quiz-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: #888;
    padding: 4px 8px 4px 4px;
    border-radius: 6px;
    transition: color .2s, background .2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.quiz-btn-back:hover {
    color: var(--brand);
    background: #f0f4f8;
}

.quiz-btn-back.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

/* ── Прогресс ── */
.quiz-progress {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.quiz-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D9D9D9;
    transition: background .25s, transform .25s;
}

.quiz-progress-dot.active {
    background: var(--brand);
    transform: scale(1.15);
}

/* ── Контент ── */
.quiz-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ── Шаги ── */
.quiz-steps {
    flex: 1;
    position: relative;
}

.quiz-step {
    display: none;
    flex-direction: column;
    gap: 18px;
    animation: quizFadeIn .25s ease;
}

.quiz-step.is-active {
    display: flex;
}

@keyframes quizFadeIn {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Тексты ── */
.quiz-intro {
    text-align: center;
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #666;
}

.quiz-q {
    margin: 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    color: #1B1B1B;
    font-family: 'Gilroy-Regular', sans-serif;
    text-align: center;
}

/* ── Варианты ответов ── */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-opt-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 15px;
    color: #1B1B1B;
    padding: 12px 16px;
    border: 1.5px solid #E8E8E8;
    border-radius: 10px;
    transition: border-color .2s, background .2s;
    user-select: none;
    line-height: 1.3;
}

.quiz-opt-label:hover {
    border-color: #b0bdd0;
    background: #f6f8fb;
}

.quiz-opt-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Кастомный чекбокс/радио */
.quiz-opt-check {
    width: 20px;
    height: 20px;
    border: 2px solid #CCC;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s;
    position: relative;
}

.quiz-opt-check.is-square {
    border-radius: 5px;
}

/* Состояние checked */
.quiz-opt-label:has(input:checked) {
    border-color: var(--brand);
    background: #f0f4f9;
}

.quiz-opt-label:has(input:checked) .quiz-opt-check {
    border-color: var(--brand);
    background: var(--brand);
}

.quiz-opt-label:has(input:checked) .quiz-opt-check::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.quiz-opt-label:has(input:checked) .quiz-opt-check.is-square::after {
    width: 10px;
    height: 8px;
    background: none;
    border-radius: 0;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

/* ── Кнопки Далее / Отправить ── */
.quiz-btn-next {
    display: block;
    width: 100%;
    padding: 15px 24px;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background .2s, opacity .2s;
    margin-top: auto;
}

.quiz-btn-next:hover {
    background: var(--brand-hover);
}

.quiz-btn-next:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* ── Контакты: мессенджер ── */
.msg-switcher-label {
    margin: 0;
    font-size: 13px;
    color: #888;
    text-align: center;
}

.msg-switcher {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.msg-tab {
    padding: 7px 14px;
    border: 1.5px solid #E0E0E0;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    color: #555;
    transition: border-color .2s, color .2s, background .2s;
}

.msg-tab:hover {
    border-color: #b0bdd0;
    color: var(--brand);
}

.msg-tab.is-active {
    border-color: var(--brand);
    color: var(--brand);
    background: #f0f4f9;
}

/* ── Форма контактов ── */
#promo-quiz {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Поля ввода ── */
.quiz-contact-field {
    position: relative;
}

.quiz-contact-field input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #E0E0E0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 15px;
    color: #1B1B1B;
    background: #fff;
    outline: none;
    transition: border-color .2s;
    -webkit-appearance: none;
}

.quiz-contact-field input:focus {
    border-color: var(--brand);
}

.quiz-contact-field input::placeholder {
    color: #B0B0B0;
}

/* ── Согласие ── */
.quiz-agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.quiz-agree-box {
    width: 18px;
    height: 18px;
    border: 2px solid #CCC;
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .2s, background .2s;
}

.quiz-agree-box.is-checked {
    border-color: var(--brand);
    background: var(--brand);
}

.quiz-agree-box.is-checked::after {
    content: '';
    display: block;
    width: 10px;
    height: 7px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translate(1px, -1px);
}

.quiz-agree span {
    font-size: 12px;
    color: #888;
    line-height: 1.45;
}

.quiz-agree a {
    pointer-events: none;
    text-decoration: none;
    /*color: var(--brand);*/
    /*text-decoration: underline;*/
}

/* ── Экран успеха ── */
.quiz-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    padding: 40px 0;
    animation: quizFadeIn .3s ease;
}

.quiz-success.is-active {
    display: flex;
}

.quiz-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.quiz-success-icon svg {
    fill: #fff;
}

.quiz-success-title {
    margin: 0;
    font-size: 28px;
    font-family: 'Gilroy-Regular', sans-serif;
    font-weight: 400;
    color: var(--brand);
}

.quiz-success-desc {
    margin: 0;
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    max-width: 320px;
}

/* ================================================================
   АДАПТИВ
   ================================================================ */

@media (max-width: 768px) {
    body {
        height: 100dvh;
        overflow: hidden;
    }
    .promo-page {
        padding: 0;
        align-items: stretch;
        background: var(--brand);
    }

    /* Карточка — на весь экран, фото как фон */
    .promo-card {
        display: block;
        position: relative;
        min-height: auto;
        border-radius: 0;
        box-shadow: none;
        background: none;
    }

    /* Фото — абсолютно на весь экран */
    .promo-photo {
        display: flex;
        position: fixed;
        inset: 0;
        z-index: 0;
        padding: 20px 24px 0;
        flex-direction: column-reverse;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        background: url('../img/home-mob.webp') top/124% no-repeat;
        height: 100%;
        overflow: hidden;
    }

    .promo-photo-top {
        position: relative;
        width: 100%;
        z-index: 1;
    }

    .promo-title {
        text-align: center;
        font-size: 18px;
        line-height: 1.45;
        order: 2;
    }

    .promo-logo {
        order: 1;
    }

    .promo-logo img {
        max-width: 120px;
    }

    /* Белая панель квиза всплывает снизу */
    .quiz-inner {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1;
        background: #fff;
        border-radius: 20px 20px 0 0;
        padding: 28px 24px 48px;
        min-height: 60vh;
        box-shadow: 0 -8px 32px rgba(0,0,0,.15);
    }

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

    .px-form-success-msg p {
        font-size: 16px !important;
    }
}

@media (max-width: 420px) {
    .quiz-inner {
        padding: 24px 16px 32px;
    }

    .quiz-opt-label {
        font-size: 14px;
        padding: 10px 14px;
    }

    .msg-tab {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* ================================================================
   LEAD FORM PAGE
   ================================================================ */

.lf-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.lf-top {
    padding-top: 4px;
}

.lf-form-wrap form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Разделитель "или" ── */
.lf-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #C0C0C0;
    font-size: 13px;
}

.lf-divider::before,
.lf-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E8E8E8;
}

/* ── Кнопка Позвонить ── */
.lf-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border: 1.5px solid var(--brand);
    border-radius: 10px;
    color: var(--brand);
    font-family: 'Geologica-Light', sans-serif;
    font-size: 15px;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.lf-call-btn:hover {
    background: var(--brand);
    color: #fff;
}

.lf-call-phone {
    font-size: 13px;
    opacity: .7;
}

/* ================================================================
   PASSWORD OVERLAY
   ================================================================ */

.pw-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .35s ease;
}

.pw-overlay.pw-hide {
    opacity: 0;
    pointer-events: none;
}

.pw-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.pw-title {
    margin: 0;
    font-family: 'Geologica-Light', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: rgba(255,255,255,.7);
    letter-spacing: 0.05em;
}

.pw-field-wrap {
    display: flex;
    gap: 8px;
}

.pw-input {
    width: 160px;
    padding: 12px 16px;
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    font-family: 'Geologica-Light', sans-serif;
    font-size: 18px;
    letter-spacing: 0.2em;
    color: #fff;
    outline: none;
    text-align: center;
    transition: border-color .2s;
}

.pw-input::placeholder {
    color: rgba(255,255,255,.3);
    letter-spacing: 0.1em;
}

.pw-input:focus {
    border-color: rgba(255,255,255,.7);
}

.pw-btn {
    padding: 12px 20px;
    border: 1.5px solid rgba(255,255,255,.4);
    border-radius: 10px;
    background: rgba(255,255,255,.12);
    font-family: 'Geologica-Light', sans-serif;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    white-space: nowrap;
}

.pw-btn:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.7);
}

.pw-error {
    margin: 0;
    font-family: 'Geologica-Light', sans-serif;
    font-size: 13px;
    color: #ff8a8a;
    opacity: 0;
    transition: opacity .2s;
}

.pw-error--show {
    opacity: 1;
}