.routes-header {
  background-color: var(--back-blue);
  padding-top: 98px;
  padding-bottom: 60px;
}

.main-page__header-top {
  opacity: 1;
}

.routes-title {
  font-weight: 600;
  font-size: 40px;
  line-height: 110%;
  letter-spacing: 0.02em;
  color: #3579f4;
  margin-bottom: 40px;
  margin-top: 32px;
}

.routes-search {
  display: flex;
  align-items: center;
  width: 610px;
}
.routes-search .routes-search__input-wrapper {
  display: flex;
  align-items: center;
  max-width: 489px;
  border-bottom: 1px solid #e4e7ee;
  border-radius: 12px;
  padding: 18px 16px 18px 12px;
  margin-right: 16px;
  background: #f8f9fe;
  width: 100%;
  transition: border 0.2s;
}
.routes-search .routes-search__input-wrapper:hover {
  border-bottom: 1px solid #a9b1bc;
}
.routes-search .routes-search__input-wrapper:focus-within {
  border-color: #3579f4;
}
.routes-search .routes-search__input-wrapper .routes-search__svg {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 5px;
}
.routes-search .routes-search__input-wrapper .routes-search__input {
  width: 100%;
  background: transparent;
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
}
.routes-search .routes-search__input-wrapper .routes-search__input::-moz-placeholder {
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #a9b1bc;
}
.routes-search .routes-search__input-wrapper .routes-search__input::placeholder {
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #a9b1bc;
}

main {
  padding: 20px 0 100px 0;
}

.routes-main__content {
  -moz-columns: 2;
       columns: 2;
  -moz-column-gap: 5.208vw;
       column-gap: 5.208vw;
  padding: 40px;
  contain: layout;
}

.routes-main__content--active {
  -moz-columns: 1;
       columns: 1;
}

.letter {
  border-bottom: 1px solid #e4e7ee;
  margin-bottom: 40px;
  display: inline-flex;
  flex-direction: column;
  -moz-column-break-inside: avoid;
       break-inside: avoid;
}

.letter__title {
  font-weight: 500;
  font-size: 24px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #32465a;
  margin-bottom: 24px;
}

.letter__row {
  display: inline-flex;
  align-items: center;
  margin-bottom: 4px;
}

.letter__row-cities {
  display: flex;
  align-items: center;
  margin-right: 32px;
  padding: 6px;
  transition: all 0.2s;
  border-radius: 12px;
}

.letter__row-cities:hover {
  background: #f8f9fe;
}
.letter__row-cities:hover .city-name {
  color: #3579f4;
}

.city-svg {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  margin-right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.city-name {
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #32465a;
  transition: all 0.2s;
}
.city-name span {
  display: block;
  font-weight: 400;
  font-size: 12px;
  line-height: 140%;
  color: #6a7989;
}

.letter-row__arrow {
  width: 40px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 8px;
}

.letter__row-distance {
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #a9b1bc;
}

.distance__text {
  font-weight: 400;
  font-size: 14px;
  line-height: 140%;
  letter-spacing: 0.02em;
  color: #e4e7ee;
  margin-right: 24px;
  display: none;
}

.routes-main__btn-more {
  background: rgba(53, 121, 244, 0.06);
  border-radius: 12px;
  padding: 18px 24px;
  text-align: center;
  font-weight: 500;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0.02em;
  color: #3579f4;
  display: block;
  margin: 0 auto;
  transition: all 0.2s;
}
.routes-main__btn-more:hover {
  background: rgba(53, 121, 244, 0.1);
}
.routes-main__btn-more:active {
  scale: 0.96;
}

.results-title {
  font-weight: 500;
  font-size: 24px;
  line-height: 120%;
  letter-spacing: 0.02em;
  color: #32465a;
  margin-bottom: 40px;
  display: none;
}

.results-title--active {
  display: block;
}

.search-results {
  display: inline-flex;
  flex-direction: column;
}

.routes-main__btn-more--disabled {
  display: none;
}

@media (max-width: 880px) {
  .routes-main__content {
    -moz-columns: 1;
         columns: 1;
    display: flex;
    flex-direction: column;
    max-height: 800px;
    overflow: hidden;
    transition: max-height 0.4s ease;
  }
}
@media (max-width: 768px) {
  .routes-title {
    font-size: 32px;
    line-height: 112%;
  }
  .routes-search {
    width: 100%;
  }
  main {
    padding-bottom: 60px;
  }
}
@media (max-width: 568px) {
  .routes-search {
    flex-direction: column;
  }
  .routes-search .routes-search__input-wrapper {
    margin-right: 0;
    margin-bottom: 16px;
    width: 100%;
    max-width: none;
  }
  .routes-search__btn {
    width: 100%;
  }
  .letter__title {
    margin-bottom: 16px;
  }
  .letter__row {
    flex-direction: column;
    background: #f8f9fe;
    margin-bottom: 8px;
    padding: 8px;
  }
  .letter__row-cities {
    margin-right: 0;
    margin-bottom: 8px;
  }
  .city-svg {
    display: none;
  }
  .routes-main__content {
    padding: 40px 0 0 0;
  }
  .distance__text {
    display: inline;
  }
  .results-title {
    margin-bottom: 32px;
  }
  .search-results {
    display: block;
  }
  .search-results .letter__row {
    align-items: start;
  }
  .search-results .city-svg {
    display: flex;
  }
  .search-results .letter__row-distance {
    display: none;
  }
  .search-results .letter__row-cities {
    margin-bottom: 0;
  }
}