/* ЦКН — стили сайта. Фирменные цвета прежнего сайта: синий #2492fa, графит, светло-серые секции; Roboto + Playfair Display */

:root {
    --blue: #2492fa;
    --blue-dark: #1576d6;
    --blue-soft: #e8f3ff;
    --green: #8dbb2f;
    --green-soft: #eef7dc;
    --pink: #ff5a79;
    --orange: #f2b927;
    --ink: #1b2430;
    --text: #3a4552;
    --muted: #7a8694;
    --line: #e4e9ef;
    --bg: #ffffff;
    --bg-soft: #f4f6f9;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(27, 36, 48, .06), 0 8px 24px rgba(27, 36, 48, .06);
    --shadow-hover: 0 2px 4px rgba(27, 36, 48, .08), 0 16px 40px rgba(27, 36, 48, .12);
    --serif: "Playfair Display", Georgia, serif;
    --sans: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(28px, 4vw, 44px); letter-spacing: -.01em; }
/* Blazor ставит фокус на h1 при переходе (FocusOnNavigate) — для экранных дикторов; рамка не нужна */
h1:focus, h1:focus-visible { outline: none; }
h2 { font-size: clamp(22px, 2.6vw, 32px); }
h3 { font-size: 19px; }
h1 small, h2 small { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--muted); font-size: .6em; display: inline-block; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 18px; color: var(--muted); max-width: 760px; }
.spacer { flex: 1; }
.ok { color: #2f8f46; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding-top: 56px; padding-bottom: 56px; }
.section-gray { background: var(--bg-soft); }
.section-blue { background: linear-gradient(135deg, #1d7fe0, #2492fa 55%, #4aa8ff); color: #fff; }
.section-blue h2, .section-blue p { color: #fff; }
.section-title { margin: 40px 0 20px; }
.section-head { margin-bottom: 28px; max-width: 760px; }
.section-head.row { display: flex; justify-content: space-between; align-items: end; max-width: none; gap: 16px; }
.section-head p { color: var(--muted); }
.link-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; }
.icon { flex-shrink: 0; vertical-align: middle; }

/* ---- Кнопки ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
    font-weight: 500; font-size: 15px; line-height: 1.2; transition: .15s; white-space: nowrap;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(36, 146, 250, .28); }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { border-color: var(--blue); color: var(--blue); background: #fff; }
.btn-outline:hover { background: var(--blue-soft); }
.btn-light { background: var(--bg-soft); color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: #e9edf2; color: var(--ink); }
.section-blue .btn-light { background: #fff; border-color: #fff; }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-block { display: flex; width: 100%; margin-top: 10px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.danger, .icon-btn.danger { color: #d33a4f; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.icon-btn { background: #fff; border: 1px solid var(--line); border-radius: 8px; width: 32px; height: 32px; display: inline-grid; place-items: center; color: var(--text); }
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn[disabled] { opacity: .4; }

/* ---- Шапка ---- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(12px);
    border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.logo img { height: 36px; width: auto; max-width: 100%; }
.logo-mark { width: 54px; height: 28px; }
.logo-text { display: flex; flex-direction: column; font-size: 10.5px; line-height: 1.15; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.logo-text b { font-size: 14px; color: var(--ink); letter-spacing: .04em; }
.logo-light .logo-text, .logo-light .logo-text b { color: #fff; }
.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav-link { padding: 8px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; font-size: 15px; cursor: pointer; }
.nav-link:hover, .nav-link.active { background: var(--bg-soft); color: var(--blue); }
.nav-item { position: relative; }
.nav-sub {
    position: absolute; top: 100%; left: 0; min-width: 260px; padding: 8px; margin-top: 6px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-hover);
    display: none; flex-direction: column;
}
.nav-sub::before { content: ""; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.nav-item:hover .nav-sub, .nav-item:focus-within .nav-sub { display: flex; }
.nav-sub a { padding: 9px 12px; border-radius: 8px; color: var(--ink); font-size: 15px; }
.nav-sub a:hover { background: var(--blue-soft); color: var(--blue); }
.header-contacts { display: flex; flex-direction: column; align-items: end; gap: 2px; }
.header-phone { font-weight: 700; color: var(--ink); font-size: 17px; white-space: nowrap; }
.burger { display: none; background: none; border: 0; color: var(--ink); padding: 6px; margin-left: auto; }
.mobile-menu { display: none; }

/* ---- Главная: шапка ---- */
.hero {
    position: relative; color: #fff; padding: 72px 0 96px; overflow: hidden;
    /* Фон — как на прежнем сайте (img/hero.jpg); можно заменить в админке: «Настройки» → фон шапки */
    background: linear-gradient(100deg, rgba(20, 32, 48, .66) 0%, rgba(20, 32, 48, .4) 50%, rgba(20, 32, 48, .1) 100%), var(--hero-img, url("img/hero.jpg"));
    background-size: cover; background-position: center;
}
.hero::after { content: ""; position: absolute; inset: auto -10% -60% 40%; height: 120%; background: radial-gradient(closest-side, rgba(36, 146, 250, .35), transparent); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; font-size: clamp(30px, 4.2vw, 52px); text-shadow: 0 2px 16px rgba(10, 18, 30, .35); }
.hero .lead, .hero-stats { text-shadow: 0 1px 10px rgba(10, 18, 30, .4); }
.hero .lead { color: rgba(255, 255, 255, .85); }
.hero-search {
    display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 8px 8px 8px 18px;
    max-width: 620px; margin: 28px 0; color: var(--muted); box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.hero-search input { flex: 1; border: 0; outline: 0; font-size: 16px; min-width: 0; background: transparent; }
.hero-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats b { font-size: 30px; font-weight: 700; }
.hero-stats span { color: rgba(255, 255, 255, .75); font-size: 14px; }
.hero-quote {
    margin: 0; padding: 32px; border-radius: 20px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(8px); font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.5;
}
.hero-quote .icon { color: var(--blue); opacity: .9; }
.hero-quote cite { display: block; margin-top: 12px; font-size: 15px; color: rgba(255, 255, 255, .7); }
.actions-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: -44px; position: relative; z-index: 2; }
.action-card {
    display: flex; align-items: center; gap: 16px; padding: 24px; background: #fff; border-radius: var(--radius);
    border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); font-size: 18px; font-weight: 500; text-align: left; transition: .2s;
}
.action-card > .icon:first-child { color: var(--blue); }
.action-card .go { margin-left: auto; color: var(--muted); transition: .2s; }
.action-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); color: var(--ink); }
.action-card:hover .go { color: var(--blue); transform: translateX(4px); }

