/* Житло — стилі публічного сайту.
   Візуальна мова: світлі заокруглені картки, чорні pill-кнопки, теплий персиковий акцент
   (колір логотипу). Класи відповідають розмітці, яку генерують js/*.js. */

:root {
    --bg: #ffffff;
    --surface: #f5f4f2;
    --surface-2: #efedea;
    --ink: #121212;
    --ink-2: #3a3a3a;
    --muted: #77736e;
    --line: #e7e4df;
    --accent: #f26b21;
    --accent-ink: #c4500f;
    --accent-soft: #fdeadf;
    --accent-soft-2: #fbdcc9;
    --ok: #1f8a4c;
    --error: #c62828;

    --r-xl: 32px;
    --r-lg: 24px;
    --r-md: 18px;
    --r-sm: 12px;
    --pill: 999px;

    --shadow: 0 12px 40px rgba(18, 18, 18, .08);
    --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --container: 1320px;
    --gutter: 24px;
    --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }

svg { width: 20px; height: 20px; flex: none; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section { padding: 56px 0; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.section-title {
    font-size: clamp(28px, 3.4vw, 44px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -.02em;
}

.section-sub {
    margin-top: 10px;
    color: var(--muted);
    max-width: 640px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.loading {
    grid-column: 1 / -1;
    padding: 40px 24px;
    border-radius: var(--r-lg);
    background: var(--surface);
    color: var(--muted);
    text-align: center;
}

/* ---------- Кнопки ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: var(--pill);
    background: var(--ink);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn svg { width: 18px; height: 18px; transition: transform .2s; }
.btn:hover { background: #2b2b2b; }
.btn:hover svg { transform: translateX(3px); }
.btn:disabled { opacity: .6; cursor: progress; }

.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }

.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { background: var(--ink); color: #fff; }

.btn--accent { background: var(--accent); }
.btn--accent:hover { background: var(--accent-ink); }

.btn--block { width: 100%; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 14px; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    transition: background .2s, color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.icon-btn--prev svg { transform: rotate(180deg); }

.link-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    border-bottom: 1px solid currentColor;
}
.link-more svg { width: 16px; height: 16px; }

/* ---------- Шапка ---------- */

.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(1.4) blur(14px);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 24px rgba(0, 0, 0, .04); }

.header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--header-h);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.logo svg { width: 34px; height: 34px; }
.logo small {
    display: block;
    margin-top: -2px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
}
.logo span { line-height: 1.1; }

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.nav a {
    padding: 8px 14px;
    border-radius: var(--pill);
    color: var(--ink-2);
    font-size: 15px;
    font-weight: 500;
    transition: background .2s, color .2s;
}
.nav a:hover { background: var(--surface); color: var(--ink); }

.nav__fav { display: inline-flex; align-items: center; gap: 6px; }
.nav__fav span {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: var(--pill);
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.header__actions { display: flex; align-items: center; gap: 10px; }
.header__phone { gap: 8px; }
.header__phone svg { width: 16px; height: 16px; }

.burger {
    display: none;
    width: 46px;
    height: 46px;
    margin-left: auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.burger span {
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .25s, opacity .25s;
}
.nav-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-open .burger span:nth-child(2) { opacity: 0; }
.nav-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero { padding: 12px 0 0; }

.hero__frame {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: min(760px, calc(100svh - var(--header-h) - 24px));
    padding: 28px;
    border-radius: var(--r-xl);
    overflow: hidden;
    color: #fff;
    background: #2a2622 url("../images/hero.jpg") center 30% / cover no-repeat;
    isolation: isolate;
}
.hero__frame::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(20, 16, 12, .35) 0%, rgba(20, 16, 12, .05) 35%, rgba(20, 16, 12, .55) 100%);
}

.hero__cards {
    position: absolute;
    top: 28px;
    left: 28px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hero__card {
    display: block;
    width: 220px;
    padding: 8px 8px 12px;
    border-radius: var(--r-md);
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform .25s;
}
.hero__card:hover { transform: translateY(-3px); }
.hero__card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--r-sm);
    margin-bottom: 10px;
}
.hero__card strong {
    display: block;
    padding: 0 4px;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hero__card-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 0 4px;
}
.hero__card-row small { color: var(--muted); font-size: 11px; }
.hero__card-row b { font-size: 12px; font-weight: 700; }

.hero__thumb {
    display: block;
    width: 120px;
    border: 3px solid #fff;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform .25s;
}
.hero__thumb:hover { transform: translateY(-3px); }
.hero__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.hero__badge {
    position: absolute;
    top: 28px;
    right: 28px;
    display: grid;
    place-items: center;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--ink);
    transition: transform .3s;
}
.hero__badge:hover { transform: scale(1.04); }
.hero__badge-text {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: spin 18s linear infinite;
}
.hero__badge-text text {
    fill: var(--ink);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.hero__badge-ico {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--ink);
    color: #fff;
}
.hero__badge-ico svg { width: 22px; height: 22px; transform: rotate(-45deg); }

