/* v51: жесткий фикс главной формы. Без фиксированных min-width, без переполнения, та же логика полей что на внутряке. */
.aeroHomeV48,
.aeroHomeV48 *{box-sizing:border-box!important}

.aeroHomeV48{width:100%;max-width:100%;overflow-x:hidden!important}
.aeroHomeV48 .homeHeroV48{
  width:min(1180px, calc(100% - 32px))!important;
  max-width:min(1180px, calc(100% - 32px))!important;
  margin-left:auto!important;
  margin-right:auto!important;
  padding-left:0!important;
  padding-right:0!important;
  overflow:visible!important;
}
.aeroHomeV48 .homeHeroTextV48{width:100%;max-width:980px!important;margin-bottom:28px!important}

/* Главная форма: 2 аккуратные строки на десктопе, чтобы физически помещалась по ширине */
.aeroHomeV48 .homeSearchFromRouteV50,
.aeroHomeV48 .searchBox.homeSearchFromRouteV50,
.aeroHomeV48 .routeSearch.homeSearchFromRouteV50{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding:14px!important;
  border-radius:26px!important;
  overflow:visible!important;
  background:#fff!important;
  border:1px solid rgba(15,23,42,.10)!important;
  box-shadow:0 20px 60px rgba(15,23,42,.12)!important;
}

.aeroHomeV48 .homeSearchFromRouteV50 .flightForm,
.aeroHomeV48 .searchBox.homeSearchFromRouteV50 form.flightForm{
  display:grid!important;
  grid-template-columns:repeat(12,minmax(0,1fr))!important;
  gap:10px!important;
  align-items:stretch!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  margin:0!important;
  overflow:visible!important;
}

/* Дети формы: откуда / swap / куда — первая строка */
.aeroHomeV48 .homeSearchFromRouteV50 .flightForm > *{min-width:0!important;max-width:100%!important}
.aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(1){grid-column:span 5!important}
.aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .swapBtn{grid-column:span 1!important}
.aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(3){grid-column:span 6!important}
/* Вторая строка: даты / пассажиры / кнопка */
.aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(4),
.aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(5),
.aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .passField,
.aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .submitBtn{grid-column:span 3!important}

.aeroHomeV48 .homeSearchFromRouteV50 .field{
  min-width:0!important;
  max-width:100%!important;
  width:100%!important;
  padding:11px 13px!important;
  border-radius:18px!important;
  overflow:visible!important;
}
.aeroHomeV48 .homeSearchFromRouteV50 label{
  margin:0 0 6px!important;
  font-size:12px!important;
  line-height:1.15!important;
  white-space:nowrap!important;
}
.aeroHomeV48 .homeSearchFromRouteV50 input{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:24px!important;
  font-size:15px!important;
  line-height:24px!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
.aeroHomeV48 .homeSearchFromRouteV50 input[type="date"]{
  font-size:14px!important;
  letter-spacing:-.02em!important;
  padding:0!important;
}
.aeroHomeV48 .homeSearchFromRouteV50 .swapBtn,
.aeroHomeV48 .homeSearchFromRouteV50 .submitBtn{
  width:100%!important;
  min-width:0!important;
  max-width:100%!important;
  height:auto!important;
  min-height:58px!important;
  padding:0 14px!important;
  align-self:stretch!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:18px!important;
  white-space:nowrap!important;
}
.aeroHomeV48 .homeSearchFromRouteV50 .submitBtn{font-size:15px!important}

.aeroHomeV48 .homeSearchFromRouteV50 .passengerStepper{
  display:grid!important;
  grid-template-columns:34px minmax(0,1fr) 34px!important;
  gap:7px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
}
.aeroHomeV48 .homeSearchFromRouteV50 .passengerStepper button{
  width:34px!important;height:34px!important;min-width:34px!important
}
.aeroHomeV48 .homeSearchFromRouteV50 .passLabel{
  min-width:0!important;
  max-width:100%!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
  font-size:13px!important;
}

/* Подсказки не должны расширять форму */
.aeroHomeV48 .homeSearchFromRouteV50 .suggest{
  left:0!important;
  right:auto!important;
  width:min(360px, calc(100vw - 48px))!important;
  max-width:calc(100vw - 48px)!important;
  min-width:0!important;
  z-index:9999!important;
}

@media(max-width:920px){
  .aeroHomeV48 .homeHeroV48{width:min(100% - 24px, 760px)!important;max-width:min(100% - 24px, 760px)!important;padding-top:24px!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm{grid-template-columns:repeat(6,minmax(0,1fr))!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(1){grid-column:span 5!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .swapBtn{grid-column:span 1!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(3){grid-column:span 6!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(4),
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(5),
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .passField,
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .submitBtn{grid-column:span 3!important}
}

@media(max-width:640px){
  html,body{max-width:100%;overflow-x:hidden!important}
  .aeroHomeV48 .homeHeroV48{width:calc(100% - 20px)!important;max-width:calc(100% - 20px)!important;padding-top:18px!important}
  .aeroHomeV48 .homeHeroTextV48{margin-bottom:18px!important}
  .aeroHomeV48 .homeHeroTextV48 h1{font-size:31px!important;line-height:1.06!important;letter-spacing:-.04em!important;margin-bottom:12px!important}
  .aeroHomeV48 .homeHeroTextV48 p{font-size:15px!important;line-height:1.55!important}
  .aeroHomeV48 .homeSearchFromRouteV50{padding:10px!important;border-radius:20px!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm{grid-template-columns:1fr!important;gap:9px!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field,
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(1),
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(3),
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(4),
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .field:nth-child(5),
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .passField,
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .swapBtn,
  .aeroHomeV48 .homeSearchFromRouteV50 .flightForm > .submitBtn{grid-column:1/-1!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .swapBtn,
  .aeroHomeV48 .homeSearchFromRouteV50 .submitBtn{min-height:50px!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .passengerStepper{grid-template-columns:42px minmax(0,1fr) 42px!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .passengerStepper button{width:42px!important;height:42px!important;min-width:42px!important}
  .aeroHomeV48 .homeSearchFromRouteV50 .passLabel{font-size:14px!important;line-height:42px!important}
}
