/* DomianKvartal premium visual layer: safe CSS overrides */
:root {
  --bg-main: #f5f1ea;
  --bg-soft: #fbf8f3;
  --bg-surface: #ffffff;

  --text-main: #2c231f;
  --text-muted: #6f6258;

  --accent: #a34739;
  --accent-hover: #8a392d;
  --accent-soft: #efddd5;

  --border-soft: #e9ded3;
  --border-strong: #d9c8bb;

  --shadow-xs: 0 4px 10px rgba(32, 20, 14, 0.05);
  --shadow-sm: 0 10px 24px rgba(32, 20, 14, 0.08);
  --shadow-md: 0 16px 34px rgba(32, 20, 14, 0.12);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 28px;
  --space-6: 40px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 0%, #fffdfa 0%, #f7f2ea 45%, #f2ece4 100%);
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  color: var(--text-main);
  letter-spacing: -0.018em;
}

p {
  color: var(--text-muted);
  line-height: 1.64;
}

/* ========= Header / Navigation ========= */
header {
  background: rgba(248, 242, 234, 0.86);
  border-bottom: 1px solid rgba(163, 71, 57, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65) inset;
}

.header-inner {
  gap: var(--space-3);
}

.logo {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

header nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

nav a {
  margin-left: 0;
  font-size: 0.92rem;
  font-weight: 500;
  color: #5f5248;
  padding: 8px 12px;
  border-radius: 999px;
  transition: all 0.2s ease;
}

nav a::after {
  display: none;
}

nav a:hover,
nav a.is-active,
nav a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #bc5a47);
  box-shadow: var(--shadow-xs);
}

.header-contacts a {
  margin-left: 0;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.9rem;
  border-color: rgba(163, 71, 57, 0.8);
}

/* ========= Buttons ========= */
.btn {
  background: linear-gradient(135deg, var(--accent), #be5b48);
  border-radius: var(--radius-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 20px rgba(163, 71, 57, 0.2);
}

.btn:hover {
  background: linear-gradient(135deg, var(--accent-hover), #a04234);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(163, 71, 57, 0.28);
}

/* ========= Hero ========= */
.hero {
  padding: 118px 0 152px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(27, 19, 16, 0.22), rgba(27, 19, 16, 0.06) 45%, rgba(27, 19, 16, 0.2));
  pointer-events: none;
}

.hero > .container {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(120, 95, 78, 0.28);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 44px;
}

.hero h1,
.hero h2 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.06;
  text-wrap: balance;
  color: #2a201b;
}

.hero p {
  margin-top: 16px;
  font-size: clamp(1rem, 1.8vw, 1.12rem);
  max-width: 650px;
  color: #5c5046;
}

.hero-actions {
  margin-top: 28px;
  gap: 12px;
}

.hero-actions .btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
}

.hero-actions .btn.secondary {
  background: rgba(255, 255, 255, 0.62);
  color: var(--accent);
  border: 1px solid rgba(163, 71, 57, 0.52);
  box-shadow: none;
}

.hero-actions .btn.secondary:hover {
  background: rgba(163, 71, 57, 0.08);
  border-color: var(--accent);
}

/* ========= Section rhythm ========= */
section {
  padding: 88px 0;
}

.section-title,
body.catalog-page h1 {
  font-size: clamp(1.85rem, 2.9vw, 2.4rem);
  margin-bottom: 22px;
  text-wrap: balance;
}

.section-subtitle {
  color: var(--text-muted);
}

/* ========= Trust: Yandex Good Place ========= */
.trust-yandex-place {
  padding: clamp(32px, 5vw, 56px) 0;
}

.trust-yandex-place__card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(230px, 320px);
  gap: 24px;
  align-items: stretch;
  padding: clamp(20px, 3.2vw, 34px);
  border-radius: 24px;
  border: 1px solid rgba(120, 84, 60, 0.18);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(251, 245, 238, 0.94));
  box-shadow: 0 14px 34px rgba(32, 20, 14, 0.1);
}

.trust-yandex-place__content h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
}

.trust-yandex-place__content p {
  margin: 0 0 16px;
  max-width: 62ch;
}

.trust-yandex-place__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.trust-yandex-place__metrics li {
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(180, 77, 66, 0.2);
}

.trust-yandex-place__metrics strong {
  display: block;
  font-size: 1.15rem;
  color: #3a2d27;
  line-height: 1.2;
}

.trust-yandex-place__metrics span {
  display: block;
  margin-top: 4px;
  font-size: 0.86rem;
  color: #6e5f55;
}

.trust-yandex-place__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #b44d42, #924034);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(143, 57, 47, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.trust-yandex-place__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(143, 57, 47, 0.3);
}

