/* Инфинити Хоумс. Палитрата е от самата сграда: бяла мазилка, бетонно сиво, антрацит, оксидно червено.
   Дълбочината идва от три неща: бяло срещу бетон, пластови сенки и елементи, които се застъпват. */
/* Шрифтовете са на нашия адрес (tools/fonts.py), без връзка към Google */
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/geologica-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geologica"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/geologica-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/fonts/onest-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --white: #ffffff;
  --concrete: #e3e6ea;
  --concrete-deep: #cfd4da;
  --ink: #12161b;
  --muted: #47505a;
  --line: #c3c9d0;
  --accent: #a3352c;
  --accent-dark: #842820;
  --r: 12px;
  --head: "Geologica", "Onest", system-ui, "Segoe UI", Arial, sans-serif;
  --body: "Onest", system-ui, "Segoe UI", Arial, sans-serif;
  --pad: clamp(20px, 4.4vw, 64px);
  --lift-1: 0 1px 2px rgba(18, 26, 36, .08), 0 6px 16px -6px rgba(18, 26, 36, .16);
  --lift-2: 0 1px 3px rgba(18, 26, 36, .07), 0 10px 20px -12px rgba(18, 26, 36, .16);
  --lift-3: 0 1px 3px rgba(18, 26, 36, .08), 0 14px 28px -14px rgba(18, 26, 36, .22);
}

/* Български форми на буквите: без това Chrome рисува т/д като m/g. !important, защото font: го нулира. */
*, *::before, *::after { box-sizing: border-box; font-feature-settings: "locl" 0 !important; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font-family: var(--body); font-size: 17.5px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
button { font-family: inherit; }
h1, h2, h3 { font-family: var(--head); font-weight: 600; letter-spacing: -0.025em; line-height: 1.04; text-wrap: balance; }
h1 { font-size: clamp(38px, 4.4vw, 66px); }
.h1-name { display: block; }
.h1-sub { display: block; margin-top: .3em; font-size: .5em; font-weight: 500; letter-spacing: -0.015em; color: var(--muted); }
h2 { font-size: clamp(34px, 4vw, 60px); }
h3 { font-size: 22px; letter-spacing: -0.012em; line-height: 1.15; }
p { color: var(--muted); text-wrap: pretty; }
a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 3px; }

.nb { white-space: nowrap; }
.wrap { width: min(1240px, 100% - 2 * var(--pad)); margin-inline: auto; }

/* Бутони: ъгъл 12px, един запълнен в група */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border-radius: var(--r); border: 1.5px solid transparent; font-family: var(--body); font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .2s, box-shadow .2s; }
.btn-solid { background: var(--accent); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 10px 22px -10px rgba(132, 40, 32, .8); }
.btn-solid:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-line { border-color: var(--ink); color: var(--ink); background: var(--white); }
.btn-line:hover { background: var(--ink); color: #fff; }

/* Горна лента: прозрачна най-горе, плътна след скрол */
.top { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; align-items: center; gap: 36px; height: 88px; padding: 0 var(--pad); transition: background-color .25s, box-shadow .25s; }
.top.scrolled { background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line), 0 14px 30px -22px rgba(18, 26, 36, .5); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
/* Логото на клиента: черен знак със златна сянка. Лека сянка, за да стои и върху снимката на телефон */
.brand-logo { display: block; width: auto; height: 56px; filter: drop-shadow(0 1px 1px rgba(255, 255, 255, .7)) drop-shadow(0 2px 6px rgba(18, 26, 36, .12)); }
.foot-logo { width: auto; height: 44px; }
.nav { display: flex; gap: 28px; }
.nav a { font-size: 15.5px; font-weight: 500; text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--accent); }
.top-cta { min-height: 44px; transition: opacity .2s, visibility .2s; }
.top.at-form .top-cta { opacity: 0; visibility: hidden; }
/* Текст само за екранен четец */
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Езикът: малко падащо меню под бутона за запитване (details/summary, работи и без JS) */
.top-end { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255, 255, 255, .9); font-size: 12.5px; font-weight: 600; letter-spacing: .02em; line-height: 1.3; color: var(--muted); cursor: pointer; user-select: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary { position: relative; }
.lang summary::after { content: ""; position: absolute; inset: -4px -10px -16px; } /* зона около 44 px за пръст */
.lang summary:hover, .lang[open] summary { color: var(--ink); border-color: var(--muted); }
.lang summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.lang .chev { width: 11px; height: 11px; stroke-width: 1.8; transition: transform .2s; }
.lang[open] .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; display: grid; min-width: 150px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--lift-3); }
.lang-menu a { padding: 9px 12px; border-radius: 8px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink); }
.lang-menu a:hover { background: rgba(18, 26, 36, .06); }
.lang-menu a[aria-current] { background: var(--concrete); font-weight: 600; }

