/* Стили квиз-опросника: Desktop-First, без :root, шрифты строго в px */
.quiz-section { padding: 48px 16px 56px; background: #f1f5f9; position: relative; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
.quiz-container { max-width: 980px; margin: 0 auto; position: relative; }

/* Декоративные стрелки по бокам */
.quiz-deco-arrow { position: absolute; width: 140px; height: 230px; pointer-events: none; z-index: 1; opacity: 0.6; }
.quiz-deco-arrow-left { left: -110px; top: 80px; }
.quiz-deco-arrow-right { right: -110px; top: 120px; }

/* Основная плашка */
.quiz-card { background: #ffffff; border-radius: 20px; box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08); padding: 36px 40px 40px; position: relative; z-index: 2; border: 1px solid #e2e8f0; }

/* Верхняя полоса и счетчик */
.quiz-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.quiz-badge { background: #0f172a; color: #f8fafc; border: 1px solid #334155; font-size: 13px; font-weight: 800; padding: 5px 14px; border-radius: 20px; letter-spacing: 0.4px; text-transform: uppercase; box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15); }
.quiz-counter { font-size: 14px; font-weight: 700; color: #94a3b8; letter-spacing: 0.5px; }

.quiz-progress-track { height: 6px; background: #f1f5f9; border-radius: 6px; overflow: hidden; margin-bottom: 28px; }
.quiz-progress-bar { height: 100%; width: 20%; background: #1d4ed8; border-radius: 6px; transition: width 0.3s ease; }

/* Шаги квиза */
.quiz-step { display: none; }
.quiz-step.active { display: block; animation: quizFadeIn 0.25s ease-out; }
.quiz-branch-content { display: none; }
.quiz-branch-content.active { display: block; animation: quizFadeIn 0.2s ease-out; }
@keyframes quizFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.quiz-title { font-size: 24px; font-weight: 800; color: #0f172a; text-align: center; margin: 0 0 8px; letter-spacing: -0.3px; line-height: 32px; }
.quiz-subtitle { font-size: 18px; color: #28292b; text-align: center; margin: 0 auto 28px; max-width: 680px; line-height: 24px; font-family: qam;}

/* Сетка карточек с фото */
.quiz-grid { display: grid; gap: 16px; margin-bottom: 24px; }
.quiz-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 680px; margin-left: auto; margin-right: auto; }
.quiz-grid-4 { grid-template-columns: repeat(4, 1fr); }

.quiz-card-opt { background: #ffffff; border: 2px solid #e2e8f0; border-radius: 14px; padding: 12px; cursor: pointer; transition: all 0.2s ease; display: flex; flex-direction: column; position: relative; user-select: none; }
.quiz-card-opt:hover { border-color: #3b82f6; transform: translateY(-3px); box-shadow: 0 8px 24px rgba(29, 78, 216, 0.12); }
.quiz-card-opt.selected { border-color: #1d4ed8; background: #f8fafc; box-shadow: 0 8px 24px rgba(29, 78, 216, 0.16); }

.quiz-card-thumb { position: relative; width: 100%; height: 160px; border-radius: 10px; overflow: hidden; margin-bottom: 12px; background: #e2e8f0; }
.quiz-grid-2 .quiz-card-thumb { height: 190px; }
.quiz-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.quiz-card-opt:hover .quiz-card-thumb img { transform: scale(1.03); }

/* Компактный аккуратный чекпоинт в левом верхнем углу фото */
.quiz-check-badge { position: absolute; top: 8px; left: 8px; width: 16px; height: 16px; border-radius: 50%; background: rgba(15, 23, 42, 0.45); border: 1.5px solid rgba(255, 255, 255, 0.85); display: flex; align-items: center; justify-content: center; transition: all 0.15s ease; z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,0.25); }
.quiz-check-badge svg { width: 9px; height: 9px; opacity: 0; transition: opacity 0.12s ease; }
.quiz-card-opt.selected .quiz-check-badge { background: #16a34a; border-color: #16a34a; }
.quiz-card-opt.selected .quiz-check-badge svg { opacity: 1; stroke: #ffffff; stroke-width: 3.5; }

.quiz-card-label { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 4px; text-align: center; }
.quiz-card-desc { font-size: 15px; color: #615f5f; text-align: center; line-height: 19px; font-family: qam;font-weight: bold;border: 1px solid;}

/* Список радио-кнопок для текстовых шагов */
.quiz-radio-list { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin: 0 auto 24px; }
.quiz-radio-item { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 2px solid #e2e8f0; border-radius: 12px; cursor: pointer; transition: all 0.15s ease; background: #ffffff; user-select: none; }
.quiz-radio-item:hover { border-color: #3b82f6; background: #f8fafc; }
.quiz-radio-item.selected { border-color: #1d4ed8; background: #eff6ff; }

.quiz-radio-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cbd5e1; background: #ffffff; flex-shrink: 0; position: relative; transition: all 0.15s ease; }
.quiz-radio-item.selected .quiz-radio-dot { border-color: #1d4ed8; background: #1d4ed8; }
.quiz-radio-item.selected .quiz-radio-dot::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #ffffff; top: 5px; left: 5px; }

.quiz-radio-info { display: flex; flex-direction: column; }
.quiz-radio-title { font-size: 16px; font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.quiz-radio-sub { font-size: 15px; color: #101011; line-height: 21px; }

/* Сводка параметров на финале */
.quiz-summary-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px; padding: 18px 20px; margin: 0 auto 20px; max-width: 620px; text-align: left; }
.quiz-summary-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 8px; }
.quiz-summary-title { font-size: 13px; font-weight: 800; color: #1e293b; text-transform: uppercase; letter-spacing: 0.5px; }
.quiz-summary-edit-btn { background: transparent; border: none; color: #1d4ed8; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }
.quiz-summary-edit-btn:hover { color: #1e40af; text-decoration: none; }
.quiz-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.quiz-sum-item { background: #ffffff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.quiz-sum-label { font-size: 17px; color: #64748b; }
.quiz-sum-val { font-size: 13px; font-weight: 700; color: #0f172a; line-height: 18px; word-break: break-word; }

/* Подсказка со ссылкой на онлайн-конструктор */
.quiz-calculator-hint { display: flex; align-items: center; gap: 12px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 14px 18px; margin: 0 auto 18px; max-width: 620px; text-align: left; }
.quiz-calc-hint-icon { flex-shrink: 0; }
.quiz-calc-hint-text { font-size: 17px; line-height: 20px; color: #1e3a8a; }
.quiz-calc-link { display: inline-block; font-weight: 700; color: #1d4ed8; text-decoration: underline; margin-top: 3px; }
.quiz-calc-link:hover { color: #1e40af; }

/* Пояснение о сути заявки */
.quiz-call-notice { display: flex; gap: 12px; align-items: flex-start; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 18px; margin: 0 auto 20px; max-width: 620px; text-align: left; }
.quiz-call-notice-icon { flex-shrink: 0; margin-top: 2px; }
.quiz-call-notice-text { font-size: 18px; line-height: 20px; color: #475569; margin: 0; font-family: qam;}

/* Финальный шаг */
.quiz-final-form { max-width: 620px; margin: 0 auto; }
.quiz-contact-inputs { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 16px; padding: 24px; }

/* Выбор мессенджера */
.quiz-messenger-picker { margin-bottom: 20px; }
.quiz-picker-label { display: block; font-size: 13px; font-weight: 700; color: #475569; margin-bottom: 10px; }
.quiz-msg-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quiz-msg-btn { background: #ffffff; border: 2px solid #e2e8f0; border-radius: 10px; padding: 10px 8px; font-size: 13px; font-weight: 700; color: #334155; text-align: center; cursor: pointer; transition: all 0.15s ease; user-select: none; }
.quiz-msg-btn:hover { border-color: #3b82f6; color: #1d4ed8; }
.quiz-msg-btn.selected { border-color: #1d4ed8; background: #1d4ed8; color: #ffffff; }

/* Поле ввода телефона и кнопка */
.quiz-phone-field { display: flex; gap: 10px; margin-bottom: 12px; }
.quiz-phone-input { flex: 1; border: 2px solid #cbd5e1; border-radius: 10px; padding: 14px 16px; font-size: 16px; font-weight: 600; color: #0f172a; outline: none; transition: border-color 0.15s ease; background: #ffffff; }
.quiz-phone-input:focus { border-color: #1d4ed8; box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12); }
.quiz-submit-btn { background: #1d4ed8; border: none; color: #ffffff; padding: 14px 22px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background 0.15s ease; white-space: nowrap; }
.quiz-submit-btn:hover { background: #1e40af; }
.quiz-privacy-note { font-size: 19px; color: #94a3b8; text-align: center; margin: 0; line-height: 16px; }

/* Экран благодарности */
.quiz-success-box { text-align: center; padding: 32px 16px 20px; }
.quiz-success-icon { width: 64px; height: 64px; border-radius: 50%; background: #dcfce7; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.quiz-success-icon svg { width: 36px; height: 36px; }
.quiz-btn-restart { background: #f1f5f9; border: 1px solid #cbd5e1; color: #475569; padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.quiz-btn-restart:hover { background: #e2e8f0; color: #0f172a; }

/* Полоска внизу по ширине как 2 колонки по центру (Пройти опрос) */
.quiz-start-bar-wrap { margin: 0 auto 16px; }
.quiz-card-opt--wide { padding: 14px 22px; border: 1px solid #1e293b; border-radius: 14px; cursor: pointer; transition: all 0.2s ease; background: #0f172a; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; text-decoration: none; user-select: none; box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18); }
.quiz-card-opt--wide:hover { border-color: #334155; background: #1e293b; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.3); }
.quiz-card-opt--wide.selected { border-color: #16a34a; background: #111d2e; }
.quiz-wide-text { display: flex; flex-direction: column; text-align: left; }
.quiz-wide-title { font-size: 17px; font-weight: 900; color: #ffffff; margin-bottom: 4px; letter-spacing: 0.2px; }
.quiz-wide-sub { font-size: 14px; color: #94a3b8; line-height: 20px; }
.quiz-wide-btn-tag { display: inline-flex; align-items: center; gap: 6px; background: #16a34a; color: #ffffff; padding: 8px 18px; border-radius: 8px; font-size: 14px; font-weight: 800; flex-shrink: 0; box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35); transition: background 0.15s ease; }
.quiz-card-opt--wide:hover .quiz-wide-btn-tag { background: #22c55e; }

/* Нижняя панель навигации */
.quiz-nav-actions { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid #f1f5f9; }
.quiz-btn-prev { height: 44px; padding: 0 18px; background: #ffffff; border: 1px solid #cbd5e1; color: #475569; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; font-weight: 700; transition: all 0.15s ease; flex-shrink: 0; }
.quiz-btn-prev:hover:not(:disabled) { border-color: #1d4ed8; color: #1d4ed8; background: #eff6ff; }
.quiz-btn-prev:disabled { opacity: 0.35; cursor: not-allowed; }
.quiz-btn-next { background: #1d4ed8; border: none; color: #ffffff; height: 44px; padding: 0 28px; border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background 0.15s ease; box-shadow: 0 4px 14px rgba(29, 78, 216, 0.28); }
.quiz-btn-next:hover { background: #1e40af; }

.quiz-hidden-input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }

/* Адаптивность: Desktop-First (только max-width) */
@media (max-width: 900px) {
    .quiz-card { padding: 28px 20px 28px; }
    .quiz-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .quiz-deco-arrow { display: none; }
}

@media (max-width: 640px) {
    .quiz-section { padding: 32px 10px 40px; }
    .quiz-card { padding: 22px 14px 24px; border-radius: 14px; }
    .quiz-title { font-size: 20px; line-height: 27px; }
    .quiz-subtitle { font-size: 15px; line-height: 21px; margin-bottom: 20px; }
    .quiz-card-desc { font-size: 13px; line-height: 18px; }
    .quiz-radio-sub { font-size: 14px; line-height: 19px; }
    .quiz-grid-2 { grid-template-columns: 1fr; }
    .quiz-grid-4 { grid-template-columns: 1fr; }
    .quiz-summary-grid { grid-template-columns: 1fr; }
    .quiz-calculator-hint { flex-direction: column; align-items: flex-start; gap: 8px; }
    .quiz-call-notice { flex-direction: column; gap: 8px; }
    .quiz-phone-field { flex-direction: column; }
    .quiz-submit-btn { justify-content: center; }
    .quiz-nav-actions { justify-content: center; }
    .quiz-btn-next { flex: 1; max-width: 280px; justify-content: center; }
    .quiz-card-opt--wide { flex-direction: column; align-items: stretch; padding: 14px 16px; gap: 12px; }
    .quiz-wide-text { width: 100%; text-align: left; }
    .quiz-wide-title { font-size: 16px; line-height: 22px; }
    .quiz-wide-sub { font-size: 13.5px; line-height: 19px; }
    .quiz-wide-btn-tag { width: 100%; justify-content: center; padding: 10px 16px; box-sizing: border-box; }
}