.trust-yandex-place__badge {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px 18px;
  border-radius: 26px;
  border: 1px solid rgba(130, 96, 76, 0.2);
  background: linear-gradient(180deg, #fff 0%, #f7efe5 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 20px rgba(46, 30, 21, 0.1);
}

.trust-yandex-place__pin {
  width: 62px;
  height: 62px;
  border-radius: 999px 999px 999px 0;
  transform: rotate(-45deg);
  background: radial-gradient(circle at 58% 42%, #ffffff 0 28%, #db3f31 29% 100%);
  box-shadow: 0 8px 16px rgba(219, 63, 49, 0.24);
}

.trust-yandex-place__badge-title {
  font-size: 0.92rem;
  color: #4e433a;
}

.trust-yandex-place__badge strong {
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  line-height: 1.05;
  text-align: center;
  color: #2d2522;
}

.trust-yandex-place__year {
  font-size: 1.7rem;
  font-weight: 800;
  color: #8f392f;
  letter-spacing: 0.01em;
}

/* ========= Generic surfaces ========= */
.benefit,
.requisites-card,
.footer-cta-content,
.new-object-card,
body.catalog-page .card {
  border-radius: var(--radius-md);
  border: 1px solid rgba(120, 96, 78, 0.15);
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface);
}

.benefit:hover,
.new-object-card:hover,
body.catalog-page .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ========= Home ui-blocks cards ========= */
.ub-card,
.ub-tile,
.ub-story,
.ub-qcard {
  border-radius: var(--radius-md);
  border: 1px solid rgba(120, 96, 78, 0.14);
  box-shadow: var(--shadow-xs);
  background: rgba(255, 255, 255, 0.92);
}

.ub-card:hover,
.ub-tile:hover,
.ub-story:hover,
.ub-qcard:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.ub-chip {
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: #fff;
  color: #5b4d43;
}

.ub-chip.is-active,
.ub-chip[aria-selected="true"] {
  background: linear-gradient(135deg, var(--accent), #bb5846);
  color: #fff;
  border-color: transparent;
}

/* ========= Catalog panels / filters ========= */
body.catalog-page .listing-tools {
  margin-bottom: 24px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(120, 96, 78, 0.15);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: var(--shadow-xs);
}

body.catalog-page .filters {
  gap: 10px;
}

body.catalog-page .filters label {
  font-size: 0.8rem;
  color: #6a5d53;
}

body.catalog-page .filters input {
  border-radius: 9px;
  border: 1px solid rgba(120, 96, 78, 0.28);
  background: #fff;
  color: var(--text-main);
}

body.catalog-page .filters input:focus {
  outline: none;
  border-color: rgba(163, 71, 57, 0.68);
  box-shadow: 0 0 0 3px rgba(163, 71, 57, 0.14);
}

body.catalog-page .results-count {
  font-weight: 600;
  color: #66584e;
}

/* ========= Catalog cards ========= */
body.catalog-page .cards {
  gap: 22px;
}

body.catalog-page .card {
  overflow: hidden;
}

body.catalog-page .card img {
  height: 220px;
}

body.catalog-page .card-content {
  padding: 18px;
}

body.catalog-page .card h2 {
  font-size: 1.06rem;
  margin-bottom: 10px;
}

body.catalog-page .card p {
  color: var(--text-muted);
  line-height: 1.58;
}

.card-meta {
  color: var(--accent);
  font-weight: 700;
}

body.catalog-page .card .btn {
  width: 100%;
  text-align: center;
  border-radius: 10px;
  margin-top: 12px;
}

/* ========= Footer / CTA ========= */
.footer-cta {
  margin-top: 76px;
  background:
    linear-gradient(180deg, rgba(246, 240, 232, 0.4) 0%, rgba(241, 233, 223, 0.5) 100%),
    url("../hero/footer.jpg") center / cover no-repeat;
}

.footer-cta-content {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(120, 96, 78, 0.2);
}

.footer-cta h2 {
  text-shadow: none;
}

footer {
  background: #f4ece3;
}

.footer-columns {
  gap: 24px;
}

.footer-column ul li {
  margin-bottom: 8px;
}

.footer-contact-item {
  line-height: 1.5;
}

.footer-social a {
  border-radius: 999px;
}

/* ========= Modal ========= */
body.catalog-page .modal {
  backdrop-filter: blur(2px);
  padding: 20px 14px;
  align-items: flex-start;
  overflow-y: auto;
}

body.catalog-page .modal-content {
  width: min(880px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  margin: 0 auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(120, 96, 78, 0.24);
}

body.catalog-page .close-modal {
  position: sticky;
  top: 0;
  z-index: 2;
  float: right;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(246, 240, 232, 0.96);
  border: 1px solid #d6c8b7;
  line-height: 1;
}

body.catalog-page #modalImages img,
body.catalog-page .modal img {
  border-radius: 10px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ========= Responsive ========= */
@media (max-width: 1100px) {
  .header-inner {
    padding: 16px 20px;
  }

  nav a {
    font-size: 0.86rem;
    padding: 7px 10px;
  }
}

@media (max-width: 768px) {
  body {
    background: #f6f1ea;
  }

  header {
    backdrop-filter: blur(8px);
  }

  .header-inner > nav {
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 2px;
  }

  .header-inner > nav::-webkit-scrollbar {
    display: none;
  }

  nav a {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .hero {
    padding: 76px 0 88px;
  }

  .hero > .container {
    padding: 24px 18px;
    border-radius: 14px;
  }

  .hero h1,
  .hero h2 {
    font-size: 1.9rem;
  }

  .hero p {
    margin-top: 14px;
    font-size: 0.95rem;
  }

  .hero-actions {
    margin-top: 22px;
    gap: 10px;
  }

  .hero-actions .btn,
  .btn,
  body.catalog-page .card .btn,
  .new-object-card__btn,
  .header-contacts a,
  .footer-social a {
    min-height: 44px;
  }

  section {
    padding: 64px 0;
  }

  body.catalog-page .listing-tools {
    margin: 0 15px 16px;
    padding: 12px;
  }

  body.catalog-page .modal {
    padding: 12px 8px;
  }

  body.catalog-page .modal-content {
    max-height: calc(100vh - 20px);
    border-radius: 12px;
  }

  body.catalog-page .cards {
    gap: 14px;
  }

  body.catalog-page .card {
    border-radius: 12px;
  }

  body.catalog-page .card img {
    height: 188px;
  }

  .footer-contacts-block {
    gap: 18px;
  }
}

@media (max-width: 390px) {
  .logo {
    font-size: 1.05rem;
  }

  .hero h1,
  .hero h2 {
    font-size: 1.72rem;
  }

  body.catalog-page h1 {
    font-size: 1.5rem;
  }

  .footer-cta-content {
    padding: 24px 16px;
  }
}

/* ============================================
   Targeted UX pass (hero, cards/home, mobile)
   ============================================ */
:root {
  --surface-hero: rgba(255, 255, 255, 0.9);
  --surface-hero-border: rgba(112, 86, 68, 0.28);
  --section-separator: rgba(112, 86, 68, 0.14);
  --focus-ring: 0 0 0 3px rgba(163, 71, 57, 0.22);
}

/* Zone 1: Hero / first screen */
.hero {
  position: relative;
  padding: clamp(92px, 11vw, 142px) 0 clamp(108px, 14vw, 172px);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 14%, rgba(255, 255, 255, 0.24), transparent 38%),
    radial-gradient(circle at 8% 86%, rgba(163, 71, 57, 0.18), transparent 34%);
  pointer-events: none;
}

.hero > .container {
  position: relative;
  max-width: min(960px, calc(100% - 32px));
  background: var(--surface-hero);
  border: 1px solid var(--surface-hero-border);
  border-radius: 22px;
  padding: clamp(28px, 4.8vw, 52px);
  box-shadow: 0 22px 46px rgba(32, 20, 14, 0.16);
}

.hero > .container::before {
  content: "Проверенная база объектов";
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  margin-bottom: 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #784437;
  background: rgba(239, 221, 213, 0.88);
  border: 1px solid rgba(163, 71, 57, 0.24);
}

.hero h1,
.hero h2 {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.1rem, 4.7vw, 3.35rem);
  font-weight: 840;
  line-height: 1.03;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero p {
  margin-top: 16px;
  max-width: 58ch;
  font-size: clamp(1rem, 1.6vw, 1.12rem);
  color: #5d5147;
}

.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions .btn {
  min-height: 46px;
  padding: 12px 20px;
}

.hero-actions .btn:first-child {
  box-shadow: 0 14px 30px rgba(163, 71, 57, 0.32);
}

.hero-actions .btn.secondary {
  background: #fff;
  color: #874334;
  border: 1px solid rgba(163, 71, 57, 0.42);
}

.hero-actions .btn.secondary:hover {
  background: rgba(163, 71, 57, 0.08);
}

/* Catalog heroes should be tighter and task-focused */
body.catalog-page .hero {
  padding: 58px 0 74px;
}

body.catalog-page .hero > .container {
  max-width: min(860px, calc(100% - 30px));
  padding: clamp(20px, 3.6vw, 34px);
}

body.catalog-page .hero h2 {
  font-size: clamp(1.72rem, 4vw, 2.45rem);
}

body.catalog-page .hero p {
  max-width: 52ch;
  font-size: 0.98rem;
}

/* Zone 2: Cards + homepage scanability */
body:not(.catalog-page) .section-title {
  margin-bottom: 14px;
  font-size: clamp(1.95rem, 3vw, 2.45rem);
}

body:not(.catalog-page) .section-title::after {
  content: "";
  display: block;
  width: 66px;
  height: 3px;
  border-radius: 999px;
  margin-top: 10px;
  background: linear-gradient(90deg, var(--accent), rgba(163, 71, 57, 0.28));
}

body:not(.catalog-page) .ub-section,
body:not(.catalog-page) .legacy-refresh,
body:not(.catalog-page) .new-objects,
body:not(.catalog-page) .hot-offers,
body:not(.catalog-page) .partners {
  position: relative;
  padding-block: clamp(58px, 8vw, 92px);
}

body:not(.catalog-page) .ub-section + .ub-section,
body:not(.catalog-page) .ub-section + .legacy-refresh,
body:not(.catalog-page) .legacy-refresh + .legacy-refresh,
body:not(.catalog-page) .legacy-refresh + .new-objects,
body:not(.catalog-page) .new-objects + .hot-offers,
body:not(.catalog-page) .hot-offers + .legacy-refresh {
  border-top: 1px solid var(--section-separator);
}

/* Home cards from ui-blocks */
.ub-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ub-card__media {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  overflow: hidden;
  line-height: 0;
}

.ub-card__body {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 10px;
  padding: 14px 14px 16px;
  background: #fff;
}

.ub-price strong {
  display: block;
  font-size: 1.07rem;
  letter-spacing: -0.01em;
}

.ub-pm {
  color: #7a6b61;
  font-size: 0.82rem;
}

.ub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ub-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #5f4f44;
  background: #f8f2eb;
  border: 1px solid #ecdccf;
}

.ub-addr {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #67594f;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Catalog cards scanability */
body.catalog-page .cards {
  gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

body.catalog-page .card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border-color: rgba(114, 93, 77, 0.18);
  box-shadow: 0 12px 28px rgba(33, 22, 15, 0.1);
}

body.catalog-page .card img {
  height: 212px;
  object-fit: cover;
  background: #eee7df;
}

body.catalog-page .card-content {
  display: grid;
  gap: 10px;
  padding: 16px;
  min-height: 230px;
}

body.catalog-page .card h2 {
  margin: 0;
  line-height: 1.32;
}

body.catalog-page .card p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body.catalog-page .card-meta {
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #6f3429;
  background: rgba(239, 221, 213, 0.9);
  border: 1px solid rgba(163, 71, 57, 0.22);
}

body.catalog-page .card .btn {
  margin-top: auto;
}

/* New objects cards on home/listings */
.new-objects-grid {
  gap: 18px;
}

.new-object-card {
  border-radius: 16px;
}

.new-object-card img {
  height: 164px;
}

.new-object-card__content {
  gap: 10px;
}

.new-object-card h3 {
  line-height: 1.35;
  min-height: 2.7em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.new-object-card__btn {
  margin-top: 6px;
  min-height: 42px;
}

/* Filters feel more structured */
body.catalog-page .listing-tools {
  padding: 16px;
  border-radius: 14px;
}

body.catalog-page .filters {
  gap: 12px;
}

body.catalog-page .filters input {
  min-height: 40px;
}

body.catalog-page .filters input:focus {
  box-shadow: var(--focus-ring);
}

/* Zone 3: Mobile UX pass */
@media (max-width: 768px) {
  .header-inner {
    padding: 12px 14px;
    gap: 10px;
  }

  .logo {
    font-size: 1rem;
  }

  .header-inner > nav {
    gap: 6px;
    padding-bottom: 4px;
    margin-inline: -2px;
  }

  nav a {
    padding: 9px 12px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  .header-contacts a {
    min-height: 40px;
    padding: 8px 12px;
  }

  .hero {
    padding: 64px 0 80px;
  }

  .hero > .container {
    max-width: calc(100% - 20px);
    padding: 20px 16px;
    border-radius: 16px;
  }

  .hero > .container::before {
    font-size: 0.67rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: center;
    width: fit-content;
    max-width: calc(100% - 8px);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }

  .hero h1,
  .hero h2 {
    max-width: none;
    font-size: 1.9rem;
    line-height: 1.06;
  }

  .hero p {
    margin-top: 12px;
    font-size: 0.95rem;
    line-height: 1.52;
  }

  .hero-actions {
    margin-top: 18px;
    width: 100%;
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 46px;
  }

  body.catalog-page .hero {
    padding: 44px 0 56px;
  }

  body.catalog-page h1 {
    text-align: left;
    font-size: 1.52rem;
    padding: 16px 15px 12px;
  }

  body.catalog-page .listing-tools {
    margin: 0 12px 14px;
    padding: 12px;
  }

  body.catalog-page .filters label {
    font-size: 0.78rem;
    gap: 5px;
  }

  body.catalog-page .filters input {
    min-height: 42px;
    font-size: 0.95rem;
  }

  body.catalog-page .cards {
    gap: 14px;
    padding: 0 12px 22px;
    grid-template-columns: 1fr;
  }

  body.catalog-page .card {
    border-radius: 14px;
  }

  body.catalog-page .card img {
    height: 190px;
  }

  body.catalog-page .card-content {
    min-height: 0;
    gap: 9px;
  }

  .new-objects-grid {
    gap: 12px;
  }

  .new-object-card img {
    height: 170px;
  }

  .new-object-card__btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 390px) {
  .header-inner {
    padding: 10px 10px;
  }

  .logo {
    font-size: 0.93rem;
  }

  .hero {
    padding: 58px 0 72px;
  }

  .hero > .container {
    max-width: calc(100% - 16px);
    padding: 16px 13px;
  }

  .hero h1,
  .hero h2 {
    font-size: 1.68rem;
  }

  .hero p {
    font-size: 0.91rem;
  }

  .hero-actions .btn,
  .btn,
  .new-object-card__btn,
  body.catalog-page .card .btn {
    min-height: 44px;
  }

  body.catalog-page .card img,
  .new-object-card img {
    height: 168px;
  }
}

/* ============================================
   SEO content block (apartments page only)
   ============================================ */
.seo-content {
  padding: 28px 0 18px;
}

.seo-content .container {
  max-width: 1200px;
}

.seo-content__inner {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(114, 93, 77, 0.2);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(33, 22, 15, 0.08);
  padding: 26px;
}

.seo-content h2 {
  margin: 0 0 14px;
  font-size: clamp(1.48rem, 2.5vw, 1.9rem);
  line-height: 1.22;
  color: #2d231e;
}

.seo-content h3 {
  margin: 0 0 10px;
  font-size: 1.14rem;
  line-height: 1.3;
  color: #3a2c25;
}

.seo-content p {
  margin: 0 0 12px;
  color: #5d5046;
  line-height: 1.64;
}

.seo-content__faq,
.seo-content__links {
  margin-top: 20px;
}

.seo-content__faq-list {
  margin: 0;
}

.seo-content__faq-item {
  padding: 12px 0;
  border-top: 1px solid rgba(114, 93, 77, 0.16);
}

.seo-content__faq-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.seo-content__faq-item dt {
  font-weight: 700;
  color: #332821;
  margin-bottom: 6px;
}

.seo-content__faq-item dd {
  margin: 0;
  color: #65584d;
  line-height: 1.58;
}

.seo-content__links ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.seo-content__links a {
  color: #8f3f32;
  text-decoration: underline;
  text-decoration-color: rgba(143, 63, 50, 0.35);
  text-underline-offset: 2px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.seo-content__links a:hover {
  color: #6f3026;
  text-decoration-color: rgba(111, 48, 38, 0.7);
}

.seo-content__links a:focus-visible {
  outline: none;
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(163, 71, 57, 0.2);
}

@media (max-width: 768px) {
  .seo-content {
    padding: 18px 0 12px;
  }

  .seo-content__inner {
    padding: 18px 14px;
    border-radius: 14px;
  }

  .seo-content h2 {
    font-size: 1.34rem;
    margin-bottom: 12px;
  }

  .seo-content h3 {
    font-size: 1.04rem;
  }

  .seo-content p,
  .seo-content__faq-item dd {
    font-size: 0.95rem;
  }
}

@media (max-width: 390px) {
  .seo-content__inner {
    padding: 16px 12px;
  }

  .seo-content h2 {
    font-size: 1.24rem;
  }

  .seo-content__links ul {
    padding-left: 16px;
  }
}

/* Apartments editorial SEO layout */
.seo-content--apartments {
  padding: 34px 0 22px;
}

.seo-content--apartments .seo-content__inner {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(251, 247, 241, 0.92) 100%);
  border: 1px solid rgba(118, 96, 79, 0.2);
  border-radius: 24px;
  box-shadow: 0 22px 44px rgba(31, 21, 14, 0.1);
  padding: 30px;
}

.seo-content--apartments .seo-content__intro {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: start;
}

.seo-content--apartments .seo-content__eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: #7e4234;
  background: rgba(239, 221, 213, 0.9);
  border: 1px solid rgba(163, 71, 57, 0.24);
}

.seo-content--apartments h2 {
  margin-bottom: 12px;
  max-width: 28ch;
}

.seo-content--apartments h3 {
  margin-top: 20px;
  margin-bottom: 12px;
}

.seo-content--apartments .seo-content__lead p {
  max-width: 64ch;
}

.seo-content--apartments .seo-content__grid {
  display: grid;
  gap: 12px;
}

.seo-content--apartments .seo-content__grid--market {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.seo-content--apartments .seo-content__grid--locations {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seo-content--apartments .seo-content__grid--faq {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.seo-content--apartments .seo-content__grid--links {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seo-content--apartments .seo-content__card,
.seo-content--apartments .seo-content__faq-item,
.seo-content--apartments .seo-content__link-card {
  border: 1px solid rgba(117, 95, 78, 0.2);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(31, 21, 14, 0.06);
  padding: 14px;
}

.seo-content--apartments .seo-content__card-title {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.34;
  color: #2f241f;
}

.seo-content--apartments .seo-content__card p,
.seo-content--apartments .seo-content__faq-item p,
.seo-content--apartments .seo-content__link-card p {
  margin: 0;
  color: #5f5147;
}

.seo-content--apartments .seo-content__note {
  margin-top: 8px !important;
  padding-top: 8px;
  border-top: 1px dashed rgba(120, 95, 78, 0.25);
  font-size: 0.92rem;
}

.seo-content--apartments .seo-content__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.seo-content--apartments .seo-content__tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #7a3a2d;
  border: 1px solid rgba(163, 71, 57, 0.28);
  background: rgba(239, 221, 213, 0.88);
}

.seo-content--apartments .seo-content__compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.seo-content--apartments .seo-content__scenario {
  margin-top: 18px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(117, 95, 78, 0.22);
  background: rgba(252, 246, 238, 0.82);
}

.seo-content--apartments .seo-content__scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.seo-content--apartments .seo-content__scenario-item {
  border-radius: 14px;
  border: 1px solid rgba(117, 95, 78, 0.18);
  background: #fff;
  padding: 12px;
}

.seo-content--apartments .seo-content__scenario-item p {
  margin: 0;
  color: #5f5147;
}

.seo-content--apartments .seo-content__checklist {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.seo-content--apartments .seo-content__checklist li {
  border: 1px solid rgba(117, 95, 78, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  padding: 11px 12px 11px 36px;
  position: relative;
  color: #4f433a;
}

.seo-content--apartments .seo-content__checklist li::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #d26b56, #a34739);
  box-shadow: 0 0 0 3px rgba(163, 71, 57, 0.14);
}

.seo-content--apartments .seo-content__faq {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid rgba(117, 95, 78, 0.22);
}

.seo-content--apartments .seo-content__faq-item {
  padding: 14px;
}

.seo-content--apartments .seo-content__links {
  margin-top: 24px;
}

.seo-content--apartments .seo-content__link-card a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: #8b3d31;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 61, 49, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.seo-content--apartments .seo-content__link-card a:hover {
  color: #6d2f24;
  border-bottom-color: rgba(109, 47, 36, 0.7);
  transform: translateX(2px);
}

.seo-content--apartments .seo-content__link-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.seo-content--apartments .seo-content__link-card:hover {
  transform: translateY(-2px);
  border-color: rgba(163, 71, 57, 0.35);
  box-shadow: 0 14px 28px rgba(33, 22, 15, 0.12);
}

.seo-content--apartments .seo-content__link-badge {
  display: inline-flex;
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #7a3b2d;
  background: rgba(239, 221, 213, 0.9);
  border: 1px solid rgba(163, 71, 57, 0.25);
}

.seo-content--apartments .seo-content__image-placeholder {
  margin: 0;
}

.seo-content--apartments .seo-content__image-empty {
  min-height: 188px;
  border-radius: 14px;
  border: 1px dashed rgba(117, 95, 78, 0.45);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(243, 234, 225, 0.76)),
    repeating-linear-gradient(-45deg, rgba(163, 71, 57, 0.06) 0 10px, rgba(163, 71, 57, 0.02) 10px 20px);
  display: grid;
  place-items: center;
}

.seo-content--apartments .seo-content__image-empty span {
  font-size: 0.95rem;
  font-weight: 600;
  color: #7a6658;
}

.seo-content--apartments .seo-content__image-placeholder figcaption {
  margin-top: 8px;
  color: #76665b;
  font-size: 0.84rem;
  line-height: 1.45;
}

.seo-content--apartments .seo-content__image-placeholder--wide {
  margin-top: 16px;
}

.seo-content--apartments .seo-content__image-placeholder--wide .seo-content__image-empty {
  min-height: 170px;
}

.seo-content--apartments .seo-image {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(120, 84, 60, 0.16);
  box-shadow: 0 10px 30px rgba(30, 20, 14, 0.06);
}

.seo-content--apartments .seo-image img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.seo-content--apartments .seo-image figcaption {
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  color: #6f625b;
}

.seo-content--apartments .seo-image--wide {
  margin-top: 16px;
}

.seo-content--apartments .seo-image--wide img {
  height: 260px;
}

@media (max-width: 1024px) {
  .seo-content--apartments .seo-content__grid--market {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seo-content--apartments .seo-content__grid--locations,
  .seo-content--apartments .seo-content__grid--links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .seo-content--apartments {
    padding: 22px 0 14px;
  }

  .seo-content--apartments .seo-content__inner {
    border-radius: 18px;
    padding: 18px 14px;
  }

  .seo-content--apartments .seo-content__intro,
  .seo-content--apartments .seo-content__compare,
  .seo-content--apartments .seo-content__scenario-grid,
  .seo-content--apartments .seo-content__checklist,
  .seo-content--apartments .seo-content__grid--faq,
  .seo-content--apartments .seo-content__grid--market {
    grid-template-columns: 1fr;
  }

  .seo-content--apartments .seo-content__image-empty {
    min-height: 150px;
  }
}

/* Houses SEO hub: small visual tone shift while reusing shared layout */
.seo-hub--houses .seo-content__eyebrow {
  color: #5f3a22;
  background: rgba(239, 227, 213, 0.95);
  border-color: rgba(140, 95, 55, 0.28);
}

.seo-hub--houses .seo-content__scenario {
  background: linear-gradient(180deg, rgba(252, 246, 238, 0.94) 0%, rgba(247, 238, 227, 0.9) 100%);
}

.seo-hub--houses .seo-content__checklist li::before {
  background: radial-gradient(circle at 35% 35%, #c27a41, #8b5b30);
  box-shadow: 0 0 0 3px rgba(139, 91, 48, 0.16);
}

/* Lands SEO hub: earth-tone accent */
.seo-hub--lands .seo-content__eyebrow {
  color: #4f4a2d;
  background: rgba(235, 237, 216, 0.96);
  border-color: rgba(110, 122, 72, 0.26);
}

.seo-hub--lands .seo-content__scenario {
  background: linear-gradient(180deg, rgba(245, 248, 233, 0.95) 0%, rgba(239, 243, 225, 0.9) 100%);
}

.seo-hub--lands .seo-content__checklist li::before {
  background: radial-gradient(circle at 35% 35%, #98a35f, #6a7643);
  box-shadow: 0 0 0 3px rgba(106, 118, 67, 0.16);
}

/* Newbuilds SEO hub: urban accent */
.seo-hub--newbuilds .seo-content__eyebrow {
  color: #2f4665;
  background: rgba(222, 233, 247, 0.96);
  border-color: rgba(80, 108, 146, 0.26);
}

.seo-hub--newbuilds .seo-content__scenario {
  background: linear-gradient(180deg, rgba(236, 243, 253, 0.95) 0%, rgba(226, 237, 250, 0.9) 100%);
}

.seo-hub--newbuilds .seo-content__checklist li::before {
  background: radial-gradient(circle at 35% 35%, #5b83b8, #3f5f8e);
  box-shadow: 0 0 0 3px rgba(63, 95, 142, 0.16);
}

/* =====================================================
   Curated prepublish polish: safe low-risk overrides
   ===================================================== */
.footer-cta {
  background:
    linear-gradient(180deg, rgba(246, 240, 232, 0.4) 0%, rgba(241, 233, 223, 0.5) 100%),
    url("../hero/footer.jpg") center / cover no-repeat;
}

.footer-cta-content p {
  color: #5a4d43;
}

body.catalog-page .listing-tools {
  border-color: rgba(161, 138, 118, 0.28);
  box-shadow: 0 10px 22px rgba(28, 20, 14, 0.08);
}

body.catalog-page .filters label {
  color: #5f5348;
  font-weight: 600;
}

body.catalog-page .filters input {
  background: rgba(255, 255, 255, 0.95);
}

body.catalog-page .filters input::placeholder {
  color: #8a7a6b;
}

body.catalog-page .card .btn,
.new-object-card .btn {
  font-weight: 700;
}

body.catalog-page .card .btn:focus-visible,
.new-object-card .btn:focus-visible,
header nav a:focus-visible {
  outline: 2px solid rgba(168, 74, 60, 0.45);
  outline-offset: 2px;
}

.new-object-card__type {
  color: #6a5849;
}

.new-object-card__price {
  letter-spacing: 0.01em;
}

.seo-content__inner {
  box-shadow: 0 14px 34px rgba(31, 22, 17, 0.1);
}

.seo-content p {
  color: #4f433a;
}

@media (max-width: 768px) {
  .trust-yandex-place {
    padding: 22px 0 12px;
  }

  .trust-yandex-place__card {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
    border-radius: 18px;
  }

  .trust-yandex-place__metrics {
    grid-template-columns: 1fr;
    margin-bottom: 14px;
  }

  .trust-yandex-place__btn {
    width: 100%;
  }

  .trust-yandex-place__badge {
    order: -1;
    padding: 16px 14px;
  }

  .trust-yandex-place__pin {
    width: 54px;
    height: 54px;
  }

  body.catalog-page .listing-tools {
    margin-bottom: 18px;
  }

  .seo-content--apartments .seo-content__inner {
    padding-top: 16px;
  }
}

/* =====================================================
   2026 Premium redesign layer
   Warm local real-estate brand system
   ===================================================== */
:root {
  --color-page: #f7f1e8;
  --color-section: #fbf7f1;
  --color-card: #ffffff;
  --color-text: #2f2723;
  --color-muted: #746760;
  --color-accent: #b44d42;
  --color-accent-dark: #8f392f;
  --color-accent-soft: #ead1c8;
  --color-border: rgba(120, 84, 60, 0.16);
  --shadow-soft: 0 18px 50px rgba(47, 39, 35, 0.08);
  --shadow-card: 0 12px 32px rgba(47, 39, 35, 0.1);
  --radius-card: 24px;
  --radius-pill: 999px;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at 14% 2%, rgba(255, 255, 255, 0.92) 0 22%, transparent 38%),
    linear-gradient(180deg, #f7f1e8 0%, #fbf7f1 42%, #f2eadf 100%);
  color: var(--color-text);
}

::selection {
  background: rgba(180, 77, 66, 0.22);
}

.container {
  width: min(1200px, calc(100% - 40px));
}

header {
  background: rgba(247, 241, 232, 0.82) !important;
  border-bottom: 1px solid rgba(120, 84, 60, 0.14) !important;
  box-shadow: 0 10px 34px rgba(47, 39, 35, 0.06);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 76px;
  gap: 18px;
}

.logo {
  max-width: 260px;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.18;
}

header nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  flex: 1;
}

header nav a {
  margin-left: 0 !important;
  padding: 9px 10px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

header nav a::after {
  display: none;
}

header nav a:hover,
header nav a.is-active,
header nav a[aria-current="page"] {
  background: rgba(180, 77, 66, 0.1);
  color: var(--color-accent-dark);
}

.header-contacts {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-contacts a {
  margin-left: 0 !important;
  border-color: rgba(180, 77, 66, 0.35) !important;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 22px rgba(180, 77, 66, 0.08);
}

.header-contacts__messenger {
  padding-inline: 12px !important;
  font-size: 0.88rem;
}

.btn,
.btn-primary,
.agent-info .btn-primary,
.contact-actions .btn,
.hero-actions .btn {
  border-radius: var(--radius-pill) !important;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark)) !important;
  color: #fff !important;
  box-shadow: 0 14px 32px rgba(180, 77, 66, 0.22);
  font-weight: 750 !important;
}

.btn:hover,
.btn-primary:hover,
.agent-info .btn-primary:hover,
.hero-actions .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(180, 77, 66, 0.28);
}

.btn.secondary,
.btn-outline,
.agent-info .btn-outline,
.hero-actions .btn.secondary {
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--color-accent-dark) !important;
  border: 1px solid rgba(180, 77, 66, 0.32) !important;
  box-shadow: none;
}

.hero {
  position: relative;
  min-height: min(720px, calc(100vh - 74px));
  padding: clamp(72px, 9vw, 118px) 0 clamp(54px, 8vw, 92px);
  display: flex;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(47, 39, 35, 0.82) 0%, rgba(47, 39, 35, 0.62) 42%, rgba(47, 39, 35, 0.15) 100%),
    url("../hero/hero.jpg") center center / cover no-repeat !important;
}

body.catalog-page .hero {
  min-height: 420px;
  padding: 82px 0 64px;
}

body[data-listing="apartments"] .hero {
  background:
    linear-gradient(90deg, rgba(47, 39, 35, 0.78), rgba(47, 39, 35, 0.2)),
    url("../types/apartments.jpg") right center / cover no-repeat !important;
}

body[data-listing="houses"] .hero {
  background:
    linear-gradient(90deg, rgba(47, 39, 35, 0.78), rgba(47, 39, 35, 0.2)),
    url("../types/houses.jpg") right center / cover no-repeat !important;
}

body[data-listing="lands"] .hero {
  background:
    linear-gradient(90deg, rgba(47, 39, 35, 0.78), rgba(47, 39, 35, 0.24)),
    url("../types/land.jpg") right center / cover no-repeat !important;
}

body[data-listing="newbuilds"] .hero {
  background:
    linear-gradient(90deg, rgba(47, 39, 35, 0.78), rgba(47, 39, 35, 0.2)),
    url("../types/apartments.jpg") right center / cover no-repeat !important;
}

.hero > .container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 20px !important;
  color: #fff;
}

.hero h1,
.hero h2 {
  max-width: 780px;
  color: #fff !important;
  font-size: clamp(42px, 6vw, 78px) !important;
  line-height: 0.96 !important;
  letter-spacing: -0.055em !important;
  text-transform: none !important;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.25);
}

body.catalog-page .hero h1,
body.catalog-page .hero h2 {
  font-size: clamp(36px, 4.6vw, 58px) !important;
}

.hero h1 span,
.hero h2 span {
  color: #f2c7bb !important;
}

.hero p {
  max-width: 620px;
  margin-top: 24px;
  color: rgba(255, 255, 255, 0.86) !important;
  font-size: clamp(17px, 1.7vw, 22px) !important;
}

.hero-actions {
  margin-top: 30px;
  gap: 12px;
}

.hero-scenarios {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-scenarios__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92rem;
}

.hero-scenarios__item:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-quick-links {
  display: none;
}

.stats {
  margin-top: -44px;
  padding: 0 0 56px !important;
  position: relative;
  z-index: 3;
  background: transparent !important;
}

.stats .benefits,
.legacy-refresh .benefits,
.legacy-refresh .guarantee-list,
.legacy-refresh .reviews,
.legacy-refresh .faq-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.stats .benefit,
.legacy-refresh .benefit,
.legacy-refresh .guarantee-item,
.legacy-refresh .review,
.legacy-refresh .faq-item,
.partners-card,
.new-object-card,
.hot-offer-card,
body.catalog-page .card,
.seo-content__card,
.seo-content__faq-item,
.seo-content__link-card,
.team-profile-card,
.agent-card {
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-card) !important;
  background: rgba(255, 255, 255, 0.84) !important;
  box-shadow: var(--shadow-card) !important;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.stats .benefit:hover,
.legacy-refresh .benefit:hover,
.legacy-refresh .guarantee-item:hover,
.legacy-refresh .review:hover,
.legacy-refresh .faq-item:hover,
.partners-card:hover,
.new-object-card:hover,
.hot-offer-card:hover,
body.catalog-page .card:hover,
.seo-content__card:hover,
.team-profile-card:hover {
  transform: translateY(-4px);
  border-color: rgba(180, 77, 66, 0.28) !important;
  box-shadow: 0 22px 54px rgba(47, 39, 35, 0.14) !important;
}

.legacy-refresh,
.ub-section,
.partners,
.hot-offers,
.new-objects,
#mortgage,
.contact,
.form-section {
  background: transparent !important;
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(56px, 7vw, 96px);
}

.section-title,
.ub-title,
.legacy-refresh .section-title {
  color: var(--color-text);
  font-size: clamp(30px, 4vw, 52px) !important;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.section-subtitle,
.ub-sub,
.legacy-refresh .section-subtitle {
  color: var(--color-muted) !important;
  font-size: clamp(16px, 1.5vw, 19px);
}

body.catalog-page main,
body.static-page main {
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

body.catalog-page .listing-tools {
  position: relative;
  margin-top: -28px;
  z-index: 4;
  border-radius: var(--radius-card) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(12px);
}

body.catalog-page .cards {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)) !important;
  gap: 24px !important;
}

body.catalog-page .card {
  overflow: hidden;
}

body.catalog-page .card img,
.new-object-card img,
.hot-offer-card img,
.ub-card__media img {
  display: block;
  width: 100%;
  height: 230px !important;
  object-fit: cover;
  transition: transform 350ms ease;
}

body.catalog-page .card:hover img,
.new-object-card:hover img,
.hot-offer-card:hover img,
.ub-card:hover .ub-card__media img {
  transform: scale(1.045);
}

body.catalog-page .card-content {
  padding: 20px !important;
}

body.catalog-page .card h2,
.new-object-card h3,
.hot-offer-content h3 {
  font-size: 1.1rem !important;
  letter-spacing: -0.02em;
}

.card-meta,
.card-mortgage,
.seo-content__tag,
.seo-content__link-badge,
.new-object-card__type {
  border-radius: var(--radius-pill) !important;
  background: rgba(180, 77, 66, 0.09) !important;
  color: var(--color-accent-dark) !important;
}

.seo-content {
  background: transparent !important;
  padding: clamp(54px, 7vw, 94px) 0 !important;
}

.seo-content__inner {
  border-radius: 30px !important;
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.72) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-soft) !important;
}

.seo-image {
  border-radius: 22px !important;
  overflow: hidden;
}

.seo-image img {
  min-height: 230px;
}

.footer-cta {
  background:
    linear-gradient(90deg, rgba(47, 39, 35, 0.84), rgba(47, 39, 35, 0.42)),
    url("../hero/footer.jpg") center / cover no-repeat !important;
  margin-top: 0 !important;
}

.footer-cta-content {
  background: rgba(255, 255, 255, 0.82) !important;
  border-radius: 28px !important;
  box-shadow: var(--shadow-soft);
}

#certificates {
  background:
    linear-gradient(180deg, rgba(251, 247, 241, 0.88), rgba(242, 234, 223, 0.9)) !important;
}

#certificates .certificates-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(240px, 320px)) !important;
  justify-content: center !important;
  gap: 28px !important;
  max-width: 1040px;
  margin: 0 auto;
}

#certificates .certificate-card {
  border-radius: 24px !important;
  overflow: hidden;
  background: #fff !important;
  box-shadow: var(--shadow-card);
}

