.includes {
  margin-bottom: 108px;
}

.stages-work {
  padding-top: 0;
}

/* Секция Functions */
.functions {
  background-color: #f0ecf8;
  padding: 80px 0;
  width: 100%;
}

.functions__head-title {
  font-family: "Unbounded", sans-serif;
  font-size: 40px;
  font-weight: 600;
  text-transform: uppercase;
  color: #464d63;
  margin-bottom: 50px;
}

@media screen and (max-width: 1600px) {
  .functions__head-title {
    font-size: 32px;
  }
}

.functions__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.functions__column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.functions__item {
  display: flex;
  flex-direction: row;
  gap: 50px;
  align-items: flex-start;
}

.functions__number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  background-color: #7b66a7;
  box-shadow: 5px 10px 15px 0px #0057ff40;
}

.functions__number img {
  width: 13px;
  height: 13px;
}

.functions__title {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1a2233;
}

.functions__text {
	font-family: Inter;
	font-size: 20px;
	font-weight: 300;
	color: #33324b;
	line-height: 150%;
}

@media screen and (max-width: 1600px) {
  .functions__text {
    font-size: 16px;
  }
}
@media screen and (max-width: 1445px) {
  .wrapper__item__description {
    font-size: 15px;
  }
}

.functions__content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Секция How it works */
.how-it-works {
  background-color: #f8f9fa;
  padding-top: 80px;
  width: 100%;
}

.how-it-works__container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.how-it-works__title {
  font-family: "Unbounded", sans-serif;
  font-size: 40px;
  font-weight: 600;
  text-transform: uppercase;
  color: #464d63;
  margin-bottom: 50px;
  align-self: flex-start;
}

@media screen and (max-width: 1600px) {
  .how-it-works__title {
    font-size: 32px;
  }
}

.how-it-works__wrapper {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  margin-bottom: 55px;
}

.wrapper__item {
  display: flex;
  gap: 40px;
  width: 100%;
  align-items: stretch;
}

/* Центрирование для элементов без изображения (hasImage: false) */
.wrapper__item:not(:has(.wrapper__item__img)) {
  justify-content: center;
}

/* Альтернативный селектор для браузеров, не поддерживающих :has() */
.wrapper__item .wrapper__item__text:only-child {
  margin: 0 auto;
}

.wrapper__item__text {
  width: 49%;
  min-height: 200px;
  height: auto;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 35px;
  background-color: #f8f9fa;
  border: 1px solid #e6e6e6;
}

.wrapper__item__heading {
  font-family: "Inter", sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #7b66a7;
  margin-bottom: 26px;
}

@media screen and (max-width: 1600px) {
  .wrapper__item__heading {
    font-size: 21px;
  }
}

.wrapper__item__heading::after {
  content: "";
  display: block;
  width: 224px;
  height: 2px;
  background-color: #7b66a7;
  margin-top: 13px;
}

.wrapper__item__description {
	font-family: Inter;
  font-weight: 300;
  font-size: 20px;
  line-height: 160%;
  color: #33324b;
  margin: 0;
}

@media screen and (max-width: 1600px) {
  .wrapper__item__description {
    font-size: 16px;
  }
}
@media screen and (max-width: 1445px) {
  .wrapper__item__description {
    font-size: 15px;
  }
}

.wrapper__item__img {
  width: 49%;
  min-height: 400px;
  height: auto;
  overflow: hidden;
  border: 1px solid #e6e6e6;
}

.how-it-works__wrapper .wrapper__item:nth-child(even) {
  flex-direction: row-reverse;
}

.wrapper__item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Мобильная версия */
@media screen and (max-width: 928px) {
  .wrapper__item {
    flex-direction: column;
  }

  .how-it-works__wrapper .wrapper__item:nth-child(2n) {
    flex-direction: column;
  }

  .wrapper__item__img {
    width: 100%;
  }

  .wrapper__item__text {
    width: 100%;
  }
}

@media screen and (max-width: 768px) {
  .functions {
    padding: 60px 0;
  }

  .functions__container {
    padding: 0 25px;
  }

  .functions__head-title {
    font-size: 24px;
    margin-bottom: 30px;
  }

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

  .functions__number {
    font-size: 36px;
  }

  .functions__title {
    font-size: 20px;
  }

  .how-it-works__title {
    font-size: 24px;
    margin-bottom: 30px;
  }

  .how-it-works__wrapper {
    gap: 30px;
  }

  .wrapper__item {
    flex-direction: column;
    gap: 20px;
  }

  .wrapper__item__text {
    min-height: 200px;
  }

  .wrapper__item__heading {
    font-size: 20px;
  }
}

@media screen and (max-width: 705px) {
  .stages-work {
    padding-top: 80px;
  }

  .wrapper__item__img {
    height: 378px;
  }
}

@media screen and (max-width: 480px) {
  .functions {
    padding: 40px 0;
  }

  .functions__head-title {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .functions__number {
    font-size: 32px;
  }

  .functions__title {
    font-size: 15px;
  }

  .stages-work {
    padding-bottom: 80px;
  }

  .how-it-works__title {
    font-size: 16px;
    margin-bottom: 20px;
  }

  .wrapper__item__heading {
    font-size: 18px;
  }
}
