/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; line-height: 1.4; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.grow { flex: 1; }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); font-weight: 600; }
.skip:focus { left: 8px; }

/* icons */
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 22px; height: 22px; }
.ic-bold { stroke-width: 2.2; }
.sk { fill: currentColor; }
.skw { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 7 9; opacity: .75; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 12px; border: 0; background: var(--primary); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; transition: background .15s; }
.btn:hover { background: var(--primary-h); }
.btn-sm { height: 42px; width: fit-content; }
.pill { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid transparent; background: transparent; font-weight: 600; font-size: 14.5px; position: relative; white-space: nowrap; }
.pill:hover { background: var(--pale-2); }
.pill.bordered { border-color: var(--line); background: #fff; }
.pill-lang { padding: 0 12px; }
.pill-lang strong { letter-spacing: .02em; font-weight: 800; }
.badge { position: absolute; top: 4px; left: 26px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }

/* ---------- dropdown menus ---------- */
.menu-root { position: relative; display: flex; }
.menu { position: absolute; z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-menu); padding: 6px; }
.menu-loc { top: calc(100% + 8px); left: 0; width: 260px; max-height: 360px; overflow: auto; }
.menu-loc-search { left: auto; right: 0; top: calc(100% + 14px); width: 280px; }
.menu-lang { top: calc(100% + 8px); right: 0; width: 200px; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 9px; font-size: 14.5px; font-weight: 600; min-height: 40px; }
.menu-item:hover, .menu-item:focus-visible { background: var(--pale-2); }
.menu-item[aria-selected="true"], .menu-item[aria-checked="true"] { color: var(--primary); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.hdr.scrolled { box-shadow: 0 4px 16px rgba(16, 44, 74, .07); }
.hdr-in { height: var(--header-h); display: flex; align-items: center; gap: 8px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; margin-right: 12px; }
.logo b { color: var(--accent); font-weight: 800; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); display: grid; place-items: center; color: #fff; }
.logo-mark .ic { width: 18px; height: 18px; stroke-width: 2.2; }

/* ---------- partner banner ---------- */
.banner { margin-top: 20px; border-radius: var(--r-lg); overflow: hidden; min-height: 232px; background: #E3EEF9; }
.banner-link { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: stretch; min-height: 232px; padding: 0 0 0 48px; gap: 24px; }
.banner-copy { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: 28px 0; }
.banner-copy p { font-size: 15.5px; font-weight: 500; color: #33475B; max-width: 520px; }
.banner h2 { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; max-width: 560px; }
.ad-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: #4A5A6B; background: rgba(255, 255, 255, .75); padding: 3px 9px; border-radius: 999px; width: fit-content; }
.banner-art { align-self: end; display: flex; justify-content: flex-end; align-items: flex-end; padding-right: 24px; color: rgba(53, 99, 138, .30); }
.banner-art svg { height: 200px; width: auto; aspect-ratio: 8/5; }

/* ---------- search ---------- */
.search-sec { margin-top: 36px; }
.search-sec h1 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 800; letter-spacing: -.025em; margin-bottom: 16px; }
.search-card { position: relative; z-index: 10; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 8px; box-shadow: 0 8px 28px rgba(16, 44, 74, .08); }
.search-card:focus-within { border-color: #9DB8D6; box-shadow: 0 8px 28px rgba(16, 44, 74, .12), 0 0 0 3px rgba(29, 93, 166, .12); }
.search-field { flex: 1; display: flex; align-items: center; gap: 12px; padding: 0 14px; min-width: 0; height: 52px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 500; color: var(--ink); }
.search-field input::placeholder { color: #6B7A8A; }
.sep { width: 1px; height: 28px; background: var(--line); flex: none; }
.loc-btn { height: 52px; min-width: 230px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; font-weight: 600; font-size: 16px; }
.loc-btn:hover { background: var(--pale-2); }
.loc-name { flex: 1; text-align: left; }
.btn-find { height: 52px; padding: 0 36px; font-size: 16px; border-radius: 13px; }
.sugg { left: 0; right: 0; top: calc(100% + 8px); padding: 8px; }
.sugg h3 { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px 12px 4px; }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; text-align: left; padding: 10px 12px; border-radius: var(--r-sm); font-size: 15px; font-weight: 600; min-height: 44px; }
.opt .ic { color: var(--muted); width: 18px; height: 18px; }
.opt:hover, .opt.active { background: var(--pale-2); }

/* ---------- sections ---------- */
.sec { margin-top: 44px; }
.sec-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.sec-h h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.sec-h p { font-size: 14px; color: var(--muted); margin-top: 4px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14.5px; color: var(--primary); padding: 8px 4px; border-radius: 8px; white-space: nowrap; }
.more:hover { color: var(--primary-h); }
.more .ic { width: 18px; height: 18px; transition: transform .15s; }
.more:hover .ic { transform: translateX(3px); }

/* ---------- categories ---------- */
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }   /* a row of fewer tiles sits in the centre */
.cats > li { flex: 0 0 calc((100% - 8 * 12px) / 9); min-width: 0; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 6px 12px; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r); text-align: center; transition: border-color .15s, box-shadow .15s; }
.cat-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--pale-2); color: var(--ink); display: grid; place-items: center; transition: background .15s, color .15s; }
.cat-ic .ic { width: 24px; height: 24px; }
.cat-label { font-size: 13px; font-weight: 600; line-height: 1.25; min-height: 2.5em; display: flex; align-items: flex-start; justify-content: center; }
.cat:hover { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.cat:hover .cat-ic { background: var(--primary); color: #fff; }
.cat.all { background: var(--pale); border-color: var(--pale); width: 100%; cursor: pointer; font: inherit; color: inherit; }
.cat.all[aria-expanded="true"] .cat-ic { background: var(--primary); color: #fff; }
.cat.all .cat-ic { background: #fff; color: var(--primary); }
.cat.all:hover .cat-ic { background: var(--primary); color: #fff; }

/* ---------- listing cards ---------- */
.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 16px; }
.card { position: relative; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card:has(a:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.thumb { aspect-ratio: 4 / 3; position: relative; display: grid; place-items: center; color: rgba(53, 99, 138, .55); overflow: hidden; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb .ic { width: 38%; height: auto; aspect-ratio: 1; stroke-width: 1.2; }
.top { position: absolute; top: 8px; left: 8px; background: var(--badge-bg); color: var(--badge-ink); font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 3px 8px; border-radius: 7px; }
.fav { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); display: grid; place-items: center; color: var(--ink); transition: background .15s, color .15s; }
.fav:hover { background: #fff; color: var(--fav); }
.fav .ic { width: 19px; height: 19px; }
.fav[aria-pressed="true"] { color: var(--fav); }
.fav[aria-pressed="true"] .ic { fill: var(--fav); }
.card-body { padding: 12px 14px 14px; }
.ttl { font-size: 14px; line-height: 1.35; font-weight: 600; min-height: 2.7em; }
.ttl a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; color: var(--ink); }
.ttl a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.price { font-size: 17px; font-weight: 800; letter-spacing: -.01em; color: var(--price); margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meta { margin-top: 8px; font-size: 12.5px; line-height: 1.35; color: var(--muted); font-weight: 500; display: flex; flex-direction: column; gap: 2px; }
.meta span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- footer ---------- */
.foot { margin-top: 72px; background: #fff; border-top: 1px solid var(--line); }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1.2fr; gap: 40px; padding: 48px 0 36px; }
.foot .logo { margin-bottom: 14px; }
.foot h3 { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.foot li a { display: inline-block; padding: 5px 0; font-size: 14.5px; color: var(--muted); font-weight: 500; }
.foot li a:hover { color: var(--primary); }
.foot p { font-size: 14.5px; line-height: 1.55; color: var(--muted); font-weight: 500; }
.foot-desc { max-width: 340px; }
.contact .btn { margin-top: 16px; }
.soc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.soc a { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; }
.soc a:hover { background: var(--pale-2); border-color: var(--line-strong); }
.foot-bot { border-top: 1px solid var(--line); padding: 18px 0 28px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; font-size: 13.5px; color: var(--muted); font-weight: 500; }
.foot-bot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-bot a:hover { color: var(--primary); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 3px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 7px; font-size: 13px; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 1279px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cats > li { flex-basis: calc((100% - 4 * 12px) / 5); }
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .foot-grid > .contact { grid-column: 1 / -1; }
  .hide-lg { display: none; }
}
@media (max-width: 899px) {
  .hide-md { display: none; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .banner-link { padding-left: 28px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 719px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .cats > li { flex-basis: calc((100% - 4 * 12px) / 5); }
  .banner-link { grid-template-columns: 1fr; padding: 24px 20px; }
  .banner-art { display: none; }
  .search-card { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; }
  .sep { display: none; }
  .menu-root:has(.loc-btn) { flex: 1; }
  .loc-btn { flex: 1; min-width: 0; width: 100%; }
  .menu-loc-search { left: 0; right: auto; }
  .hide-sm { display: none; }
  .hdr-in { gap: 2px; }
  .hdr-in .pill { padding: 0 10px; }
  .hdr-in .btn { padding: 0 12px; margin-left: 4px; }
  .logo { margin-right: 0; font-size: 20px; }
  .sec-h h2 { font-size: 20px; }
}
@media (max-width: 479px) {
  .hide-xs { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* ---------- mobile (phones): bottom tab bar, sheets, swipe strips ---------- */
.tabbar { display: none; }

@media (max-width: 719px) {
  :root { --header-h: 60px; --tabbar-h: 64px; }
  body { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); }

  /* header: logo + language only; the rest lives in the tab bar */
  .hdr { backdrop-filter: none; background: #fff; } /* backdrop-filter would trap the fixed sheets */
  .hdr-desktop { display: none; }
  .hdr-in { gap: 8px; }

  /* bottom tab bar */
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(16, 44, 74, .06);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .tab { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; min-height: 52px;
    font-size: 11px; font-weight: 600; color: var(--muted); border-radius: 12px; white-space: nowrap; }
  .tab .ic { width: 24px; height: 24px; }
  .tab[aria-current="page"] { color: var(--primary); }
  .tab .badge { top: 0; left: calc(50% + 4px); }
  .tab-post { color: var(--ink); }
  .tab-plus { width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center;
    margin-top: -18px; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(29, 93, 166, .35); }
  .tab-plus .ic { width: 22px; height: 22px; }

  /* menus become bottom sheets */
  body.menu-open::before { content: ''; position: fixed; inset: 0; background: rgba(16, 44, 74, .4); z-index: 25; }
  .menu-loc, .menu-lang, .menu-loc-search { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 70vh;
    border-radius: 20px 20px 0 0; padding: 12px 8px calc(12px + env(safe-area-inset-bottom)); z-index: 60; }
  .menu-item { min-height: 48px; font-size: 16px; }
  .search-card:has([data-loc-menu]:not([hidden])) { z-index: 35; }

  /* banner */
  .banner { margin-top: 12px; min-height: 0; border-radius: 16px; }
  .banner-link { min-height: 0; padding: 20px 18px; }
  .banner-copy { padding: 0; gap: 10px; }
  .banner h2 { font-size: 22px; }
  .banner-copy p { font-size: 14px; }

  /* search */
  .search-sec { margin-top: 24px; }
  .search-sec h1 { font-size: 22px; margin-bottom: 12px; }
  .search-card { border-radius: 16px; padding: 6px; }
  .search-field { height: 48px; padding: 0 10px; }
  .loc-btn, .btn-find { height: 48px; }
  .btn-find { padding: 0 24px; }
  .sugg { top: calc(100% + 6px); }
  .opt { min-height: 48px; }

  /* sections */
  .sec { margin-top: 32px; }
  .sec-h { margin-bottom: 12px; }
  .sec-h p { font-size: 13px; }

  /* horizontal swipe rows bleed to the screen edge */
  .cats, .grid-strip { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 8px; scroll-padding: 0 var(--gutter); }
  .cats::-webkit-scrollbar, .grid-strip::-webkit-scrollbar { display: none; }
  .cats > li { flex: 0 0 96px; scroll-snap-align: start; }
  .cat { padding-left: 4px; padding-right: 4px; }
  .cat-label { font-size: 12px; max-width: 100%; overflow-wrap: anywhere; hyphens: auto; }   /* a long name ("Недвижимость") wraps instead of spilling out of the tile */
  .grid-strip > li { flex: 0 0 168px; scroll-snap-align: start; }

  /* compact cards */
  .card-body { padding: 10px 12px 12px; }
  .ttl { font-size: 13.5px; }
  .price { font-size: 16px; margin-top: 6px; }
  .meta { margin-top: 6px; font-size: 12px; }
  .fav { width: 40px; height: 40px; top: 6px; right: 6px; }

  /* footer */
  .foot { margin-top: 48px; }
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding: 32px 0 24px; }
  .foot-grid > div:first-child, .foot-grid > .contact { grid-column: 1 / -1; }
  .foot-bot { flex-direction: column; align-items: flex-start; }
}

/* ---------- partner banner photo ---------- */
.banner-art { position: relative; align-self: stretch; padding: 0; color: inherit; }
.banner-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 28%); mask-image: linear-gradient(to right, transparent 0, #000 28%); }
@media (max-width: 899px) {
  .banner-art img { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40%); mask-image: linear-gradient(to right, transparent 0, #000 40%); }
}
@media (max-width: 719px) {
  .banner-link { padding: 0 0 18px; gap: 14px; }
  .banner-art { display: block; order: -1; height: 120px; }
  .banner-art img { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); }
  .banner-copy { padding: 0 18px; }
}
.banner-art img { transform: scaleX(-1); } /* sky on the left so it fades into the banner background */
/* the image is mirrored, so its fade gradient runs the opposite way */
.banner-art img { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28%); mask-image: linear-gradient(to left, transparent 0, #000 28%); }
@media (max-width: 899px) {
  .banner-art img { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 40%); mask-image: linear-gradient(to left, transparent 0, #000 40%); }
}
@media (max-width: 719px) {
  .banner-art img { -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); }
}

/* ---------- toast (shared) ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 12px; font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-menu); max-width: calc(100vw - 32px); text-align: center; }
@media (max-width: 719px) { .toast { bottom: calc(var(--tabbar-h, 64px) + 20px + env(safe-area-inset-bottom)); } }

/* ---------- mobile header: compact city selector next to the logo ---------- */
@media (max-width: 719px) {
  .hdr-in { gap: 8px; }
  .hdr-in .loc-pill { height: 40px; padding: 0 10px; gap: 6px; min-width: 0; }
  .hdr-in .loc-pill [data-loc-name] { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hdr-in .loc-pill .ic-sm { width: 14px; height: 14px; }
  .hdr-in .grow { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 389px) {
  .hdr-in .loc-pill [data-loc-name] { max-width: 64px; }
}

/* ---------- region label beside the header city selector ---------- */
.loc-label { display: none; max-width: 150px; font-size: 12px; line-height: 1.25; font-weight: 500; color: var(--muted); margin-right: -2px; }
.loc-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.2; }
.loc-cap { display: none; font-size: 10.5px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
@media (min-width: 1200px) { .loc-label { display: block; } }
@media (max-width: 719px) {
  .hdr-in .loc-pill { height: 46px; padding: 0 10px; }
  .loc-cap { display: block; }
  .hdr-in .loc-pill .loc-text [data-loc-name] { font-size: 14px; }
}
.loc-cap { max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 389px) {
  .hdr-in { gap: 6px; }
  .hdr-in .loc-pill { padding: 0 8px; gap: 5px; }
}

/* ---------- brand logo (assets/branding) ---------- */
.logo img { display: block; height: 34px; width: auto; }
.logo picture { display: block; line-height: 0; }
@media (max-width: 719px) { .logo img { height: 26px; } }
@media (max-width: 379px) { .logo img { height: 34px; width: 34px; } }
@media (min-width: 380px) and (max-width: 429px) {
  .logo img { height: 22px; }
  .hdr-in { gap: 6px; }
  .hdr-in .loc-pill { padding: 0 8px; gap: 5px; }
  .hdr-in .loc-pill [data-loc-name] { max-width: 70px; }
}

/* ---------- footer: three text blocks on the left, reserved ad zone on the right ---------- */
.foot-grid { grid-template-columns: 1.5fr 1fr 1.1fr 1.1fr 300px; gap: 36px; }
.ad-zone { justify-self: end; width: 300px; }
.ad-zone-label { font-size: 11.5px !important; font-weight: 700 !important; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; line-height: 1.2 !important; }
.ad-slot { width: 300px; min-height: 250px; /* reserved so the page does not jump when the ad loads */ display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px dashed #B9CCE1; border-radius: 14px; background: var(--bg); color: var(--muted); font-size: 13.5px; font-weight: 600; text-align: center; padding: 16px; }
.ad-slot-size { font-size: 12px; font-weight: 700; color: #8A98A8; font-variant-numeric: tabular-nums; }
@media (max-width: 1279px) {
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .foot-grid > .contact { grid-column: auto; }
  .ad-zone { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 899px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 719px) {
  .foot-grid > .contact { grid-column: 1 / -1; }
  .ad-zone { justify-self: center; max-width: 100%; }
  .ad-slot { max-width: 100%; }
}

/* ---------- all categories: slide-down panel under the category row ---------- */
.cat-more { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .4s ease, visibility 0s .4s; }
.cat-more.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows .4s ease, visibility 0s 0s; }
.cat-more-in { overflow: hidden; min-height: 0; }
.cat-more-grid { margin-top: 14px; padding: 24px 28px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 24px;
  opacity: 0; transform: translateY(-8px); transition: opacity .3s ease .05s, transform .4s ease; }
.cat-more.is-open .cat-more-grid { opacity: 1; transform: none; }
.cm-col h3 { font-size: 15px; font-weight: 800; }
.cm-col h3 a { display: flex; align-items: center; gap: 10px; }
.cm-col h3 a:hover { color: var(--primary); }
.cm-ic { width: 32px; height: 32px; flex: none; border-radius: 9px; background: var(--pale-2); display: grid; place-items: center; }
.cm-ic .ic { width: 18px; height: 18px; }
.cm-col ul { margin-top: 10px; display: grid; gap: 2px; }
.cm-col li a { display: block; padding: 6px 0; font-size: 14px; color: var(--ink-2); font-weight: 500; }
.cm-col li a:hover { color: var(--primary); text-decoration: underline; }
@media (max-width: 899px) { .cat-more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 719px) { .cat-more-grid { padding: 18px 16px; gap: 22px 16px; } }
@media (max-width: 359px) { .cat-more-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .cat-more, .cat-more-grid { transition: none; } }

/* "Все категории": a card in the row on wider screens, a link beside the heading on phones */
.cats-more-link { align-self: center; display: none; background: none; border: 0; font: inherit; font-weight: 700; font-size: 14.5px; cursor: pointer; }
.cats-more-link .ic { transition: transform .25s; }
.cats-more-link:hover .ic { transform: none; }
.cats-more-link[aria-expanded="true"] .ic { transform: rotate(180deg); }
@media (max-width: 719px) {
  .cats-more-link { display: inline-flex; }
  .cats > li:has(> .cat.all) { display: none; }
}
.sec-h:has(.cats-more-link) { align-items: center; }   /* heading and the "Все категории" link share one centre line */

/* compact partner banner above the category results */
.banner-sm { margin: 0 0 20px; min-height: 0; border-radius: 16px; }
.banner-sm .banner-link { min-height: 0; padding: 0 0 0 28px; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 16px; }
.banner-sm .banner-copy { padding: 20px 0; gap: 10px; align-items: flex-start; }
.banner-sm h2 { font-size: clamp(19px, 1.8vw, 24px); }
.banner-sm .banner-art { min-height: 110px; }
@media (max-width: 719px) {
  .banner-sm { margin-bottom: 14px; }
  .banner-sm .banner-link { padding: 0 0 16px; gap: 10px; grid-template-columns: 1fr; }
  .banner-sm .banner-art { height: 84px; min-height: 0; }
  .banner-sm .banner-copy { padding: 0 16px; }
}

/* ---------- signed-in account menu (opened from the header / tab bar) ---------- */
.user-pop { position: fixed; z-index: 60; top: calc(var(--header-h, 64px) + 6px); right: max(var(--gutter, 16px), calc((100vw - var(--maxw, 1180px)) / 2 + var(--gutter, 16px))); width: 240px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-menu); padding: 6px; }
.user-pop[hidden] { display: none; }
.user-pop-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-pop-head strong { font-size: 15px; font-weight: 800; overflow-wrap: anywhere; }
.user-pop-sep { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.user-pop-head span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 719px) {
  .user-pop { top: auto; right: var(--gutter, 16px); left: var(--gutter, 16px); width: auto; bottom: calc(var(--tabbar-h, 64px) + 12px + env(safe-area-inset-bottom)); }
}

/* district rows under the chosen region in the location menu */
.menu-item.menu-sub { padding-left: 28px; font-weight: 500; font-size: 14px; min-height: 36px; }

.cm-col li.cm-sub a { padding: 3px 0 3px 12px; font-size: 13.5px; color: var(--muted); }

/* ---------- ad units (Google AdSense) and the site's own banners ---------- */
.ad-slot-live { border: 0; background: transparent; padding: 0; min-height: 250px; }
.ad-zone-strip { width: 100%; justify-self: stretch; margin: 0 0 20px; min-height: 120px; }
.ad-zone-strip ins.adsbygoogle { width: 100%; }