#team .leadership {
  border-radius: 30px !important;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(250, 241, 234, 0.9)) !important;
  box-shadow: var(--shadow-soft);
}

.mobile-menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
}

.header-mobile-spacer {
  display: none;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1002;
  display: flex;
  justify-content: flex-end;
  background: rgba(25, 18, 14, 0);
  pointer-events: none;
  transition: background 220ms ease;
}

.mobile-drawer.is-open {
  background: rgba(25, 18, 14, 0.52);
  pointer-events: auto;
}

.mobile-drawer__panel {
  width: min(420px, 88vw);
  height: 100%;
  padding: 24px;
  background: rgba(251, 247, 241, 0.96);
  box-shadow: -18px 0 60px rgba(47, 39, 35, 0.22);
  transform: translateX(100%);
  transition: transform 240ms ease;
  overflow-y: auto;
}

.mobile-drawer.is-open .mobile-drawer__panel {
  transform: translateX(0);
}

.mobile-drawer__close {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--color-text);
  font-size: 30px;
  float: right;
  cursor: pointer;
}

.mobile-drawer__title {
  clear: both;
  padding: 24px 0 18px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
}

.mobile-drawer__nav {
  display: grid;
  gap: 10px;
}

.mobile-drawer__nav a {
  display: block;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(120, 84, 60, 0.12);
  font-weight: 700;
  color: var(--color-text);
}

