/* Базовые стили — Абсолют, палитра absolut888.ru: бордо + золотой */
@font-face {
  font-family: "Algerius";
  src: url("/assets/fonts/ALGERIC.TTF") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-algerius: "Algerius", Roboto, cursive;
  --color-primary: #8b0000;
  --color-primary-light: #a01818;
  --color-primary-dark: #6b0000;
  --color-accent: #c9a227;
  --color-accent-light: #e0b83d;
  --color-accent-dark: #a8861f;
  --color-text: #222;
  --color-muted: #555;
  --color-bg: #f8f6f0;
  --color-bg-warm: #f5f2eb;
  --color-border: #e2dfd6;
  --color-surface: #faf6f0;
  --form-border: #e2dfd6;
  --form-focus-ring: rgba(91, 0, 13, .12);
  --color-header-footer-bg: #5b000d;
  --color-footer-bg: #5b000d;
  --color-footer-text: #e8d5d5;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-brand-serif: Georgia, "Times New Roman", Times, serif;
  --color-accent-on-dark: #e8c84a;
  --shadow-soft: 0 4px 20px rgba(0,0,0,.06);
  --shadow-card: 0 2px 12px rgba(0,0,0,.07);
  --shadow-card-hover: 0 8px 28px rgba(0,0,0,.1);
  --color-accent-border: rgba(201, 162, 39, 0.32);
  --color-card-bg: #fffcf6;
  /* Подложки страниц и карточек — тёплый крем, как в каталоге */
  --surface-bg: var(--color-card-bg);
  --surface-bg-solid: #fffcf6;
  /* Поля выбора, поиска, форм — светлее подложки */
  --control-bg: #ffffff;
  --control-bg-focus: #ffffff;
  --surface-radius: 12px;
  --surface-padding: 1.25rem;
  --space-section: 1.25rem;
  /* Ширина макета: каталог/контакты vs читательские страницы */
  --layout-wide: 1200px;
  --layout-reading: 720px;
  --admin-toolbar-height: calc(0.55rem * 2 + 0.85rem);
}

/* Заголовки — Algerius, как на absolut888.ru (ALGERIC.TTF, weight 400) */
.hero-compact-cta h1,
.header-brand-title,
.footer-logo,
.catalog-page h1,
.agents-page-title,
.page-layout--reading .page-head h1,
.page-head h1,
.page-head .agents-page-title,
.page-head .favorites-title,
.favorites-title,
.page-section h2,
.page-section .page-section-title,
.block h2,
.page-uslugi .uslugi-section h2 {
  font-family: var(--font-algerius);
  font-weight: 400;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 7rem; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: #770000a1;
  background-image:
    linear-gradient(90deg, rgba(251, 238, 195, 0.95) 0%, rgba(249, 244, 220, 0.95) 50%, rgba(251, 238, 195, 0.95) 100%),
    url('/assets/bg/bg5.webp');
  background-repeat: repeat;
  /*background-size: auto, 360px 360px;*/
  line-height: 1.5;
  overflow-x: hidden;
}

body::before {
  content: '';
  display: block;
  position: fixed;
  z-index: -1;
  top: 0;
  width: 100vw;
  height: 100vh;
  width: 100vmax;
  height: 100vmax;
  background: transparent;
  pointer-events: none;
}



/* Шапка — в потоке по умолчанию (уезжает вверх); после порога скролла — липкая компактная (fixed) */
.header {
  position: relative;
  z-index: 1000;
  background: var(--color-header-footer-bg);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  border-bottom: 2px solid var(--color-accent);
  overflow: hidden;
}
.header.is-stuck {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
}
/* Фото офиса (Ревда) сбоку — не на всю ширину, с градиентом и полупрозрачностью */
.header-bg-office {
  display: none;
  position: absolute;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image: url("/assets/fasd.webp");
}
.header--office-side .header-bg-office {
  display: block;
  top: 23px;
  bottom: auto;
  height: 170px;
  left: 40%;
  right: 24%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.28;
}
.header--office-side .header-bg-office::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--color-header-footer-bg) 0%, transparent 45%, transparent 55%, var(--color-header-footer-bg) 100%);
  pointer-events: none;
}
.header-spacer {
  display: block;
  flex-shrink: 0;
}
/* Параллакс-звёзды (слои двигаются вверх с разной скоростью) */
.header-stars-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.header-stars {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  background: transparent;
  box-shadow: var(--star-shadows, none);
  animation: header-star-float 45s linear infinite;
}
.header-stars::after {
  content: "";
  position: absolute;
  left: 0;
  top: 1000px;
  width: 1px;
  height: 1px;
  background: transparent;
  box-shadow: var(--star-shadows, none);
}
.header-stars2 {
  width: 2px;
  height: 2px;
  animation-duration: 90s;
}
.header-stars2::after {
  width: 2px;
  height: 2px;
  top: 1000px;
}
.header-stars3 {
  width: 3px;
  height: 3px;
  animation-duration: 135s;
}
.header-stars3::after {
  width: 3px;
  height: 3px;
  top: 1000px;
}
@keyframes header-star-float {
  from { transform: translateY(0); }
  to { transform: translateY(-1000px); }
}
.header-top {
  padding: 1rem 1.25rem 1.15rem;
  position: relative;
  z-index: 1;
  transition: padding .25s ease;
}
.header-top::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 60%;
  max-width: 480px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent) 20%, var(--color-accent) 80%, transparent);
  opacity: 0.85;
  transition: opacity .25s ease;
}
.header-top-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
}
.header-top-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.header-top-row-1 { justify-content: space-between; }
.header-top-row-2 { justify-content: space-between; }
/* ПК: телефон справа (во второй строке); мобильная — в первой */
.header-phone-desktop { display: none; }
@media (min-width: 901px) {
  .header-phone-mobile { display: none !important; }
  .header-phone-desktop { display: inline-flex; align-items: center; }
  .header-top-row-2 { flex: 0 0 auto; }
}
.header-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
  transition: opacity .2s;
}
.header-brand:hover { opacity: .95; }
.header-brand-img {
  display: block;
  width: 150px;
  height: 150px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.2));
  transition: width .25s ease, height .25s ease;
}
.header-brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.2rem;
}
.header-brand-name {
  font-family: var(--font-brand-serif);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-accent-on-dark);
  transition: font-size .25s ease, opacity .25s ease;
}
.header-brand-title {
  font-size: 3rem;
  letter-spacing: 0em;
  color: var(--color-accent-on-dark);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .22);
  transition: font-size .25s ease;
}
.header-brand-slogan {
  font-size: 0.8rem;
  color: rgba(255,255,255,.85);
  letter-spacing: .03em;
  margin-top: 0.15rem;
  transition: opacity .25s ease;
}

/* Без анимации при появлении/исчезновении липкой шапки (нет скачка при скролле вверх) */
.header.is-stuck .header-top,
.header.is-stuck .header-top::after,
.header.is-stuck .header-brand,
.header.is-stuck .header-brand-img,
.header.is-stuck .header-brand-name,
.header.is-stuck .header-brand-title,
.header.is-stuck .header-brand-slogan,
.header.is-stuck .header-phone,
.header.is-stuck .header-social a,
.header.is-stuck .header-email,
.header.is-unsticking .header-top,
.header.is-unsticking .header-top::after,
.header.is-unsticking .header-brand,
.header.is-unsticking .header-brand-img,
.header.is-unsticking .header-brand-name,
.header.is-unsticking .header-brand-title,
.header.is-unsticking .header-brand-slogan,
.header.is-unsticking .header-phone,
.header.is-unsticking .header-social a,
.header.is-unsticking .header-email {
  transition: none;
}
.header.is-stuck .header-top {
  padding: 0.4rem 1rem 0.5rem;
}
.header.is-stuck .header-top-inner {
  align-items: center;
}
.header.is-stuck .header-bg-office {
  display: none;
}
.header.is-stuck .header-top::after {
  opacity: 0.35;
}
.header.is-stuck .header-brand-img {
  width: 56px;
  height: 56px;
}
.header.is-stuck .header-brand-name {
  display: none;
}
.header.is-stuck .header-brand-title {
  font-size: 3rem;
}
.header.is-stuck .header-brand-slogan {
  display: none;
}
.header.is-stuck .header-phone {
  font-size: 0.95rem;
}
.header.is-stuck .header-social a {
  width: 28px;
  height: 28px;
  font-size: 0.7rem;
}
.header.is-stuck .header-email {
  font-size: 0.85rem;
}
.header-phone {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .02em;
  transition: color .2s;
}
.header-phone:hover { color: var(--color-accent-light); }
.header-email {
  color: rgba(255,255,255,.9);
  text-decoration: none;
  font-size: .9rem;
  transition: color .2s;
}
.header-email:hover { color: var(--color-accent-light); }
.header-social {
  display: flex;
  gap: .3rem;
  align-items: center;
}
.header-social a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(255,255,255,.1);
  font-size: .75rem;
  font-weight: 600;
  transition: background .2s, color .2s, width .25s ease, height .25s ease, font-size .25s ease;
}
.header-social a:hover {
  background: var(--color-accent);
  color: #4a000b;
}
.header-nav-wrap {
  position: relative;
  z-index: 1;
  background: rgba(0,0,0,.15);
  padding: 0.4rem 1rem;
}
.header-nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
  align-items: center;
  justify-content: center;
}
.header-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
  transition: background .2s, color .2s, border-color .2s;
}
.header-nav a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-accent);
}
.header-nav a.active {
  font-weight: 700;
  background: rgba(255,255,255,.08);
  color: var(--color-accent-light);
  border-bottom: 2px solid var(--color-accent);
  margin-bottom: -2px;
}
.header-nav a:hover {
  background: rgba(255,255,255,.12);
  color: var(--color-accent-light);
}

/* Бургер — только на мобильных */
.header-burger {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  border: none;
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background .2s;
}
.header-burger:hover {
  background: rgba(255,255,255,.2);
}
.header-burger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform .25s ease, opacity .25s ease;
}
.header.is-nav-open .header-burger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.header.is-nav-open .header-burger-line:nth-child(2) {
  opacity: 0;
}
.header.is-nav-open .header-burger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Мобильная шапка */
@media (max-width: 900px) {
  .header-bg-office { display: none !important; }
  .header-top {
    padding: 0.75rem 1rem;
  }
  .header--office-side .header-bg-office {
    top: 50px;
    height: 80px;
  }
  .header-top-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  .header-top-row {
    width: 100%;
    gap: 0.5rem;
  }
  .header-brand {
    flex-direction: row;
    gap: 0.6rem;
    text-align: left;
  }
  .header-brand-img {
    width: 56px;
    height: 56px;
  }
  .header-brand-name,
  .header-brand-slogan {
    display: none;
  }
  .header .header-brand-title { font-size: 1.75rem; }
  .header-phone { font-size: 1rem; }
  /* Липкая шапка на мобильном — компактнее */
  .header.is-stuck .header-brand-img {
    width: 56px;
    height: 56px;
  }
  .header.is-stuck .header-brand-title {
    font-size: 1.2rem;
  }
  .header.is-stuck .header-top {
    padding: 0.4rem 1rem 0.5rem;
  }
  .header.is-stuck .header-phone {
    font-size: 0.9rem;
  }
  .header.is-stuck .header-social a {
    width: 26px;
    height: 26px;
    font-size: 0.65rem;
  }
  /* Липкая шапка — одна строка: логотип, телефон, соцсети, бургер */
  .header.is-stuck .header-top-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.5rem 0.75rem;
  }
  .header.is-stuck .header-top-row {
    width: auto;
    flex: 0 0 auto;
  }
  .header.is-stuck .header-top-row-1 {
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
  }
  .header.is-stuck .header-top-row-2 {
    flex: 0 0 auto;
    justify-content: flex-end;
  }
  .header-email { display: none; }
  .header-social { display: flex; }
  .header-social a { width: 28px; height: 28px; font-size: 0.7rem; }
  .header-burger {
    display: flex;
    flex-shrink: 0;
  }
  .header-nav-wrap {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background: var(--color-header-footer-bg);
    padding: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s ease, opacity .2s ease;
  }
  .header.is-nav-open {
    overflow: visible;
  }
  .header.is-nav-open .header-nav-wrap {
    max-height: 80vh;
    opacity: 1;
  }
  .header-nav {
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 0;
    gap: 0;
  }
  .header-nav a {
    display: block;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .header-nav a:last-child { border-bottom: none; }
}
@media (max-width: 480px) {
  .header:not(.is-stuck) .header-brand-title { font-size: 1.55rem; }
  .header-phone { font-size: 0.85rem; }
}
@media (min-width: 901px) {
  .header-burger { display: none !important; }
  .header-nav-wrap {
    position: relative;
    max-height: none;
    opacity: 1;
  }
}

