/* Patch 17 — поиск на главной как в примере */

.home-search-pro {
  position: absolute;
  left: 50%;
  bottom: -74px;
  transform: translateX(-50%);
  z-index: 8;
  width: min(1180px, calc(100% - 32px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 60px rgba(24,26,32,.16);
}

.home-search-row {
  display: grid;
  grid-template-columns: 1.35fr 1.1fr .75fr 20px .75fr auto auto;
  gap: 12px;
  align-items: center;
}

.home-search-pro input,
.home-search-pro select {
  min-height: 52px;
}

.price-dash {
  text-align: center;
  color: #181a20;
  font-weight: 900;
}

.home-search-btn,
.home-map-btn {
  min-height: 52px;
  padding-left: 24px;
  padding-right: 24px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.home-map-btn {
  border-color: #181a20;
  color: #181a20;
  background: #fff;
}

.home-search-btn:hover,
.home-map-btn:hover,
.more-filters:hover,
.home-search-pro input:hover,
.home-search-pro select:hover {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 10px 28px rgba(24,26,32,.12);
}

.home-search-pro input:focus,
.home-search-pro select:focus {
  transform: translateY(-2px) scale(1.025);
  box-shadow: 0 0 0 4px rgba(235,103,83,.14);
  border-color: var(--primary);
}

.home-search-bottom {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 14px;
}

.more-filters {
  border: 0;
  background: transparent;
  color: #181a20;
  font-weight: 900;
  cursor: pointer;
  padding: 8px 0;
  transition: transform .18s ease;
}

.home-search-bottom a {
  color: #181a20;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-style: dotted;
}

/* Отключаем старое позиционирование формы на главной */
.agency-hero .agency-search,
.agency-hero .search-card {
  display: none !important;
}

.districts-section {
  padding-top: 125px !important;
}

@media (max-width: 1100px) {
  .home-search-row {
    grid-template-columns: 1fr 1fr;
  }

  .price-dash {
    display: none;
  }

  .home-search-btn,
  .home-map-btn {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .home-search-pro {
    bottom: -250px;
    padding: 14px;
  }

  .home-search-row {
    grid-template-columns: 1fr;
  }

  .home-search-bottom {
    display: block;
  }

  .home-search-bottom a {
    display: inline-block;
    margin-top: 10px;
  }

  .dynamic-hero,
  .agency-hero,
  .hero-v3 {
    min-height: 830px !important;
  }

  .districts-section {
    padding-top: 285px !important;
  }
}

@media (max-width: 420px) {
  .home-search-pro {
    width: calc(100% - 20px);
    bottom: -260px;
  }

  .dynamic-hero,
  .agency-hero,
  .hero-v3 {
    min-height: 850px !important;
  }
}