@keyframes spin { to { transform: rotate(360deg); } }

.hero__title {
    font-size: clamp(88px, 21vw, 300px);
    line-height: .85;
    font-weight: 700;
    letter-spacing: -.055em;
    text-align: center;
    text-shadow: 0 8px 40px rgba(0, 0, 0, .18);
}

.hero__bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.hero__sub {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 500;
    max-width: 460px;
}
.hero__facts { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__facts li {
    padding: 10px 18px;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: var(--pill);
    background: rgba(255, 255, 255, .14);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 14px;
    font-weight: 600;
}

/* ---------- Пошук (головна) ---------- */

.searchbar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
    gap: 10px;
    padding: 10px;
    border-radius: var(--r-lg);
    background: var(--surface);
}

.searchbar__field {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 8px 14px 8px 8px;
    border-radius: var(--r-md);
    background: #fff;
    transition: opacity .2s;
}
.searchbar__field.is-disabled { opacity: .45; }

.searchbar__ico {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-ink);
    flex: none;
}
.searchbar__ico svg { width: 18px; height: 18px; }

.searchbar__body { flex: 1; min-width: 0; }
.searchbar__label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}
.searchbar__pair { display: flex; align-items: center; gap: 4px; }
.searchbar__pair > * { width: 50%; }

.searchbar select,
.searchbar input {
    width: 100%;
    min-width: 0;
    padding: 2px 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}
.searchbar select { cursor: pointer; text-overflow: ellipsis; }
.searchbar input::placeholder { color: var(--ink-2); font-weight: 500; }

.searchbar__submit { min-height: 100%; padding: 0 28px; border-radius: var(--r-md); }

.searchbar__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
}

/* ---------- Фільтри (каталог) ---------- */

.filters {
    margin: 28px 0 20px;
    padding: 18px;
    border-radius: var(--r-lg);
    background: var(--surface);
}

.filters__toggle {
    display: none;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--pill);
    background: #fff;
    font-weight: 600;
}
.filters__badge {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-left: auto;
    border-radius: var(--pill);
    background: var(--accent);
    color: #fff;
    font-size: 12px;
}

.filters__body {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.filters__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    transition: opacity .2s;
}
.filters__field.is-disabled { opacity: .45; }
.filters__label { color: var(--muted); font-size: 13px; font-weight: 500; padding-left: 4px; }

