.seo-route-links {
  padding: clamp(34px, 5vw, 64px) 0;
  background: #f7f9fc;
  color: #09274b;
}

.seo-route-links__inner {
  width: min(1380px, calc(100% - 32px));
  margin-inline: auto;
}

.seo-route-links__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.seo-route-links__header span {
  color: #f04444;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.seo-route-links__header h2 {
  margin: 5px 0 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.2;
}

.seo-route-links__controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}
.seo-route-links__controls button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid #d3ddea;
  border-radius: 50%;
  color: #fff;
  background: #0b315d;
  box-shadow: 0 5px 12px rgba(10, 38, 73, .14);
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
}
.seo-route-links__controls button:hover:not(:disabled),
.seo-route-links__controls button:focus-visible {
  border-color: #ff4b4b;
  background: #ff4141;
}
.seo-route-links__controls button:disabled {
  cursor: not-allowed;
  opacity: .38;
}
.seo-route-links__controls output {
  min-width: 48px;
  color: #52657b;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.seo-route-links__scroller {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 16px;
  overflow-x: auto;
  padding: 3px 3px 14px;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  touch-action: pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
}
.seo-route-links__scroller::-webkit-scrollbar {
  display: none;
}
.seo-route-links__page {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.seo-route-card {
  position: relative;
  display: grid;
  min-height: 126px;
  padding: 18px 58px 17px 24px;
  overflow: hidden;
  border: 1px solid #d8e0ea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 16px rgba(10, 38, 73, .12);
  color: #09274b;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.seo-route-card::before {
  content: "";
  position: absolute;
  inset: 19px auto 0 0;
  width: 5px;
  background: #0b315d;
}
.seo-route-card:hover,
.seo-route-card:focus-visible {
  border-color: #ff4b4b;
  box-shadow: 0 11px 25px rgba(10, 38, 73, .17);
  transform: translateY(-2px);
  outline: none;
}
.seo-route-card.is-popular { border-color: #ff5b5b; }
.seo-route-card.is-popular::before { background: #ff4141; }
.seo-route-card__route {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: start;
  font-size: 9px;
  white-space: nowrap;
}
.seo-route-card__route i {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #fff0f0;
  box-shadow: 0 3px 8px rgba(255, 68, 68, .2);
  color: #ff4141;
  font-size: 17px;
  font-style: normal;
}
.seo-route-card__route b { color: #173f6d; font-size: 10px; font-weight: 600; }
.seo-route-card__title {
  align-self: end;
  margin-top: 14px;
  font-size: 16px;
  font-weight: 800;
}
.seo-route-card__arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5a5a, #ff3232);
  box-shadow: 0 5px 10px rgba(255, 54, 54, .3);
  color: #fff;
  font-size: 19px;
  transform: translateY(-50%);
}
.seo-route-card em {
  position: absolute;
  left: 24px;
  bottom: 7px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ff4a4a;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: .04em;
}
.seo-route-card.is-popular .seo-route-card__title { padding-bottom: 13px; }

@media (max-width: 900px) {
  .seo-route-links__page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .seo-route-links {
    padding: 32px 0;
  }
  .seo-route-links__inner {
    width: calc(100% - 24px);
  }
  .seo-route-links__header {
    align-items: center;
    margin-bottom: 16px;
  }
  .seo-route-links__header h2 {
    font-size: 24px;
  }
  .seo-route-links__controls {
    gap: 5px;
  }
  .seo-route-links__controls button {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
  .seo-route-links__controls output {
    min-width: 40px;
    font-size: 10px;
  }
  .seo-route-links__scroller {
    gap: 10px;
    padding: 2px 2px 8px;
  }
  .seo-route-links__page {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .seo-route-card {
    min-width: 0;
    min-height: 112px;
    padding: 12px 34px 12px 14px;
    border-radius: 11px;
    box-shadow: 0 4px 12px rgba(10, 38, 73, .1);
  }
  .seo-route-card::before {
    inset: 12px auto 12px 0;
    width: 4px;
  }
  .seo-route-card__route {
    min-width: 0;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 8px;
    line-height: 1.2;
    white-space: normal;
  }
  .seo-route-card__route i {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }
  .seo-route-card__route b {
    display: none;
  }
  .seo-route-card__title {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.3;
  }
  .seo-route-card__arrow {
    right: 8px;
    width: 25px;
    height: 25px;
    font-size: 15px;
  }
  .seo-route-card em {
    left: 14px;
    bottom: 5px;
  }
}

@media (max-width: 390px) {
  .seo-route-links__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .seo-route-card {
    min-height: 108px;
    padding-right: 30px;
  }
}
