/* Квиз «Расчёт сметы» — широкий современный вид (.qz2) */
.qz2 {
  --qz-primary: #7c0a02;
  --qz-soft: rgba(124, 10, 2, .07);
  --qz-ink: #1d1d1f;
  --qz-muted: #6e6e73;
  --qz-line: #e8e6e3;
  --qz-bg: #f7f5f2;
}
.qz2 .quiz-card {
  background: var(--qz-bg) !important; border: 0 !important; box-shadow: none !important;
  border-radius: 28px !important; padding: clamp(20px, 3.5vw, 48px) !important;
}

/* Шапка: заголовок слева, прогресс справа */
.qz2-head {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px 48px;
  align-items: end; margin-bottom: 32px;
}
.qz2 .quiz-header { text-align: left !important; margin-bottom: 0 !important; }
.qz2 .quiz-badge-burgundy {
  border-radius: 999px; font-size: 12px; letter-spacing: .06em; padding: 7px 14px !important;
  background: var(--qz-soft) !important; color: var(--qz-primary) !important;
}
.qz2 .quiz-main-title {
  text-transform: none !important; font-size: clamp(26px, 3vw, 40px) !important;
  font-weight: 800 !important; letter-spacing: -.02em; line-height: 1.12; color: var(--qz-ink); margin: 12px 0 10px !important;
}
.qz2 .quiz-subtitle { font-size: 16px; max-width: 640px; margin: 0; }
.qz2 .quiz-progress-wrap { margin-bottom: 0 !important; background: #fff; border-radius: 16px; padding: 16px 18px; }
.qz2 .quiz-progress-bar-bg { height: 8px !important; border-radius: 999px; background: #efebe6 !important; }
.qz2 .quiz-progress-bar { border-radius: 999px; background: var(--qz-primary) !important; transition: width .35s ease; }
@media (max-width: 991.98px) {
  .qz2-head { grid-template-columns: 1fr; gap: 18px; margin-bottom: 24px; }
}

/* Заголовок шага */
.qz2 .quiz-step-title { text-align: left !important; font-size: 20px !important; font-weight: 700 !important; color: var(--qz-ink); margin-bottom: 18px !important; }

/* Карточки вариантов */
.qz2 .quiz-option-card { display: block; cursor: pointer; }
.qz2 .quiz-visual-card, .qz2 .quiz-text-card, .qz2 .quiz-check-card {
  position: relative; background: #fff; border: 2px solid transparent !important;
  border-radius: 18px !important; box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  transition: border-color .15s, box-shadow .2s, transform .2s; overflow: hidden;
}
.qz2 .quiz-option-card:hover .quiz-visual-card,
.qz2 .quiz-option-card:hover .quiz-text-card,
.qz2 .quiz-option-card:hover .quiz-check-card { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .07); }
.qz2 .quiz-option-card input:checked + .quiz-visual-card,
.qz2 .quiz-option-card input:checked + .quiz-text-card,
.qz2 .quiz-option-card input:checked + .quiz-check-card { border-color: var(--qz-primary) !important; box-shadow: 0 10px 24px rgba(124, 10, 2, .1); background: #fff; }
/* галочка у выбранного варианта */
.qz2 .quiz-option-card input[type="radio"]:checked + .card::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--qz-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 15px no-repeat;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}
.qz2 .quiz-card-photo { aspect-ratio: 4 / 3; height: auto !important; border-radius: 0; }
.qz2 .quiz-visual-card .card-body { text-align: left !important; padding: 14px 16px 16px !important; }
.qz2 .quiz-card-title { font-size: 16px; color: var(--qz-ink); }
.qz2 .quiz-card-desc { font-size: 13px; line-height: 1.4; margin-top: 2px; }
.qz2 .quiz-option-card input:checked + .quiz-visual-card .quiz-card-title,
.qz2 .quiz-option-card input:checked + .quiz-text-card .quiz-number-val { color: var(--qz-primary); }

/* Шаг 1: пять вариантов в один ряд на широком экране */
@media (min-width: 1200px) {
  .qz2 [data-step="1"] > .row > [class*="col-"] { flex: 0 0 20%; max-width: 20%; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  .qz2 [data-step="1"] > .row > [class*="col-"] { flex: 0 0 33.333%; max-width: 33.333%; }
}

/* Текстовые варианты (площадь, порода) */
.qz2 .quiz-text-card { text-align: left !important; padding: 22px 20px !important; }
.qz2 .quiz-number-val { font-size: 24px !important; font-weight: 800 !important; color: var(--qz-ink); letter-spacing: -.01em; }
.qz2 .quiz-text-card .fs-5 { font-size: 19px !important; }

/* Чекбоксы доп. услуг */
.qz2 .quiz-check-card { padding: 18px 20px !important; }
.qz2 .quiz-check-indicator { border-radius: 8px; }

/* Шаг 5: контакты */
.qz2 [data-step="5"] > .text-center { text-align: left !important; max-width: 720px; margin: 0 auto 20px; }
.qz2 [data-step="5"] .badge.bg-success { background: #eef7f0 !important; color: #1f7a3a; font-size: 14px !important; font-weight: 600; }
.qz2 [data-step="5"] .col-lg-8 { max-width: 720px; }
.qz2 .quiz-channel-btn { border-radius: 12px !important; font-size: 16px !important; font-weight: 600; background: #fff; }
.qz2 [data-step="5"] .form-control { border-radius: 12px; border-color: var(--qz-line); min-height: 54px; background: #fff; }
.qz2 #quizSubmitBtn { border-radius: 14px !important; text-transform: none !important; font-size: 17px !important; box-shadow: 0 10px 24px rgba(124, 10, 2, .25) !important; }

/* Навигация */
.qz2 .quiz-navigation { border-top: 0 !important; padding-top: 0 !important; margin-top: 28px !important; }
.qz2 #quizNextBtn { border-radius: 14px !important; min-height: 54px; padding-left: 36px !important; padding-right: 36px !important; box-shadow: 0 8px 20px rgba(124, 10, 2, .22); }
.qz2 #quizPrevBtn { border-radius: 14px !important; min-height: 54px; background: #fff; border-color: var(--qz-line) !important; color: var(--qz-ink) !important; }
.qz2 #quizPrevBtn:hover { border-color: #c9c4bd !important; }

/* Экран благодарности */
.qz2 .quiz-success-screen h3 { text-transform: none !important; }

@media (max-width: 575.98px) {
  .qz2 .quiz-card { border-radius: 20px !important; }
  .qz2 .quiz-number-val { font-size: 20px !important; }
  .qz2 .quiz-navigation { position: sticky; bottom: 64px; background: var(--qz-bg); padding: 10px 0 !important; z-index: 2; }
  .qz2 #quizNextBtn { width: 100%; }
}

/* Телефон: варианты первого шага по два в ряд, компактнее */
@media (max-width: 767.98px) {
  .qz2 [data-step="1"] > .row { --bs-gutter-x: 10px; --bs-gutter-y: 10px; }
  .qz2 [data-step="1"] > .row > [class*="col-"] { flex: 0 0 50%; max-width: 50%; }
  .qz2 [data-step="1"] > .row > [class*="col-"]:last-child { flex: 0 0 100%; max-width: 100%; }
  .qz2 [data-step="1"] > .row > [class*="col-"]:last-child .quiz-card-photo { aspect-ratio: 16 / 7; }
  .qz2 .quiz-visual-card .card-body { padding: 10px 12px 12px !important; }
  .qz2 .quiz-card-title { font-size: 14px; }
  .qz2 .quiz-card-desc { font-size: 12px; }
  .qz2 .quiz-option-card input[type="radio"]:checked + .card::after { width: 22px; height: 22px; top: 8px; right: 8px; background-size: 13px; }
  .qz2 [data-step="2"] .row > [class*="col-"], .qz2 [data-step="3"] .row > [class*="col-"] { flex: 0 0 50%; max-width: 50%; }
  .qz2 [data-step="2"] .row, .qz2 [data-step="3"] .row { --bs-gutter-x: 10px; --bs-gutter-y: 10px; }
  .qz2 .quiz-text-card { padding: 14px !important; }
}