.mobile-drawer__actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.mobile-drawer__actions a {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius-pill);
  text-align: center;
  font-weight: 800;
}

.mobile-drawer__call {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: #fff !important;
}

.mobile-drawer__messenger {
  background: #fff;
  border: 1px solid var(--color-border);
}

body.drawer-open {
  overflow: hidden;
}

@media (max-width: 1180px) {
  header nav a {
    font-size: 12px;
    padding: 8px 7px;
  }
}

@media (max-width: 980px) {
  .header-inner {
    min-height: 66px;
  }

  header .header-inner > nav,
  header .header-contacts {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero {
    min-height: auto;
    padding: 84px 0 70px;
  }

  .stats {
    margin-top: 0;
    padding-top: 26px !important;
  }

  .stats .benefits,
  .legacy-refresh .benefits,
  .legacy-refresh .guarantee-list,
  .legacy-refresh .reviews,
  .legacy-refresh .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #certificates .certificates-grid {
    grid-template-columns: repeat(2, minmax(240px, 320px)) !important;
  }
}

@media (max-width: 640px) {
  .container,
  body.catalog-page main,
  body.static-page main {
    width: min(100% - 28px, 1200px);
  }

  .logo {
    max-width: calc(100% - 72px);
    font-size: 15px;
    line-height: 1.2;
    white-space: normal;
  }

  .hero-scenarios__item {
    flex: 1 1 100%;
    min-width: 0;
  }

  .mobile-menu-toggle {
    flex: 0 0 auto;
  }

  .hero {
    padding: 64px 0 52px;
    background-position: center !important;
  }

  .hero > .container {
    padding: 0 14px !important;
  }

  .hero h1,
  .hero h2 {
    max-width: 100%;
    font-size: clamp(34px, 10.8vw, 44px) !important;
    line-height: 0.95 !important;
    letter-spacing: -0.04em !important;
    overflow-wrap: normal;
    word-break: normal;
    text-wrap: pretty;
  }

  .hero h1 span,
  .hero h2 span {
    display: block;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .hero-scenarios {
    margin-top: 12px;
  }

  .hero-scenarios__item {
    flex: 1 1 calc(50% - 10px);
    min-width: 140px;
  }

  .hero-quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
  }

  .hero-quick-links__item {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(120, 84, 60, 0.16);
    color: var(--color-text);
    font-weight: 700;
    text-align: center;
    box-shadow: 0 10px 24px rgba(47, 39, 35, 0.08);
  }

  .hero-quick-links__item:active,
  .hero-quick-links__item:hover {
    background: rgba(255, 255, 255, 0.94);
    color: var(--color-accent-dark);
  }

  .stats .benefits,
  .legacy-refresh .benefits,
  .legacy-refresh .guarantee-list,
  .legacy-refresh .reviews,
  .legacy-refresh .faq-grid {
    grid-template-columns: 1fr;
  }

  body.catalog-page .cards {
    grid-template-columns: 1fr !important;
  }

  #certificates .certificates-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .footer-cta h2 {
    font-size: 32px !important;
  }
}