.cat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-tile {
    display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: var(--radius); background: var(--bg-soft);
    color: var(--ink); transition: .2s; border: 1px solid transparent;
}
.cat-tile .icon { color: var(--blue); }
.cat-tile:hover { background: #fff; border-color: var(--line); box-shadow: var(--shadow-hover); color: var(--ink); }
.cat-name { font-weight: 500; font-size: 17px; }
.cat-count { color: var(--muted); font-size: 14px; }
.projects-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 20px; }
.tiles-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.wide-tile { padding: 28px; border-radius: var(--radius); background: var(--blue-soft); color: var(--ink); display: block; transition: .2s; }
.wide-tile p { color: var(--muted); }
.wide-tile .go { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 500; }
.wide-tile:hover { box-shadow: var(--shadow-hover); color: var(--ink); }
.tile-dark { background: var(--ink); }
.tile-dark h3 { color: #fff; }
.tile-dark p { color: rgba(255, 255, 255, .7); }
.tile-dark .go { color: #7cc0ff; }
.analytics-teaser { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.builders { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: center; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.steps li { counter-increment: s; background: rgba(255, 255, 255, .12); border-radius: 12px; padding: 14px 16px 14px 52px; position: relative; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: var(--blue); display: grid; place-items: center; font-weight: 700; font-size: 14px; }

/* ---- Шапка внутренних страниц ---- */
.page-hero { background: var(--bg-soft); padding: 28px 0 32px; border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: .3em; }
.page-hero .lead { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.crumbs-light, .crumbs-light a { color: rgba(255, 255, 255, .75); }

/* ---- Чипы, категории, фильтры ---- */
.cat-chips, .chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cat-chips { margin: 24px 0 16px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line);
    background: #fff; color: var(--ink); font-size: 15px; transition: .15s; white-space: nowrap;
}
.chip small { color: var(--muted); font-size: 12px; }
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.active small { color: rgba(255, 255, 255, .6); }
.chip-project { background: linear-gradient(135deg, #fff7e0, #fff); border-color: #f5d98a; }
.chip-project .icon { color: var(--orange); }
.chip-project:hover { border-color: var(--orange); color: var(--ink); }
.chips-sep { width: 1px; height: 28px; background: var(--line); margin: 0 6px; }
.chips-sm .chip, .chip-xs { padding: 6px 12px; font-size: 14px; }
.chip-xs { padding: 4px 10px; }
.chip-toggle.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.filters-toggle { display: none; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.filters-main { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.filters-extra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.filters-extra:empty { display: none; }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 150px; }
.fld > span { display: flex; align-items: center; gap: 6px; }
.fld input, .fld select, .fld summary {
    height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; background: #fff; min-width: 0; font-size: 15px;
}
.fld input:focus, .fld select:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }
.fld-range > div { display: flex; gap: 6px; }
.fld-range input { width: 100px; }
.fld-search { flex: 1; min-width: 220px; }
.fld-inline { flex-direction: row; align-items: center; gap: 8px; min-width: 0; }
.fld-inline input { width: 80px; height: 36px; }
.class-pick { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.mini-toggle { border: 0; background: var(--blue-soft); color: var(--blue); border-radius: 6px; font-size: 12px; padding: 1px 8px; }
.dropdown { position: relative; }
.dropdown summary { list-style: none; display: flex; flex-direction: column; justify-content: center; cursor: pointer; padding: 2px 12px; min-width: 160px; }
.dropdown summary::-webkit-details-marker { display: none; }
.dropdown summary span { font-size: 11px; color: var(--muted); }
.dropdown summary b { font-weight: 400; color: var(--ink); font-size: 15px; }
.fld.dropdown > summary + .dropdown-body { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-hover); padding: 10px 14px; min-width: 260px; max-height: 340px; overflow: auto; }
.check { display: flex; gap: 8px; align-items: center; padding: 4px 0; color: var(--text); font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.seg { display: inline-flex; background: var(--bg-soft); border-radius: 12px; padding: 4px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 9px 16px; border-radius: 9px; color: var(--text); font-size: 15px; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); font-weight: 500; }
.seg-sm button { padding: 6px 12px; font-size: 14px; }
.reset { margin-left: auto; }
.results-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 24px 0 16px; flex-wrap: wrap; }
.results-count { font-size: 17px; }
.results-tools { display: flex; gap: 10px; align-items: center; }
.results-tools select { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: #fff; }
.objects-map { height: 520px; border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; background: var(--bg-soft); }
.more { text-align: center; margin: 28px 0; }
.empty { text-align: center; padding: 56px 20px; background: var(--bg-soft); border-radius: var(--radius); }
.catalog-cta {
    display: flex; justify-content: space-between; align-items: center; gap: 24px; margin: 48px 0 0; padding: 32px 36px;
    border-radius: 20px; background: linear-gradient(135deg, var(--blue-soft), #f6fbff); border: 1px solid #d6e9fc;
}
.catalog-cta p { color: var(--muted); margin: 0; max-width: 680px; }
.cta-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---- Карточка объекта в списке ---- */
.obj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.obj-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); color: var(--text); transition: .2s; }
.obj-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); color: var(--text); }
.obj-photo { position: relative; aspect-ratio: 4 / 3; background: var(--bg-soft); }
.obj-photo img { width: 100%; height: 100%; object-fit: cover; }
.obj-nophoto { display: grid; place-items: center; height: 100%; color: #b8c2cd; }
.obj-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.obj-count { position: absolute; right: 10px; bottom: 10px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 8px; padding: 2px 8px; font-size: 12px; display: flex; gap: 4px; align-items: center; }
.obj-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.obj-price { font-size: 20px; font-weight: 700; color: var(--ink); }
.obj-price2 { font-size: 13px; color: var(--muted); margin-top: -4px; }
.obj-title { font-weight: 500; color: var(--ink); margin-top: 4px; }
.obj-address { font-size: 14px; color: var(--muted); display: flex; gap: 4px; align-items: start; }
.obj-address .icon { margin-top: 3px; }
.obj-tenant { font-size: 13px; color: #2f8f46; }
.obj-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.obj-tags span { font-size: 12px; background: var(--bg-soft); border-radius: 6px; padding: 3px 8px; color: var(--text); }
.obj-tags-lg span { font-size: 14px; padding: 6px 12px; border-radius: 8px; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--ink); color: #fff; }
.badge-accent { background: var(--pink); }
.badge-green { background: var(--green-soft); color: #4f7a10; }
.badge-light { background: var(--bg-soft); color: var(--text); border: 1px solid var(--line); }
a.badge-light:hover { border-color: var(--blue); color: var(--blue); }

/* ---- Страница объекта ---- */
.object-page { padding-top: 24px; padding-bottom: 56px; }
.object-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 20px; }
.object-head h1 { font-size: clamp(24px, 3vw, 36px); }
.object-address { color: var(--muted); display: flex; gap: 6px; align-items: center; }
.object-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.object-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.object-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.object-aside { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h2 { font-size: 22px; }
.params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0; }
.params > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.params dt { color: var(--muted); }
.params dd { margin: 0; color: var(--ink); text-align: right; font-weight: 500; }
.params-compact { grid-template-columns: 1fr; }
.params-compact > div { padding: 4px 0; border: 0; justify-content: start; }
.params-compact dt { min-width: 110px; }
.params-compact dd { text-align: left; font-weight: 400; }
.desc > div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.desc > div:last-child { border: 0; }
.desc dt { font-weight: 500; color: var(--ink); margin-bottom: 2px; }
.desc dd { margin: 0; white-space: pre-line; }
.price-card .price-main { font-size: 28px; font-weight: 700; color: var(--ink); }
.price-sub { color: var(--muted); }
.price-alt { margin-top: 8px; font-size: 15px; }
.price-card .btn-block:first-of-type { margin-top: 18px; }
.object-no { text-align: center; color: var(--muted); font-size: 13px; margin-top: 12px; }
.broker-card .broker-row, .broker-row { display: flex; gap: 14px; align-items: center; }
.broker-row img, .avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--bg-soft); display: grid; place-items: center; color: var(--muted); flex-shrink: 0; }
.broker-name { font-weight: 700; color: var(--ink); font-size: 17px; }
.broker-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.soc { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; }
.soc:hover { border-color: var(--blue); color: var(--blue); }
.soc-wa { color: #1fa855; }
.soc-tg { color: #229ed9; }
.soc-max { color: #6b4cf6; font-weight: 700; }
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery-main { position: relative; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-empty { aspect-ratio: 16 / 9; border-radius: var(--radius); background: var(--bg-soft); color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 10px; }
.gal-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); }
.gal-prev { left: 14px; }
.gal-next { right: 14px; }
.gal-counter { position: absolute; bottom: 12px; right: 14px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 8px; padding: 2px 10px; font-size: 13px; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.gallery-thumbs button { flex: 0 0 96px; height: 72px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; background: none; opacity: .7; }
.gallery-thumbs button.on { border-color: var(--blue); opacity: 1; }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10, 14, 20, .94); display: grid; place-items: center; outline: 0; }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; }
.lb-close { position: absolute; top: 16px; right: 16px; background: none; border: 0; color: #fff; }
.lightbox .gal-counter { bottom: 20px; right: 50%; transform: translateX(50%); }
.video { aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: #000; margin-bottom: 20px; }
.video iframe, .map-frame iframe { width: 100%; height: 100%; border: 0; }
.map-frame { height: 380px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-soft); }

/* ---- Окна ---- */
.modal-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(15, 23, 32, .55); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 32px); overflow: auto; background: #fff; border-radius: 20px; padding: 32px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); animation: pop .2s; }
.modal h3 { font-size: 24px; padding-right: 32px; }
.modal-close { position: absolute; top: 16px; right: 16px; border: 0; background: var(--bg-soft); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; color: var(--text); }
.modal-done { text-align: center; padding: 12px 0; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--green-soft); color: #4f7a10; display: grid; place-items: center; margin: 0 auto 16px; }
.modal-share { max-width: 600px; }
.share-link { display: flex; gap: 8px; margin: 16px 0; }
.share-link input { flex: 1; min-width: 0; height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 16px; background: var(--bg-soft); }
.share-grid { display: grid; grid-template-columns: 1fr 180px; gap: 20px; align-items: center; }
.share-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-buttons .soc { justify-content: center; }
.share-qr { text-align: center; font-size: 12px; color: var(--muted); }
.share-qr svg { width: 160px; height: 160px; display: block; margin: 0 auto 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }

/* ---- Формы ---- */
.form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.form label, .fld-block { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.form input, .form select, .form textarea, .fld-block input, .fld-block select, .fld-block textarea, .login-card input {
    border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font-size: 15px; background: #fff; width: 100%;
}
.form input:focus, .form textarea:focus, .fld-block input:focus, .fld-block textarea:focus { outline: 2px solid var(--blue-soft); border-color: var(--blue); }
.form .check { flex-direction: row; font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-error { color: #d33a4f; font-size: 14px; margin: 0; }

/* ---- Спрос ---- */
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.req-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.req-card h3 { margin: 4px 0; }
.req-head { display: flex; justify-content: space-between; align-items: center; }
.req-params { margin: 0; display: grid; gap: 4px; font-size: 14px; }
.req-params > div { display: flex; gap: 8px; }
.req-params dt { color: var(--muted); min-width: 110px; }
.req-params dd { margin: 0; color: var(--ink); }
.req-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.req-broker { display: flex; gap: 10px; align-items: center; color: var(--ink); font-size: 14px; line-height: 1.3; }
.req-broker img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.req-broker small { color: var(--muted); }

/* ---- Аналитика ---- */
.note { background: var(--bg-soft); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 24px; }
.note p:last-child { margin: 0; }
.charts-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.charts-3 .donut-body { flex-direction: column; align-items: stretch; }
.charts-3 .donut-svg { width: 150px; height: 150px; margin: 0 auto; }
.charts-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-bottom: 20px; }
.analytics-page .card, .charts-2 + .card { margin-bottom: 20px; }
.donut-group { font-size: 13px; color: var(--blue); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.donut-title { font-size: 18px; }
.donut-body { display: flex; gap: 24px; align-items: center; }
.donut-svg { width: 180px; height: 180px; flex-shrink: 0; }
.donut-total { font-size: 20px; font-weight: 700; fill: var(--ink); }
.donut-total-sub { font-size: 9px; fill: var(--muted); }
.legend { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.legend span { flex: 1; }
.legend b { color: var(--ink); }
.legend-row { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 16px; }
.legend-row span { flex: none; }
.matrix-rows { display: flex; flex-direction: column; gap: 8px; }
.matrix-row { display: grid; grid-template-columns: 170px 1fr 48px; gap: 12px; align-items: center; font-size: 14px; }
.matrix-label { color: var(--ink); }
.matrix-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--bg-soft); min-width: 2px; }
.matrix-bar i { height: 100%; }
.matrix-sum { color: var(--muted); text-align: right; }
main .card:has(.matrix) { margin-bottom: 20px; }

/* ---- Кейсы, статьи, брокеры, шаблоны ---- */
.h-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 340px); gap: 20px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.h-scroll > * { scroll-snap-align: start; }
.case-grid, .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.case-card, .article-card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); color: var(--text); transition: .2s; }
.case-card:hover, .article-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); color: var(--text); }
.case-img, .article-img { aspect-ratio: 16 / 10; background: var(--bg-soft); display: grid; place-items: center; color: #b8c2cd; position: relative; }
.case-img img, .article-img img { width: 100%; height: 100%; object-fit: cover; }
.article-img .badge { position: absolute; top: 10px; left: 10px; }
.case-body, .article-body { padding: 16px 18px 20px; }
.case-body h3, .article-body h3 { font-size: 18px; margin: 4px 0 6px; }
.case-body p, .article-body p { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-top: 32px; padding-bottom: 56px; align-items: start; }
.article-layout aside { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
.prose { font-size: 17px; line-height: 1.7; color: var(--text); max-width: 820px; }
.prose-wide { max-width: 980px; }
.prose h2 { margin-top: 1.4em; }
.prose h3 { margin-top: 1.3em; font-size: 21px; }
.prose img { border-radius: var(--radius-sm); margin: 1em 0; height: auto; }
.prose .cover { margin-top: 0; width: 100%; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--blue); font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--ink); }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 10px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 24px; }
.photo-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: 10px; margin: 0; }
.links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.big-phone { font-size: 22px; font-weight: 700; color: var(--ink); }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.person { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); color: var(--ink); transition: .2s; }
.person:hover { box-shadow: var(--shadow-hover); color: var(--ink); }
.person-photo { width: 140px; height: 140px; border-radius: 50%; overflow: hidden; background: var(--bg-soft); display: grid; place-items: center; color: #b8c2cd; margin-bottom: 10px; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; }
.broker-profile { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.broker-photo { width: 240px; height: 240px; border-radius: 24px; overflow: hidden; background: var(--bg-soft); display: grid; place-items: center; color: #b8c2cd; }
.broker-photo img { width: 100%; height: 100%; object-fit: cover; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.tpl-card { display: flex; gap: 16px; align-items: center; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--ink); transition: .2s; }
.tpl-card:hover { box-shadow: var(--shadow-hover); color: var(--ink); }
.tpl-icon { width: 52px; height: 52px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex-shrink: 0; }
.tpl-body { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.tpl-card .go { color: var(--blue); }

/* ---- Лендинг проекта ---- */
.landing-hero {
    color: #fff; padding: 48px 0 72px;
    background: linear-gradient(90deg, rgba(20, 32, 48, .88), rgba(20, 32, 48, .35)), var(--hero-img, linear-gradient(135deg, #2d3c4f, #4b6077));
    background-size: cover; background-position: center;
}
.landing-hero h1 { color: #fff; font-size: clamp(32px, 5vw, 60px); max-width: 900px; }
.landing-hero .lead { color: rgba(255, 255, 255, .85); }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.adv { display: flex; gap: 12px; align-items: start; padding: 18px; background: var(--bg-soft); border-radius: 14px; color: var(--ink); font-weight: 500; }
.adv .icon { color: var(--blue); }

/* ---- 404 ---- */
.not-found { text-align: center; padding: 96px 24px; }
.nf-code { font-family: var(--serif); font-size: 120px; line-height: 1; color: var(--blue-soft); font-weight: 700; -webkit-text-stroke: 2px var(--blue); }
.not-found .cta-buttons { justify-content: center; }

/* ---- Подвал ---- */
.site-footer { background: #151c26; color: rgba(255, 255, 255, .7); padding: 56px 0 24px; margin-top: 56px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.site-footer a { display: block; color: rgba(255, 255, 255, .7); padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.footer-quote { font-family: var(--serif); font-style: italic; margin-top: 20px; font-size: 15px; }
.footer-quote span { font-family: var(--sans); font-style: normal; font-size: 13px; opacity: .7; }
.footer-phone { font-size: 20px; font-weight: 700; color: #fff !important; }
.footer-social { display: flex; gap: 8px; margin: 10px 0 14px; }
.footer-social a { width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .08); display: grid; place-items: center; padding: 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 40px; padding-top: 20px; font-size: 13px; }
.footer-bottom a { display: inline; }

#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 300; padding: 12px 20px; background: #fff3cd; box-shadow: 0 -2px 10px rgba(0, 0, 0, .1); }
#blazor-error-ui .dismiss { float: right; cursor: pointer; }

/* ---- Админка ---- */
.admin { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: var(--bg-soft); }
.admin-side { background: #151c26; color: rgba(255, 255, 255, .75); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.admin-brand { display: block; padding: 4px 8px 20px; }
.admin-brand .logo-text, .admin-brand .logo-text b { color: #fff; }
.admin-side nav { display: flex; flex-direction: column; gap: 2px; }
.admin-side nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: rgba(255, 255, 255, .75); font-size: 15px; }
.admin-side nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-side nav a.active { background: var(--blue); color: #fff; }
.admin-side .count { margin-left: auto; background: var(--pink); color: #fff; border-radius: 999px; font-size: 12px; padding: 1px 8px; }
.admin-sep { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .4); padding: 16px 12px 6px; }
.admin-main { min-width: 0; }
.admin-top { display: flex; align-items: center; gap: 16px; padding: 12px 28px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.admin-burger { display: none; }
.admin-content { padding: 28px; max-width: 1400px; }
.admin-content h1 { font-size: 28px; }
.admin-content h2 { font-size: 20px; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-gap { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row-gap input { border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; color: var(--muted); }
.stat b { font-size: 32px; color: var(--ink); }
.stat-accent { border-color: var(--pink); }
.stat-accent b { color: var(--pink); }
.cat-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.cat-stats a { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--bg-soft); color: var(--ink); }
.cat-stats a:hover { background: var(--blue-soft); color: var(--ink); }
.cat-stat-name { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.cat-stat-name .icon { color: var(--blue); }
.cat-stat-nums { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.cat-stat-nums b { font-size: 24px; line-height: 1; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.admin-table th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 12px 14px; background: #fafbfc; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border: 0; }
.admin-table .thumb { width: 72px; }
.admin-table .thumb img { width: 64px; height: 44px; object-fit: cover; border-radius: 6px; }
.admin-table input { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; margin-top: 12px; }
.edit-grid-tight { margin-top: 16px; grid-template-columns: minmax(0, 1fr) 280px; }
.edit-main { display: flex; flex-direction: column; gap: 16px; }
.edit-side { position: sticky; top: 80px; }
.edit-side .fld-block { margin-bottom: 14px; }
.edit-main h2 { margin: 16px 0 0; }
.md-editor { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.md-toolbar { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); background: #fafbfc; flex-wrap: wrap; align-items: center; }
.md-toolbar button, .md-upload { border: 1px solid transparent; background: none; border-radius: 8px; padding: 6px 10px; color: var(--ink); font-size: 14px; display: inline-flex; gap: 4px; align-items: center; cursor: pointer; }
.md-toolbar button:hover, .md-upload:hover { background: #fff; border-color: var(--line); }
.md-toolbar button.on { background: var(--blue-soft); color: var(--blue); }
.md-upload input, .drop input, .link-btn input { display: none; }
.md-body { display: grid; }
.md-body.split { grid-template-columns: 1fr 1fr; }
.md-body textarea { border: 0 !important; border-radius: 0 !important; padding: 14px !important; font-family: ui-monospace, Consolas, monospace; font-size: 14px !important; line-height: 1.6; resize: vertical; min-height: 200px; outline: 0 !important; }
.md-preview { padding: 14px 18px; border-left: 1px solid var(--line); font-size: 15px; max-height: 640px; overflow: auto; background: #fcfdfe; }
.md-help { padding: 6px 12px; border-top: 1px solid var(--line); background: #fafbfc; }
.drop { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px; border: 2px dashed #c9d4e0; border-radius: 12px; color: var(--muted); cursor: pointer; text-align: center; font-size: 14px; position: relative; transition: .15s; }
.drop:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.drop.busy { opacity: .6; }
.drop input[type=file] { display: block; position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-big { padding: 36px; margin-bottom: 20px; }
.img-field { display: flex; flex-direction: column; gap: 8px; }
.img-preview { position: relative; border-radius: 10px; overflow: hidden; background: var(--bg-soft); }
.img-preview img { width: 100%; max-height: 220px; object-fit: cover; }
.img-preview > .icon-btn { position: absolute; top: 8px; right: 8px; }
.gallery-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 8px; }
.gallery-items img { height: 100px; }
.img-tools { position: absolute; bottom: 6px; right: 6px; display: flex; gap: 4px; }
.img-tools .icon-btn { width: 26px; height: 26px; }
.pick-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; margin-top: 4px; max-height: 260px; overflow: auto; }
.pick-list button { text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 8px 12px; }
.pick-list button:hover { background: var(--blue-soft); }
.pick-selected { display: flex; flex-direction: column; gap: 6px; }
.pick-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.tpl-row { display: flex; gap: 16px; align-items: start; }
.tpl-fields { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tpl-fields input { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%; }
.tpl-fields input.strong { font-weight: 500; font-size: 16px; }
.tpl-fields .row-gap input { width: auto; flex: 1; }
.tpl-fields input.short { width: 80px; flex: none; }
.lead-item.st-new { border-left: 4px solid var(--pink); }
.lead-item select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.lead-comment { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
.settings-grid .fld-block { margin-bottom: 12px; }
.admin-loading { padding: 40px; text-align: center; color: var(--muted); }
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #151c26, #2d3c4f); padding: 16px; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { font-size: 22px; margin: 10px 0 0; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }

/* ---- Адаптивность ---- */
@media (max-width: 1180px) {
    .main-nav { display: none; }
    .burger { display: block; }
    .header-contacts { margin-left: auto; }
    .mobile-menu {
        display: flex; flex-direction: column; gap: 2px; position: absolute; top: var(--header-h); left: 0; right: 0;
        background: #fff; border-bottom: 1px solid var(--line); padding: 12px 24px 24px; box-shadow: var(--shadow-hover);
        max-height: calc(100vh - var(--header-h)); overflow: auto;
    }
    .mobile-menu > a:not(.btn) { padding: 10px 0; color: var(--ink); font-size: 17px; border-bottom: 1px solid var(--line); }
    .mobile-cats { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; }
    .mobile-cats a { padding: 6px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--ink); font-size: 14px; }
    .mobile-menu .btn { margin-top: 14px; }
    .object-layout, .article-layout { grid-template-columns: 1fr; }
    .object-aside, .article-layout aside { position: static; }
    .cat-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .hero-grid, .analytics-teaser, .builders, .charts-2, .broker-profile, .settings-grid { grid-template-columns: 1fr; }
    .hero-quote { display: none; }
    .actions-row { grid-template-columns: 1fr; margin-top: -32px; }
    .tiles-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .catalog-cta { flex-direction: column; align-items: start; padding: 24px; }
    .admin { grid-template-columns: 1fr; }
    .admin-side { position: fixed; left: -280px; width: 270px; z-index: 60; transition: .2s; }
    .admin-side.open { left: 0; }
    .admin-burger { display: block; margin: 0; }
    .admin-content { padding: 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .edit-grid, .edit-grid-tight { grid-template-columns: 1fr; }
    .edit-side { position: static; }
    .md-body.split { grid-template-columns: 1fr; }
    .md-preview { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .section { padding-top: 40px; padding-bottom: 40px; }
    .header-contacts { display: none; }
    .logo-text { font-size: 9px; }
    .logo-text b { font-size: 12px; }
    .hero { padding: 40px 0 72px; }
    .hero:not([style]) { background-image: linear-gradient(120deg, rgba(20, 32, 48, .62), rgba(20, 32, 48, .32)), url("img/hero-mobile.jpg"); }
    .hero-stats { gap: 20px; }
    .hero-stats b { font-size: 24px; }
    .cat-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
    .cat-tile { padding: 16px; }
    .steps { grid-template-columns: 1fr; }
    .cat-chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
    .filters-toggle { display: flex; width: 100%; justify-content: center; }
    .filters { display: none; margin-top: 10px; }
    .filters.open { display: block; }
    .filters-main > * { flex: 1 1 100%; }
    .fld-range input { width: 100%; flex: 1; }
    .seg { width: 100%; }
    .seg button { flex: 1; justify-content: center; padding: 9px 8px; }
    .params { grid-template-columns: 1fr; }
    .req-grid { grid-template-columns: 1fr; }
    .object-head { flex-direction: column; }
    .object-head-actions { display: none; }
    .form-row, .share-grid, .share-buttons { grid-template-columns: 1fr; }
    .modal { padding: 24px 20px; }
    .footer-grid { grid-template-columns: 1fr; }
    .matrix-row { grid-template-columns: 110px 1fr 36px; font-size: 13px; }
    .donut-body { flex-direction: column; align-items: stretch; }
    .donut-svg { margin: 0 auto; }
    .section-head.row { flex-direction: column; align-items: start; }
}

/* Брокер на странице проекта / ТЦ */
.broker-inline { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.broker-inline .broker-links { margin-top: 0; }
.case-video { margin-bottom: 20px; }
.case-video video { width: 100%; max-height: 640px; border-radius: var(--radius-sm); background: #000; }
.networks { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.networks ul { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 12px; }
.networks-brands { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.networks-brands span { padding: 10px 18px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-weight: 500; color: var(--ink); }
@media (max-width: 900px) { .networks { grid-template-columns: 1fr; } }

/* Ход синхронизации / переноса в админке */
.progress { margin: 12px 0; padding: 14px 16px; border-radius: 12px; background: var(--blue-soft); border: 1px solid #cfe5fd; }
.progress-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.progress-track { height: 8px; border-radius: 99px; background: #fff; overflow: hidden; }
.progress-fill { height: 100%; background: var(--blue); border-radius: 99px; transition: width .3s; }
.progress-fill.indeterminate { width: 35%; animation: indet 1.2s ease-in-out infinite; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #b9dbfd; border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
@media (max-width: 640px) { .logo img { height: 28px; } }
.admin-brand .logo img { height: 30px; }
