:root {
  --blue: #0468ff;
  --blue-hover: #0057d9;
  --text-main: #152242;
  --text-secondary: #6b7280;
  --text-light: #8a94a6;
  --bg-main: #ffffff;
  --bg-soft: #f4f6fb;
  --border: #dfe4ee;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-subtle: 0 2px 8px rgba(16, 24, 40, 0.06);
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: #fff;
  color: var(--text-main);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

img { max-width: 100%; height: auto; }

a { color: var(--blue); }

.container {
  width: 1180px;
  max-width: calc(100% - 32px);
  margin: 0 auto;
}

.object-container {
  width: 1120px;
  max-width: calc(100% - 32px);
  margin: 0 auto;
}

/* ——— Header ——— */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e6eaf0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f7;
}

.header-nav-row {
  display: flex;
  align-items: center;
  min-height: 44px;
  overflow: visible;
  position: relative;
  z-index: 101;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #152242;
  text-decoration: none;
  flex: 1;
  min-width: 0;
}

.logo-icon {
  color: var(--blue);
  display: flex;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.logo-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: #152242;
}

.logo-tagline {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-secondary);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 1;
  min-width: 0;
  flex-wrap: wrap;
  overflow: visible;
}

.main-nav > a {
  font-size: 14px;
  color: #152242;
  text-decoration: none;
  line-height: 44px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.main-nav > a:hover,
.main-nav > a.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.nav-more {
  position: relative;
  flex-shrink: 0;
}

.nav-more__toggle {
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: #152242;
  line-height: 44px;
  cursor: pointer;
  padding: 0;
  border-bottom: 2px solid transparent;
}

.nav-more.is-active .nav-more__toggle,
.nav-more__toggle:hover { color: var(--blue); }

.nav-more__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-subtle);
  padding: 4px;
  z-index: 110;
}

.nav-more.is-open .nav-more__menu { display: block; }

.nav-submenu .nav-more__toggle::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  transform: translateY(-1px);
  vertical-align: middle;
}

.nav-submenu.is-open .nav-more__toggle,
.nav-submenu.is-active .nav-more__toggle {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.nav-submenu .nav-more__menu {
  min-width: 220px;
  max-height: 70vh;
  overflow-y: auto;
}

@media (min-width: 761px) {
  .nav-more:hover .nav-more__menu,
  .nav-more.is-open .nav-more__menu {
    display: block;
  }
}

.nav-more__menu a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: #152242;
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.nav-more__menu a:hover,
.nav-more__menu a.is-active {
  background: #f4f7ff;
  color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.btn-header-secondary {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 14px;
  border: 1px solid #cfd8e6;
  border-radius: 6px;
  background: #fff;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-header-primary {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-header-primary:hover { background: var(--blue-hover); }

.header-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border: 1px solid #cfd8e6;
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
}

.header-burger span {
  display: block;
  height: 2px;
  background: #152242;
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover { background: var(--blue-hover); }

.btn-outline {
  background: #fff;
  color: var(--blue);
  border: 1px solid #cfd8e6;
}

.btn-whatsapp {
  background: #22c55e;
  color: #fff;
}

.btn-full { width: 100%; }

.btn-small { min-height: 32px; padding: 0 12px; font-size: 13px; }

.form-submit {
  height: 42px;
  width: 100%;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}

/* ——— Home hero ——— */
.home-hero {
  min-height: 330px;
  padding: 56px 0 42px;
  background:
    linear-gradient(rgba(20, 35, 70, 0.25), rgba(20, 35, 70, 0.25)),
    linear-gradient(135deg, #1e3a5f 0%, #3d5a80 50%, #5c7a99 100%);
  background-size: cover;
  background-position: center;
}

.home-hero.has-bg {
  background:
    linear-gradient(rgba(20, 35, 70, 0.25), rgba(20, 35, 70, 0.25)),
    url("../images/hero-bg.jpg") center/cover no-repeat;
}

.home-hero h1 {
  margin: 0 0 28px;
  color: #fff;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 700;
}

.hero-search {
  width: 860px;
  max-width: 100%;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.16);
  padding: 16px;
}

.search-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 14px;
}

.search-tabs a,
.search-tabs button {
  border: 0;
  background: transparent;
  padding: 0 0 6px;
  color: #152242;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  font-family: inherit;
}

.search-tabs a.active,
.search-tabs button.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 180px 140px 110px;
  gap: 8px;
}

.search-row input,
.search-row select {
  height: 40px;
  border: 1px solid #cfd8e6;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 14px;
  font-family: inherit;
}

.search-row button {
  height: 40px;
  border-radius: var(--radius-sm);
  border: 0;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* ——— Listings ——— */
.listings-section {
  padding: 32px 0 56px;
  background: #fff;
}

.section-title {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-main);
}

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

.listings-grid--catalog,
.related-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.listing-card {
  position: relative;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text-main);
  display: block;
}