@media (max-width: 420px) {
  .hero h1,
  .hero h2 {
    font-size: clamp(32px, 10.2vw, 40px) !important;
    letter-spacing: -0.045em !important;
  }
}

@media (max-width: 768px) {
  body:not(.catalog-page):not(.static-page) header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 12;
    background: transparent !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none;
  }

  body:not(.catalog-page):not(.static-page) .header-inner {
    min-height: 72px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) 56px;
    align-items: center;
    gap: 8px;
  }

  body:not(.catalog-page):not(.static-page) .logo {
    color: #fff !important;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.38);
    grid-column: 2;
    justify-self: center;
    text-align: center;
    max-width: 100%;
    line-height: 1.2;
  }

  body:not(.catalog-page):not(.static-page) .mobile-menu-toggle {
    display: inline-flex !important;
    grid-column: 3;
    justify-self: end;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, 0.44);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(22, 16, 12, 0.28);
    z-index: 15;
  }

  body:not(.catalog-page):not(.static-page) .mobile-menu-toggle span {
    width: 20px;
    background: #3a2a23;
  }

  body:not(.catalog-page):not(.static-page) .header-mobile-spacer {
    display: block;
    width: 52px;
    height: 52px;
    grid-column: 1;
  }

  body:not(.catalog-page):not(.static-page) .hero {
    padding-top: 130px;
  }

  body:not(.catalog-page):not(.static-page) .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
      180deg,
      rgba(37, 29, 24, 0.62) 0%,
      rgba(37, 29, 24, 0.34) 18%,
      rgba(37, 29, 24, 0.08) 44%,
      rgba(37, 29, 24, 0) 62%
    );
    pointer-events: none;
    z-index: 0;
  }
}