/* Основной контент */
.main { max-width: var(--layout-wide); margin: 0 auto; padding: 2rem 1.25rem; min-height: 60vh; min-width: 0; }

/* Кнопки */
.btn {
  display: inline-block;
  padding: 0.6rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 6px;
  transition: background .2s, color .2s, border-color .2s, box-shadow .2s, transform .2s ease;
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--form-focus-ring);
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-accent-dark) 0%, var(--color-accent) 50%, var(--color-accent-light) 100%);
  color: #fff;
  border: 2px solid var(--color-accent);
  box-shadow: 0 2px 8px rgba(201, 162, 39, .25);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  color: #fff;
  border-color: var(--color-accent-light);
  box-shadow: 0 4px 14px rgba(201, 162, 39, .35);
  transform: translateY(-1px);
}
.btn-primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(201, 162, 39, .35), 0 2px 8px rgba(201, 162, 39, .25);
}
.btn-outline { background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: #fff; }
.btn-outline:focus-visible { box-shadow: 0 0 0 3px var(--form-focus-ring); }

.main a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--color-accent);
  border-radius: 2px;
}
.main a.btn:focus-visible { box-shadow: 0 0 0 3px rgba(201, 162, 39, .35); }

/* Герой на главной — слайдер слева, призыв справа. Картинки из админки «Герой». */
.hero-compact {
  max-width: var(--layout-wide);
  margin: 0 auto 2rem;
  padding: 15px;
  display: flex;
  flex-wrap: wrap;
  min-height: 380px;
  background: var(--surface-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--color-accent-border);
}
.hero-compact-slider {
  flex: 1 1 50%;
  min-width: 320px;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  min-height: 320px;
}
.hero-compact-slider::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(91, 0, 13, .03) 0%, transparent 50%, rgba(201, 162, 39, .02) 100%);
  pointer-events: none;
  z-index: 1;
}
.hero-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(0,0,0,.08);
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
}
.hero-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
}
.hero-compact-slide {
  position: absolute;
  inset: 0;
  transition: opacity 1s ease;
}
.hero-compact.hero-compact-multi .hero-compact-slide { opacity: 0; }
.hero-compact.hero-compact-multi .hero-compact-slide.hero-compact-slide-visible { opacity: 1; z-index: 1; }
.hero-compact-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

/* Блок «Быстрый старт» под hero */
.home-quick-start.page-section {
  max-width: 1200px;
  margin: 0.5rem auto 1.25rem;
  padding: 1.5rem 1.4rem 1.35rem;
  background: linear-gradient(165deg, rgba(255, 253, 248, .98) 0%, rgba(255, 249, 240, .94) 100%);
  border: 1px solid rgba(201, 162, 39, .24);
  border-radius: 14px;
  box-shadow:
    0 8px 32px rgba(91, 0, 13, .05),
    0 2px 8px rgba(0, 0, 0, .035);
}
.home-quick-start-head {
  margin-bottom: 1.25rem;
}
.home-quick-start-head-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}
.home-quick-start-head-text {
  flex: 1 1 auto;
  min-width: 0;
}
.page-home .home-quick-start .home-quick-start-title {
  border-bottom: none;
  padding-bottom: 0;
  margin: 0 0 0.4rem;
}
.home-quick-start-title {
  font-size: clamp(1.25rem, 2.2vw, 1.5rem);
  line-height: 1.28;
  color: var(--color-text);
  letter-spacing: 0.01em;
}
.home-quick-start-lead {
  margin: 0;
  max-width: 36rem;
  font-size: 0.9rem;
  line-height: 1.62;
  color: rgba(85, 85, 85, .92);
}
@media (min-width: 992px) {
  .home-quick-start-lead {
    max-width: none;
    white-space: nowrap;
  }
}
.home-quick-badge {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0.3rem 0.65rem;
  font-size: 0.67rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.03em;
  color: var(--color-accent-dark);
  background: rgba(255, 252, 246, .9);
  border: 1px solid rgba(201, 162, 39, .26);
  border-radius: 999px;
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
}
.home-quick-badge--live {
  color: var(--color-accent-dark);
  background: rgba(201, 162, 39, .07);
  pointer-events: none;
}
.home-quick-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.8rem;
  margin-bottom: 1.15rem;
}
.home-quick-nav-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  height: 100%;
  min-height: 5.25rem;
  padding: 0.9rem 0.8rem 0.9rem 0.95rem;
  background: rgba(255, 252, 246, .95);
  border: 1px solid rgba(201, 162, 39, .22);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition:
    transform .25s ease,
    box-shadow .25s ease,
    border-color .25s ease,
    background-color .25s ease;
}
.home-quick-nav-card:hover {
  border-color: rgba(201, 162, 39, .48);
  background: #fff;
  box-shadow: 0 6px 20px rgba(91, 0, 13, .07), 0 2px 6px rgba(0, 0, 0, .04);
  transform: translateY(-3px);
}
.home-quick-nav-card:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(91, 0, 13, .05);
}
.home-quick-nav-card:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(201, 162, 39, .5), 0 4px 16px rgba(91, 0, 13, .06);
}
.home-quick-nav-icon {
  flex-shrink: 0;
  width: 2.15rem;
  height: 2.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(139, 0, 0, .06);
  color: var(--color-primary);
  transition: background-color .25s ease, color .25s ease;
}
.home-quick-nav-card:hover .home-quick-nav-icon {
  background: rgba(201, 162, 39, .14);
  color: var(--color-primary-dark);
}
.home-quick-nav-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.home-quick-nav-text {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  flex: 1 1 auto;
  min-width: 0;
}
.home-quick-nav-title {
  font-size: 0.93rem;
  font-weight: 600;
  line-height: 1.28;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.home-quick-nav-desc {
  font-size: 0.75rem;
  line-height: 1.48;
  color: rgba(85, 85, 85, .88);
}
.home-quick-nav-arrow {
  flex-shrink: 0;
  align-self: center;
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
  color: rgba(201, 162, 39, .62);
  transition: transform .25s ease, color .25s ease;
}
.home-quick-nav-card:hover .home-quick-nav-arrow {
  transform: translateX(4px);
  color: rgba(168, 134, 31, .95);
}
.home-quick-live {
  padding: 1rem 1.1rem 1.05rem;
  background: rgba(255, 252, 246, .65);
  border: 1px solid rgba(201, 162, 39, .18);
  border-radius: 12px;
}
.home-quick-live-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(201, 162, 39, .14);
}
.home-quick-live-title {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}
.home-quick-live-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
}
.home-live-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  flex: 1 1 0;
  min-width: 7rem;
  gap: 0.18rem;
  padding: 0.2rem 1.1rem;
  text-align: center;
  border-left: 1px solid rgba(201, 162, 39, .16);
}
.home-live-stat:first-child {
  border-left: none;
  padding-left: 0.25rem;
}
.home-live-stat:last-child {
  padding-right: 0.25rem;
}
.home-live-num {
  font-size: clamp(1.5rem, 2.1vw, 1.85rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--color-primary);
}
.home-live-label {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--color-text);
}
.home-live-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.12rem 0 0;
  font-size: 0.66rem;
  line-height: 1.3;
  color: rgba(85, 85, 85, .85);
}
.home-live-dot {
  position: relative;
  flex-shrink: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 0 rgba(201, 162, 39, .4);
  animation: home-live-pulse 2.6s ease-out infinite;
}
@keyframes home-live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(201, 162, 39, .4); }
  70% { box-shadow: 0 0 0 5px rgba(201, 162, 39, 0); }
  100% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0); }
}
@media (max-width: 1024px) {
  .home-quick-nav-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-quick-live-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 0.5rem;
  }
  .home-live-stat {
    border-left: none;
    padding: 0.35rem 0.5rem;
    min-width: 0;
    align-items: flex-start;
    text-align: left;
  }
  .home-live-stat:first-child,
  .home-live-stat:last-child {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  .home-live-meta {
    justify-content: flex-start;
  }
}
@media (max-width: 768px) {
  .home-quick-start.page-section {
    padding: 1.2rem 1.05rem 1.1rem;
    border-radius: 12px;
  }
  .home-quick-start-head-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
  .home-quick-start-title {
    font-size: 1.2rem;
  }
  .home-quick-nav-card {
    min-height: 0;
  }
}
@media (max-width: 560px) {
  .home-quick-nav-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}
@media (max-width: 480px) {
  .home-quick-start.page-section {
    padding: 1rem 0.9rem 0.95rem;
    margin-bottom: 1rem;
  }
  .home-quick-live {
    padding: 0.85rem 0.8rem 0.9rem;
  }
  .home-quick-live-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .home-quick-badge {
    font-size: 0.64rem;
    padding: 0.26rem 0.55rem;
  }
}
@media (max-width: 375px) {
  .home-quick-start-lead {
    font-size: 0.86rem;
  }
  .home-quick-nav-title {
    font-size: 0.88rem;
  }
}
.hero-compact-cta {
  flex: 1 1 50%;
  min-width: 320px;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--surface-bg);
  border-radius: 0 12px 12px 0;
}
.hero-compact-cta h1 {
  font-size: clamp(1.45rem, 3.8vw, 2rem);
  margin: 0 0 0.5rem;
  color: var(--color-text);
  line-height: 1.25;
}
.hero-title-br-mobile { display: none; }
.hero-compact-subline { font-size: 1rem; color: var(--color-muted); margin: 0 0 1rem; line-height: 1.4; }
.hero-compact-phone { font-size: 1.4rem; margin: 0 0 1.25rem; }
.hero-compact-phone a { color: var(--color-primary); font-weight: 700; text-decoration: none; }
.hero-compact-phone a:hover { color: var(--color-accent-light); }
.hero-compact-btns { margin: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
@media (max-width: 768px) {
  .hero-compact {
    flex-direction: column;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .hero-compact-slider {
    min-height: 0;
    min-width: 0;
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16/9;
  }
  .hero-compact-cta {
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1.5rem 1rem;
    border-radius: 0 0 12px 12px;
    text-align: center;
    align-items: center;
  }
  .hero-compact-cta h1 {
    max-width: 100%;
    overflow-wrap: break-word;
  }
  .hero-compact-cta .hero-compact-subline {
    max-width: 100%;
  }
  .hero-compact-cta .hero-compact-btns {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
  }
  .hero-compact-cta .hero-compact-btns .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    white-space: normal;
    text-align: center;
  }
  .hero-title-br-mobile { display: inline; }
}
@media (max-width: 400px) {
  .hero-compact { padding: 10px; }
  .hero-compact-cta { padding: 1.25rem 0.85rem; }
  .hero-compact-cta .hero-compact-btns {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-compact-cta .hero-compact-btns .btn { width: 100%; }
}

/* Блок «Маршрут сделки» на главной */
.block-features--process {
  padding: 1.5rem 1.4rem 1.25rem;
}
.page-home .block-features--process h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0.65rem;
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  line-height: 1.28;
  max-width: none;
}
.block-features--process .features-lead {
  margin: 0;
  max-width: none;
  font-size: 0.96rem;
  line-height: 1.58;
  color: var(--color-muted);
}
.features-head {
  margin-bottom: 1.5rem;
}
.features-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.features-steps::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: 1.65rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, .5) 8%, rgba(201, 162, 39, .5) 92%, transparent);
  pointer-events: none;
  z-index: 0;
}
.feature-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1rem 1rem 1.05rem;
  background: var(--surface-bg-solid);
  border: 1px solid var(--color-accent-border);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.feature-step:hover {
  border-color: rgba(201, 162, 39, .45);
  box-shadow: var(--shadow-card-hover);
}
.feature-step-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.feature-step-num {
  display: block;
  font-size: clamp(1.5rem, 2vw, 1.85rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.04em;
  color: rgba(201, 162, 39, .42);
  font-variant-numeric: tabular-nums;
}
.feature-step-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--color-primary);
  opacity: 0.85;
}
.feature-step-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature-step-title {
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
}
.feature-step-desc {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--color-muted);
  flex-grow: 1;
}
.features-badges {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.5rem 0.65rem;
}
.features-badge {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 500;
  color: var(--color-text);
  background: rgba(255, 252, 246, .9);
  border: 1px solid rgba(201, 162, 39, .32);
  border-radius: 999px;
}
.features-badge--upn,
.features-badge--rgr {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 0.85rem 0.38rem 0.55rem;
  border-radius: 8px;
}
.features-badge-icon {
  flex-shrink: 0;
  width: 26px;
  height: 32px;
  color: var(--color-primary);
}
.features-badge-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
.features-badge-icon--logo {
  width: 30px;
  height: 30px;
}
.features-badge-icon--logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}
@media (max-width: 1024px) {
  .features-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .features-steps::before {
    display: none;
  }
}
@media (max-width: 560px) {
  .block-features--process {
    padding: 1.2rem 1rem 1rem;
  }
  .features-steps {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .features-badge {
    font-size: 0.76rem;
  }
}

/* Подпись над заголовком секции */
.section-label { font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--color-accent); margin: 0 0 .5rem; }