.filters__range { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

.filters select,
.filters input {
    width: 100%;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    background: #fff;
    font-size: 15px;
    outline: none;
    transition: border-color .2s;
}
.filters select:focus,
.filters input:focus { border-color: var(--ink); }

.filters__actions {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
}
.filters__found { color: var(--muted); font-size: 14px; }
.filters__reset {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent-ink);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Стрічка «Ексклюзивні пропозиції» ---------- */

.scroller { margin-right: calc(var(--gutter) * -1); }
.scroller__track {
    display: flex;
    gap: 20px;
    padding-right: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.scroller__track::-webkit-scrollbar { display: none; }

.scroller-nav { display: flex; align-items: center; gap: 14px; }
.dots { display: flex; gap: 6px; }
.dots button {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: var(--pill);
    background: var(--line);
    transition: width .25s, background .25s;
}
.dots button[aria-current="true"] { width: 26px; background: var(--ink); }

.feature {
    flex: 0 0 min(880px, 86%);
    display: grid;
    gap: 12px;
    scroll-snap-align: start;
}

.feature__media {
    display: block;
    border-radius: var(--r-xl);
    overflow: hidden;
}
.feature__media img {
    width: 100%;
    aspect-ratio: 16 / 8;
    object-fit: cover;
    transition: transform .6s;
}
.feature:hover .feature__media img { transform: scale(1.03); }

.feature__panel {
    display: grid;
    gap: 6px;
    padding: 26px 28px;
    border-radius: var(--r-xl);
    background: var(--accent-soft);
}
.feature__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.feature__head h3 { font-size: clamp(20px, 2.2vw, 28px); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.feature__tag {
    flex: none;
    padding: 6px 12px;
    border-radius: var(--pill);
    background: rgba(255, 255, 255, .7);
    font-size: 13px;
    font-weight: 600;
}
.feature__addr { color: var(--ink-2); }

.feature__foot {
    display: flex;
    align-items: flex-end;
    gap: 16px 48px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.feature__foot small { display: block; color: var(--muted); font-size: 13px; }
.feature__foot strong { font-size: clamp(18px, 2vw, 24px); font-weight: 700; }
.feature__price { font-size: clamp(22px, 2.6vw, 32px) !important; }
.feature__foot .btn { margin-left: auto; }

/* ---------- Картка об'єкта ---------- */

.catalog__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 20px;
}

.prop { display: flex; flex-direction: column; min-width: 0; }

.prop__media {
    position: relative;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: var(--surface);
}
.prop__media > a { display: block; }
.prop__media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .5s;
}
.prop:hover .prop__media img { transform: scale(1.04); }

.prop__nophoto {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    color: #c2bdb6;
}
.prop__nophoto svg { width: 48px; height: 48px; }

.prop__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: var(--pill);
    background: rgba(255, 255, 255, .92);
    font-size: 12px;
    font-weight: 700;
}
.prop__badge--rent { background: var(--accent); color: #fff; }

.prop__fav {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    transition: transform .2s, color .2s;
}
.prop__fav svg { width: 18px; height: 18px; }
.prop__fav:hover { transform: scale(1.08); }
.prop__fav[aria-pressed="true"] { --fav-fill: 1; color: var(--accent); }

.prop__body { display: grid; gap: 6px; padding: 14px 4px 0; }
.prop__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.prop__price { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.prop__price small { color: var(--muted); font-size: 13px; font-weight: 500; }
.prop__area { color: var(--ink-2); font-size: 14px; white-space: nowrap; }

.prop__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.prop__title a:hover { color: var(--accent-ink); }

.prop__place {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 13px;
}
.prop__place svg { width: 14px; height: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chips li {
    padding: 5px 12px;
    border-radius: var(--pill);
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
}

.catalog__more { display: flex; margin: 36px auto 0; }

/* ---------- Про агентство ---------- */

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.about__media {
    position: relative;
    min-height: 460px;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--surface) url("../images/about.jpg") center / cover no-repeat;
}
.about__stamp {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 18px 22px;
    border-radius: var(--r-md);
    background: #fff;
    box-shadow: var(--shadow);
}
.about__stamp strong { display: block; font-size: 32px; line-height: 1; font-weight: 800; }
.about__stamp span { color: var(--muted); font-size: 13px; }

.about__panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: clamp(24px, 4vw, 48px);
    border-radius: var(--r-xl);
    background: var(--surface);
}
.about__panel p { color: var(--ink-2); }

.about__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: auto;
}
.about__stats div {
    padding: 18px;
    border-radius: var(--r-md);
    background: #fff;
}
.about__stats strong {
    display: block;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.02em;
}
.about__stats span { color: var(--muted); font-size: 13px; line-height: 1.3; }

.benefits {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}
.benefits li {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    font-weight: 600;
    line-height: 1.35;
}
.benefits__ico {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-ink);
}

/* ---------- Команда ---------- */

.team__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 20px;
}

.agent { display: flex; flex-direction: column; min-width: 0; }
.agent--reveal { animation: reveal .5s both; }
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } }

