.level {
  display: flex;
  justify-content: center;
  padding: 89px 0 68px;
}

.level-wrapper {
  display: flex;
  justify-content: flex-start;
  overflow: hidden;
  position: relative;
  height: 249px;
  background-color: var(--main-color);
  border-radius: 24px;
  padding: 49px 80px;
}

.railways-img {
  position: absolute;
  bottom: 0;
  right: 25px;
  z-index: 2;
  width: 495px;
  height: 298px;
}

.level-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.level-content__title {
  font-size: 30px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--white);
  width: 690px;
}

.level-content__text {
  font-size: 18px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--white);
  width: 609px;
}

.level-content__button {
  color: var(--main-color);
  border-radius: 8px;
  width: 180px;
  height: 52px;
  border: none;
  background-color: var(--white);
  position: absolute;
  top: 99px;
  right: 80px;
  font-size: var(--default-font-size);
  font-weight: 500;
  z-index: 5;
  cursor: pointer;
  transition: 0.3s linear;
}

.level-content__button:hover {
  background-color: #cccccc;
}

@media (max-width: 1239px) {
  .level {
    padding: 48px 0 33px;
  }

  .level-wrapper {
    padding: 40px 24px;
    height: auto;
    flex-direction: column;
    gap: 32px;
  }

  .railways-img {
    width: 313px;
    height: 248px;
    right: 0;
    bottom: auto;
    top: 0;
  }

  .level-content__title {
    width: 100%;
    font-size: 24px;
    line-height: 1.3;
  }

  .level-content__text {
    width: 100%;
    font-size: 16px;
  }

  .level-content__button {
    position: relative;
    width: 100%;
    font-size: 18px;
    line-height: 1.3;
    top: auto;
    right: auto;
  }
}