/* Начало: бял панел с текста, снимката хвърля сянка върху него, картата с данните стъпва върху двете */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 46fr) minmax(0, 54fr); min-height: max(100svh, 680px); background: linear-gradient(180deg, #f2f4f6 0%, #e4e8ec 100%); }
.hero-text { display: flex; flex-direction: column; justify-content: center; gap: 26px; padding: 120px clamp(28px, 4vw, 72px) 210px var(--pad); }
.lead { font-size: clamp(18px, 1.4vw, 21px); max-width: 30em; color: var(--muted); }
.hero-photo { position: relative; min-height: 520px; background: #cfdde3; box-shadow: -22px 0 44px -24px rgba(18, 26, 36, .28); overflow: hidden; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 66% 40%; animation: settle 1.6s cubic-bezier(.2, .7, .2, 1) both; }
.hero-card { position: absolute; z-index: 3; left: var(--pad); bottom: clamp(36px, 7vh, 72px); display: grid; grid-template-columns: repeat(4, auto); gap: 0; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 4px rgba(18, 26, 36, .1), 0 16px 30px -14px rgba(18, 26, 36, .38); animation: rise .9s .25s cubic-bezier(.2, .7, .2, 1) both; }
.hero-card > div { padding: 20px 30px 22px; border-left: 1px solid var(--line); }
.hero-card > div:first-child { border-left: 0; }
.hero-card dt { font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 5px; white-space: nowrap; }
.hero-card dd { font-family: var(--head); font-size: clamp(19px, 1.7vw, 25px); font-weight: 600; letter-spacing: -0.02em; white-space: nowrap; }
.viz { position: absolute; z-index: 2; right: 14px; bottom: 14px; padding: 5px 10px; border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--ink); font-size: 12.5px; font-weight: 500; box-shadow: var(--lift-1); }
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Секции: бяло и бетон се редуват, за да се вижда къде свършва едната и почва другата */
.block { padding: clamp(72px, 9.5vw, 148px) 0; }
/* Бетонните секции: лек преход отгоре надолу и чертожна мрежа, която избледнява към средата */
.block-tint { position: relative; isolation: isolate; background: linear-gradient(180deg, #eaedf0 0%, #dde1e6 100%); }
.block-tint::before { content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(18, 26, 36, .2) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 26, 36, .2) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: linear-gradient(105deg, #000 0%, rgba(0, 0, 0, .5) 40%, transparent 78%);
  mask-image: linear-gradient(105deg, #000 0%, rgba(0, 0, 0, .5) 40%, transparent 78%); }
.block-tint:nth-of-type(even)::before { -webkit-mask-image: linear-gradient(255deg, #000 0%, rgba(0, 0, 0, .5) 40%, transparent 78%); mask-image: linear-gradient(255deg, #000 0%, rgba(0, 0, 0, .5) 40%, transparent 78%); }
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(36px, 6vw, 104px); align-items: center; }
.two-text { display: grid; gap: 20px; }
.two-text h2 { margin-bottom: 8px; }
.two-text p { font-size: 18.5px; }

.shot-wrap { position: relative; }
[hidden] { display: none !important; } /* скритото с атрибута да не се показва от display в класовете (чертежът при 3D) */
.shot { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; overflow: hidden; }
.shot img { width: 100%; }

/* Червената плоча зад снимката повтаря червените полета по фасадата */
.slab { isolation: isolate; }
.slab::before { content: ""; position: absolute; z-index: -1; inset: 16px -16px -16px 16px; border-radius: 14px; background: var(--accent); }
.slab > .shot { box-shadow: 0 1px 3px rgba(18, 26, 36, .1), 0 8px 18px -10px rgba(18, 26, 36, .28); }

/* Детайли */
#detayli h2 { margin-bottom: clamp(30px, 4vw, 56px); }
.bento { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 26px; }
.card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--lift-2); }
.card .shot { border-radius: 0; flex: 1 1 auto; min-height: 0; }
.card .shot img { height: 100%; object-fit: cover; }
.card.tall { grid-row: span 2; }
.card-text { display: grid; gap: 7px; padding: 22px 26px 26px; border-top: 3px solid var(--accent); }
.card-text p { font-size: 16.5px; }

/* Разпределения */
.plans-head { display: grid; gap: 16px; max-width: 44em; margin-bottom: clamp(28px, 3.6vw, 48px); }
.plans-head p { font-size: 18.5px; }
.plans { padding: clamp(18px, 2.6vw, 36px); gap: clamp(20px, 2.6vw, 32px); box-shadow: var(--lift-3); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: clamp(18px, 2.2vw, 26px); border-bottom: 1px solid var(--concrete); }
.tab { min-width: 50px; min-height: 50px; padding: 0 17px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--white); color: var(--ink); font-family: var(--head); font-size: 17px; font-weight: 500; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.tab:hover { border-color: var(--ink); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 10px 20px -10px rgba(18, 26, 36, .7); }
.plan-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(22px, 3.2vw, 52px); align-items: start; }
.plan-info { display: grid; gap: 12px; }
.plan-info h3 { font-size: 30px; }
.plan-info p:empty { display: none; }
.units { list-style: none; margin: 4px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.units li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.u-name { display: grid; gap: 1px; min-width: 0; } /* пренася се; „№ 12“ се държи заедно с неразделим интервал */
.u-name small { font-size: 13.5px; color: var(--muted); }
.u-right { display: flex; align-items: center; gap: 12px; }
.units b { font-family: var(--head); font-size: 19px; font-weight: 600; white-space: nowrap; }
/* площта: едро тъмно число с еднаква ширина на цифрите, мярката по-малка до него */
.units .area { display: inline-flex; align-items: baseline; gap: 0; color: var(--ink); }
.units .num { font-size: 23px; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums lining-nums; color: var(--ink); }
.units .unit { margin-left: 4px; font-size: 15px; font-weight: 500; color: var(--muted); }
/* Статус: зелено = свободен, сиво и по-блед ред = зает */
.st { min-width: 84px; padding: 4px 9px; border-radius: 8px; font-size: 13px; font-style: normal; font-weight: 600; text-align: center; white-space: nowrap; }
.st-free { background: #e3f1e8; color: #1f6b3e; box-shadow: 0 0 0 1px #b9dcc6 inset; }
.st-taken { background: var(--concrete); color: var(--muted); }
.u-taken .u-name { color: #6b737c; } /* по-светло пада под контраст 4.5; площта остава тъмна */
.fine { font-size: 13.5px; }
.plan-shot { border: 1px solid var(--line); border-radius: 12px; background: var(--white); box-shadow: var(--lift-1); }
.plan-shot .viz { border: 1px solid var(--line); }
/* 3D модел на етажа (plan3d.js): превключвател над чертежа, кутия с модела, надписи над апартаментите */
.plan-view { display: grid; gap: 12px; min-width: 0; }
.view-seg { justify-self: start; display: inline-grid; grid-auto-flow: column; border: 1.5px solid var(--ink); border-radius: var(--r); overflow: hidden; background: var(--white); }
.view-seg button { min-height: 44px; padding: 0 18px; border: 0; background: transparent; color: var(--ink); font-family: var(--body); font-size: 15px; font-weight: 600; cursor: pointer; transition: background-color .18s, color .18s; }
.view-seg button + button { border-left: 1.5px solid var(--ink); }
.view-seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.view-seg button:disabled { color: #8a929a; cursor: default; }
.view-seg button:focus-visible { outline-offset: -4px; }
.plan3d { position: relative; height: clamp(380px, 38vw, 560px); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: linear-gradient(#f5f6f7, #e7eaed); box-shadow: var(--lift-1); touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.plan3d canvas { display: block; outline: none; }
.plan3d.loading::after { content: attr(data-msg); position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; color: var(--muted); }
.l3d-layer { position: absolute; inset: 0; pointer-events: none; }
.l3d { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; padding: 3px 8px 4px; border-radius: 8px; background: rgba(255, 255, 255, .95); color: var(--ink); line-height: 1.2; white-space: nowrap; box-shadow: 0 1px 2px rgba(18, 26, 36, .18), 0 6px 14px -8px rgba(18, 26, 36, .45); }
.l3d b { font-size: 14.5px; font-weight: 600; }
.l3d i { font-size: 13px; font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.l3d.res { background: rgba(233, 236, 239, .95); color: #59616a; }
.l3d.on { background: var(--ink); color: #fff; }
.plan3d-note { margin: 0; font-size: 14px; }
.mode-3d .units li[data-key] { cursor: pointer; }
.units li { transition: background-color .15s; }
.units li.sel { margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 8px; background: #eef1f3; }

/* Входът: снимка от край до край, текстовата карта излиза от нея */
.vhod { background: var(--white); padding-bottom: clamp(40px, 5vw, 72px); }
.vhod-photo { position: relative; height: clamp(360px, 50vw, 700px); overflow: hidden; }
.vhod-photo .shot { height: 100%; border-radius: 0; }
.vhod-photo .shot img { height: 100%; object-fit: cover; object-position: 50% 64%; }
.vhod-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 46%; background: linear-gradient(rgba(18, 26, 36, 0), rgba(18, 26, 36, .34)); pointer-events: none; }
.vhod-card { position: relative; z-index: 2; display: grid; gap: 18px; width: min(560px, 100%); margin-top: clamp(-190px, -14vw, -90px); padding: clamp(26px, 3.4vw, 48px); background: var(--white); border-radius: 18px; border-top: 4px solid var(--accent); box-shadow: var(--lift-3); }
.vhod-card p { font-size: 18px; }

/* Локация: бетонен панел върху бялото */
.loc-sec { padding: 0 0 clamp(72px, 9vw, 132px); background: var(--white); }
.loc { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; padding: clamp(26px, 3.6vw, 52px); border-radius: 18px; background: var(--concrete); box-shadow: 0 1px 0 var(--concrete-deep) inset, var(--lift-1); }
.loc h2 { font-size: clamp(28px, 2.8vw, 42px); margin-bottom: 12px; }
.loc p { font-size: 18px; }

/* Запитване */
.ask { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 104px); align-items: start; }
.ask-text { display: grid; gap: 20px; }
.ask-text p { font-size: 18.5px; max-width: 26em; }
.form { gap: 18px; padding: clamp(22px, 3.2vw, 40px); box-shadow: var(--lift-3); border-color: transparent; }
.form label { display: grid; gap: 8px; font-size: 15px; font-weight: 600; }
.form input, .form textarea { width: 100%; padding: 14px 15px; border: 1.5px solid var(--line); border-radius: var(--r); background: #f7f8f9; color: var(--ink); font-family: var(--body); font-size: 16px; transition: border-color .15s, background-color .15s; }
.form textarea { resize: vertical; min-height: 116px; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); background: #fff; }
.form input.bad { border-color: var(--accent); background: #fbefed; }
.form .btn { margin-top: 4px; justify-self: start; }
.form-note { font-size: 14.5px; }
.form-note:empty { display: none; }
.form-note { scroll-margin-top: 110px; }
.form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; }
.contact li { display: grid; gap: 2px; }
.contact span { font-size: 14px; font-weight: 600; color: var(--muted); }
.contact a { font-family: var(--head); font-size: 21px; font-weight: 600; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.contact a:hover { color: var(--accent); }
.form-note.err { color: var(--accent-dark); font-weight: 600; }

/* Край */
.foot { background: var(--white); border-top: 1px solid var(--line); padding: 36px 0 42px; }
.foot-in { display: flex; align-items: baseline; justify-content: space-between; gap: 16px 40px; flex-wrap: wrap; }
.foot p { font-size: 14.5px; max-width: 46em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { padding: 10px 0; font-size: 14.5px; color: var(--ink); text-underline-offset: 3px; white-space: nowrap; }
.form-legal { font-size: 13.5px; color: var(--muted); }
.form-legal a { color: var(--ink); text-underline-offset: 3px; }
/* Поверителност: обикновена страница с текст */
.legal { padding: calc(88px + clamp(40px, 6vw, 80px)) 0 clamp(56px, 8vw, 104px); background: var(--white); }
.legal-in { max-width: 760px; display: grid; gap: 14px; }
.legal h1 { font-size: clamp(24px, 7.4vw, 52px); margin-bottom: 6px; }
.legal h2 { font-size: clamp(21px, 2.2vw, 25px); margin-top: 22px; }
.legal p { color: var(--ink); }
.legal .lead { font-size: 19px; color: var(--muted); }
.legal a { color: var(--ink); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-date { margin-top: 22px; font-size: 14.5px; color: var(--muted) !important; }
/* Страница 404 */
.nf { padding: calc(88px + clamp(56px, 9vw, 128px)) 0 clamp(72px, 11vw, 152px); background: var(--white); }
.nf-in { max-width: 640px; display: grid; gap: 18px; justify-items: start; }
.nf h1 { font-size: clamp(28px, 6.4vw, 48px); }
.nf p { font-size: 18px; color: var(--muted); margin-bottom: 6px; }

/* Увеличена снимка */
.lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 20px; border: 0; background: rgba(227, 230, 234, .98); }
.lightbox[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 16px; justify-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox-view { display: grid; place-items: center; width: 100%; min-height: 0; overflow: auto; }
.lightbox img { max-width: 100%; max-height: calc(100dvh - 110px); width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: var(--lift-3); }
/* Разпределение: в истински размер, плъзга се */
.lightbox.pan .lightbox-view { place-items: start; }
.lightbox.pan img { max-width: none; max-height: none; border-radius: 0; background: #fff; box-shadow: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-photo img, .hero-card { animation: none; }
  .btn-solid:hover { transform: none; }
}

@media (max-width: 1180px) and (min-width: 900px) {
  .hero-card > div { padding: 18px 20px 20px; }
  /* колоната със списъка до чертежа е тясна (около 277px при 1024): площта и надписът един под друг,
     иначе „Търговско помещение № 4“ и „Резервирано“ избутваха списъка под чертежа */
  .u-right { flex-direction: column; align-items: flex-end; gap: 4px; }
}

@media (max-width: 899px) {
  body { font-size: 16.5px; }
  .top { height: 78px; gap: 16px; }
  .nav { display: none; }
  .brand-logo { height: 42px; }
  .top-cta { min-height: 44px; padding: 0 16px; font-size: 15px; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-photo { order: 1; min-height: 0; height: 60svh; box-shadow: none; }
  .hero-photo img { object-position: 64% 30%; }
  .hero-photo::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 110px; z-index: 1; background: linear-gradient(rgba(242, 244, 246, .9), rgba(242, 244, 246, 0)); pointer-events: none; }
  .hero-photo .viz { bottom: 62px; }
  .hero-card { order: 2; position: relative; left: auto; bottom: auto; margin: -48px var(--pad) 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-card > div { padding: 16px 18px 17px; border-left: 0; border-top: 1px solid var(--line); }
  .hero-card > div:nth-child(-n+2) { border-top: 0; }
  .hero-card > div:nth-child(even) { border-left: 1px solid var(--line); }
  .hero-card dd { font-size: 16.5px; white-space: normal; }
  .hero-card dt { white-space: normal; line-height: 1.3; }
  .u-right { flex-direction: column; align-items: flex-end; gap: 4px; }
  .hero-text { order: 3; padding: 36px var(--pad) 56px; gap: 18px; }
  .two, .ask, .bento, .plan-body { grid-template-columns: minmax(0, 1fr); }
  .two-text p, .plans-head p, .ask-text p, .vhod-card p, .loc p { font-size: 17px; }
  .slab::before { inset: 10px -10px -10px 10px; }
  .two .slab { margin-bottom: 16px; }
  .card.tall { grid-row: auto; }
  .card.tall .shot img { aspect-ratio: 4 / 4.4; }
  .plan-view { order: -1; }
  .plan3d { height: min(62vh, 460px); }
  .l3d { padding: 2px 6px 3px; }
  .l3d b { font-size: 13px; }
  .l3d i { font-size: 11.5px; }
  .tab { padding: 0 12px; }
  .vhod-photo { height: 74vw; }
  .vhod-card { margin-top: -56px; }
  .vhod-photo .viz { bottom: auto; top: 14px; }
  .loc .btn { width: 100%; }
  .form .btn { width: 100%; }
}

@media (max-width: 370px) {
  h1 { font-size: 31px; }
  .top { gap: 10px; padding: 0 14px; }
  .brand { min-width: 0; }
  .brand-logo { height: 36px; }
  .st { min-width: 0; padding: 3px 7px; font-size: 12px; }
  .u-right { gap: 8px; }
  .top-cta { padding: 0 12px; font-size: 14px; }
  .hero-card > div { padding: 14px 14px 15px; }
  .hero-card dd { font-size: 15.5px; }
}