/* Фото менеджерів у CRM часто вже мають «вшите» помаранчеве кільце різної товщини й положення.
   Збільшуємо фото й обрізаємо колом так, щоб чуже кільце пішло за кадр, а рамку малюємо самі —
   однакову для всіх. clip-path діє до transform, тому радіус ділимо на zoom — видно рівно коло. */
:root { --avatar-zoom: 1.3; }
.avatar-crop,
img.agent__photo,
.object__agent-top img {
    object-fit: cover;
    object-position: center 30%;
    transform: scale(var(--avatar-zoom));
    clip-path: circle(calc(50% / var(--avatar-zoom)));
}
.avatar-crop { width: 100%; height: 100%; }

.agent__media {
    position: relative;
    display: block;
    width: min(100%, 260px);
    aspect-ratio: 1;
    margin: 0 auto;
    padding: 7px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: #fff;
    transition: border-color .25s, transform .25s;
}
.agent:hover .agent__media { border-color: var(--ink); transform: translateY(-3px); }
/* Абсолютно, щоб пропорції фото не розтягували квадрат рамки */
.agent__photo {
    position: absolute;
    top: 7px;
    left: 7px;
    width: calc(100% - 14px);
    height: calc(100% - 14px);
    display: block;
    border-radius: 50%;
}
.agent__photo--empty { display: grid; place-items: center; background: var(--surface); color: #c2bdb6; }
.agent__photo--empty svg { width: 64px; height: 64px; }

.agent__count {
    position: absolute;
    left: 50%;
    bottom: -6px;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: var(--pill);
    background: var(--ink);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.agent__body { display: grid; justify-items: center; gap: 6px; padding: 22px 4px 0; text-align: center; }
.agent__contacts { justify-content: center; }
.agent__name { font-size: 17px; font-weight: 700; line-height: 1.3; }
.agent__name a:hover { color: var(--accent-ink); }
.agent__phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 500;
}
.agent__phone svg { width: 14px; height: 14px; color: var(--accent); }

.agent__contacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.agent__contacts a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface);
    transition: background .2s, color .2s;
}
.agent__contacts a:hover { background: var(--ink); color: #fff; }
.agent__contacts svg { width: 16px; height: 16px; }

.team__more { display: flex; margin: 32px auto 0; }
.team__more svg { transform: rotate(90deg); }
.team__more.is-open svg { transform: rotate(-90deg); }

/* ---------- Партнери ---------- */

.partners__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.partner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    transition: border-color .2s, box-shadow .2s;
}
a.partner:hover { border-color: transparent; box-shadow: var(--shadow); }
.partner__logo {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--surface);
    flex: none;
}
.partner__logo img { width: 100%; height: 100%; object-fit: contain; }
.partner__name { padding: 4px; font-size: 11px; font-weight: 700; text-align: center; }
.partner small { font-size: 14px; font-weight: 600; line-height: 1.3; }

.partners__more { display: flex; margin: 24px auto 0; }

/* ---------- Контакти та форма ---------- */

.contacts__panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 4vw, 56px);
    padding: clamp(24px, 4vw, 56px);
    border-radius: var(--r-xl);
    background: var(--accent-soft);
}

.contacts__list { display: grid; gap: 10px; margin: 28px 0; }
.contacts__list li a,
.contacts__list li > span {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 17px;
    font-weight: 600;
}
.contacts__ico {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    flex: none;
}
.contacts__ico svg { width: 18px; height: 18px; }
.contacts__list a:hover .contacts__ico { background: var(--ink); color: #fff; }

.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    transition: background .2s, color .2s;
}
.socials a:hover { background: var(--ink); color: #fff; }

.lead__form {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: clamp(20px, 3vw, 32px);
    border-radius: var(--r-lg);
    background: #fff;
}
.lead__title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }

.field {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    transition: border-color .2s;
}
.field:focus-within { border-color: var(--ink); }
.field svg { width: 18px; height: 18px; color: var(--muted); }
.field input,
.field textarea {
    flex: 1;
    min-width: 0;
    height: 54px;
    border: 0;
    background: transparent;
    outline: none;
}
.field--area { align-items: flex-start; }
.field--area svg { margin-top: 17px; }
.field textarea { height: auto; min-height: 90px; padding: 15px 0; resize: vertical; }
.field.is-invalid { border-color: var(--error); }