/* Блоки */
.intro { padding: 0 0 2.5rem; }
.intro p { margin-bottom: 1rem; line-height: 1.62; max-width: var(--layout-reading); }
.intro p:last-child { margin-bottom: 0; }
.block {
  position: relative;
  margin-bottom: 3rem;
  overflow: hidden;
}
.block:last-child { margin-bottom: 0; }
.block-alt {
  background: var(--surface-bg);
  padding: 1.5rem var(--surface-padding);
  border-radius: var(--surface-radius);
  border: 1px solid var(--color-accent-border);
  box-shadow: var(--shadow-card);
}
.block h2 {
  font-size: 1.45rem;
  margin: 0 0 1.25rem;
  color: var(--color-text);
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 0.75rem;
}
.block h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), transparent);
  border-radius: 1px;
  opacity: 0.9;
}

/* Золотая шапочка для всех .block: сверху как 6A, снизу как 6B */
.block::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 40%;
  height: 6px;
  background: linear-gradient(90deg, rgba(201,162,39,.85) 0%, rgba(224,184,61,.8) 60%, rgba(249,242,213,.0) 100%);
  border-radius: 0 0 999px 0;
  pointer-events: none;
}
.block::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 5px;
  background:
    repeating-linear-gradient(135deg,
      rgba(201,162,39,.28) 0,
      rgba(201,162,39,.28) 5px,
      rgba(248,246,240,.0) 5px,
      rgba(248,246,240,.0) 9px
    );
  opacity: 0.6;
  pointer-events: none;
}

/* Блоки на страницах Услуги и Страхование — всегда с подложкой,
   чтобы золотые полосы не висели в воздухе */
.page-uslugi .block:not(.block-alt),
.page-strahovanie .block:not(.block-alt) {
  background: var(--surface-bg);
  padding: 1.5rem var(--surface-padding);
  border-radius: var(--surface-radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-accent-border);
}
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Блок доверия — сертификаты, как на оригинале */
.block-trust {
  background: var(--surface-bg);
  padding: 1.5rem var(--surface-padding);
  border-radius: var(--surface-radius);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-section);
  border: 1px solid var(--color-accent-border);
}
.trust-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; justify-content: center; font-size: .9rem; color: var(--color-muted); }
.trust-list li { position: relative; padding-left: 1rem; }
.trust-list li::before { content: "✓"; position: absolute; left: 0; color: var(--color-accent); font-weight: 700; }

.block-career {
  padding: 1.5rem var(--surface-padding);
  background: var(--surface-bg);
  border-radius: var(--surface-radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-accent-border);
}
.block-career-lead { color: var(--color-muted); margin-bottom: 1rem; line-height: 1.5; }
.career-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.career-list li { position: relative; padding-left: 1.25rem; margin-bottom: .5rem; line-height: 1.45; }
.career-list li::before { content: "•"; position: absolute; left: 0; color: var(--color-accent); }

/* Узкий макет: о компании, отзывы, газета */
.page-layout--reading {
  max-width: var(--layout-reading);
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}
/* Широкий макет: на всю .main (каталог, контакты, услуги, страхование и т.д.) */
.page-layout--wide {
  width: 100%;
  max-width: none;
}
.page-layout--reading .page-section:last-child,
.page-layout--wide .page-section:last-child,
.page-contacts .page-section:last-child { margin-bottom: 0; }
/* Текст внутри широких страниц — удобная длина строки */
.prose-measure,
.page-layout--wide .contacts-intro,
.page-layout--wide .contacts-offices-intro,
.page-layout--wide .services-lead,
.page-layout--wide .strahovanie-lead,
.page-layout--wide .strahovanie-property-lead,
.page-uslugi .uslugi-section > p,
.page-uslugi .uslugi-intro {
  max-width: var(--layout-reading);
}
.page-head p { margin: 0.5rem 0 0; line-height: 1.5; }
.page-head p:last-child { margin-bottom: 0; }
.error-page .page-head { max-width: 36rem; }
.about-intro { margin-bottom: 2rem; }
.about-intro p { margin-bottom: 1rem; }
.about-trust { margin: 2rem 0; }
.about-career { margin: 2rem 0; }
.about-career .career-list li { margin-bottom: .75rem; }
.about-cta.page-section--actions { margin-bottom: 0; }

/* ----- Страница Наша газета (/nasha-gazeta) ----- */
.page-gazeta .gazeta-intro { margin-bottom: 1.5rem; }
.page-gazeta .gazeta-issue {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}
.page-gazeta .gazeta-issue strong { font-weight: 700; }
.page-gazeta .gazeta-preview {
  margin: 1.5rem 0;
}
.page-gazeta .gazeta-preview-link {
  display: block;
  width: 50%;
  max-width: 50%;
  line-height: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.page-gazeta .gazeta-preview-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  vertical-align: middle;
}
.page-gazeta .gazeta-links-wrap {
  margin: 1.5rem 0;
}
.page-gazeta .gazeta-download-btn { font-size: 1rem; padding: 0.6rem 1.25rem; }
.page-gazeta .gazeta-empty { margin-bottom: 1rem; color: var(--color-muted); }
.page-gazeta .gazeta-cta { margin-top: 1.5rem; }
@media (max-width: 768px) {
  .page-gazeta .gazeta-preview-link { width: 85%; max-width: 85%; }
  .page-gazeta .gazeta-preview-img { max-height: 70vh; }
}

/* Страницы: Контакты, Услуги, Отзывы */
.contacts-intro { margin-bottom: 1.25rem; color: var(--color-muted); }
.contacts-list { margin: 1rem 0; }
.contact-item { margin: 0.5rem 0; }
.contact-item a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.contact-item a:hover { color: var(--color-primary-light); text-decoration: underline; }
.contact-label { margin-right: 0.5rem; color: var(--color-muted); }

/* Общие стили форм (отзывы, контакты и др.) */
.site-form-wrap {
  padding: var(--surface-padding);
  margin: 0 0 var(--space-section);
}
.site-form-wrap .site-form-title { color: var(--color-primary); font-size: 1.2rem; margin: 0 0 1.25rem; font-weight: 600; }
.site-form .form-row,
.site-form .review-field { margin-bottom: 1.25rem; }
.site-form .form-row:last-of-type.form-actions,
.site-form .review-submit { margin-bottom: 0; padding-top: 0.25rem; margin-top: 1rem; }
.site-form label { display: block; margin-bottom: 0.4rem; font-weight: 500; font-size: .95rem; color: var(--color-text); }
.site-form input[type="text"],
.site-form input[type="tel"],
.site-form input[type="email"],
.site-form select,
.site-form textarea {
  width: 100%;
  max-width: 100%;
  line-height: 1.4;
}
.site-form input::placeholder,
.site-form textarea::placeholder { color: var(--color-muted); opacity: .9; }
.site-form textarea { resize: vertical; min-height: 5em; }
.site-form .required { color: var(--color-primary); }
.site-form .btn { padding: 0.6rem 1.5rem; font-size: 1rem; min-height: 44px; }

