.connection__container {
  max-width: 1005px;
}

.connection__title {
  margin-top: 8px;
  font-size: 36px;
  font-weight: 500;
  line-height: 36px;
  text-align: center;
  color: #000;
}

.connection__accent {
  color: #34538b;
}

.connection__subtitle {
  max-width: 710px;
  margin: 22px auto 0;
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  color: #000;
  white-space: pre;
}

.connection__steps-wrap {
  position: relative;
  margin-top: 40px;
}

.connection__line {
  position: absolute;
  top: 46px;
  left: 11.69%;
  width: 76.5%;
  height: 2px;
  background: rgba(113, 149, 219, 0.6);
}

.connection__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 0;
  list-style: none;
}

.step {
  height: 244px;
  padding: 23px 12px 0 23px;
  border: 1px solid #d5e0f5;
  border-radius: 20px;
  background: #eef3fb;
  box-shadow: 0 4px 12px rgba(21, 49, 99, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  white-space: nowrap;
  cursor: default;
}

.step:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: #7195db;
  box-shadow:
    0 18px 40px rgba(21, 49, 99, 0.22),
    0 0 0 2px rgba(113, 149, 219, 0.7);
}

.step:nth-child(3) {
  --desc-lh: 15px;
  --text-mt: 13.5px;
}

.step__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(90deg, #2e79cf, #153072);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

.step__title {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  color: #1c3363;
  white-space: pre;
}

.step__text {
  margin-top: var(--text-mt, 12px);
  font-size: 12px;
  line-height: var(--desc-lh, 17px);
  color: #333;
  white-space: pre;
}

.connection__badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-top: 28px;
  cursor: default;
}

.connection__badge {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  border: 1px solid #1e3566;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  color: #1b2e56;
  text-align: center;
  cursor: default;
}

.connection__badge--filled {
  border-color: #253f72;
  background: #253f72;
  color: #fff;
}

.connection__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.connection__button {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 180px;
  height: 50px;
  border-radius: 8px;
  background: linear-gradient(90deg, #5195e3, #153072);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.2s;
}

.connection__button--light {
  border: 1.5px solid #34538b;
  font-weight: 500;
  background: #fff;
  color: #1c3363;
}

.connection__button:hover {
  opacity: 0.85;
}

@media (max-width: 1000px) {
  .connection__line {
    display: none;
  }

  .connection__steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .connection__title {
    font-size: 26px;
    line-height: 1.2;
  }

  .connection__steps {
    grid-template-columns: 1fr;
  }

  .step {
    height: auto;
    padding-bottom: 24px;
  }

  .connection__badges {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 700px) {
  .connection {
    padding: 0 0 60px;
  }

  .connection__title {
    margin-top: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 29px;
    color: #0b1530;
  }

  .connection__accent {
    color: #2f5597;
  }

  .connection__subtitle {
    margin-top: 18px;
    font-size: 14px;
    line-height: 21px;
    color: #4a5675;
    white-space: normal;
  }

  .connection__steps-wrap {
    margin-top: 24px;
  }

  .connection__steps {
    gap: 14px;
  }

  .step {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 14px;
    align-items: center;
    padding: 16px 20px 18px;
    height: auto;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, var(--step-from), var(--step-to));
    box-shadow: none;
    color: #fff;
    white-space: normal;
  }

  .step:hover {
    transform: none;
    box-shadow: none;
  }

  .step:nth-child(1) {
    --step-from: #6f95db;
    --step-to: #5574be;
  }

  .step:nth-child(2) {
    --step-from: #5574be;
    --step-to: #33508a;
  }

  .step:nth-child(3) {
    --step-from: #33508a;
    --step-to: #294679;
  }

  .step:nth-child(4) {
    --step-from: #294679;
    --step-to: #1b2f63;
  }

  .step__number {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 16px;
  }

  .step__title {
    margin-top: 0;
    font-size: 16px;
    line-height: 21px;
    color: #fff;
    white-space: normal;
  }

  .step__text {
    grid-column: 1 / -1;
    width: 100%;
    max-width: none;
    margin-top: 12px;
    font-size: 14px;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.9);
    white-space: normal;
  }

  .step__br {
    display: none;
  }

  .connection__badges {
    gap: 10px;
    margin-top: 20px;
  }

  .connection__badge {
    height: auto;
    min-height: 56px;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
  }

  .connection__buttons {
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }

  .connection__button {
    width: 100%;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(90deg, #2b7bda, #1b2d6e);
    font-size: 15px;
    font-weight: 500;
  }

  .connection__button--light {
    border: 1px solid #2f5597;
    background: #fff;
  }
}