.lead__status { min-height: 1.4em; font-size: 14px; }
.lead__status.is-ok { color: var(--ok); }
.lead__status.is-error { color: var(--error); }
.lead__note { color: var(--muted); font-size: 13px; }

/* ---------- Підвал ---------- */

.footer {
    margin-top: 56px;
    padding: 56px 0 28px;
    background: var(--ink);
    color: #fff;
}
.footer__inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.footer .logo small { color: rgba(255, 255, 255, .55); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer__nav a { color: rgba(255, 255, 255, .75); }
.footer__nav a:hover { color: #fff; }
.footer .socials a { background: rgba(255, 255, 255, .1); color: #fff; }
.footer .socials a:hover { background: var(--accent); }
.footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, .12);
    color: rgba(255, 255, 255, .55);
    font-size: 14px;
}

/* ---------- Внутрішні сторінки ---------- */

.page { padding: 20px 0 0; }

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 14px;
}
.crumbs a:hover { color: var(--ink); }
.crumbs span:last-child {
    color: var(--ink);
    max-width: 60ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalogpage__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.catalogpage__found { font-weight: 600; }
.catalogpage__sort { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.catalogpage__sort select {
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--pill);
    background: #fff;
    color: var(--ink);
    font-weight: 600;
}

/* ---------- Сторінка об'єкта ---------- */

.object__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    grid-template-areas:
        "gallery head"
        "details aside";
    gap: 32px 40px;
    align-items: start;
}

.gallery { grid-area: gallery; min-width: 0; }
.gallery__stage {
    position: relative;
    border-radius: var(--r-xl);
    overflow: hidden;
    background: var(--surface);
}
.gallery__image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: zoom-in;
}
.gallery__nav {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-top: -24px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow);
    transition: transform .2s;
}
.gallery__nav:hover { transform: scale(1.08); }
.gallery__nav--prev { left: 18px; }
.gallery__nav--prev svg { transform: rotate(180deg); }
.gallery__nav--next { right: 18px; }
.gallery__counter {
    position: absolute;
    right: 16px;
    bottom: 16px;
    padding: 5px 12px;
    border-radius: var(--pill);
    background: rgba(18, 18, 18, .65);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.gallery__thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.gallery__thumb {
    width: 120px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--r-md);
    overflow: hidden;
    background: none;
    opacity: .7;
    transition: opacity .2s, border-color .2s;
}
.gallery__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery__thumb:hover { opacity: 1; }
.gallery__thumb.is-active { border-color: var(--ink); opacity: 1; }

.object__head { grid-area: head; display: grid; gap: 18px; min-width: 0; }
.object__title { font-size: clamp(26px, 3vw, 40px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; }
.object__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: var(--muted); }
.object__address,
.object__views { display: inline-flex; align-items: center; gap: 6px; }
.object__address svg,
.object__views svg { width: 16px; height: 16px; }

.object__price-row { display: flex; align-items: center; gap: 12px; }
.object__price-box {
    padding: 14px 24px;
    border-radius: var(--r-lg);
    background: var(--accent-soft);
}
.object__price { display: block; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.1; font-weight: 800; letter-spacing: -.02em; }
.object__price-unit { color: var(--ink-2); font-size: 14px; }
.object__fav { position: static; width: 56px; height: 56px; border: 1px solid var(--line); }
.object__fav svg { width: 22px; height: 22px; }

.object__facts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.object__facts li {
    display: grid;
    gap: 2px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}
.object__facts svg { width: 20px; height: 20px; margin-bottom: 6px; color: var(--accent); }
.object__facts strong { font-size: 18px; font-weight: 700; }
.object__facts span { color: var(--muted); font-size: 13px; }