.contacts-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }
.contacts-social { margin: 2rem 0; }
.contacts-social h2 { margin-bottom: 0.5rem; }
.contacts-social-inline { margin: 1.5rem 0 2rem; }
.contacts-social-inline .contacts-social-title { margin-bottom: 0.35rem; font-size: 1rem; }
.contacts-social-inline a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.contacts-social-inline a:hover { color: var(--color-primary-light); text-decoration: underline; }
.contacts-message { padding: 1rem var(--surface-padding); border-radius: var(--surface-radius); margin: 0 0 var(--space-section); }
.contacts-message-success { background: rgba(34, 139, 34, .12); color: #1a5c1a; border: 1px solid rgba(34, 139, 34, .3); }
.contacts-message-error { background: rgba(139, 0, 0, .08); color: #8b0000; border: 1px solid rgba(139, 0, 0, .25); }
.contacts-forms h2 { margin-bottom: 1rem; }
.contacts-forms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contacts-form-single { max-width: none; width: 100%; }
.contacts-form-wrap h3 { margin: 0 0 1rem; font-size: 1.1rem; }
.contacts-offices h2 { margin-bottom: 0.5rem; }
.contacts-offices-intro { color: var(--color-muted); margin-bottom: 1.5rem; }
.contacts-offices-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.page-contacts .contacts-offices-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 960px) {
  .page-contacts .contacts-offices-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.contacts-office-card { padding: 1.25rem; background: var(--color-bg-alt, #f8f7f5); border-radius: 10px; border: 1px solid var(--color-border); }
.contacts-office-city { margin: 0 0 0.5rem; font-size: 1.1rem; }
.contacts-office-address { margin: 0 0 0.5rem; font-size: .95rem; }
.contacts-office-phones { margin: 0 0 0.75rem; font-size: .9rem; color: var(--color-muted); }
.contacts-office-actions { margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.contacts-office-actions .btn-sm { font-size: .85rem; padding: 0.35rem 0.65rem; }
.contacts-map-wrap { border-radius: 10px; overflow: hidden; border: 1px solid var(--color-border); box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.contacts-map { height: 400px; width: 100%; background: #e8ecef; }
.contacts-map-wrap .leaflet-control-attribution,
.object-map-wrap .leaflet-control-attribution,
.catalog-map .leaflet-control-attribution { display: none !important; }
.contacts-map-marker { background: none !important; border: none !important; }
.contacts-map-marker .object-map-pin-svg { display: block; width: 24px; height: 36px; }
@media (max-width: 640px) {
  .contacts-forms-grid { grid-template-columns: 1fr; }
  .site-form-wrap { padding: 1.25rem; }
  .site-form input[type="text"],
  .site-form input[type="tel"],
  .site-form input[type="email"],
  .site-form textarea { padding: 0.6rem 0.7rem; min-height: 44px; }
  .contacts-offices-list { grid-template-columns: 1fr; }
  .contacts-map { height: 300px; }
}
.services-intro { margin-bottom: 2rem; }
.services-list { margin: 2rem 0; }

/* ----- Страница Услуги (/uslugi) ----- */
.page-uslugi .services-lead {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--color-text);
  margin: 0 0 2rem;
}
.page-uslugi a {
  color: var(--color-primary);
  text-decoration: none;
}
.page-uslugi a:hover {
  color: var(--color-primary-light);
  text-decoration: underline;
}

/* Навигация по разделам (якоря) */
.page-uslugi .uslugi-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}
.page-uslugi .uslugi-nav-title {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin: 0;
}
.page-uslugi .uslugi-nav a {
  font-size: 0.95rem;
}
.page-uslugi .uslugi-nav a.is-active {
  font-weight: 700;
  text-decoration: underline;
}

/* Секции (общее) */
.page-uslugi .uslugi-section {
  margin-bottom: 2.5rem;
}
.page-uslugi .uslugi-section:last-of-type {
  margin-bottom: 0;
}
.page-uslugi .uslugi-section h2 {
  font-size: 1.35rem;
  margin: 0 0 1rem;
  color: var(--color-text);
}
.page-uslugi .uslugi-section h3.uslugi-subtitle {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-primary);
  margin: 1.25rem 0 0.5rem;
}
.page-uslugi .uslugi-section h3.uslugi-subtitle:first-of-type {
  margin-top: 0;
}
/* В текстовых блоках (Покупка, Юрисконсульт) подзаголовок — как основной текст, без красного */
.page-uslugi #pokupka .uslugi-subtitle,
.page-uslugi #yuriskonsult .uslugi-subtitle {
  color: var(--color-text);
}
.page-uslugi .uslugi-section p {
  margin: 0 0 1rem;
  line-height: 1.6;
}
.page-uslugi .uslugi-contact-block {
  margin: 1rem 0;
}
.page-uslugi .uslugi-contact-block a {
  font-weight: 600;
}

/* Списки услуг (маркер ·) */
.page-uslugi .uslugi-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  line-height: 1.55;
}
.page-uslugi .uslugi-list li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.4rem;
}
.page-uslugi .uslugi-list li::before {
  content: "·";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

/* Правовая проверка (галочки) */
.page-uslugi .uslugi-intro {
  margin: 0 0 1rem;
  color: var(--color-muted);
  line-height: 1.5;
}
.page-uslugi .uslugi-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.35rem 1.25rem;
}
.page-uslugi .uslugi-checklist li {
  position: relative;
  padding-left: 1.15rem;
  font-size: 0.9rem;
  color: var(--color-muted);
  line-height: 1.4;
}
.page-uslugi .uslugi-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

/* Страница Страхование */
.strahovanie-intro { margin-bottom: 2rem; }
.strahovanie-lead { font-size: 1.05rem; color: var(--color-text); line-height: 1.5; margin: 0; }
.strahovanie-types h2 { margin-bottom: 1.25rem; }
.strahovanie-categories { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 600px) { .strahovanie-categories { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .strahovanie-categories { grid-template-columns: repeat(3, 1fr); } }
.strahovanie-cat { background: var(--color-card-bg); padding: 1.25rem; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.06); border: 1px solid var(--color-accent-border); }
.strahovanie-cat h3 { font-size: 1.1rem; margin: 0 0 0.75rem; color: var(--color-primary); }
.strahovanie-cat .trust-list { justify-content: flex-start; gap: 0.5rem 1rem; }
.strahovanie-why { margin-bottom: 2rem; }
.strahovanie-why .trust-list,
.strahovanie-property .trust-list { justify-content: flex-start; flex-direction: column; gap: 0.5rem 0; }
.strahovanie-property-lead { margin: 0 0 1rem; color: var(--color-muted); line-height: 1.5; font-size: .95rem; }
.strahovanie-contact { margin-top: 2rem; }
.strahovanie-contact a { color: var(--color-primary); text-decoration: none; font-weight: 600; }
.strahovanie-contact a:hover { color: var(--color-primary-light); text-decoration: underline; }
.strahovanie-contact a.btn { color: #fff; }
.strahovanie-contact a.btn:hover { color: #fff; text-decoration: none; }
.strahovanie-addresses h2 { margin-bottom: 0.75rem; }
.strahovanie-address-list { list-style: none; padding: 0; margin: 0; color: var(--color-text); line-height: 1.6; }
.strahovanie-address-list li { margin-bottom: 0.5rem; }
.strahovanie-address-list a { color: var(--color-primary); text-decoration: none; }
.strahovanie-address-list a:hover { text-decoration: underline; }
.strahovanie-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }

/* Страница отзывов — общее */
.reviews-intro { margin-bottom: 2rem; color: var(--color-muted); line-height: 1.55; }
.reviews-cta { margin: 2rem 0; }
.reviews-cta .btn { margin-right: 0.5rem; margin-bottom: 0.5rem; }

/* Форма отзыва — общий блок от .site-form-wrap; ниже только специфика отзывов */
.review-form-message { margin: 0 0 1rem; padding: 0.5rem 0; }
.review-form-success { color: #2d5a27; font-weight: 500; }
.review-form-error { color: var(--color-primary); font-weight: 600; }
.review-success-block {
  text-align: center;
  padding: 2.5rem 2rem;
  margin: 0;
  background: rgba(5, 150, 105, .08);
  border: 1px solid rgba(5, 150, 105, .35);
  border-radius: 12px;
  color: #065f46;
}
.review-success-text { margin: 0; font-size: 1.25rem; font-weight: 700; line-height: 1.4; }
.review-form .review-field.review-field-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.review-form .review-field-inline { flex: 1; min-width: 180px; }
.review-form .review-field-inline label { display: block; }
.review-form textarea { min-height: 100px; }
.review-rating { display: flex; gap: 0.35rem; align-items: center; }
.review-star-label { cursor: pointer; margin: 0; padding: 0.15rem; }
.review-star-label input { position: absolute; opacity: 0; width: 0; height: 0; }
.review-star { font-size: 2rem; color: #c0c0c0; transition: color .2s ease, transform .15s ease; display: inline-block; }
.review-star-label:hover .review-star { transform: scale(1.15); }
/* Без наведения: показываем выбранное значение (data-value) */
.review-rating[data-value="1"] .review-star-label:nth-child(1) .review-star,
.review-rating[data-value="2"] .review-star-label:nth-child(1) .review-star,
.review-rating[data-value="2"] .review-star-label:nth-child(2) .review-star,
.review-rating[data-value="3"] .review-star-label:nth-child(1) .review-star,
.review-rating[data-value="3"] .review-star-label:nth-child(2) .review-star,
.review-rating[data-value="3"] .review-star-label:nth-child(3) .review-star,
.review-rating[data-value="4"] .review-star-label:nth-child(1) .review-star,
.review-rating[data-value="4"] .review-star-label:nth-child(2) .review-star,
.review-rating[data-value="4"] .review-star-label:nth-child(3) .review-star,
.review-rating[data-value="4"] .review-star-label:nth-child(4) .review-star,
.review-rating[data-value="5"] .review-star-label .review-star { color: var(--color-accent); }
/* При наведении: все звёзды серые, затем до наведённой — жёлтые (чётко видно выбор) */
.review-rating[data-hover] .review-star { color: #c0c0c0; }
.review-rating[data-hover="1"] .review-star-label:nth-child(1) .review-star,
.review-rating[data-hover="2"] .review-star-label:nth-child(1) .review-star,
.review-rating[data-hover="2"] .review-star-label:nth-child(2) .review-star,
.review-rating[data-hover="3"] .review-star-label:nth-child(1) .review-star,
.review-rating[data-hover="3"] .review-star-label:nth-child(2) .review-star,
.review-rating[data-hover="3"] .review-star-label:nth-child(3) .review-star,
.review-rating[data-hover="4"] .review-star-label:nth-child(1) .review-star,
.review-rating[data-hover="4"] .review-star-label:nth-child(2) .review-star,
.review-rating[data-hover="4"] .review-star-label:nth-child(3) .review-star,
.review-rating[data-hover="4"] .review-star-label:nth-child(4) .review-star,
.review-rating[data-hover="5"] .review-star-label .review-star { color: #d4a017; }

/* Список отзывов на странице */
.reviews-list.page-section {
  margin-top: 0;
}
.reviews-list {
  margin-top: 0;
}
.reviews-list .section-label { margin-bottom: 0.35rem; }
.reviews-list-heading { margin: 0 0 1.25rem; font-size: 1.2rem; font-weight: 600; color: var(--color-text); }
.reviews-list-items { list-style: none; padding: 0; margin: 0; min-width: 0; }
.review-item { border-bottom: 1px solid var(--color-border); padding: 1.25rem 0; min-width: 0; }
.review-item:last-child { border-bottom: none; }
.review-item-meta { display: grid; grid-template-columns: auto 1fr; gap: 0.25rem 1rem; margin: 0 0 0.75rem; font-size: 0.95rem; }
.review-item-meta dt { margin: 0; font-weight: 600; color: var(--color-text); }
.review-item-meta dd { margin: 0; color: var(--color-text); }
.review-item-meta dd + dt { margin-top: 0.15rem; }
.review-item-rating { display: flex; align-items: center; gap: 0.35rem; }
.review-item-stars { color: var(--color-accent); }
.review-item-stars-empty { color: #ddd; }
.review-item-rating-num { color: var(--color-muted); font-size: 0.9em; }
.review-item-body { margin: 0; line-height: 1.55; white-space: pre-wrap; word-break: break-word; overflow-wrap: break-word; max-width: 100%; min-width: 0; }
.review-item-body br { display: block; content: ""; margin-top: 0.5rem; }
.reviews-list-items { min-width: 0; }
.reviews-filter-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-bottom: 1.5rem; }
.reviews-filter-label { margin: 0; font-weight: 600; font-size: 0.95rem; }
.reviews-filter-select { min-width: 12rem; }
.reviews-filter-btn { padding: 0.4rem 0.75rem; }
.review-agent-link { color: var(--color-accent); text-decoration: none; }
.review-agent-link:hover { text-decoration: underline; }
.reviews-list-empty { margin: 1rem 0 0; color: var(--color-muted); }

/* Списки типов и городов */
.block-types .type-list, .block-cities .city-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1rem; min-width: 0; }
.type-list a, .city-list a { color: var(--color-primary); text-decoration: none; overflow-wrap: break-word; }
.type-list a:hover, .city-list a:hover { color: var(--color-primary-light); text-decoration: underline; }
.type-list .cnt, .city-list .cnt { color: var(--color-muted); font-size: .9em; }
.block-latest .card-grid { margin-bottom: 0; }

/* Главная: «Новые объекты» — ровная сетка 3×3 (9 карточек) */
.card-grid--home-latest {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 960px) {
  .card-grid--home-latest { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .card-grid--home-latest { grid-template-columns: 1fr; }
}
/* Карточки на кремовой подложке — белые, чтобы не сливались с секцией */
.page-section--cards .card {
  background: var(--control-bg);
  border-radius: var(--surface-radius);
}
.page-section--cards .card:hover {
  border-color: rgba(201, 162, 39, .65);
}

/* Карточки */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; min-width: 0; }
@media (max-width: 400px) {
  .card-grid { grid-template-columns: 1fr; }
}
.card {
  background: var(--color-card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-accent-border);
  transition: box-shadow .25s ease, transform .25s ease, border-color .25s ease;
  min-width: 0;
}
.card:hover {
  box-shadow: var(--shadow-card-hover), 0 0 0 1px rgba(201, 162, 39, .5), 0 0 24px rgba(201, 162, 39, .08);
  transform: translateY(-2px);
  border-color: rgba(201, 162, 39, .55);
}
.card-image { display: block; aspect-ratio: 4/3; background: var(--color-border); position: relative; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-no-image { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--color-muted); font-size: .9rem; }
.card-body { padding: 1rem; }
.card-status { font-size: .75rem; color: var(--color-muted); margin: 0 0 .35rem; text-transform: uppercase; letter-spacing: .03em; }
.card-labels { color: var(--color-primary); margin-left: .35rem; }
.card-heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; margin-bottom: .5rem; min-width: 0; }
.card-heading-row .card-title { margin: 0; flex: 1 1 auto; min-width: 0; }
.card-heading-row .card-price { flex: 0 0 auto; }
.card-price { font-weight: 600; font-size: 1.1rem; }
.card-title { font-size: 1rem; line-height: 1.3; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--color-primary); }
.card-meta { font-size: .85rem; color: var(--color-muted); margin: 0 0 .4rem; line-height: 1.4; }
.card-agent { font-size: .85rem; margin: 0 0 .5rem; }
.card-agent a { color: var(--color-primary); text-decoration: none; font-weight: 700; }
.card-agent a:hover { color: var(--color-primary-light); }
.card-link-wrap { text-align: right; margin-top: 0.5rem; margin-bottom: 0; }
.card-link-wrap .card-link { margin: 0; }
.card-link { font-size: .9rem; color: var(--color-primary); text-decoration: none; }
.card-link:hover { color: var(--color-primary-light); }
.card-link.btn { text-decoration: none; }
.card-link.btn:hover { text-decoration: none; color: #fff; }
.card-link-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; margin-bottom: 0; padding-right: 0.125rem; }
.card-call-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.25rem;
  box-sizing: border-box;
  color: var(--color-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, color .2s;
  flex-shrink: 0;
  text-decoration: none;
}
.card-call-btn:hover { background: rgba(139, 0, 0, .1); color: var(--color-primary); }
.card-call-btn svg { display: block; }
.card-fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0.25rem;
  box-sizing: border-box;
  color: var(--color-primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, color .2s;
  overflow: visible;
  flex-shrink: 0;
}
.card-fav-btn svg {
  display: block;
  overflow: visible;
}
.card-fav-btn:hover { background: rgba(139, 0, 0, .1); }
.card-fav-btn.is-favorite { color: var(--color-primary); }
.card-fav-btn.is-favorite:hover { background: rgba(139, 0, 0, .15); }
.card-fav-icon { display: inline-flex; align-items: center; justify-content: center; }
.card-fav-icon-filled { display: none; }
.card-fav-btn.is-favorite .card-fav-icon-outline { display: none; }
.card-fav-btn.is-favorite .card-fav-icon-filled { display: inline-flex; }
.header-favorites-count { font-weight: 600; }
.object-fav-wrap { display: inline-block; }
.object-fav-wrap .object-fav-btn { margin: 0; }
.more { margin-top: 1rem; text-align: center; }
.more a { color: var(--color-primary); text-decoration: none; }
.more a:not(.btn):hover { color: var(--color-primary-light); }
.more .btn { margin-top: 0; }
.more .btn-outline:hover { color: #fff; }

/* Избранное */
.block-favorites {
  padding: 1.75rem 1.25rem 2rem;
  background: var(--color-card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-accent-border);
}
.favorites-title { margin-top: 0; margin-bottom: 1rem; }
.page-favorites .page-head .favorites-title { margin-bottom: 0; }
.page-favorites .page-section--flush .favorites-empty { margin-bottom: 1.25rem; }
.favorites-empty { color: var(--color-muted); }
.favorites-grid { margin-top: 0; }

/* Каталог — фильтры */
.catalog-page .page-head h1 { font-size: clamp(1.45rem, 3.5vw, 1.85rem); }
.filters {
  max-width: 100%;
}
.filters-body { display: flex; flex-direction: column; gap: 0.75rem; }
.filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: flex-end;
}
.filters-row-primary {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem 0.75rem;
  align-items: flex-end;
}
.filters-row-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.9rem;
  align-items: flex-end;
}
.filters-row-secondary .filter-field-sort-right { margin-left: auto; }
.filters-row-primary .filter-field-search { flex: 1; min-width: 10rem; }
.filters .filter-field-search input[type="search"] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.filters-row-actions {
  align-items: center;
  padding-top: 0.5rem;
  margin-top: 0.15rem;
  border-top: 1px solid var(--color-border);
}
.filters .filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
  min-width: 0;
}
.filters .filter-field select option,
.page-section select option,
.agents-filter select option,
.site-form select option {
  background: var(--control-bg);
  color: var(--color-text);
}
.filters .filter-field select { width: 100%; min-width: 7rem; }
.filters .filter-field-narrow select { min-width: 4.5rem; max-width: 5.5rem; }
.filters .filter-field-price input { min-width: 5.5rem; }
.filters .filter-field-compact input { width: 5rem; min-width: 4.5rem; }
.filters .filter-field-sort select { min-width: 10rem; }
.filters-checkboxes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 1rem;
}
.filters .filter-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0;
}
.filters .filter-checkbox input { width: auto; margin: 0; accent-color: var(--color-primary); }
.filters-submit {
  margin-left: auto;
  padding: 0.45rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background .2s;
}
.filters-submit:hover { background: var(--color-primary-light); }
@media (max-width: 900px) {
  .filters { padding: 0.9rem 1rem; }
  .filters-body { gap: 0.65rem; }
  .filters-row-actions { padding-top: 0.65rem; }
  .filters-row-primary { flex-wrap: wrap; display: grid; grid-template-columns: repeat(2, 1fr); }
  .filters-row-secondary { display: grid; grid-template-columns: repeat(2, 1fr); }
  .filters-row-secondary .filter-field-sort-right { margin-left: 0; grid-column: 1 / -1; justify-self: start; }
  .filters-submit { margin-left: auto; max-width: 10rem; }
}
@media (max-width: 480px) {
  .filters { padding: 0.75rem; }
  .filters-row-primary,
  .filters-row-secondary { grid-template-columns: 1fr; }
  .filters-row-primary .filter-field-search { max-width: none; grid-column: 1; }
  .filters .filter-field-narrow select { max-width: none; }
}

