/* Квиз «Подобрать дом» — карточка справа внизу, на телефоне — шторка снизу */
.mqz, .mqz-launch, .mqz button, .mqz input { font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; }
.mqz {
  position: fixed; right: 24px; bottom: 24px; z-index: 70; width: 380px; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column; background: #fff; color: #16211c; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(14, 30, 20, .28); overflow: hidden;
  opacity: 0; transform: translateY(24px) scale(.98); transition: opacity .26s, transform .26s;
}
.mqz.is-in { opacity: 1; transform: none; }
.mqz[hidden] { display: none; }
.mqz__close {
  position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%;
  background: #f1f3f1; color: #55635c; font-size: 20px; line-height: 1; cursor: pointer;
}
.mqz__close:hover { background: #e4e8e4; color: #16211c; }
.mqz__head { display: flex; align-items: center; gap: 12px; padding: 18px 56px 14px 20px; }
.mqz__head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: #eef2ea; }
.mqz__head b { display: block; font-size: 15px; font-weight: 700; }
.mqz__head span { display: block; font-size: 12px; color: #6b7871; }
.mqz__bar { height: 3px; background: #edf0ed; margin: 0 20px; border-radius: 2px; overflow: hidden; }
.mqz__bar i { display: block; height: 100%; width: 0; background: #94c11f; transition: width .3s; }
.mqz__body { padding: 18px 20px 8px; overflow-y: auto; flex: 1 1 auto; }
.mqz__body h3 { margin: 0 0 6px; font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.mqz__note { margin: 0 0 16px; font-size: 14px; line-height: 1.45; color: #55635c; }
.mqz__opts { display: grid; gap: 8px; }
.mqz__opts--cards { grid-template-columns: 1fr 1fr; gap: 10px; }
.mqz__opt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px; text-align: left;
  border: 1px solid #dfe4e0; border-radius: 12px; background: #fff; color: #16211c; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.mqz__opt i { flex: 0 0 18px; height: 18px; border: 2px solid #c5cdc7; border-radius: 50%; transition: border .15s; }
.mqz__opt:hover, .mqz__card:hover { border-color: #94c11f; }
.mqz__opt.is-on { border-color: #94c11f; background: #f5f9ea; }
.mqz__opt.is-on i { border: 5px solid #94c11f; }
.mqz__card {
  display: flex; flex-direction: column; padding: 0; border: 1px solid #dfe4e0; border-radius: 12px; overflow: hidden;
  background: #f6f7f5; cursor: pointer; text-align: left; color: #16211c; transition: border-color .15s, box-shadow .15s;
}
.mqz__card img, .mqz__q { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.mqz__q { display: grid; place-items: center; font-size: 54px; font-weight: 800; color: #c9d1cb; background: #eef1ee; }
.mqz__card > span:last-child { padding: 10px 12px; font-size: 14px; font-weight: 600; }
.mqz__card.is-on { border-color: #94c11f; box-shadow: 0 0 0 2px #94c11f inset; }
.mqz--shake { animation: mqz-shake .36s; }
@keyframes mqz-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.mqz__form { display: grid; gap: 10px; }
.mqz__form input[name=name], .mqz__form input[name=phone] {
  width: 100%; padding: 13px 14px; border: 1px solid #dfe4e0; border-radius: 12px; font-size: 16px; color: #16211c; background: #fff;
}
.mqz__form input:focus { outline: 2px solid #94c11f; outline-offset: -1px; border-color: #94c11f; }
.mqz__via { display: flex; gap: 6px; }
.mqz__via label { flex: 1; }
.mqz__via input { position: absolute; opacity: 0; pointer-events: none; }
.mqz__via span {
  display: block; padding: 10px 6px; text-align: center; border: 1px solid #dfe4e0; border-radius: 10px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.mqz__via input:checked + span { border-color: #94c11f; background: #f5f9ea; }
.mqz__via input:focus-visible + span { outline: 2px solid #94c11f; }
.mqz__trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.mqz__agree { display: flex; gap: 8px; font-size: 11.5px; line-height: 1.4; color: #6b7871; }
.mqz__agree input { flex: 0 0 auto; margin-top: 2px; accent-color: #94c11f; }
.mqz__agree a { color: #6f9312; }
.mqz__status { margin: 0; min-height: 18px; font-size: 13px; color: #b0412e; }
.mqz__foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid #eef0ee; }
.mqz__foot[hidden] { display: none; }
.mqz__count { flex: 1; font-size: 12px; color: #6b7871; }
.mqz__back {
  width: 46px; height: 46px; border: 1px solid #dfe4e0; border-radius: 12px; background: #fff; font-size: 18px; color: #55635c; cursor: pointer;
}
.mqz__back:disabled { opacity: .4; cursor: default; }
.mqz__next {
  height: 46px; padding: 0 22px; border: 0; border-radius: 12px; background: #94c11f; color: #12200a;
  font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s;
}
.mqz__next:hover { background: #a6d12c; }
.mqz__next:disabled { opacity: .6; }
.mqz__done { text-align: center; padding: 18px 0 14px; }
.mqz__done > span {
  display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 12px; border-radius: 50%;
  background: #f0f7dc; color: #6f9312; font-size: 28px; font-weight: 800;
}
.mqz__ok { width: 100%; margin-top: 6px; }
/* кнопка повторного открытия — слева внизу, чтобы не спорить с кругом «6%» справа */
.mqz-launch {
  position: fixed; left: 20px; bottom: 20px; z-index: 39; display: grid; gap: 1px; text-align: left;
  padding: 11px 18px 11px 46px; border: 0; border-radius: 999px; background: #16211c; color: #fff; cursor: pointer;
  box-shadow: 0 10px 28px rgba(14, 30, 20, .3); transition: transform .18s;
}
.mqz-launch::before {
  content: ''; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: #94c11f; box-shadow: 0 0 0 0 rgba(148, 193, 31, .6); animation: mqz-pulse 2.4s infinite;
}
.mqz-launch b { font-size: 14px; font-weight: 700; }
.mqz-launch span { font-size: 11px; color: #b9c4bd; }
.mqz-launch:hover { transform: translateY(-2px); }
.mqz-launch[hidden] { display: none; }
@keyframes mqz-pulse { 70% { box-shadow: 0 0 0 10px rgba(148, 193, 31, 0); } 100% { box-shadow: 0 0 0 0 rgba(148, 193, 31, 0); } }
/* пока виден баннер cookie или открыт квиз — кнопку и круг «6%» прячем */
body:has(.mgw-cookie:not([hidden])) .mqz-launch { display: none; }
body.mqz-open .mgw-orbit { opacity: 0; pointer-events: none; }
@media (max-width: 640px) {
  .mqz { left: 0; right: 0; bottom: 0; width: auto; max-height: 88vh; border-radius: 20px 20px 0 0; }
  .mqz__body h3 { font-size: 19px; }
  .mqz-launch { left: 12px; bottom: 12px; padding: 9px 14px 9px 40px; }
  .mqz-launch::before { left: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .mqz, .mqz__bar i { transition: none; }
  .mqz-launch::before, .mqz--shake { animation: none; }
}

/* «Выгодные предложения» на главной: карточки — тёмно-зелёный металлик, как карточки оплаты */
.mqz-promo__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-bottom: 36px; }
.mqz-promo__head p { margin: 14px 0 0; max-width: 720px; color: #55635c; font-size: 17px; line-height: 1.6; }
.mqz-promo__all {
  flex: 0 0 auto; background: none; border: 0; padding: 8px 0; color: #16211c; font: 700 20px/1.2 'Manrope', system-ui, sans-serif; cursor: pointer; white-space: nowrap;
}
.mqz-promo__all span { display: inline-block; margin-left: 8px; color: #6f9312; transition: transform .18s; }
.mqz-promo__all:hover span { transform: translateX(4px); }
.mqz-promo__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mqz-promo__card {
  position: relative; display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; color: #fff; text-decoration: none;
  background:
    linear-gradient(140deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 38%),
    linear-gradient(145deg, #2c4a30 0%, #1d3321 42%, #35553a 68%, #15241a 100%);
  box-shadow: 0 14px 34px rgba(12, 24, 15, .28), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .25s, box-shadow .25s;
}
.mgw .mqz-promo__card { color: #fff; text-decoration: none; }
.mqz-promo__card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.14) 48%, transparent 58%);
  transform: translateX(-30%); transition: transform .9s ease;
}
.mqz-promo__card:hover { transform: translateY(-6px); box-shadow: 0 22px 46px rgba(12, 24, 15, .38), inset 0 1px 0 rgba(255,255,255,.18); }
.mqz-promo__card:hover::after { transform: translateX(30%); }
.mqz-promo__img { display: block; margin: 10px 10px 0; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; background: #24342b; box-shadow: 0 0 0 1px rgba(255,255,255,.10); }
.mqz-promo__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.mqz-promo__card:hover .mqz-promo__img img { transform: scale(1.05); }
.mqz-promo__body { position: relative; z-index: 1; display: grid; gap: 10px; padding: 18px 20px 22px; }
.mqz-promo__tag {
  justify-self: start; display: flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; font-size: 13px; color: #d7ea9f;
  background: linear-gradient(150deg, rgba(255,255,255,.18), rgba(255,255,255,.04)); box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.mqz-promo__tag::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #94c11f; }
.mqz-promo__body b { font-size: 17px; line-height: 1.4; font-weight: 700; color: #fff; }
@media (max-width: 1100px) { .mqz-promo__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
  .mqz-promo__head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .mqz-promo__head p { font-size: 15px; }
  .mqz-promo__all { font-size: 17px; }
  .mqz-promo__grid { grid-template-columns: 1fr; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { .mqz-promo__card, .mqz-promo__card::after, .mqz-promo__img img { transition: none; } }

/* «Скачать список документов» на странице ипотеки */
.mqz-docs-wrap { padding-top: 0; }
.mqz-docs {
  display: flex; align-items: center; gap: 28px; padding: 28px 32px; border: 1px solid #dfe4e0; border-radius: 16px; background: #f4f3ef;
}
.mqz-docs__icon { flex: 0 0 auto; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 18px; background: #fff; color: #6f9312; }
.mqz-docs__text { flex: 1 1 auto; display: grid; gap: 6px; }
.mqz-docs__text b { font-size: 20px; line-height: 1.3; }
.mqz-docs__text span { font-size: 15px; color: #55635c; line-height: 1.5; }
.mqz-docs__form { flex: 0 0 380px; display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; }
.mqz-docs__form input[name=phone] {
  min-width: 0; padding: 0 16px; height: 52px; border: 1px solid #dfe4e0; border-radius: 12px; font: 400 16px 'Manrope', system-ui, sans-serif; background: #fff; color: #16211c;
}
.mqz-docs__form input[name=phone]:focus { outline: 2px solid #94c11f; outline-offset: -1px; }
.mqz-docs__form .mgw-btn { height: 52px; white-space: nowrap; }
.mqz-docs__agree { grid-column: 1 / -1; display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: #6b7871; line-height: 1.4; }
.mqz-docs__agree input { accent-color: #94c11f; margin-top: 1px; }
.mqz-docs__agree a { color: #6f9312; }
.mqz-docs__status { grid-column: 1 / -1; margin: 0; min-height: 0; font-size: 13px; color: #4e6a12; }
.mqz-docs__status:empty { display: none; }
@media (max-width: 1000px) {
  .mqz-docs { flex-wrap: wrap; }
  .mqz-docs__form { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .mqz-docs { padding: 22px 18px; gap: 16px; }
  .mqz-docs__icon { width: 60px; height: 60px; }
  .mqz-docs__text b { font-size: 18px; }
  .mqz-docs__form { grid-template-columns: 1fr; }
}

/* «Фундамент под ключ»: коллаж плит справа на первом экране */
.mgw-film__media.mqz-fund {
  left: auto; width: 54%; padding: 22px 22px 22px 0;
  display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 12px;
}
.mqz-fund__tile { position: relative; margin: 0; overflow: hidden; border-radius: 18px; background: #24342b; }
.mqz-fund__tile--1 { grid-row: 1 / 3; }
.mgw-film__media.mqz-fund .mqz-fund__tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: mqz-fund-zoom 22s ease-in-out infinite alternate; }
.mqz-fund__tile--2 img { animation-delay: -7s !important; }
.mqz-fund__tile--3 img { animation-delay: -14s !important; }
@keyframes mqz-fund-zoom { from { transform: scale(1.02); } to { transform: scale(1.1) translateX(-1.5%); } }
/* текст слева на сплошном тёмном фоне, к коллажу — мягкий переход */
.mgw-film:has(.mqz-fund)::before {
  background: linear-gradient(90deg, #1D2B24 0%, #1D2B24 44%, rgba(29,43,36,.55) 52%, rgba(29,43,36,.08) 64%, rgba(29,43,36,0) 100%);
}
@media (max-width: 1100px) {
  .mgw-film__media.mqz-fund { width: 100%; padding: 0; gap: 4px; }
  .mqz-fund__tile { border-radius: 0; }
  .mgw-film:has(.mqz-fund)::before { background: linear-gradient(180deg, rgba(14,24,18,.78) 0%, rgba(14,24,18,.88) 60%, rgba(14,24,18,.94) 100%); }
}
@media (prefers-reduced-motion: reduce) { .mgw-film__media.mqz-fund .mqz-fund__tile img { animation: none; } }

/* Окно «Полный каталог проектов» — по центру, затемнение фона */
.mqz-cat { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(12, 20, 16, .55); opacity: 0; transition: opacity .22s; font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif; }
.mqz-cat.is-in { opacity: 1; }
.mqz-cat[hidden] { display: none; }
.mqz-cat__box { position: relative; display: grid; grid-template-columns: 300px 1fr; width: min(760px, 100%); background: #fff; color: #16211c; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(14, 30, 20, .35); transform: translateY(14px); transition: transform .22s; }
.mqz-cat.is-in .mqz-cat__box { transform: none; }
.mqz-cat__img { background: #1d2b24 url('katalog-cover.webp?v=2') center / cover; min-height: 380px; }
.mqz-cat__body { padding: 34px 32px 26px; }
.mqz-cat__tag { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; background: #94c11f; color: #12200a; padding: 5px 11px; border-radius: 99px; }
.mqz-cat__body h3 { margin: 14px 0 10px; font-size: 26px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
.mqz-cat__body p { margin: 0 0 18px; font-size: 14.5px; line-height: 1.5; color: #55635c; }
.mqz-cat__form { display: grid; gap: 10px; }
.mqz-cat__form input[name=phone] { height: 52px; padding: 0 16px; border: 1px solid #dfe4e0; border-radius: 12px; font: 600 16px/1 inherit; font-family: inherit; color: #16211c; }
.mqz-cat__form input[name=phone]:focus { outline: 2px solid #94c11f; outline-offset: -1px; }
.mqz-cat__form button[type=submit] { height: 52px; border: 0; border-radius: 12px; background: #94c11f; color: #12200a; font: 800 15px/1 inherit; font-family: inherit; cursor: pointer; }
.mqz-cat__form button[type=submit]:hover { background: #a3d12a; }
.mqz-cat__form button:disabled { opacity: .6; }
.mqz-cat__form .mqz__status { margin: 0; min-height: 18px; font-size: 13px; color: #55635c; }
.mqz-cat__close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 34px; height: 34px; border: 0; border-radius: 50%; background: #f1f3f1; color: #55635c; font-size: 20px; line-height: 1; cursor: pointer; }
.mqz-promo__cat { margin-left: 18px; }
@media (max-width: 720px) {
  .mqz-cat { align-items: end; padding: 0; }
  .mqz-cat__box { grid-template-columns: 1fr; border-radius: 22px 22px 0 0; }
  .mqz-cat__img { min-height: 150px; }
  .mqz-cat__body { padding: 22px 20px 20px; }
  .mqz-cat__body h3 { font-size: 22px; }
  .mqz-promo__cat { margin: 10px 0 0; }
}
