:root {
  --brand: #329344;
  --brand-rgb: 50 147 68;
  --brand-dark: #277538;
  --brand-dark-rgb: 39 117 56;
  --brand-light: #3fad55;
  --brand-light-rgb: 63 173 85;
  --chrome: #373737;
  --chrome-rgb: 55 55 55;
  --hero-overlay: #373737;
  --hero-overlay-rgb: 55 55 55;
  --ink: #373737;
  --ink-rgb: 55 55 55;
}

.nav-link {
  padding: 0.4rem 0.5rem;
  border-radius: 0.375rem;
  transition: background .15s;
  white-space: nowrap;
  font-size: 1.0625rem; /* 17px */
  line-height: 1.25;
}
.nav-link:hover { background: rgba(255,255,255,.1); }

/* Шапка на всю ширину экрана */
.site-header__inner {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.5rem;
}
.site-header__left {
  justify-self: start;
  min-width: 0;
}
.site-header__center {
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
}
.site-header__burger {
  justify-self: end;
}
.site-header__search-input {
  width: 5.5rem;
  font-size: 0.8125rem;
}
.site-header__phone {
  gap: 0.35rem;
}
.site-header__phone-text {
  display: none;
}

@media (min-width: 480px) {
  .site-header__inner { column-gap: 0.75rem; }
  .site-header__center { gap: 0.65rem; }
  .site-header__search-input { width: 7.5rem; }
  .site-header__phone-text { display: inline; font-size: 0.8125rem; }
}

@media (min-width: 768px) {
  .site-header__center { gap: 0.75rem; }
  .site-header__search-input { width: 9rem; font-size: 0.875rem; }
  .site-header__phone-text { font-size: 0.875rem; }
}

/* Десктоп: логотип+меню слева у края, действия справа у края */
@media (min-width: 1280px) {
  .site-header__inner {
    display: flex;
    justify-content: space-between;
    column-gap: 1rem;
  }
  .site-header__left {
    display: flex;
    align-items: center;
  }
  .site-header__center {
    margin-left: auto;
    justify-content: flex-end;
    gap: 0.75rem;
  }
  .site-header__search-input {
    width: 10rem;
  }
  .site-header__search-input:focus {
    width: 12rem;
  }
  .site-header__phone-text {
    display: inline;
  }
}

.form-input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.625rem 0.875rem;
  outline: none;
  background: #fff;
}
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 0.2);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.25rem;
  border-radius: 0.375rem;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--brand);
  color: var(--brand);
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  transition: background .2s, color .2s;
}
.btn-outline:hover { background: var(--brand); color: #fff; }

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  color: var(--ink);
}
.section-title span { color: var(--brand); }

.crm-input, .crm-select, .crm-textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: #fff;
}
.crm-input:focus, .crm-select:focus, .crm-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 0.15);
}

/* Searchable select (autocomplete) */
.crm-ac {
  position: relative;
  width: 100%;
}
.crm-ac__control {
  position: relative;
}
.crm-ac__native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.crm-ac__trigger {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background: #fff;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  line-height: 1.25rem;
  min-height: 2.375rem;
}
.crm-ac__trigger:hover {
  border-color: #94a3b8;
}
.crm-ac--open .crm-ac__trigger,
.crm-ac__trigger:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 0.15);
}
.crm-ac__value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crm-ac__value--placeholder {
  color: #94a3b8;
}
.crm-ac__chevron {
  color: #94a3b8;
  font-size: 0.7rem;
  flex-shrink: 0;
}
.crm-ac--open .crm-ac__chevron {
  transform: rotate(180deg);
}
.crm-ac__clear {
  position: absolute;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 1.5rem;
  height: 1.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #94a3b8;
  border-radius: 0.25rem;
  cursor: pointer;
  padding: 0;
}
.crm-ac--has-value .crm-ac__clear {
  display: inline-flex;
}
.crm-ac__clear:hover {
  color: #64748b;
  background: #f1f5f9;
}
.crm-ac--has-value .crm-ac__trigger {
  padding-right: 3.25rem;
}
.crm-ac__panel {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 0.25rem);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px -5px rgb(15 23 42 / 0.12), 0 4px 6px -4px rgb(15 23 42 / 0.08);
  overflow: hidden;
}
.crm-ac__search {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  background: #f8fafc;
}
.crm-ac__search:focus {
  background: #fff;
}
.crm-ac__list {
  list-style: none;
  margin: 0;
  padding: 0.25rem;
  max-height: 14rem;
  overflow-y: auto;
}
.crm-ac__option {
  padding: 0.5rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  line-height: 1.3;
}
.crm-ac__option:hover,
.crm-ac__option--active {
  background: #f0faf2;
  color: var(--brand-dark);
}
.crm-ac__option--selected {
  font-weight: 600;
}
.crm-ac__empty {
  padding: 0.75rem 0.625rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  text-align: center;
}
.crm-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.crm-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.crm-check:hover {
  border-color: var(--brand);
  background: #f0faf2;
}
.crm-check:has(input:checked) {
  border-color: rgb(var(--brand-rgb) / 0.45);
  background: #f0faf2;
  box-shadow: inset 0 0 0 1px rgb(var(--brand-rgb) / 0.12);
}
.crm-check input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.125rem 0 0;
  flex-shrink: 0;
  accent-color: var(--brand);
  cursor: pointer;
}
.crm-check__text {
  font-size: 0.875rem;
  line-height: 1.4;
  color: #475569;
}
.crm-check__title {
  display: block;
  font-weight: 600;
  color: #334155;
}
.crm-check__hint {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #94a3b8;
}
.crm-check__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: var(--brand);
  font-size: 0.95rem;
}
.crm-check:has(input:checked) .crm-check__icon {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.crm-check--site {
  align-items: center;
}
.crm-check--site .crm-check__text {
  flex: 1;
}
.crm-check--site input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
}