/* Пагинация */
.catalog-bottom-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.catalog-top-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.catalog-per-page { margin: 0; font-size: 0.95rem; color: var(--color-muted); }
.catalog-per-page-top { flex-shrink: 0; }
.catalog-per-page a { color: var(--color-primary); text-decoration: none; }
.catalog-per-page a:hover { text-decoration: underline; }
.catalog-per-page-current { font-weight: 600; color: var(--color-text); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; min-width: 0; }
.pagination a { color: var(--color-primary); text-decoration: none; }
.pagination a:hover { text-decoration: underline; }

/* Страница объекта — макет как на Домклике: галерея-лента слева, инфо и агент справа */
.object-page { max-width: var(--layout-wide); margin: 0 auto; min-width: 0; }
.object-similar { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
.object-similar-title { margin: 0 0 1.25rem; font-size: 1.35rem; font-weight: 600; color: var(--color-text); }
.object-similar-grid { margin-bottom: 0; }

.block-viewed {
  margin-top: 2.5rem;
  padding: 1.75rem 1.25rem 2rem;
  background: var(--color-card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-accent-border);
}
.block-viewed .viewed-title { margin: 0 0 1.25rem; font-size: 1.35rem; font-weight: 600; color: var(--color-text); }
.block-viewed .viewed-grid { margin-bottom: 0; }
.catalog-viewed { margin-top: 2rem; }
.object-viewed { margin-top: 2.5rem; }
.object-top {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 360px);
  gap: 1.5rem 2rem;
  align-items: start;
  margin-bottom: 2rem;
  min-width: 0;
}
/* Поверхности на пёстром фоне (единая система) */
.page-head,
.page-section,
.surface-panel,
.surface-bar,
.filters,
.site-form-wrap {
  background: var(--surface-bg);
  border: 1px solid var(--color-accent-border);
  border-radius: var(--surface-radius);
  box-shadow: var(--shadow-card);
  box-sizing: border-box;
}
.page-head {
  margin: 0 0 var(--space-section);
  padding: 1rem var(--surface-padding) 1.1rem;
}
.page-section {
  position: relative;
  margin: 0 0 var(--space-section);
  padding: var(--surface-padding);
  overflow: hidden;
}
.page-section--flush {
  padding-bottom: 0.75rem;
}
.page-section--empty {
  text-align: center;
  color: var(--color-muted);
}
.page-section--actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.page-section--actions .btn { margin: 0; }
.page-section h2,
.page-section .page-section-title {
  font-size: 1.35rem;
  margin: 0 0 1rem;
  color: var(--color-text);
  line-height: 1.3;
}
.page-home .page-section h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.5rem);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--color-accent-border);
}
.page-home .page-section .more {
  margin-top: 1.25rem;
  margin-bottom: 0;
}
.page-section--trust {
  text-align: center;
  padding: 1rem var(--surface-padding);
}
.page-section--trust .trust-list {
  justify-content: center;
}
.page-section > .section-label:first-child {
  margin-top: 0;
}
.page-section .site-form-wrap {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  border-radius: 0;
}
.surface-panel {
  margin-bottom: var(--space-section);
  padding: var(--surface-padding);
}
.surface-bar {
  margin-top: var(--space-section);
  margin-bottom: 0;
  padding: 0.75rem var(--surface-padding);
}
.filters {
  margin-bottom: var(--space-section);
  padding: 1rem var(--surface-padding);
}
.page-section .filters,
.page-section .agents-filter {
  margin-top: 1rem;
  margin-bottom: 0;
}
/* Поля ввода — единый вид */
.page-section input[type="search"],
.page-section input[type="text"],
.page-section input[type="email"],
.page-section input[type="tel"],
.page-section input[type="number"],
.page-section select,
.page-section textarea,
.filters .filter-field select,
.filters .filter-field input,
.filters .filter-field-search input[type="search"],
.agents-filter .agents-filter-search,
.agents-filter select,
.site-form input[type="text"],
.site-form input[type="tel"],
.site-form input[type="email"],
.site-form select,
.site-form textarea,
.reviews-filter-select {
  padding: 0.42rem 0.6rem;
  border: 1px solid rgba(210, 205, 195, 0.85);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--control-bg);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.page-section input:focus,
.page-section select:focus,
.page-section textarea:focus,
.filters .filter-field select:focus,
.filters .filter-field input:focus,
.filters .filter-field-search input:focus,
.agents-filter .agents-filter-search:focus,
.agents-filter select:focus,
.site-form input:focus,
.site-form select:focus,
.site-form textarea:focus,
.reviews-filter-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
  background: var(--control-bg-focus);
}
.page-head .breadcrumbs {
  margin: 0 0 0.65rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}
.page-head h1,
.page-head .agents-page-title,
.page-head .favorites-title {
  margin: 0;
  color: var(--color-text);
  line-height: 1.25;
}
.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--color-border);
}
.page-meta .catalog-result-count { margin: 0; font-size: 1rem; color: var(--color-text); }
.page-meta .catalog-per-page { margin: 0; }

/* Хлебные крошки (вне .page-head — компактная таблетка) */
.breadcrumbs {
  margin: 0 0 1rem;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-accent-border);
  box-shadow: 0 1px 6px rgba(0,0,0,.04);
  font-size: 0.9rem;
  color: var(--color-muted);
}
.breadcrumbs a { color: var(--color-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-primary); }
.breadcrumbs-sep { margin: 0 .15rem; opacity: .65; }
.breadcrumbs-current { color: var(--color-text); }