.object__agent {
    padding: 18px;
    border-radius: var(--r-lg);
    background: var(--surface);
}
.object__agent:empty { display: none; }
.object__agent-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.object__agent-top img,
.object__agent-ph {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
}
.object__agent-top img { background: none; }
.object__agent-top strong { display: block; font-size: 16px; }
.object__agent-top span { color: var(--muted); font-size: 13px; }
.object__agent-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    margin-bottom: 10px;
    border-radius: var(--pill);
    background: var(--ink);
    color: #fff;
    font-weight: 700;
    transition: background .2s;
}
.object__agent-call:hover { background: var(--accent); }
.object__agent-call svg { width: 16px; height: 16px; }
.object__agent .agent__contacts a { background: #fff; }

.object__meta { color: var(--muted); font-size: 13px; }

.object__details { grid-area: details; display: grid; gap: 36px; min-width: 0; }
.object__aside { grid-area: aside; position: sticky; top: calc(var(--header-h) + 16px); }
.object__aside .lead__form { background: var(--surface); }
.object__aside .field { background: #fff; }

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    padding: 4px;
    border-radius: var(--pill);
    background: var(--surface);
    width: fit-content;
}
.tabs button {
    min-height: 42px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--pill);
    background: transparent;
    color: var(--muted);
    font-weight: 600;
}
.tabs button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }

.object__h2 { margin-bottom: 16px; font-size: 22px; font-weight: 700; }
.object__block + .object__block { margin-top: 28px; }
.object__desc { color: var(--ink-2); line-height: 1.7; }

.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; margin: 0; }
.specs__row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
.specs dt { color: var(--muted); }
.specs dd { margin: 0; font-weight: 600; text-align: right; }

.object__video iframe,
.object__map iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--r-lg);
    background: var(--surface);
}
.object__map { margin-bottom: 14px; }