@media (max-width: 640px) {
  body:not(.catalog-page):not(.static-page) .hero {
    padding-top: 104px;
  }
}

body.static-page main > section {
  border-radius: 26px !important;
  border: 1px solid var(--color-border) !important;
  background: rgba(255, 255, 255, 0.82) !important;
  box-shadow: var(--shadow-card) !important;
}

body.static-page main h2,
body.static-page main h3 {
  letter-spacing: -0.03em;
}

body.static-page main ul {
  padding-left: 20px;
}

body.static-page main li {
  margin-bottom: 8px;
  color: var(--color-muted);
}

/* Unified property cards with in-card mini gallery */
.new-objects-grid,
.hot-offers-grid,
body.catalog-page .cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.property-card {
  background: #fffdf9 !important;
  border: 1px solid rgba(125, 96, 78, 0.2) !important;
  border-radius: 24px !important;
  box-shadow: 0 16px 34px rgba(31, 21, 14, 0.1) !important;
  overflow: hidden;
}

.property-card__gallery {
  position: relative;
  height: clamp(250px, 23vw, 300px);
  background: #ece2d7;
}

.property-card__photo {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.property-card__photo.is-fallback {
  background-size: cover;
  filter: saturate(0.9);
}

.property-card__gallery-btn {
  position: absolute;
  top: 50%;
  width: 40px;
  height: 40px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #743d31;
  font-size: 26px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.property-card__gallery-btn--prev { left: 12px; }
.property-card__gallery-btn--next { right: 12px; }

.property-card__counter {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #f8f3ee;
  background: rgba(34, 24, 16, 0.58);
  z-index: 2;
}

.property-card__body {
  padding: 16px 16px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.property-card__meta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(166, 72, 57, 0.26);
  background: rgba(244, 225, 214, 0.65);
  color: #7c3428;
  font-size: 0.73rem;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.property-card__title {
  margin: 0;
  color: #271a14;
  font-size: 1.25rem;
  line-height: 1.28;
  min-height: 2.56em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-card__price {
  margin: 0;
  color: #2f1d16;
  font-size: clamp(1.45rem, 1.9vw, 1.74rem);
  line-height: 1.08;
  font-weight: 790;
}

.property-card__chars {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.property-card__char {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(166, 72, 57, 0.25);
  background: rgba(250, 236, 224, 0.62);
  color: #5b3a2f;
  font-size: 0.82rem;
  font-weight: 650;
  padding: 6px 10px;
}

.property-card__actions {
  margin-top: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hot-offers .property-card__actions {
  grid-template-columns: 1fr 1fr;
}

.property-card__cta,
.property-card__phone {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px !important;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 740;
}

.property-card__cta {
  background: linear-gradient(135deg, #8f3f31 0%, #b55a48 100%) !important;
  border: 1px solid rgba(126, 45, 33, 0.46) !important;
  color: #fffaf6 !important;
}

.property-card__phone {
  background: rgba(255, 252, 246, 0.85) !important;
  border: 1px solid rgba(166, 72, 57, 0.38) !important;
  color: #6f2f24 !important;
}

@media (max-width: 1024px) {
  .new-objects-grid,
  .hot-offers-grid,
  body.catalog-page .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .property-card__gallery {
    height: clamp(220px, 31vw, 260px);
  }

  .property-card__actions {
    grid-template-columns: 1fr;
  }

  .hot-offers .property-card__actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .new-objects-grid,
  .hot-offers-grid,
  body.catalog-page .cards {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .property-card__gallery {
    height: clamp(210px, 54vw, 240px);
  }

  .property-card__body {
    padding: 14px 13px 13px;
  }

  .property-card__title {
    font-size: 1.12rem;
  }

  .property-card__price {
    font-size: clamp(1.38rem, 6.1vw, 1.6rem);
  }

  .property-card__gallery-btn {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }
}