.object-left-col {
  min-width: 0;
  background: var(--color-card-bg);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-accent-border);
}
.object-sidebar {
  position: sticky;
  top: 8.5rem;
  align-self: start;
  background: var(--color-card-bg);
  padding: 1.25rem;
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-accent-border);
}
.object-title { margin: 0 0 .35rem; font-size: 1.35rem; line-height: 1.3; }
.object-status { color: var(--color-muted); font-size: .9rem; margin: 0 0 .5rem; }
.object-price { font-size: 1.5rem; font-weight: 600; margin: 0 0 0.5rem; }
.object-address { font-weight: 700; margin: 0 0 1rem; line-height: 1.35; }
.object-info { margin: 0 0 1.25rem; }
.object-info dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .75rem; margin: 0; }
.object-info dt { color: var(--color-muted); font-weight: 400; }
.object-info dd { margin: 0; }
.object-info a { color: var(--color-primary); text-decoration: none; }
.object-info a:hover { text-decoration: underline; }
.object-agent-title { margin: 0 0 .5rem; font-size: 1rem; }
.object-agent { padding-top: 1rem; border-top: 1px solid var(--color-border); }
.agent-name { font-weight: 600; margin: 0 0 .25rem; }
.object-agent .agent-name a { color: var(--color-text); text-decoration: none; }
.object-agent .agent-name a:hover { color: var(--color-primary); text-decoration: underline; }
.object-agent p { margin: 0 0 .25rem; font-size: .95rem; }
.object-agent-phone a { font-weight: 600; color: var(--color-primary); text-decoration: none; }
.object-agent-phone a:hover { text-decoration: underline; }
.object-agent-btn { display: inline-block; margin-top: .75rem; padding: .5rem 1rem; background: var(--color-primary); color: #fff; text-decoration: none; border-radius: 6px; font-size: .9rem; }
.object-agent-btn:hover { background: var(--color-primary-light); color: #fff; }
.object-no-photo-block { background: var(--color-bg); border-radius: 10px; padding: 3rem; text-align: center; }
.object-no-photo { color: var(--color-muted); margin: 0; }

.object-map-wrap { margin-top: 1.5rem; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.08); border: 1px solid var(--color-border); min-height: 320px; position: relative; z-index: 1; }
.object-map { height: 320px; min-height: 320px; width: 100%; background: #e8ecef; display: block; }
.object-map-placeholder { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.object-map-no-coords { margin: 0; color: var(--color-muted); font-size: .95rem; text-align: center; }
.object-map-no-coords code { font-size: .85em; background: rgba(0,0,0,.06); padding: .15em .4em; border-radius: 4px; }

/* Метка на карте — классическая капля (SVG), бордо + золотая обводка */
.object-map-marker.leaflet-div-icon { background: none !important; border: none !important; }
.object-map-pin-svg {
  display: block;
  width: 24px;
  height: 36px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}

/* Галерея-лента: как на Домклике — лента без серости, фото вплотную друг за другом */
.gallery-tape-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-bg);
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.gallery-tape {
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 40vh;
  min-height: 240px;
  padding: 0 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
}
.gallery-tape:active { cursor: grabbing; }
.gallery-tape.gallery-tape-dragging,
.gallery-tape.gallery-tape-snapping {
  scroll-snap-type: none;
  scroll-behavior: auto;
}
.gallery-tape::-webkit-scrollbar { display: none; }
.gallery-tape-item {
  flex: 0 0 auto;
  min-width: 120px;
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border-radius: 8px;
  overflow: hidden;
}
.gallery-tape-inner {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--color-bg);
  border-radius: 8px;
  overflow: hidden;
}
/* Фото целиком без обрезки: ширина ячейки задаётся JS по пропорции изображения */
.gallery-tape-inner img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.gallery-tape-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: var(--color-primary);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  transition: background .2s, color .2s;
  z-index: 2;
}
.gallery-tape-btn:hover {
  background: var(--color-surface);
  color: var(--color-primary-dark);
}
.gallery-tape-prev { left: 12px; }
.gallery-tape-next { right: 12px; }
.gallery-tape-counter {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: .35rem .75rem;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: .85rem;
  border-radius: 20px;
  z-index: 2;
}
.gallery-tape-fullscreen-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.4rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  z-index: 2;
  transition: background .2s;
}
.gallery-tape-fullscreen-btn:hover {
  background: rgba(0,0,0,.75);
}
/* Лайтбокс во весь экран */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}
.gallery-lightbox.is-open { display: flex; }
.gallery-lightbox img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  pointer-events: none;
}
.gallery-lightbox-prev,
.gallery-lightbox-next,
.gallery-lightbox-close {
  position: absolute;
  border: none;
  background: rgba(255,255,255,.2);
  color: #fff;
  cursor: pointer;
  padding: .75rem 1rem;
  font-size: 1.5rem;
  border-radius: 8px;
  transition: background .2s;
}
.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover,
.gallery-lightbox-close:hover {
  background: rgba(255,255,255,.35);
}
.gallery-lightbox-close {
  top: 1rem;
  right: 1rem;
  font-size: 1.75rem;
  line-height: 1;
}
.gallery-lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.gallery-lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.gallery-lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: .4rem .9rem;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: .95rem;
  border-radius: 20px;
}
@media (max-width: 768px) {
  .object-top { grid-template-columns: 1fr; }
  .object-sidebar { position: static; align-self: stretch; order: 1; }
  .object-left-col { order: 2; }
  .gallery-tape-btn { width: 42px; height: 42px; font-size: 1.5rem; }
  .gallery-tape-prev { left: 8px; }
  .gallery-tape-next { right: 8px; }
}
@media (max-width: 600px) {
  .gallery-tape-btn { width: 38px; height: 38px; font-size: 1.35rem; }
}

.object-extra { margin-top: 1.5rem; }
.object-extra h2 { margin-top: 0; margin-bottom: .6rem; font-size: 1.1rem; }
.object-extra-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem .5rem;
  font-size: .9rem;
  line-height: 1.4;
}
.char-pair {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .4rem .6rem;
  align-items: baseline;
  min-width: 0;
}
.char-label { color: var(--color-muted); font-weight: 600; white-space: nowrap; }
.char-value { word-break: break-word; min-width: 0; }
@media (min-width: 769px) {
  .object-extra-grid {
    grid-template-columns: 1fr 1fr;
    gap: .4rem .8rem;
  }
}
.object-description { margin-top: 1.5rem; }
.object-description h2 { margin-top: 0; }
.object-description-text { line-height: 1.5; }
.object-description-text p { margin: 0 0 0.75rem; }
.object-description-text p:last-child { margin-bottom: 0; }
.object-description-text ul,
.object-description-text ol { margin: 0.5rem 0 0.75rem; padding-left: 1.25rem; }
.object-description-text li { margin-bottom: 0.25rem; }
.object-description-text li:last-child { margin-bottom: 0; }
.object-description-text div { margin-bottom: 0.5rem; }
.object-description-text div:last-child { margin-bottom: 0; }
.object-description-text strong,
.object-description-text b { font-weight: 700; }
.object-description-text em,
.object-description-text i { font-style: italic; }

.object-address-above-map { margin-top: 1.5rem; margin-bottom: 0.5rem; }
.object-address-bold { font-weight: 700; font-size: 1.05rem; margin: 0 0 .35rem; line-height: 1.35; }
.object-locality { margin: 0; font-size: .9rem; color: var(--color-muted); }
.object-locality a { color: var(--color-primary); text-decoration: none; }
.object-locality a:hover { text-decoration: underline; }
.object-route-wrap { margin: 0.75rem 0 0; }
.btn-route {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-surface);
  border: 2px solid var(--color-primary);
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s, color .2s, border-color .2s;
}
.btn-route:hover:not(:disabled) {
  background: var(--color-primary);
  color: #fff;
}
.btn-route:disabled { opacity: 0.8; cursor: wait; }
.btn-route-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E") no-repeat center;
  mask-size: contain;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7z'/%3E%3Ccircle cx='12' cy='9' r='2.5'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask-size: contain;
}

.object-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.btn-call, .btn-share {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1rem;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.btn-call {
  background: var(--color-primary);
  color: #fff;
}
.btn-call:hover { background: var(--color-primary-light); color: #fff; }
.btn-call-icon {
  display: inline-block;
  width: 1em; height: 1em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.btn-share {
  background: rgba(139, 0, 0, .12);
  color: var(--color-primary);
}
.btn-share:hover { background: rgba(139, 0, 0, .2); }
.btn-share-icon {
  display: inline-block;
  width: 1em; height: 1em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'/%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cline x1='8.59' y1='13.51' x2='15.42' y2='17.49'/%3E%3Cline x1='15.41' y1='6.51' x2='8.59' y2='10.49'/%3E%3C/svg%3E") center/contain no-repeat;
}
.share-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  padding: 0.6rem 1.25rem;
  background: var(--color-text);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.share-toast.share-toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Агенты (страница списка) — вертикальные карточки */
.agents-page { padding-bottom: 2rem; }
.agents-page .page-head .agents-page-title { font-size: 1.75rem; }
.agents-page-title { margin-top: 0; margin-bottom: 1rem; font-size: 1.75rem; color: var(--color-text); }
.agents-empty { color: var(--color-muted); }
.agents-filter {
  margin-bottom: var(--space-section);
  display: grid;
  grid-template-columns: minmax(280px, 1.6fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 1rem;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  padding: 0.85rem 1rem;
}
.agents-filter.page-section {
  padding: var(--surface-padding);
}
.agents-filter label {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .35rem;
  min-width: 0;
  max-width: 100%;
  font-size: .95rem;
  color: var(--color-muted);
}
.agents-filter .agents-filter-search,
.agents-filter select {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}
.agents-filter button {
  padding: 0.45rem 1rem;
  font-size: 1rem;
  white-space: nowrap;
  height: 2.35rem;
}
@media (max-width: 1080px) {
  .agents-filter {
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr);
  }
  .agents-filter button {
    justify-self: start;
  }
}
@media (max-width: 640px) {
  .agents-filter { grid-template-columns: 1fr; align-items: stretch; padding: .65rem .7rem; }
  .agents-filter label { max-width: none; }
  .agents-filter .agents-filter-search { width: 100%; }
  .agents-filter select { width: 100%; }
  .agents-filter button { width: 100%; }
}
.agents-group { margin-bottom: 2.25rem; }
.agents-group:last-child { margin-bottom: 0; }
.agents-group-title-main {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--color-accent-border);
  background: var(--surface-bg);
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  min-height: 2.3rem;
}
.agents-group-subtitle {
  margin: 1.25rem 0 0.6rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: .02em;
}
.agents-group-subtitle:first-of-type { margin-top: 0.75rem; }
.agents-group-title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: .02em;
  padding-bottom: .35rem;
  border-bottom: 1px solid var(--color-border);
}
.agents-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.1rem;
}
@media (max-width: 768px) {
  .agents-page-title {
    margin-bottom: .85rem;
    font-size: 1.45rem;
  }
  .agents-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .agent-card-v-body { padding: 0.75rem 0.6rem 0.9rem; }
  .agent-card-v-name { font-size: 0.9rem; }
  .agent-card-v-position, .agent-card-v-contact { font-size: 0.8rem; }
}
.agent-card-v {
  background: var(--color-card-bg);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-accent-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, border-color .2s;
}
.agent-card-v:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  border-color: rgba(139, 0, 0, .12);
}
.agent-card-v-photo-link {
  display: block;
  aspect-ratio: 3 / 4;
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}
.agent-card-v-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.agent-card-v-photo-link .agent-card-v-photo-placeholder {
  height: 100%;
}
@supports not (aspect-ratio: 1 / 1) {
  .agent-card-v-photo-link {
    height: 0;
    padding-top: 133.3333%;
  }
  .agent-card-v-photo,
  .agent-card-v-photo-placeholder {
    position: absolute;
    inset: 0;
  }
}
.agent-card-v-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: rgba(255,255,255,.9);
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.agent-card-v-body {
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  flex: 1;
}
.agent-card-v-name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 600;
}
.agent-card-v-name a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
}
.agent-card-v-name a:hover { color: var(--color-primary); }
.agent-card-v-position {
  margin: 0;
  color: var(--color-muted);
  font-size: .9rem;
}
.agent-card-v-contact {
  margin: 0;
  font-size: .9rem;
}
.agent-card-v-contact a {
  color: var(--color-primary);
  text-decoration: none;
}
.agent-card-v-contact a:hover { text-decoration: underline; }
.agent-card-v-btn {
  margin-top: .6rem;
  display: inline-block;
  padding: .45rem .85rem;
  background: transparent;
  color: var(--color-primary);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  border-radius: 6px;
  text-align: center;
  border: 1px solid rgba(139, 0, 0, .25);
  transition: background .2s, border-color .2s;
}
.agent-card-v-btn:hover { background: rgba(139, 0, 0, .06); border-color: var(--color-primary); }

.agent-photo { width: 70px; height: 100px; object-fit: contain; border-radius: 6px; }
/* Страница агента — подложка (карточка) с фото, телефоном и доп. информацией */
.agent-hero {
  background: var(--color-card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
  overflow: hidden;
  border: 1px solid var(--color-accent-border);
}
.agent-hero-inner {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 1.5rem 1.5rem 1.75rem;
}
.agent-hero-photo { flex-shrink: 0; }
.agent-hero-photo-img {
  width: 160px;
  height: 220px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
.agent-hero-content { flex: 1; min-width: 0; }
.agent-hero-name { margin: 0 0 .35rem; font-size: 1.5rem; font-weight: 700; color: var(--color-text); }
.agent-hero-position {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--color-muted);
  font-weight: 500;
}
.agent-hero-phone-wrap {
  margin: 0 0 1rem;
}
.agent-hero-phone-label {
  font-size: .9rem;
  color: var(--color-muted);
  margin-right: .5rem;
}
.agent-hero-phone {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
}
.agent-hero-phone:hover { color: var(--color-primary-dark); text-decoration: underline; }
.agent-hero-bio {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-text);
  font-size: .95rem;
  line-height: 1.6;
  max-width: 560px;
}
.agent-hero-bio p { margin: 0 0 .5rem; }
.agent-hero-bio p:last-child { margin-bottom: 0; }
.agent-hero-reviews-link { margin: 1rem 0 0; }
.agent-reviews-link { color: var(--color-accent); font-weight: 600; text-decoration: none; }
.agent-reviews-link:hover { text-decoration: underline; }
.agent-objects-title { margin: 0 0 1rem; font-size: 1.25rem; color: var(--color-primary); }
@media (max-width: 640px) {
  .agent-hero-inner { flex-direction: column; padding: 1.25rem; }
  .agent-hero-photo-img { width: 120px; height: 165px; }
}
.object-agent-photo-wrap { margin: 0 0 .75rem; }
.object-agent-photo { width: 80px; height: 120px; object-fit: contain; border-radius: 6px; display: block; }