.listing-card:hover .listing-card__title { color: var(--blue); }

.listing-card__photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #eef2f7;
  overflow: hidden;
  border-radius: 6px;
}

.listing-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.listing-card__badge {
  position: absolute;
  left: 8px;
  top: 8px;
  height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-sm);
  background: rgba(21, 34, 66, 0.72);
  color: #fff;
  font-size: 11px;
  line-height: 22px;
}

.listing-card__body { padding: 9px 0 0; }

.listing-card__price {
  margin-bottom: 4px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  color: #152242;
}

.listing-card__meter {
  margin-bottom: 5px;
  font-size: 12px;
  color: var(--text-secondary);
}

.listing-card__title {
  margin: 0 0 5px;
  font-size: 14px;
  line-height: 1.25;
  font-weight: 600;
  color: #152242;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.listing-card__meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.listing-card__address {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: grid;
  place-items: center;
  background: #eef2f7;
  color: #8a94a6;
  font-size: 13px;
}

.photo-placeholder::before { content: "Нет фото"; }

/* ——— Catalog page ——— */
.catalog-page {
  padding: 24px 0 56px;
  background: #fff;
}

.catalog-title {
  margin: 0 0 18px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-main);
}

.catalog-filters {
  margin-bottom: 24px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.catalog-filters-grid {
  display: grid;
  grid-template-columns: 180px 180px 1fr 1fr 140px;
  gap: 8px;
  margin-bottom: 12px;
}

.catalog-filters input,
.catalog-filters select {
  height: 38px;
  border: 1px solid #cfd8e6;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}

.catalog-filters-extra {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.catalog-filters-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.catalog-filters button[type="submit"] {
  height: 38px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Select2 */
.catalog-filters .select2-container,
.hero-search .select2-container,
.search-row .select2-container {
  width: 100% !important;
}

.select2-container--default .select2-selection--single {
  height: 38px;
  border: 1px solid #cfd8e6;
  border-radius: var(--radius-sm);
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 36px;
  padding-left: 10px;
  color: var(--text-main);
  font-size: 14px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 36px;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
  background: var(--blue);
}

.select2-dropdown {
  border-color: #cfd8e6;
  font-size: 14px;
  z-index: 200;
}

.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.catalog-count {
  font-size: 20px;
  font-weight: 700;
}

.catalog-toolbar select {
  height: 38px;
  border: 1px solid #cfd8e6;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 14px;
}

.catalog-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

/* ——— Object page ——— */
.object-page {
  padding: 20px 0 64px;
  background: #fff;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumbs a:hover { color: var(--blue); }

.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: #cbd5e1;
}

.object-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 320px;
  gap: 48px;
  align-items: start;
}

.object-title {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-main);
}

.object-actions,
.object-actions-top {
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
}

.object-actions button,
.object-actions-top button {
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 14px;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.object-gallery { margin-bottom: 24px; }

.gallery-main {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef2f7;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
}

.gallery-thumbs img {
  width: 82px;
  height: 62px;
  object-fit: cover;
  border-radius: 3px;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
}

.gallery-thumbs img.active,
.gallery-thumbs img.is-active {
  border-color: var(--blue);
}

.object-facts-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  margin: 22px 0 32px;
}

.object-fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.object-fact strong {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.object-fact span {
  font-size: 13px;
  color: var(--text-secondary);
}

.object-section {
  margin-top: 36px;
}

.object-section h2 {
  margin: 0 0 16px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.object-section p,
.description-text {
  font-size: 15px;
  line-height: 1.6;
  color: #25324d;
}

.object-map__frame {
  height: 360px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef2f7;
  border: 1px solid var(--border);
}

.object-sidebar {
  position: sticky;
  top: 76px;
}

.price-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: #fff;
}

.price-card__price {
  margin-bottom: 4px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text-main);
}

.price-card__meter {
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.price-card__mortgage {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 10px;
  border-radius: 6px;
  background: #f4f7ff;
  font-size: 13px;
}

.price-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}

.price-card__btn--primary {
  background: var(--blue);
  color: #fff;
}

.price-card__btn--secondary {
  margin-top: 8px;
  background: #eef4ff;
  color: var(--blue);
}

.price-change-up { color: #dc2626; font-size: 13px; margin-bottom: 12px; }
.price-change-down { color: #16a34a; font-size: 13px; margin-bottom: 12px; }

.agent-mini {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e6eaf0;
}

.agent-mini__name {
  font-size: 14px;
  font-weight: 700;
}

.agent-mini__role {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-secondary);
}

.agent-mini__contact {
  display: block;
  margin-top: 8px;
  color: var(--blue);
  font-size: 13px;
  text-decoration: none;
}

.mortgage-calc__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.calc-result {
  margin: 12px 0;
  padding: 12px;
  background: #f4f7ff;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.price-history {
  list-style: none;
  padding: 0;
  margin: 0;
}

.price-history li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.related-section {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid #e6eaf0;
}

.related-section h2 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 700;
}

/* ——— Forms ——— */
.form-page {
  padding: 36px 0 64px;
  background: #fff;
}

.form-card {
  width: 640px;
  max-width: 100%;
  margin: 0 auto;
}

.form-card h1 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
}

.form-card > p,
.form-card__lead {
  margin: 0 0 24px;
  font-size: 15px;
  color: var(--text-secondary);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field--full { grid-column: 1 / -1; }

.form-field label {
  font-size: 13px;
  color: #25324d;
}

.form-field input,
.form-field select,
.form-field textarea,
.form-control {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfd8e6;
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 14px;
  font-family: inherit;
}

.form-field textarea,
textarea.form-control {
  min-height: 110px;
  padding-top: 8px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.form-control:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(4, 104, 255, 0.12);
}

.file-upload {
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 16px;
  background: #f8fafc;
  text-align: center;
}

.file-upload__hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* ——— Content pages ——— */
.content-page-wrap { background: #fff; }

.content-page-shell {
  padding: 36px 0 64px;
}

.content-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0;
}

.content-page-shell > .pampadu-widget {
  margin: 24px auto;
  width: 100%;
  max-width: 100%;
}

.pampadu-widget,
.insurance-widget {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.pampadu-widget iframe,
.insurance-widget iframe {
  display: block;
  width: 100%;
  min-height: 480px;
}

.content-page h1 {
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 12px;
}

.content-lead {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.content-body {
  margin: 24px 0;
  line-height: 1.65;
  font-size: 15px;
}

.content-body p,
.content-body li,
.content-body a,
.content-page p,
.content-page li,
.content-page a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.content-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.content-block {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ——— Footer ——— */
.site-footer {
  margin-top: 56px;
  padding: 36px 0 28px;
  background: #f4f6fb;
  border-top: 1px solid var(--border);
  color: #6b7280;
}

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

.footer-title,
.footer-col h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #152242;
}

.footer-brand p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.footer-logo {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #152242;
  text-decoration: none;
}

.site-footer a {
  display: block;
  margin-bottom: 7px;
  color: #6b7280;
  font-size: 13px;
  text-decoration: none;
}

.site-footer a:hover { color: var(--blue); }

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: #8a94a6;
}

.footer-copy { margin: 0; }

/* ——— Pagination ——— */
.pagination { margin-top: 32px; display: flex; justify-content: center; }

.pagination-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination-list a,
.pagination-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  text-decoration: none;
  color: var(--text-main);
  background: #fff;
  border: 1px solid #cfd8e6;
}

.pagination-list a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.pagination-list li.active span {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.pagination-disabled { opacity: 0.4; border: none !important; background: transparent !important; }

/* ——— Alerts ——— */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 14px;
}

.alert-success { background: #ecfdf5; color: #065f46; }
.alert-error { background: #fef2f2; color: #991b1b; }

.site-main { padding-bottom: 0; }

.map-page { padding: 24px 0 56px; background: #fff; }
.map-page h1 { font-size: 28px; font-weight: 700; margin: 0 0 8px; }
.map-page__frame {
  width: 100%;
  height: min(70vh, 600px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #eef2f7;
  margin-top: 16px;
}

/* ——— Admin (minimal) ——— */
.admin-header { background: #2c3e50; color: #fff; padding: 0.75rem 0; }
.admin-header nav a, .admin-header .logo { color: #fff; text-decoration: none; margin-left: 1rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td { border: 1px solid #ddd; padding: 0.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.stat-card { background: var(--bg-soft); padding: 1rem; border-radius: var(--radius-md); }
.settings-section { background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: var(--radius-md); padding: 1.25rem; margin-bottom: 1.5rem; }
.install-page label { display: block; margin-bottom: 0.75rem; }
.install-page input { width: 100%; padding: 0.5rem; }

/* ——— Responsive ——— */
@media (max-width: 1100px) {
  .listings-grid,
  .listings-grid--catalog,
  .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .object-layout { grid-template-columns: 1fr; }
  .object-sidebar { position: static; }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
  .catalog-filters-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .header-top {
    flex-wrap: wrap;
    padding: 10px 0;
    gap: 12px;
  }

  .logo-name { font-size: 15px; }
  .logo-tagline { font-size: 11px; }

  .header-nav-row { display: none; }
  .header-actions .btn-header-secondary { display: none; }
  .header-burger { display: flex; }

  .site-header.is-nav-open .header-nav-row {
    display: block;
    width: 100%;
    padding-bottom: 10px;
    border-top: 1px solid #eef2f7;
  }

  .site-header.is-nav-open .main-nav {
    flex-wrap: wrap;
    gap: 14px;
    padding-top: 4px;
  }

  .nav-more .nav-more__menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    max-height: none;
    margin-top: 4px;
    padding: 4px 0 4px 12px;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .nav-more.is-open .nav-more__menu {
    display: block;
  }

  .nav-submenu {
    width: 100%;
  }

  .nav-submenu .nav-more__toggle {
    width: 100%;
    text-align: left;
  }

  .site-header.is-nav-open .header-actions {
    width: 100%;
    justify-content: stretch;
    gap: 8px;
  }

  .site-header.is-nav-open .header-actions .btn-header-secondary {
    display: inline-flex;
  }

  .site-header.is-nav-open .header-actions .btn-header-primary {
    flex: 1;
    justify-content: center;
  }

  .home-hero { min-height: auto; padding: 32px 0; }
  .home-hero h1 { font-size: 28px; }

  .search-row,
  .catalog-filters-grid,
  .catalog-filters-extra,
  .form-grid,
  .mortgage-calc__grid { grid-template-columns: 1fr; }

  .listings-grid,
  .listings-grid--catalog,
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

  .object-title { font-size: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .listings-grid,
  .listings-grid--catalog,
  .related-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