/* Realtor photo upload */
.crm-realtor-photo {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
}
.crm-realtor-photo__preview {
  position: relative;
  width: 8.5rem;
  height: 8.5rem;
  flex-shrink: 0;
  border-radius: 9999px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgb(var(--brand-rgb) / 0.35);
}
.crm-realtor-photo__preview--empty {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #cbd5e1;
}
.crm-realtor-photo__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.crm-realtor-photo__img.hidden {
  display: none;
}
.crm-realtor-photo__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 600;
}
.crm-realtor-photo__placeholder i {
  font-size: 1.75rem;
}
.crm-realtor-photo__placeholder.hidden {
  display: none;
}
.crm-realtor-photo__controls {
  flex: 1;
  min-width: 11rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.crm-realtor-photo__pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  background: var(--brand);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.crm-realtor-photo__pick:hover {
  background: var(--brand-dark);
}
.crm-realtor-photo__pick:active {
  transform: scale(0.98);
}
.crm-realtor-photo__pick input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.crm-realtor-photo__clear {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  font-size: 0.75rem;
  color: #94a3b8;
  cursor: pointer;
}
.crm-realtor-photo__clear:hover {
  color: #dc2626;
}
.crm-realtor-photo__clear input {
  accent-color: #dc2626;
  cursor: pointer;
}
.crm-realtor-photo__hint {
  margin: 0;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.35;
}

.crm-partner-logo {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
}
.crm-partner-logo__preview {
  position: relative;
  width: 8.5rem;
  height: 8.5rem;
  flex-shrink: 0;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px rgb(var(--brand-rgb) / 0.35);
}
.crm-partner-logo__preview--empty {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #cbd5e1;
  background: #e2e8f0;
}
.crm-partner-logo__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 0.5rem;
  box-sizing: border-box;
}
.crm-partner-logo__img.hidden {
  display: none;
}
.crm-partner-logo__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 600;
}
.crm-partner-logo__placeholder i {
  font-size: 1.75rem;
}
.crm-partner-logo__placeholder.hidden {
  display: none;
}
.crm-partner-logo__controls {
  flex: 1;
  min-width: 11rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.crm-partner-logo__pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  background: var(--brand);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.crm-partner-logo__pick:hover {
  background: var(--brand-dark);
}
.crm-partner-logo__pick:active {
  transform: scale(0.98);
}
.crm-partner-logo__pick input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.crm-partner-logo__clear {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  font-size: 0.75rem;
  color: #94a3b8;
  cursor: pointer;
}
.crm-partner-logo__clear:hover {
  color: #dc2626;
}
.crm-partner-logo__clear input {
  accent-color: #dc2626;
  cursor: pointer;
}
.crm-partner-logo__hint {
  margin: 0;
  font-size: 0.7rem;
  color: #94a3b8;
  line-height: 1.35;
}

/* Styled file pickers (CRM) */
.crm-file-pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.55rem 1rem;
  border-radius: 0.5rem;
  background: var(--brand);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.crm-file-pick:hover {
  background: var(--brand-dark);
}
.crm-file-pick:active {
  transform: scale(0.98);
}
.crm-file-pick i {
  font-size: 0.9rem;
  opacity: 0.95;
}
.crm-file-pick input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.crm-file-pick--block {
  display: flex;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px dashed rgb(var(--brand-rgb) / 0.45);
  background: #f0faf2;
  color: var(--brand-dark);
}
.crm-file-pick--block:hover {
  background: #dcf3e0;
  color: #225d30;
}
.crm-file-pick__name {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #64748b;
  word-break: break-all;
}
.crm-file-field .crm-label {
  margin-bottom: 0.35rem;
}
.crm-file-field a {
  color: var(--brand);
  font-size: 0.75rem;
}
.crm-file-field input[type="checkbox"] {
  accent-color: #dc2626;
  margin-right: 0.35rem;
}

.crm-partner-row {
  cursor: default;
}
.crm-partner-row.is-dragging {
  opacity: 0.45;
}
.crm-partner-row.is-drag-over {
  box-shadow: inset 0 2px 0 0 var(--brand);
}
.crm-partner-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.75rem;
  letter-spacing: -0.1em;
  user-select: none;
  line-height: 1;
  padding: 0.35rem 0.25rem;
  cursor: grab;
  border-radius: 0.25rem;
}
.crm-partner-handle:active {
  cursor: grabbing;
}
.crm-partner-row:hover .crm-partner-handle {
  color: #64748b;
  background: #f1f5f9;
}