/* Предпросмотр объявления */
.preview-banner {
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 0 0 8px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.95rem;
}
.preview-banner a { color: var(--color-accent-light); text-decoration: none; font-weight: 600; }
.preview-banner a:hover { text-decoration: underline; }

/* 404 — в единой палитре сайта (бордо/золотой) */
.error-page { text-align: center; padding: 3rem 1rem; }
.error-page h1 { font-size: 3rem; margin: 0; color: var(--color-primary); }
.error-page p { color: var(--color-text); }
.error-page a { color: var(--color-primary); text-decoration: none; }
.error-page a:hover { color: var(--color-accent); text-decoration: underline; }

/* Подвал — тот же бордо #5b000d, лёгкий узор как в шапке */
.footer {
  position: relative;
  background: linear-gradient(165deg, var(--color-footer-bg) 0%, #4a000b 50%, #3d0009 100%);
  color: var(--color-footer-text);
  margin-top: 3rem;
  padding: 0;
  font-size: .9rem;
  border-top: 2px solid var(--color-accent);
  box-shadow: 0 -2px 12px rgba(0,0,0,.2);
}
/* Падающие точки в подвале (как в шапке, но движение вниз) */
.footer-stars-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.footer-stars {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  background: transparent;
  box-shadow: var(--footer-star-shadows, none);
  animation: footer-star-fall 45s linear infinite;
}
.footer-stars::after {
  content: "";
  position: absolute;
  left: 0;
  top: -1000px;
  width: 1px;
  height: 1px;
  background: transparent;
  box-shadow: var(--footer-star-shadows, none);
}
.footer-stars2 {
  width: 2px;
  height: 2px;
  animation-duration: 90s;
}
.footer-stars2::after {
  width: 2px;
  height: 2px;
  top: -1000px;
}
.footer-stars3 {
  width: 3px;
  height: 3px;
  animation-duration: 135s;
}
.footer-stars3::after {
  width: 3px;
  height: 3px;
  top: -1000px;
}
@keyframes footer-star-fall {
  from { transform: translateY(0); }
  to { transform: translateY(1000px); }
}
.footer-inner { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
.footer-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 2rem;
  padding: 2rem 0 1.5rem;
  align-items: start;
  border-bottom: 1px solid rgba(201, 162, 39, .25);
  margin-bottom: 1rem;
}
.footer-brand {
  max-width: 320px;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.footer-logo-link {
  flex-shrink: 0;
  line-height: 0;
  transition: opacity .2s;
}
.footer-logo-link:hover { opacity: .9; }
.footer-logo-img {
  display: block;
  width: 100px;
  height: 100px;
  object-fit: contain;
}
.footer-brand-text { min-width: 0; }
.footer-logo {
  display: block;
  font-size: 2rem;
  letter-spacing: 0em;
  margin-bottom: .4rem;
  color: var(--color-accent-on-dark);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .22);
}
.footer-tagline {
  margin: 0;
  font-size: .85rem;
  line-height: 1.45;
  color: rgba(232,213,213,.9);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.footer-links a {
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color .2s;
}
.footer-links a.active { font-weight: 700; }
.footer-links a:hover { color: var(--color-accent-light); }
.footer-contacts {
  text-align: right;
  max-width: 300px;
  padding: 0;
}
.footer-address-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  font-size: .85rem;
  line-height: 1.5;
  color: var(--color-footer-text);
}
.footer-address-list li {
  margin-bottom: .5rem;
}
.footer-address-list li:last-child { margin-bottom: 0; }
.footer-address-list a {
  color: var(--color-footer-text);
  text-decoration: none;
  transition: color .2s;
}
.footer-address-list a:hover { color: var(--color-accent-light); }
.footer-phones {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  margin-bottom: .5rem;
}
.footer-phone {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
  text-decoration: none;
  transition: color .2s;
}
.footer-phone:hover { color: var(--color-accent-light); }
.footer-email {
  display: inline-block;
  color: var(--color-footer-text);
  text-decoration: none;
  font-size: .9rem;
  transition: color .2s;
}
.footer-email:hover { color: var(--color-accent-light); }
.footer-bottom {
  padding: 1rem 0 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-social {
  display: flex;
  gap: .4rem;
}
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: rgba(255,255,255,.08);
  color: var(--color-footer-text);
  text-decoration: none;
  font-size: .8rem;
  font-weight: 600;
  transition: background .2s, color .2s;
}
.footer-social a:hover {
  background: var(--color-accent);
  color: var(--color-primary-dark);
}
.footer-copy {
  margin: 0;
  font-size: .8rem;
  color: rgba(232,213,213,.7);
}

/* Виджет «Связаться» — слева внизу */
.contact-widget {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 50;
}
.contact-widget-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  transition: background .2s, transform .15s;
}
.contact-widget-btn:hover {
  background: var(--color-primary-light);
  color: #fff;
}
.contact-widget-btn:active { transform: scale(0.96); }
.contact-widget-icon { display: flex; align-items: center; justify-content: center; }
.contact-widget-icon svg { display: block; }
.contact-widget-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.35rem;
  background: var(--color-surface);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  border: 1px solid var(--color-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .2s, visibility .2s, transform .2s;
  min-width: 140px;
}
.contact-widget-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.contact-widget-menu-item {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.contact-widget-menu-item:hover {
  background: var(--color-primary);
  color: #fff;
}
@media (min-width: 769px) {
  .contact-widget-menu-contacts { display: block; }
  .contact-widget-menu-write,
  .contact-widget-menu-call { display: none !important; }
}
@media (max-width: 768px) {
  .contact-widget { bottom: 1rem; left: 1rem; }
  .contact-widget-btn { width: 48px; height: 48px; }
  .contact-widget-menu { flex-direction: column-reverse; }
  .contact-widget-menu-contacts { display: none !important; }
  .contact-widget-menu-write,
  .contact-widget-menu-call { display: block; }
}

/* Кнопка «Наверх» */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  padding: 0.5rem 1rem;
  font-size: .9rem;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s, background .2s;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--color-primary-light);
  color: #fff;
}
@media (max-width: 768px) {
  .back-to-top { bottom: 1rem; right: 1rem; padding: 0.5rem 0.85rem; font-size: .85rem; }
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
    padding: 1.5rem 0 1rem;
  }
  .footer-brand { max-width: none; flex-direction: column; align-items: center; }
  .footer-contacts { text-align: center; }
  .footer-bottom { flex-direction: column; justify-content: center; text-align: center; }
}