/* Каркас, поки вантажаться дані об'єкта */
.object__inner.is-loading .gallery__stage,
.object__inner.is-loading .object__title,
.object__inner.is-loading .object__price-box,
.object__inner.is-loading .object__facts {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%) 0 0 / 200% 100%;
    animation: shimmer 1.4s infinite;
    color: transparent;
}
.object__inner.is-loading .object__title { min-height: 1.2em; border-radius: var(--r-sm); }
.object__inner.is-loading .object__price-box { min-height: 72px; width: 60%; }
.object__inner.is-loading .object__facts { min-height: 88px; border-radius: var(--r-md); }
.object__inner.is-loading .object__details,
.object__inner.is-loading .object__aside { visibility: hidden; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Повноекранна галерея ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    grid-template-rows: 1fr auto;
    background: rgba(10, 10, 10, .95);
    color: #fff;
}
.lightbox__stage { display: grid; place-items: center; min-height: 0; padding: 64px 80px 16px; }
.lightbox__image { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-md); }
.lightbox__thumbs {
    grid-row: 2;
    display: flex;
    gap: 8px;
    padding: 12px 24px 20px;
    overflow-x: auto;
    justify-content: safe center;
}
.lightbox__thumb {
    width: 84px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: none;
    opacity: .5;
    flex: none;
}
.lightbox__thumb img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.lightbox__thumb.is-active { border-color: #fff; opacity: 1; }
.lightbox__close,
.lightbox__nav {
    position: absolute;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .25); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__nav { top: 50%; margin-top: -60px; }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--prev svg { transform: rotate(180deg); }
.lightbox__nav--next { right: 16px; }
.lightbox__counter { position: absolute; top: 28px; left: 24px; font-weight: 600; }

/* ---------- Профіль менеджера ---------- */

.agentpage__inner {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 40px;
    align-items: start;
}
.agentpage__card {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    display: grid;
    gap: 14px;
    padding: 16px;
    border-radius: var(--r-xl);
    background: var(--surface);
}
.agentpage__frame {
    width: min(100%, 280px);
    aspect-ratio: 1;
    margin: 8px auto 4px;
    padding: 8px;
    border: 3px solid var(--accent);
    border-radius: 50%;
    background: #fff;
}
.agentpage__photo { display: block; border-radius: 50%; aspect-ratio: 1; }
div.agentpage__photo { width: 100%; height: 100%; background: var(--surface-2); }
.agentpage__name { padding: 0 6px; font-size: 26px; line-height: 1.2; font-weight: 700; }
.agentpage__role { padding: 0 6px; margin-top: -8px; color: var(--muted); }
.agentpage__stats strong { font-size: 36px; font-weight: 800; line-height: 1; margin-right: 8px; }
.agentpage__stats { padding: 0 6px; }
.agentpage__stats span { color: var(--muted); }
.agentpage__types { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 6px; }
.agentpage__types li {
    padding: 5px 12px;
    border-radius: var(--pill);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
}
.agentpage__card .agent__contacts a { background: #fff; }
.agentpage__card .lead__form { padding: 16px; }
.agentpage__main { display: grid; gap: 40px; min-width: 0; }
.agentpage__main .catalog__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.catalog__subtitle { font-size: 26px; font-weight: 700; }

/* ---------- Адаптив ---------- */

@media (max-width: 1200px) {
    .searchbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .searchbar__submit { grid-column: span 3; min-height: 54px; }
    .benefits { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .catalog__grid,
    .team__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .agentpage__main .catalog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .partners__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .header__phone { display: none; }
}

@media (max-width: 960px) {
    :root { --header-h: 68px; }

    .burger { display: inline-flex; }
    .header__actions { display: none; }
    .nav {
        position: fixed;
        top: var(--header-h);
        left: 0;
        right: 0;
        bottom: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 16px var(--gutter);
        margin: 0;
        background: #fff;
        overflow-y: auto;
    }
    .nav a { padding: 14px 16px; font-size: 18px; border-radius: var(--r-md); }
    .nav-open .nav { display: flex; }
    .nav-open { overflow: hidden; }
    .nav__cta { display: flex !important; margin-top: 12px; justify-content: center; background: var(--ink) !important; color: #fff !important; }

    .hero__frame { min-height: 620px; padding: 20px; }
    .hero__cards { top: 20px; left: 20px; }
    .hero__thumb { display: none; }
    .hero__badge { top: 20px; right: 20px; width: 110px; height: 110px; }
    .hero__badge-text text { font-size: 13px; }
    .hero__badge-ico { width: 42px; height: 42px; }

    .feature { flex-basis: 88%; }
    .feature__media img { aspect-ratio: 16 / 10; }

    .about__grid,
    .contacts__panel { grid-template-columns: 1fr; }
    .about__media { min-height: 320px; }

    .filters__toggle { display: flex; }
    .filters__body { display: none; grid-template-columns: 1fr 1fr; margin-top: 14px; }
    .filters__body.is-open { display: grid; }

    .object__inner {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "gallery" "head" "details" "aside";
    }
    .object__aside { position: static; }

    .agentpage__inner { grid-template-columns: 1fr; }
    .agentpage__card { position: static; }
}

@media (min-width: 961px) {
    .nav__cta { display: none !important; }
}

@media (max-width: 720px) {
    :root { --gutter: 16px; }
    .section { padding: 40px 0; }

    .hero { padding-top: 8px; }
    .hero__frame { min-height: 560px; border-radius: var(--r-lg); }
    .hero__card { width: 180px; }
    .hero__badge { display: none; }
    .hero__facts li { padding: 8px 14px; font-size: 13px; }

    .searchbar { grid-template-columns: 1fr; }
    .searchbar__submit { grid-column: auto; }

    .catalog__grid,
    .team__grid,
    .agentpage__main .catalog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
    .prop__price { font-size: 18px; }
    .chips li:nth-child(n + 2) { display: none; }

    .benefits { grid-template-columns: 1fr 1fr; }
    .benefits li:last-child { grid-column: span 2; }
    .about__stats { grid-template-columns: 1fr 1fr; }
    .about__stats div:last-child { grid-column: span 2; }

    .partners__grid { grid-template-columns: 1fr 1fr; }
    .partner { flex-direction: column; align-items: flex-start; }

    .feature__panel { padding: 20px; }
    .feature__head { flex-direction: column; }
    .feature__foot { gap: 12px 28px; }
    .feature__foot .btn { width: 100%; }

    .filters__body { grid-template-columns: 1fr; }
    .specs { grid-template-columns: 1fr; }

    .lightbox__stage { padding: 64px 12px 12px; }
    .lightbox__nav { display: none; }
}

@media (max-width: 420px) {
    .catalog__grid,
    .team__grid,
    .agentpage__main .catalog__grid { grid-template-columns: 1fr; }
    .chips li:nth-child(n + 2) { display: list-item; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