.hero-gradient {
  background:
    linear-gradient(120deg, rgb(var(--hero-overlay-rgb) / 0.85) 0%, rgb(var(--brand-rgb) / 0.55) 100%),
    url('/static/img/hero-bg.jpg') center/cover;
}

.hero-overlay {
  background: linear-gradient(
    to right,
    rgb(var(--hero-overlay-rgb) / 0.95) 0%,
    rgb(var(--hero-overlay-rgb) / 0.72) 42%,
    rgb(var(--hero-overlay-rgb) / 0.28) 100%
  );
  pointer-events: none;
}

.hero-slider { position: absolute; inset: 0; }
.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.2s ease, transform 6s ease;
}
.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-search {
  max-width: 52rem;
}
.hero-search-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin-bottom: 0;
}
.hero-search-tabs::-webkit-scrollbar { display: none; }
.hero-search-tab {
  flex-shrink: 0;
  padding: 0.7rem 1.15rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 0.5rem 0.5rem 0 0;
  transition: background .2s, color .2s;
  cursor: pointer;
}
.hero-search-tab:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.hero-search-tab.is-active {
  background: #fff;
  color: var(--ink);
}
.hero-search-panel {
  background: #fff;
  color: var(--ink);
  padding: 1rem;
  border-radius: 0 0.5rem 0.5rem 0.5rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .hero-search-panel {
    grid-template-columns: 1fr auto;
    align-items: end;
    padding: 1.1rem 1.15rem;
  }
}
.hero-search-fields {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 640px) {
  .hero-search-fields {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hero-search-fields--properties {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .hero-search-fields--properties {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.hero-search-fields.hidden { display: none !important; }
.hero-search-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(55, 55, 55, 0.55);
  margin-bottom: 0.35rem;
}
.hero-search-submit {
  width: 100%;
  white-space: nowrap;
  min-height: 2.75rem;
}
@media (min-width: 768px) {
  .hero-search-submit {
    width: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
.hero-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}
.hero-chips::-webkit-scrollbar { display: none; }
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  padding: 0.7rem 1.15rem 0.7rem 0.7rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0.75rem;
  backdrop-filter: blur(6px);
  transition: background .2s, border-color .2s, color .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.hero-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  font-size: 1.35rem;
  color: var(--brand-light, #5cbf6e);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0.55rem;
}
.hero-chip-text {
  line-height: 1.25;
  max-width: 11rem;
}
.hero-chip:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}
.hero-chip--accent {
  background: rgb(var(--brand-rgb) / 0.55);
  border-color: rgb(var(--brand-light-rgb) / 0.55);
}
.hero-chip--accent:hover {
  background: rgb(var(--brand-rgb) / 0.75);
  border-color: rgb(var(--brand-light-rgb) / 0.8);
}
.hero-chip--accent .hero-chip-icon {
  color: var(--brand-dark);
}

#newbuild-lead,
#callback-lead,
#region-lead,
#service-lead {
  scroll-margin-top: 5.5rem;
}

.regions-hero {
  background:
    linear-gradient(120deg, rgb(var(--hero-overlay-rgb) / 0.92) 0%, rgb(var(--hero-overlay-rgb) / 0.72) 100%),
    url('/static/img/hero-bg.jpg') center/cover;
}
.regions-benefit {
  padding: 1.25rem;
  background: #fff;
  border-left: 4px solid var(--brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.regions-benefit-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.55rem;
  background: rgb(var(--brand-rgb) / 0.12);
  color: var(--brand);
  font-size: 1.15rem;
}
.regions-city {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(55, 55, 55, 0.08);
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
}
.regions-city:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}
.regions-city-media {
  aspect-ratio: 16 / 10;
  background: #e8ecef;
  overflow: hidden;
}
.regions-city-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.regions-city-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(55, 55, 55, 0.28);
  background:
    linear-gradient(145deg, rgb(var(--brand-rgb) / 0.12), rgba(55, 55, 55, 0.08));
}
.regions-city-body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.regions-city-cta {
  margin-top: auto;
}
.regions-empty {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
  padding: 1.75rem;
  background: #fff;
  border-left: 4px solid var(--brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
@media (min-width: 768px) {
  .regions-empty {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2.25rem;
  }
}
.regions-faq {
  background: #f8faf9;
  border: 1px solid rgba(55, 55, 55, 0.08);
  padding: 0.85rem 1rem;
}
.regions-faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.regions-faq summary::-webkit-details-marker { display: none; }
.regions-faq summary::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--brand);
  font-weight: 400;
}
.regions-faq[open] summary::after { content: "−"; }
.regions-faq-answer {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(55, 55, 55, 0.08);
  color: rgba(55, 55, 55, 0.7);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.regions-lead {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem;
  background: #fff;
  border-left: 4px solid var(--brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
@media (min-width: 900px) {
  .regions-lead {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: start;
    gap: 2.5rem;
    padding: 2rem 2.25rem;
  }
}

.services-hero {
  background:
    linear-gradient(120deg, rgb(var(--hero-overlay-rgb) / 0.92) 0%, rgb(var(--hero-overlay-rgb) / 0.72) 100%),
    url('/static/img/hero-bg.jpg') center/cover;
}
.services-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}
@media (min-width: 900px) {
  .services-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
  }
}
.services-tab {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  padding: 0.75rem 0.7rem;
  background: #fff;
  border: 1px solid rgba(55, 55, 55, 0.1);
  border-left: 3px solid transparent;
  color: rgb(var(--ink-rgb) / 0.78);
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.2;
  transition: border-color .18s, background .18s, color .18s, box-shadow .18s;
  cursor: pointer;
  min-width: 0;
}
@media (min-width: 1100px) {
  .services-tab {
    font-size: 0.92rem;
    padding: 0.85rem 0.95rem;
    gap: 0.7rem;
  }
}
.services-tab:hover {
  border-color: rgba(55, 55, 55, 0.16);
  border-left-color: rgb(var(--brand-rgb) / 0.45);
  color: rgb(var(--ink-rgb) / 0.92);
}
.services-tab.is-active {
  border-color: rgb(var(--brand-rgb) / 0.35);
  border-left-color: var(--brand);
  background: rgb(var(--brand-rgb) / 0.08);
  color: var(--brand-dark);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}
.services-tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  flex-shrink: 0;
  border-radius: 0.45rem;
  background: rgb(var(--brand-rgb) / 0.12);
  color: var(--brand);
  font-size: 0.95rem;
}
.services-tab.is-active .services-tab-icon {
  background: var(--brand);
  color: #fff;
}
.services-tab-label {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  hyphens: auto;
}
.services-panel {
  display: none;
  padding: 1.5rem 1.35rem 1.6rem;
  background: #fff;
  border-left: 4px solid var(--brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.services-panel.is-active {
  display: block;
  animation: services-panel-in .28s ease;
}
@media (min-width: 768px) {
  .services-panel {
    padding: 1.85rem 2rem 2rem;
  }
}
@keyframes services-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.services-panel-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.services-panel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  flex-shrink: 0;
  border-radius: 0.55rem;
  background: rgb(var(--brand-rgb) / 0.12);
  color: var(--brand);
  font-size: 1.2rem;
}
.services-panel-body {
  max-width: 48rem;
  color: rgb(var(--ink-rgb) / 0.8);
}
.services-lead {
  display: grid;
  gap: 1.5rem;
  padding: 1.75rem;
  background: #fff;
  border-left: 4px solid var(--brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
@media (min-width: 900px) {
  .services-lead {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    align-items: start;
    gap: 2.5rem;
    padding: 2rem 2.25rem;
  }
}

.builder-match-hero {
  background: linear-gradient(135deg, #1a2e22 0%, #2d4a35 55%, #3d5c42 100%);
}
.builder-match-field {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.builder-match-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
  color: rgb(var(--ink-rgb) / 0.9);
}
.builder-match-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.builder-match-option {
  display: inline-flex;
  cursor: pointer;
}
.builder-match-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.builder-match-option span {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border: 1px solid rgb(var(--ink-rgb) / 0.15);
  background: #fff;
  font-size: 0.875rem;
  line-height: 1.3;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.builder-match-option:hover span {
  border-color: var(--brand);
}
.builder-match-option input:checked + span {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 12%, #fff);
  color: var(--brand);
  font-weight: 600;
}
.builder-match-option input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.builder-match-lead {
  padding: 1.75rem;
  background: #fff;
  border-left: 4px solid var(--brand);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 5.5rem;
}

.lead-form-compact-grid {
  display: grid;
  gap: 0.5rem;
}
@media (min-width: 768px) {
  .lead-form-compact-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr) auto;
    align-items: stretch;
  }
}
.lead-form-compact .form-input {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}
.lead-form-compact-submit {
  width: 100%;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}
@media (min-width: 768px) {
  .lead-form-compact-submit {
    width: auto;
  }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeUp .7s ease both; }
.animate-fade-up-delay { animation: fadeUp .7s ease .15s both; }
.animate-fade-up-delay2 { animation: fadeUp .7s ease .3s both; }

/* Card hover lift */
.card-lift { transition: transform .25s ease, box-shadow .25s ease; }
.card-lift:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(55,55,55,.08); }

/* Property photo gallery — scroll-snap for photos.
   Video plays in a sibling host (not inside the scroller): Chromium breaks
   native seek/controls when <video> sits under overflow/scroll ancestors. */
.gallery-track {
  display: flex;
  height: 100%;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.gallery-track::-webkit-scrollbar {
  display: none;
}
.gallery-track.is-instant {
  scroll-behavior: auto;
}
.gallery-track.is-video-lock {
  overflow: hidden;
}
.gallery-track > img,
.gallery-track > .gallery-video-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #e2e8f0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.gallery-track > img.object-cover {
  object-fit: cover;
}
.gallery-video-slide {
  position: relative;
  background: #0f172a !important;
  overflow: hidden;
}
.gallery-video-slide .gallery-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0f172a;
}
.gallery-video-host {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #0f172a;
}
.gallery-video-host.is-active {
  display: block;
}
.gallery-video-host[hidden],
.gallery-video-host:not(.is-active) {
  display: none !important;
}
.gallery-video-host .gallery-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0f172a;
}

/* CRM property photo manager */
.crm-photo-item {
  position: relative;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: grab;
  user-select: none;
}
.crm-photo-item:active { cursor: grabbing; }
.crm-photo-item.is-dragging { opacity: 0.45; }
.crm-photo-item.is-drag-over {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.crm-photo-item img {
  width: 100%;
  height: 8rem;
  object-fit: contain;
  display: block;
  background: #f1f5f9;
  pointer-events: none;
}
.crm-photo-item .crm-photo-video-placeholder {
  width: 100%;
  height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 0.75rem;
}
.crm-photo-item .crm-photo-video-badge {
  position: absolute;
  right: 0.25rem;
  bottom: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.crm-photo-item .crm-photo-delete {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  width: 1.5rem;
  height: 1.5rem;
  background: #dc2626;
  color: #fff;
  font-size: 0.875rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.crm-photo-item .crm-photo-handle {
  position: absolute;
  left: 0.25rem;
  top: 0.25rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.15rem 0.35rem;
  letter-spacing: 0.05em;
}
.crm-photo-item .crm-photo-order {
  position: absolute;
  left: 0.25rem;
  bottom: 0.25rem;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
}
.crm-photo-status {
  font-size: 0.75rem;
  color: #64748b;
  min-height: 1.25rem;
}
.crm-upload-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.crm-upload-progress[hidden] {
  display: none !important;
}
.crm-upload-row {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 0.5rem 0.65rem;
}
.crm-upload-row.is-error {
  border-color: #fecaca;
  background: #fef2f2;
}
.crm-upload-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: #334155;
  margin-bottom: 0.35rem;
}
.crm-upload-row-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  min-width: 0;
}
.crm-upload-row-meta {
  flex-shrink: 0;
  color: #64748b;
}
.crm-upload-row.is-error .crm-upload-row-meta {
  color: #dc2626;
}
.crm-upload-track {
  height: 0.4rem;
  background: #e2e8f0;
  overflow: hidden;
}
.crm-upload-bar {
  height: 100%;
  width: 0%;
  background: var(--brand, #0f766e);
  transition: width 0.15s ease-out;
}
.crm-upload-row.is-processing .crm-upload-bar,
.crm-upload-row.is-converting .crm-upload-bar {
  background: var(--brand, #0f766e);
}
.crm-upload-row.is-converting .crm-upload-row-meta {
  color: var(--brand, #0f766e);
  font-weight: 600;
}
.crm-upload-row.is-uploading .crm-upload-row-meta {
  color: #334155;
}
.crm-upload-row.is-done .crm-upload-bar {
  background: #16a34a;
}
.crm-upload-row.is-error .crm-upload-bar {
  background: #dc2626;
}

/* Newbuild: developer badge */
.nb-developer {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(55, 55, 55, 0.04);
}
.nb-developer__logo {
  width: 3.25rem;
  height: 3.25rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  overflow: hidden;
}
.nb-developer__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  padding: 0.25rem;
}
.nb-developer__meta {
  min-width: 0;
}
.nb-developer__label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 600;
}
.nb-developer__name {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.nb-developer--aside {
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}
.nb-developer--card {
  gap: 0.5rem;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  margin-top: 0.5rem;
}
.nb-developer--card .nb-developer__logo {
  width: 1.75rem;
  height: 1.75rem;
}
.nb-developer--card .nb-developer__name {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
}
.nb-developer--card .nb-developer__label {
  display: none;
}

/* Newbuild: apartment types */
.nb-types {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .nb-types {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.nb-type {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8edf2;
  overflow: hidden;
  height: 100%;
}
.nb-type__plan {
  aspect-ratio: 4 / 3;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.nb-type__plan img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
}
.nb-type__plan--empty {
  color: #cbd5e1;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
}
.nb-type__plan--empty i {
  font-size: 1.5rem;
}
.nb-type__body {
  padding: 1rem 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
}
.nb-type__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.nb-type__rooms {
  margin-top: 0.15rem;
  font-size: 0.75rem;
  color: #94a3b8;
}
.nb-type__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: auto;
}
.nb-type__stat {
  background: #f8fafc;
  padding: 0.55rem 0.65rem;
}
.nb-type__stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  font-weight: 600;
  margin-bottom: 0.15rem;
}
.nb-type__stat-value {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.nb-type__stat-value--price {
  color: var(--brand);
}

/* Тема сайта: утилиты поверх собранного Tailwind */
.bg-chrome { background-color: var(--chrome) !important; }
.bg-brand { background-color: var(--brand) !important; }
.bg-brand-dark { background-color: var(--brand-dark) !important; }
.text-brand { color: var(--brand) !important; }
.text-brand-dark { color: var(--brand-dark) !important; }
.text-brand-light { color: var(--brand-light) !important; }
.border-brand { border-color: var(--brand) !important; }
.ring-brand { --tw-ring-color: var(--brand) !important; }

/* О компании — сертификаты */
.license-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.license-card__frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3 / 4;
  padding: 0.85rem;
  background: #fff;
  border: 1px solid rgba(55, 55, 55, 0.08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  cursor: zoom-in;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
}
.license-card__frame:hover,
.license-card__frame:focus-visible {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  outline: none;
}
.license-card__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.license-card__zoom {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: rgb(var(--chrome-rgb) / 0.78);
  color: #fff;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.license-card__frame:hover .license-card__zoom,
.license-card__frame:focus-visible .license-card__zoom {
  opacity: 1;
}
.license-card__caption {
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.35;
  color: rgb(var(--ink-rgb) / 0.72);
}
.license-lightbox {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100%;
  height: 100%;
  margin: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.license-lightbox[open] {
  display: flex;
}
.license-lightbox::backdrop {
  background: rgb(15 23 42 / 0.72);
}
.license-lightbox__panel {
  position: relative;
  background: #fff;
  padding: 1rem 1rem 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  max-width: min(92vw, 56rem);
  max-height: 92vh;
  overflow: auto;
}
.license-lightbox__img {
  display: block;
  max-width: 100%;
  max-height: min(78vh, 900px);
  margin: 0 auto;
  object-fit: contain;
}
.license-lightbox__title {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.95rem;
  color: rgb(var(--ink-rgb) / 0.75);
}
.license-lightbox__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: rgb(15 23 42 / 0.08);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.license-lightbox__close:hover {
  background: rgb(15 23 42 / 0.14);
}

/* CRM rich text (bio) */
.crm-richtext {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  background: #fff;
  overflow: hidden;
}
.crm-richtext:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(var(--brand-rgb) / 0.2);
}
.crm-richtext__toolbar {
  display: flex;
  gap: 0.25rem;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
}
.crm-richtext__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}
.crm-richtext__btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.crm-richtext__btn:active {
  background: rgb(var(--brand-rgb) / 0.08);
}
.crm-richtext__editor {
  min-height: 8.5rem;
  padding: 0.75rem 0.875rem;
  outline: none;
  font-size: 0.95rem;
  line-height: 1.55;
}
.crm-richtext__editor p {
  margin: 0 0 0.65em;
}
.crm-richtext__editor p:last-child {
  margin-bottom: 0;
}
.crm-richtext__editor strong,
.crm-richtext__editor b {
  font-weight: 700;
}
.crm-richtext textarea[data-richtext-input] {
  display: none !important;
}

/* Team bio on «О компании» */
.team-bio {
  margin-top: 0.5rem;
}
.team-bio__text {
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgb(var(--ink-rgb) / 0.65);
}
.team-bio__text p,
.richtext p {
  margin: 0 0 0.55em;
}
.team-bio__text p:last-child,
.richtext p:last-child {
  margin-bottom: 0;
}
.team-bio__text strong,
.team-bio__text b,
.richtext strong,
.richtext b {
  font-weight: 600;
  color: rgb(var(--ink-rgb) / 0.85);
}
.richtext {
  line-height: 1.65;
}
.richtext--about h1,
.richtext--about h2,
.richtext--about h3,
.richtext--about h4,
.richtext--privacy h1,
.richtext--privacy h2,
.richtext--privacy h3,
.richtext--privacy h4 {
  margin: 1.25em 0 0.45em;
  font-weight: 700;
  color: rgb(var(--ink-rgb) / 0.92);
  line-height: 1.3;
}
.richtext--about h1,
.richtext--privacy h1 { font-size: 1.5rem; }
.richtext--about h2,
.richtext--privacy h2 { font-size: 1.35rem; }
.richtext--about h3,
.richtext--privacy h3 { font-size: 1.2rem; }
.richtext--about h4,
.richtext--privacy h4 { font-size: 1.05rem; }
.richtext--about h1:first-child,
.richtext--about h2:first-child,
.richtext--about h3:first-child,
.richtext--about h4:first-child,
.richtext--privacy h1:first-child,
.richtext--privacy h2:first-child,
.richtext--privacy h3:first-child,
.richtext--privacy h4:first-child {
  margin-top: 0;
}
.richtext--about ul,
.richtext--about ol,
.richtext--privacy ul,
.richtext--privacy ol {
  margin: 0.65em 0 1em;
  padding-left: 1.35em;
}
.richtext--about ul,
.richtext--privacy ul { list-style: disc; }
.richtext--about ol,
.richtext--privacy ol { list-style: decimal; }
.richtext--about li,
.richtext--privacy li {
  margin: 0.25em 0;
}
.richtext--about blockquote,
.richtext--privacy blockquote {
  margin: 1em 0;
  padding: 0.35em 0 0.35em 1em;
  border-left: 3px solid var(--brand);
  color: rgb(var(--ink-rgb) / 0.7);
}
.richtext--about a,
.richtext--privacy a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.richtext--about a:hover,
.richtext--privacy a:hover {
  opacity: 0.85;
}
.richtext--about u,
.richtext--privacy u {
  text-decoration: underline;
}
.richtext--about del,
.richtext--privacy del {
  text-decoration: line-through;
  opacity: 0.75;
}
.richtext .rt-center,
.richtext--about .rt-center {
  text-align: center;
}
.richtext .rt-left,
.richtext--about .rt-left {
  text-align: left;
}
.richtext .rt-right,
.richtext--about .rt-right {
  text-align: right;
}
.team-bio__text--clamped {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.team-bio__toggle {
  margin-top: 0.4rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.team-bio__toggle:hover {
  text-decoration: underline;
}
.team-bio__toggle[hidden] {
  display: none !important;
}

/* Yandex Maps — карточка объекта в балуне */
.map-balloon {
  width: 252px;
  font-family: inherit;
  color: #1e293b;
  animation: map-balloon-in 0.28s ease-out;
}
@keyframes map-balloon-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.map-balloon__media {
  position: relative;
  width: calc(100% + 24px);
  margin: -8px -12px 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e2e8f0;
}
.map-balloon__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
.map-balloon:hover .map-balloon__media img {
  transform: scale(1.04);
}
.map-balloon__media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.75rem;
}
.map-balloon__body {
  padding: 0.75rem 0.15rem 0.2rem;
}
.map-balloon__type {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.2rem;
}
.map-balloon__price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
}
.map-balloon__title {
  margin-top: 0.3rem;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.map-balloon__addr {
  display: flex;
  gap: 0.35rem;
  align-items: flex-start;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
}
.map-balloon__addr i {
  margin-top: 0.15rem;
  color: var(--brand);
  flex-shrink: 0;
}
.map-balloon__addr span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.map-balloon__meta {
  margin-top: 0.45rem;
  font-size: 0.75rem;
  color: #475569;
}
.map-balloon__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.35rem;
  background: var(--brand);
  color: #fff !important;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.15s ease;
}
.map-balloon__link:hover {
  background: var(--brand-dark);
}
.map-balloon__link:active {
  transform: scale(0.98);
}
.map-balloon__link i {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}
.map-balloon__link:hover i {
  transform: translateX(2px);
}

/* Yandex Maps — список объектов в кластере */
.map-cluster {
  width: 292px;
  font-family: inherit;
  color: #1e293b;
  animation: map-balloon-in 0.28s ease-out;
}
.map-cluster__head {
  padding: 0.15rem 0.15rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}
.map-cluster__list {
  max-height: 300px;
  overflow-y: auto;
  margin: 0 -0.35rem -0.15rem;
  padding: 0.35rem 0.15rem 0.1rem;
  -webkit-overflow-scrolling: touch;
}
.map-cluster-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem;
  border-radius: 0.45rem;
  text-decoration: none !important;
  color: inherit !important;
  transition: background 0.15s ease;
}
.map-cluster-item:hover {
  background: rgb(var(--brand-rgb) / 0.08);
}
.map-cluster-item__thumb {
  width: 56px;
  height: 56px;
  border-radius: 0.35rem;
  overflow: hidden;
  flex-shrink: 0;
  background: #e2e8f0;
}
.map-cluster-item__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.map-cluster-item__ph {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 1.1rem;
}
.map-cluster-item__info {
  min-width: 0;
  flex: 1;
}
.map-cluster-item__price {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
  line-height: 1.2;
}
.map-cluster-item__title {
  margin-top: 0.15rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.map-cluster-item__meta {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-cluster-item__chevron {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: #94a3b8;
  transition: transform 0.15s ease, color 0.15s ease;
}
.map-cluster-item:hover .map-cluster-item__chevron {
  color: var(--brand);
  transform: translateX(2px);
}

/* Catalog map (Leaflet) */
#objects-map {
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow: hidden;
}
.map-pin {
  background: transparent;
  border: 0;
}
.map-pin__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  color: #fff;
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
  border: 2px solid #fff;
}
.map-cluster-icon {
  background: transparent;
  border: 0;
}
.map-cluster-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: var(--brand, #329344);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
}
.map-cluster-badge--md { width: 2.5rem; height: 2.5rem; font-size: 0.85rem; }
.map-cluster-badge--lg { width: 2.75rem; height: 2.75rem; font-size: 0.9rem; }
.map-leaflet-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 0.35rem;
  overflow: hidden;
}
.map-leaflet-popup .leaflet-popup-content {
  margin: 0;
  width: 252px !important;
}
.map-leaflet-popup--cluster .leaflet-popup-content {
  width: 292px !important;
}

/* ── 404 error page ── */
.error-page {
  min-height: calc(100vh - 12rem);
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(var(--brand-rgb), 0.08), transparent 42%),
    radial-gradient(circle at 85% 80%, rgba(var(--chrome-rgb), 0.06), transparent 38%),
    #f8fafc;
  padding: 2.5rem 0 3.5rem;
}

.error-page__inner {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .error-page__inner {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
    padding: 0 1.5rem;
  }
}

.error-page__visual {
  order: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

@media (min-width: 1024px) {
  .error-page__visual {
    order: 0;
  }
}

.error-page__image {
  width: min(100%, 34rem);
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 48px rgba(var(--ink-rgb), 0.12));
}

.error-page__content {
  order: 0;
  background: #fff;
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  box-shadow: 0 18px 50px rgba(var(--ink-rgb), 0.08);
  padding: 2rem 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .error-page__content {
    padding: 2.5rem 2.25rem;
    text-align: left;
  }
}

@media (min-width: 1024px) {
  .error-page__content {
    order: 1;
    padding: 3rem 2.75rem;
  }
}

.error-page__code {
  display: inline-block;
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(var(--brand-rgb), 0.18);
  margin-bottom: 0.35rem;
}

.error-page__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.85rem;
}

.error-page__lead {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(var(--ink-rgb), 0.68);
  max-width: 34rem;
  margin: 0 auto 1.75rem;
}

@media (min-width: 640px) {
  .error-page__lead {
    margin-left: 0;
    margin-right: 0;
  }
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 1.75rem;
}

@media (min-width: 640px) {
  .error-page__actions {
    justify-content: flex-start;
  }
}

.error-page__actions .btn-primary,
.error-page__actions .btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 11rem;
}

.error-page__hints {
  list-style: none;
  margin: 0;
  padding: 1.1rem 0 0;
  border-top: 1px solid rgba(var(--ink-rgb), 0.08);
  display: grid;
  gap: 0.55rem;
  font-size: 0.9375rem;
  color: rgba(var(--ink-rgb), 0.62);
  text-align: left;
}

.error-page__hints li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.error-page__hints i {
  color: var(--brand);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