/* --- Панель администратора на сайте (WP-style) --- */
.admin-toolbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10050;
  background: #23282d;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.admin-toolbar-inner {
  max-width: min(96vw, 1480px);
  margin: 0 auto;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 0.85rem;
}
.admin-toolbar a {
  color: #fff;
  text-decoration: none;
}
.admin-toolbar a:hover { color: #72aee6; text-decoration: underline; }
.admin-toolbar-brand { font-weight: 600; }
.admin-toolbar-sep { color: rgba(255,255,255,.35); user-select: none; }
.admin-toolbar-spacer { flex: 1 1 auto; min-width: 0.5rem; }
body.has-admin-toolbar { padding-top: var(--admin-toolbar-height); }
body.has-admin-toolbar .header.is-stuck { top: var(--admin-toolbar-height); }
body.has-admin-toolbar .preview-banner { top: var(--admin-toolbar-height); }

/* --- Админка --- */
body.admin { background: #e9ecef; }
.admin-header { background: #343a40; padding: .75rem 1rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }
.admin-header a { color: #fff; text-decoration: none; }
.admin-header a:hover { text-decoration: underline; }
.admin-main { max-width: min(96vw, 1480px); margin: 0 auto; padding: 1.5rem 1rem; background: var(--color-surface); min-height: 70vh; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.admin-table-wrap--agents {
  overflow-x: auto;
  margin-top: 0.5rem;
}
.admin-table--agents .admin-col-count {
  text-align: center;
  width: 5.5rem;
  white-space: nowrap;
}
.admin-table--agents .admin-col-count a {
  font-weight: 600;
}
.admin-table--agents .admin-col-visible {
  width: 5.5rem;
  text-align: center;
}
.admin-row-inactive {
  background: rgba(0, 0, 0, 0.03);
}
.admin-row-inactive .admin-agent-photo-thumb {
  opacity: 0.55;
}
.admin-badge-hidden {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--color-muted);
  background: rgba(0, 0, 0, 0.06);
  border-radius: 4px;
  vertical-align: middle;
}
.admin-visible-toggle-form {
  margin: 0;
  display: inline-flex;
  justify-content: center;
}
.admin-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 2.75rem;
  height: 1.45rem;
  cursor: pointer;
}
.admin-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.admin-switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #c8c8c8;
  transition: background 0.2s;
}
.admin-switch-slider::before {
  content: "";
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  left: 0.18rem;
  top: 0.18rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.admin-switch-input:checked + .admin-switch-slider {
  background: var(--color-primary);
}
.admin-switch-input:checked + .admin-switch-slider::before {
  transform: translateX(1.25rem);
}
.admin-switch-input:focus-visible + .admin-switch-slider {
  box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.25);
}
.admin-main h1 { margin-top: 0; }
.admin-main a { color: var(--color-primary); text-decoration: none; }
.admin-main a:hover { color: var(--color-primary-light); text-decoration: underline; }
.admin-main a.admin-btn,
.admin-main a.admin-btn-danger { color: #fff; text-decoration: none; }
.admin-main a.admin-btn:hover,
.admin-main a.admin-btn-danger:hover { color: #fff; text-decoration: none; }
.admin-main button { color: #fff; }
.admin-main button:hover { color: #fff; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: .5rem .75rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.admin-table th { background: var(--color-bg); font-weight: 600; }
.admin-table button { padding: .25rem .5rem; font-size: .85rem; cursor: pointer; background: var(--color-primary); color: #fff; border: none; border-radius: 4px; }
.admin-table button:hover { background: var(--color-primary-light); }
.admin-agent-photo-cell { width: 52px; vertical-align: middle; }
.admin-agent-photo-thumb { display: block; width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.admin-agent-no-photo { color: var(--color-muted); font-size: .9rem; }
.admin-agent-bio-cell { white-space: nowrap; }
.admin-has-bio { color: var(--color-primary); font-size: .85rem; }
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-form { background: var(--color-surface); padding: 2rem; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.1); max-width: 360px; width: 100%; }
.login-form h1 { margin-top: 0; }
.login-form label { display: block; margin-bottom: 1rem; }
.login-form input { width: 100%; padding: .5rem; border: 1px solid var(--color-border); border-radius: 4px; }
.login-form button { width: 100%; padding: .6rem; background: var(--color-primary); color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 1rem; }
.login-form .error { color: #c00; margin-bottom: 1rem; }
.admin .error { color: var(--color-primary-dark); }
.admin .success { color: var(--color-primary); font-weight: 500; }
.admin .errors { color: var(--color-primary-dark); font-size: .9rem; }
.admin .muted { color: var(--color-muted); font-size: .9em; }
.admin-form label { display: block; margin-bottom: .75rem; }
.admin-form input[type="text"], .admin-form input[type="password"], .admin-form select { padding: .4rem .5rem; min-width: 200px; }
.admin-form button { padding: .5rem 1rem; background: var(--color-primary); color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.admin-form button:hover { background: var(--color-primary-light); }
.admin-form a { margin-left: 1rem; }

/* Карточка сотрудника в админке */
.admin-form-page-title { margin: 0 0 1.5rem; font-size: 1.5rem; font-weight: 700; color: var(--color-text); }
.admin-form-error { margin: 0 0 1rem; padding: 0.75rem 1rem; background: #fce8e6; color: var(--color-primary-dark); border-radius: 6px; }
.admin-form-agent .admin-form-section { margin-bottom: 1.75rem; padding: 1.25rem 1.5rem; background: #f8f9fa; border-radius: 8px; border: 1px solid var(--color-border); }
.admin-form-agent .admin-form-section-title { margin: 0 0 1rem; padding-bottom: 0.5rem; font-size: 1rem; font-weight: 600; color: var(--color-text); border-bottom: 1px solid rgba(0,0,0,.08); }
.admin-form-agent .admin-form-field { margin-bottom: 1rem; }
.admin-form-agent .admin-form-field:last-child { margin-bottom: 0; }
.admin-form-agent .admin-form-label { display: block; margin-bottom: 0.35rem; font-size: 0.9rem; font-weight: 500; color: var(--color-text); }
.admin-form-agent .admin-form-required { color: var(--color-primary); }
.admin-form-agent .admin-form-input { display: block; width: 100%; max-width: 320px; padding: 0.5rem 0.65rem; font-size: 0.95rem; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface); }
.admin-form-agent .admin-form-input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 2px rgba(139, 0, 23, .15); }
.admin-form-agent .admin-form-input-narrow { max-width: 6rem; }
.admin-form-agent .admin-form-textarea { display: block; width: 100%; max-width: 480px; min-height: 100px; padding: 0.5rem 0.65rem; font-size: 0.95rem; font-family: inherit; border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-surface); resize: vertical; }
.admin-form-agent .admin-form-textarea:focus { outline: none; border-color: var(--color-primary); }
.admin-form-agent .admin-form-hint { margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--color-muted); line-height: 1.4; }
.admin-form-agent .admin-form-grid { display: grid; gap: 1rem 1.5rem; }
.admin-form-agent .admin-form-grid-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 640px) { .admin-form-agent .admin-form-grid-2 { grid-template-columns: 1fr; } }
.admin-form-agent .admin-form-field-checkbox { margin-top: 0.75rem; }
.admin-form-agent .admin-form-checkbox-label { display: inline-flex; align-items: flex-start; gap: 0.5rem; cursor: pointer; font-weight: 500; }
.admin-form-agent .admin-form-checkbox { margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; accent-color: var(--color-primary); }
.admin-form-agent .admin-form-field-photo .admin-form-photo-current { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.admin-form-agent .admin-form-photo-thumb { display: block; max-height: 64px; width: auto; border-radius: 6px; border: 1px solid var(--color-border); }
.admin-form-agent .admin-form-photo-path { font-size: 0.85rem; color: var(--color-muted); }
.admin-form-agent .admin-form-photo-path code { font-size: 0.8rem; background: rgba(0,0,0,.06); padding: 0.2rem 0.4rem; border-radius: 4px; }
.admin-form-agent .admin-form-file { display: block; margin-top: 0.25rem; font-size: 0.9rem; }
.admin-form-agent .admin-form-actions { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--color-border); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.admin-form-agent .admin-form-submit { padding: 0.6rem 1.25rem; font-size: 1rem; font-weight: 600; background: var(--color-primary); color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.admin-form-agent .admin-form-submit:hover { background: var(--color-primary-light); }
.admin-form-agent .admin-form-back { color: var(--color-primary); text-decoration: none; font-size: 0.95rem; }
.admin-form-agent .admin-form-back:hover { text-decoration: underline; }
.admin-btn { display: inline-block; padding: .5rem 1rem; background: var(--color-primary); color: #fff; text-decoration: none; border-radius: 4px; font-size: .9rem; }
.admin-btn:hover { background: var(--color-primary-light); color: #fff; }
.admin-btn-danger { padding: .5rem 1rem; font-size: .9rem; cursor: pointer; background: #c00; color: #fff; border: none; border-radius: 4px; }
.admin-btn-danger:hover { background: #a00; }
.admin-link-danger { color: #c00; }
.admin-link-danger:hover { color: #a00; text-decoration: underline; }
.admin-filters { margin-bottom: 1rem; }
.admin-filters a { margin-right: 0.75rem; color: var(--color-primary); }
.admin-filters a.active { font-weight: 600; }

/* Админка: страница газеты */
.admin-gazeta { max-width: 720px; }
.admin-gazeta-desc { color: var(--color-muted); margin: 0 0 1.25rem; }
.admin-gazeta .success { margin: 0 0 0.75rem; }
.admin-gazeta .error { margin: 0 0 0.75rem; }
.admin-gazeta-section {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.admin-gazeta-section-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.admin-gazeta-hint { font-size: 0.9rem; color: var(--color-muted); margin: 0 0 0.75rem; line-height: 1.4; }
.admin-gazeta-status-text { margin: 0; }
.admin-gazeta-status-text a { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.admin-gazeta-status-text a:hover { text-decoration: underline; }
.admin-gazeta-form { margin-top: 0.5rem; }
.admin-gazeta-form label { margin-right: 1rem; margin-bottom: 0; }
.admin-gazeta-form label + label { margin-top: 0.75rem; }
.admin-gazeta-form input { max-width: 140px; }
.admin-gazeta-form button { margin-top: 0.5rem; }
.admin-gazeta-uploads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 0.5rem;
}
.admin-gazeta-upload-block {
  padding: 1rem;
  background: var(--color-surface);
  border-radius: 6px;
  border: 1px solid var(--color-border);
}
.admin-gazeta-upload-title { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 600; color: var(--color-text); }
.admin-gazeta-upload-block .admin-form { margin: 0; }
.admin-gazeta-upload-block .admin-form label { margin-bottom: 0.5rem; }
.admin-gazeta-upload-block .admin-form button { margin-top: 0.25rem; }
.admin-gazeta-delete { border-color: rgba(204,0,0,.25); background: #fff8f8; }
.admin-gazeta-delete-form { margin-top: 0.5rem; }
@media (max-width: 640px) {
  .admin-gazeta-uploads { grid-template-columns: 1fr; }
  .admin-gazeta-form label { display: block; margin-right: 0; }
}

.admin-hero-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.admin-hero-item { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.5rem 0; border-bottom: 1px solid var(--color-border); }
.admin-hero-item:last-child { border-bottom: 0; }
.admin-hero-thumb { width: 120px; height: 68px; object-fit: cover; border-radius: 6px; border: 1px solid var(--color-border); }
.admin-hero-filename { font-size: 0.9rem; color: var(--color-muted); }
/* Админка: отзывы — компактная таблица, одна строка на отзыв */
.admin-reviews-table { table-layout: fixed; width: 100%; }
.admin-reviews-table .admin-reviews-th-date { width: 10%; }
.admin-reviews-table .admin-reviews-th-author { width: 14%; }
.admin-reviews-table .admin-reviews-th-agent { width: 14%; }
.admin-reviews-table .admin-reviews-th-rating { width: 5%; min-width: 3.5rem; }
.admin-reviews-table .admin-reviews-th-status { width: 10%; min-width: 7rem; }
.admin-reviews-table .admin-reviews-th-text { width: 28%; }
.admin-reviews-table .admin-reviews-th-actions { width: 19%; }
.admin-review-row td { padding: 0.5rem 0.6rem; vertical-align: top; font-size: 0.9rem; border-bottom: 1px solid var(--color-border); }
.admin-reviews-td-date { white-space: nowrap; color: var(--color-muted); }
.admin-review-author-name { font-weight: 600; }
.admin-review-contact { color: var(--color-muted); font-size: 0.85em; }
.admin-reviews-td-agent { word-break: break-word; }
.admin-reviews-td-rating { white-space: nowrap; padding-right: 0.75rem; }
.admin-reviews-td-status { padding-left: 0.25rem; }
.admin-status { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.admin-status-approved { background: #e6f4ea; color: #1e7e34; }
.admin-status-rejected { background: #fce8e6; color: #c5221f; }
.admin-status-pending { background: #fef7e0; color: #b36200; }
.admin-review-preview { display: block; line-height: 1.4; color: var(--color-text); }
.admin-review-details { margin-top: 0.35rem; }
.admin-review-details summary { cursor: pointer; font-size: 0.85rem; color: var(--color-primary); }
.admin-review-details summary:hover { text-decoration: underline; }
.admin-review-fulltext { margin-top: 0.5rem; padding: 0.5rem; background: #f5f5f5; border-radius: 4px; font-size: 0.9rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 12rem; overflow-y: auto; }
.admin-review-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.admin-review-action-form { margin: 0; }
.admin-btn-sm { padding: 0.3rem 0.5rem; font-size: 0.8rem; }
.admin-btn-edit { text-decoration: none; display: inline-block; }
.admin-btn-link { color: var(--color-primary); margin-left: 0.5rem; }
.admin-reviews-table .admin-btn-danger.admin-btn-sm { padding: 0.3rem 0.5rem; font-size: 0.8rem; }/* Каталог: карта объектов */
.catalog-map-toggle { margin: 0.75rem 0 0.35rem; padding-top: 0.65rem; border-top: 1px solid var(--color-border); display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.catalog-map-toggle-label { font-weight: 500; font-size: 0.95rem; color: var(--color-text); }
.catalog-map-switch { position: relative; display: inline-block; width: 48px; height: 26px; cursor: pointer; }
.catalog-map-switch input { opacity: 0; width: 0; height: 0; }
.catalog-map-switch-slider { position: absolute; inset: 0; background: #c0c0c0; border-radius: 26px; transition: background 0.2s; }
.catalog-map-switch-slider::before { content: ''; position: absolute; width: 20px; height: 20px; left: 3px; bottom: 3px; background: var(--color-surface); border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform 0.2s; }
.catalog-map-switch input:checked + .catalog-map-switch-slider { background: var(--color-primary); }
.catalog-map-switch input:checked + .catalog-map-switch-slider::before { transform: translateX(22px); }
.catalog-map-switch input:focus-visible + .catalog-map-switch-slider { box-shadow: 0 0 0 2px var(--color-primary); }
.catalog-map { margin: 0 0 1.5rem; border-radius: 8px; overflow: hidden; border: 1px solid var(--color-border); }
.catalog-map-popup { font-size: 0.9rem; line-height: 1.4; }
.catalog-map-popup-price { font-weight: 600; }
.catalog-map-popup-address { color: var(--color-muted); font-size: 0.85rem; }
.catalog-map .marker-cluster { background-color: rgba(139, 0, 0, 0.6); }
.catalog-map .marker-cluster div { background-color: var(--color-primary); color: #fff; font-weight: 600; }
.catalog-map .marker-cluster-small { background-color: rgba(139, 0, 0, 0.5); }
.catalog-map .marker-cluster-small div { background-color: var(--color-primary); }
.catalog-map .marker-cluster-medium { background-color: rgba(139, 0, 0, 0.6); }
.catalog-map .marker-cluster-medium div { background-color: var(--color-primary-dark, #6b0000); }
.catalog-map .marker-cluster-large { background-color: rgba(139, 0, 0, 0.7); }
.catalog-map .marker-cluster-large div { background-color: var(--color-primary-dark, #6b0000); }

/* Админка: журнал импорта фида */
.feed-import-journal {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  background: #f8f9fa;
  border: 1px solid var(--color-border);
  border-radius: 8px;
}
.feed-import-journal-title { margin: 0 0 0.35rem; font-size: 1.15rem; }
.feed-import-journal-meta { margin: 0 0 0.5rem; font-size: 0.9rem; }
.feed-import-journal-summary { margin: 0 0 1rem; }
.feed-import-log-block { margin-bottom: 1rem; }
.feed-import-log-block summary { cursor: pointer; font-weight: 600; }
.feed-import-log-list { margin: 0.5rem 0 0 1.25rem; padding: 0; }
.feed-import-journal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.feed-import-journal .feed-import-tab {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
  color: var(--color-text);
  cursor: pointer;
  font-size: 0.9rem;
}
.feed-import-journal .feed-import-tab:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.feed-import-journal .feed-import-tab.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.feed-import-journal .feed-import-tab.is-active:hover {
  color: #fff;
}
.feed-import-panel { display: none; }
.feed-import-panel.is-active { display: block; }
.feed-import-log-entries { display: flex; flex-direction: column; gap: 1rem; }
.feed-import-log-entry {
  padding: 0.85rem 1rem;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}
.feed-import-log-entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}
.feed-import-log-entry-head a { font-weight: 600; }
.feed-import-log-id { font-size: 0.85rem; color: var(--color-muted); }
.feed-import-log-address { margin: 0 0 0.5rem; font-size: 0.9rem; }
.feed-import-changes { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.feed-import-changes th,
.feed-import-changes td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.feed-import-changes th { background: var(--color-bg); font-weight: 600; }
.feed-import-table { margin-top: 0.25rem; background: #fff; }