/* Мини-квиз «Подбор за 3 клика» на главной (inc/quiz-mini.php). Префикс qm-. */
/* Фон блока - фото холла студии из пула (img/studio/lobby.webp) под тёплой тёмной вуалью; слева список вариантов, справа карточка «Вам подойдёт», всё на матовом стекле. */
.qm { position: relative; isolation: isolate; overflow: hidden; margin: 56px 0 0; padding: 64px 0; background: #1E130A url(../img/studio/lobby.webp) 50% 62% / cover no-repeat; }
.qm::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(60% 90% at 4% 100%, rgba(248, 116, 0, .42), rgba(248, 116, 0, 0) 70%), linear-gradient(100deg, rgba(24, 14, 7, .9) 0%, rgba(24, 14, 7, .6) 40%, rgba(24, 14, 7, .16) 100%); }
.qm-wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.qm-card { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 36px; align-items: stretch; position: relative; }
.qm-pitch { position: relative; display: flex; flex-direction: column; gap: 14px; justify-content: center; color: #fff; }
.qm-kick { align-self: flex-start; padding: 7px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .34); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #FFD9B0; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.qm-title { margin: 0; font-size: clamp(28px, 3vw, 38px); line-height: 1.04; font-weight: 800; text-transform: uppercase; color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .35); }
.qm-title span { color: #FF9B3D; }
.qm-sub { margin: 0; font-size: 15px; line-height: 1.6; color: rgba(255, 255, 255, .86); }
.qm-dots { display: flex; gap: 6px; margin-top: 4px; }
.qm-dots i { width: 26px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .3); transition: background .25s, width .25s; }
.qm-dots i.is-on { background: #F87400; width: 38px; }
.qm-dots i[hidden] { display: none; }
.qm-trust { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, .9); }
.qm-trust li { display: flex; align-items: center; gap: 8px; }
.qm-trust svg { flex: none; color: #FF9B3D; }

.qm-play { position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; justify-content: center; padding: 22px 24px 24px; border-radius: 28px; background: rgba(255, 255, 255, .86); border: 1px solid rgba(255, 255, 255, .75); box-shadow: 0 24px 64px rgba(10, 5, 0, .38); backdrop-filter: blur(6px) saturate(1.15); -webkit-backdrop-filter: blur(6px) saturate(1.15); }
.qm-bar { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.qm-back { display: inline-flex; align-items: center; gap: 4px; padding: 7px 14px 7px 8px; border: 1px solid #EBDCCB; border-radius: 999px; background: #fff; font: inherit; font-size: 13.5px; font-weight: 700; color: #5E5750; cursor: pointer; transition: border-color .15s, color .15s; }
.qm-back:hover { border-color: #F87400; color: #F87400; }
.qm-back[hidden] { display: none; }
.qm-q { margin: 0; font-size: 21px; line-height: 1.2; font-weight: 800; }
.qm-step { margin-left: auto; flex: none; font-size: 12.5px; font-weight: 700; color: #8A7A6B; white-space: nowrap; }

.qm-main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 18px; align-items: stretch; min-height: 400px; }
.qm-opts { display: flex; flex-direction: column; gap: 7px; align-content: start; animation: qm-in .35s cubic-bezier(.2, .8, .2, 1); }
.qm-card[data-view="zone"] .qm-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 7px; }
@keyframes qm-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.qm-opt { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 12px 6px 14px; border-radius: 14px; border: 1.5px solid #F0DFCB; background: #fff; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.25; color: #1B1B1B; text-align: left; text-decoration: none; cursor: pointer; transition: border-color .16s, box-shadow .16s, background .16s; }
/* крупные строки для трёх направлений и подкатегорий: иконка в круге, название и короткая подпись; делят высоту списка поровну */
.qm-opt--big { flex: 1; min-height: 76px; gap: 14px; padding: 10px 14px 10px 14px; border-radius: 18px; }
.qm-opt--big .qm-ic { width: 46px; height: 46px; border-radius: 50%; background: #FFF1E3; }
.qm-opt--big .qm-lb { display: flex; flex-direction: column; gap: 3px; }
.qm-opt--big .qm-lb b { font-size: 17px; font-weight: 800; line-height: 1.2; }
.qm-opt--big .qm-lb small { font-size: 13px; font-weight: 500; line-height: 1.35; color: #7A6A5B; }
.qm-opt--big.is-active .qm-ic { background: #F87400; color: #fff; }
.qm-opt:focus-visible { outline: 2px solid #F87400; outline-offset: 2px; }
.qm-opt.is-active { border-color: #F87400; box-shadow: 0 8px 20px rgba(248, 116, 0, .16); }
.qm-ic { flex: none; display: flex; align-items: center; justify-content: center; color: #F87400; }
.qm-lb { flex: 1; min-width: 0; }
.qm-ch { flex: none; display: flex; color: #C9B9A8; transform: rotate(180deg); transition: color .16s, transform .16s; }
.qm-opt.is-active .qm-ch { color: #F87400; transform: rotate(180deg) translateX(2px); }
.qm-opt[data-all] { background: #1B1B1B; border-color: #1B1B1B; color: #fff; }
.qm-opt[data-all].is-active { border-color: #F87400; }

.qm-pv { display: flex; flex-direction: column; min-width: 0; border-radius: 22px; background: #FFF4E8; overflow: hidden; border: 1px solid #F6DFC6; animation: qm-pop .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes qm-pop { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.qm-pv-ph { position: relative; flex: none; height: 168px; background: #E8D6C2; }
.qm-pv-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qm-pv-tag { position: absolute; left: 12px; bottom: 12px; padding: 5px 11px; border-radius: 999px; background: #F87400; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.qm-pv-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; }
.qm-pv-h { margin: 0; font-size: 18px; line-height: 1.2; font-weight: 800; color: #1B1B1B; }
.qm-pv-s { margin: 0; font-size: 14px; line-height: 1.45; color: #6B5848; }
.qm-pv-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.qm-pv-chips span { padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid #F0DFCB; font-size: 12.5px; font-weight: 600; color: #3A2E24; }
.qm-pv-get { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; font-weight: 700; color: #3A2E24; }
.qm-pv-get li { display: flex; align-items: center; gap: 5px; }
.qm-pv-get svg { color: #F87400; }
.qm-pv [hidden] { display: none; }
.qm-pv-ph img { transition: opacity .2s; }
.qm-pv-cta { margin-top: auto; }
.qm-pv-cta:empty { display: none; }
.qm-pv-cta .qm-cta { margin-top: 0; }
.qm-pv-promo { margin: 0; align-self: flex-start; padding: 4px 10px; border-radius: 8px; background: #1B1B1B; color: #FFD9B0; font-size: 12.5px; font-weight: 700; }
.qm-cta { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #FF8A1F 0%, #F87400 55%, #E05F00 100%); box-shadow: 0 10px 22px rgba(248, 116, 0, .32); color: #fff; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform .16s, box-shadow .16s; }
.qm-cta:hover { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(248, 116, 0, .4); }
.qm-cta .qm-ch { color: #fff; transform: rotate(180deg); }

/* шаг зон: можно отметить несколько; справа карточка с суммой и выгодными предложениями вместо фото */
.qm-card[data-view="zone"] .qm-main { min-height: 452px; }
.qm-opt--z { gap: 8px; padding-right: 10px; }
.qm-zp { flex: none; font-size: 12.5px; font-weight: 600; color: #8A7A6B; white-space: nowrap; }
.qm-ck { flex: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #D9C7B3; background: #fff; position: relative; transition: background .16s, border-color .16s; }
.qm-ck::after { content: ""; position: absolute; left: 5.5px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0); transition: transform .16s; }
.qm-opt--z:hover { border-color: #F5C697; }
.qm-opt--z.is-on { border-color: #F87400; background: #FFF4E8; }
.qm-opt--z.is-on .qm-ck { background: #F87400; border-color: #F87400; }
.qm-opt--z.is-on .qm-ck::after { transform: rotate(45deg) scale(1); }
.qm-pv--sel .qm-pv-ph, .qm-pv--sel .qm-pv-get { display: none; }
.qm-pv--sel { overflow-y: auto; }
.qm-pv--sel .qm-pv-body { padding-top: 18px; }
.qm-pv-of { display: flex; flex-direction: column; gap: 7px; }
.qm-pv-of:empty { display: none; }
.qm-of-h { font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #C25A00; }
/* предложение: выбирается нажатием (кружок слева), у выбранного раскрывается состав */
.qm-of { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 10px 12px; border-radius: 14px; background: #fff; border: 1.5px solid #F0DFCB; font: inherit; text-align: left; color: #1B1B1B; cursor: pointer; transition: border-color .16s, box-shadow .16s, background .16s; }
.qm-of:hover { border-color: #F5C697; }
.qm-of.is-on { border-color: #F87400; background: #FFFBF6; box-shadow: 0 8px 18px rgba(248, 116, 0, .14); }
.qm-of-t { display: flex; align-items: center; gap: 10px; }
.qm-of-t b { flex: 1; min-width: 0; font-size: 14px; font-weight: 800; line-height: 1.25; }
.qm-of-t strong { flex: none; font-size: 14px; font-weight: 800; color: #E05F00; white-space: nowrap; }
.qm-rd { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #D9C7B3; background: #fff; position: relative; transition: border-color .16s; }
.qm-rd::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #F87400; transform: scale(0); transition: transform .16s; }
.qm-of.is-on .qm-rd { border-color: #F87400; }
.qm-of.is-on .qm-rd::after { transform: scale(1); }
.qm-of-more { display: flex; flex-direction: column; gap: 5px; padding-left: 28px; animation: qm-pop .22s cubic-bezier(.2, .8, .2, 1); }
.qm-of-p { font-size: 12.5px; line-height: 1.35; color: #6B5848; }
.qm-of-sv { align-self: flex-start; padding: 2px 8px; border-radius: 6px; background: #E8F6EC; color: #1E7A3C; font-size: 12px; font-weight: 800; }
.qm-of-d { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; line-height: 1.35; color: #3A2E24; }
.qm-of-d li { position: relative; padding-left: 18px; }
.qm-of-d li::before { content: ""; position: absolute; left: 1px; top: 3px; width: 5px; height: 9px; border: solid #F87400; border-width: 0 2px 2px 0; transform: rotate(45deg) scale(.9); }
.qm-of-hint { margin: 0; padding: 12px 14px; border-radius: 14px; border: 1.5px dashed #E8CDB0; font-size: 13.5px; line-height: 1.45; color: #6B5848; }
.qm-cta--ghost { background: #fff; border: 1.5px solid #F87400; color: #E05F00; box-shadow: none; }
.qm-cta--ghost .qm-ch { color: #E05F00; }
.qm-cta--ghost:hover { box-shadow: 0 8px 18px rgba(248, 116, 0, .16); }

/* итог: слева сводка программы, справа форма «Получить программу»; всё внутри блока */
.qm-lead { display: none; flex-direction: column; min-width: 0; padding: 20px 20px 18px; border-radius: 22px; background: #fff; border: 2px solid #F87400; box-shadow: 0 18px 44px rgba(248, 116, 0, .18); animation: qm-pop .28s cubic-bezier(.2, .8, .2, 1); }
.qm-card[data-view="final"] .qm-lead { display: flex; }
.qm-card[data-view="final"] .qm-pv { display: none; }
.qm-form { display: flex; flex-direction: column; gap: 7px; }
.qm-form[hidden] { display: none; }
.qm-free { align-self: flex-start; padding: 4px 11px; border-radius: 999px; background: #E6F6EA; color: #167A35; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; }
.qm-lead-h { margin: 6px 0 0; font-size: 24px; line-height: 1.1; font-weight: 800; color: #1B1B1B; }
.qm-lead-p { margin: 0 0 4px; font-size: 14px; line-height: 1.5; color: #5E5750; }
.qm-lab { font-size: 13px; font-weight: 800; color: #3B352E; margin-top: 4px; }
.qm-in { width: 100%; box-sizing: border-box; min-height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid #E6D6C2; background: #FFFDFB; font: inherit; font-size: 16px; color: #1B1B1B; transition: border-color .15s, box-shadow .15s; }
.qm-in:focus { outline: none; border-color: #F87400; box-shadow: 0 0 0 4px rgba(248, 116, 0, .16); background: #fff; }
.qm-form .hb-ph { display: block; }
.qm-cta--form { margin-top: 8px; width: 100%; }
.qm-cta--form:disabled { opacity: .55; cursor: wait; transform: none; }
.qm-fine { margin: 2px 0 0; font-size: 12px; line-height: 1.45; color: #9A8E81; }
.qm-form .hb-form-error { margin-top: 6px; }
.qm-done { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; flex: 1; text-align: center; }
.qm-done[hidden] { display: none; }
.qm-done-ic { width: 64px; height: 64px; border-radius: 50%; background: #E6F6EA; color: #167A35; display: flex; align-items: center; justify-content: center; animation: qm-tick .5s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes qm-tick { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.qm-done h4 { margin: 0; font-size: 24px; font-weight: 800; }
.qm-done p { margin: 0; font-size: 14.5px; line-height: 1.55; color: #4F483F; }
.qm-again { margin-top: 6px; padding: 10px 22px; border-radius: 999px; border: 1.5px solid #EBDCCB; background: #fff; font: inherit; font-size: 14px; font-weight: 700; color: #5E5750; cursor: pointer; transition: border-color .15s, color .15s; }
.qm-again:hover { border-color: #F87400; color: #F87400; }
.qm-card[data-view="final"] .qm-opts { display: block; }
.qm-sum { display: flex; flex-direction: column; gap: 10px; height: 100%; box-sizing: border-box; padding: 18px 18px 16px; border-radius: 22px; background: #FFF4E8; border: 1px solid #F6DFC6; }
.qm-sum-tag { align-self: flex-start; padding: 5px 11px; border-radius: 999px; background: #F87400; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.qm-sum-h { margin: 0; font-size: 21px; line-height: 1.2; font-weight: 800; color: #1B1B1B; }
.qm-sum-p { margin: 0; font-size: 14px; line-height: 1.5; color: #4F3F32; }
.qm-sum-of { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 16px; background: #fff; border: 1.5px solid #F87400; }
.qm-sum-of .qm-of-t b { font-size: 15px; }
.qm-sum-of .qm-of-t strong { font-size: 16px; }
.qm-sum-dev { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.qm-sum-dev .qm-of-h { flex: 1 0 100%; }
.qm-dev { display: flex; flex-direction: column; gap: 1px; padding: 7px 12px; border-radius: 12px; background: #fff; border: 1px solid #F0DFCB; font-size: 13px; }
.qm-dev small { font-size: 11.5px; color: #8A7A6B; }

.qm-go { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: #C25A00; }
.qm-go[hidden] { display: none; }
.qm-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #F8C99B; border-top-color: #F87400; animation: qm-rot .7s linear infinite; }
@keyframes qm-rot { to { transform: rotate(360deg); } }
.qm-card.is-going .qm-main { opacity: .5; pointer-events: none; }

@media (max-width: 1100px) {
  .qm { margin-top: 40px; padding: 48px 0; background-position: 62% 60%; }
  .qm::before { background: radial-gradient(70% 60% at 0% 100%, rgba(248, 116, 0, .36), rgba(248, 116, 0, 0) 70%), linear-gradient(180deg, rgba(24, 14, 7, .88) 0%, rgba(24, 14, 7, .6) 100%); }
  .qm-card { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .qm-play { padding: 22px 20px; }
  .qm-main { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .qm-pv { display: none; }
  /* на шаге зон карточка с выбором и предложениями остаётся и идёт под списком */
  .qm-card[data-view="zone"] .qm-pv { display: flex; }
  .qm-card[data-view="zone"] .qm-main { min-height: 0; }
  .qm-trust { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
}
@media (max-width: 640px) {
  .qm { margin-top: 28px; padding: 32px 0 28px; }
  .qm-wrap { padding: 0 14px; }
  .qm-card { gap: 16px; }
  .qm-play { padding: 16px 14px 14px; border-radius: 24px; gap: 12px; }
  .qm-sub { display: none; }
  .qm-trust { font-size: 12.5px; }
  .qm-bar { flex-wrap: wrap; row-gap: 4px; }
  .qm-q { font-size: 18px; flex: 1 1 100%; order: 2; }
  .qm-step { order: 1; margin-left: 0; }
  .qm-back { order: 0; }
  .qm-card[data-view="zone"] .qm-opts { grid-template-columns: minmax(0, 1fr); }
  .qm-opt { min-height: 48px; font-size: 14.5px; padding: 6px 10px 6px 12px; gap: 10px; }
  .qm-opt--big { min-height: 72px; gap: 12px; }
  .qm-opt--big .qm-ic { width: 42px; height: 42px; }
  .qm-opt--big .qm-lb b { font-size: 16px; }
  .qm-opt.is-active { box-shadow: none; border-color: #F0DFCB; }
  .qm-opt:active { border-color: #F87400; }
}
@media (prefers-reduced-motion: reduce) {
  .qm-opts, .qm-pv, .qm-spin { animation: none; }
  .qm-opt, .qm-ch, .qm-cta { transition: none; }
}
