.ecosystem img {
  display: block;
  max-width: 100%;
}

.ecosystem a {
  color: inherit;
  text-decoration: none;
}

.ecosystem button,
.ecosystem input {
  font: inherit;
}

.ecosystem__title {
  margin: 0 0 30px;
  font-weight: 400;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 0.95;
  color: #333333;
}

.ecosystem__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(160px, auto);
  gap: 20px;
}

/* Карточки */
.ecosystem .card {
  position: relative;
  overflow: hidden;
  background: #f4f4f4;
  padding: 20px;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.ecosystem .card__title {
  position: relative;
  z-index: 2;
  margin: 0;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.08;
  color: #333333;
  max-width: 75%;
}

.ecosystem .card__title--big {
  font-size: clamp(28px, 3vw, 32px);
  line-height: 1.25;
  max-width: 100%;
}

.ecosystem .card__title--white {
  color: #fff;
}

.ecosystem .card__link {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.125;
  color: #8a8b8b;
}

.ecosystem .card__link .arrow {
  font-size: 34px;
  line-height: 1;
  color: #333333;
  transform: translateY(-1px);
}

.ecosystem .card__link--black {
  color: #333333;
}

/* Раскладка */
.ecosystem .card--solver {
  grid-column: 1 / span 8;
  min-height: 264px;
}

.ecosystem .card--calculator {
  grid-column: 9 / span 4;
  min-height: 264px;
}

.ecosystem .card--training {
  grid-column: 1 / span 4;
  min-height: 160px;
}

.ecosystem .card--support {
  grid-column: 5 / span 4;
  min-height: 160px;
}

.ecosystem .card--knowledge {
  grid-column: 9 / span 4;
  min-height: 160px;
}

.ecosystem .card--docs {
  grid-column: 1 / span 4;
  min-height: 264px;
}

.ecosystem .card--systems {
  grid-column: 5 / span 3;
  min-height: 264px;
}

.ecosystem .card--samples {
  grid-column: 8 / span 5;
  min-height: 264px;
  background: linear-gradient(106.99deg, rgba(49, 184, 181, 0.75) 0%, rgba(0, 191, 187, 0.8) 100%);
}

/* Форма */
.ecosystem .solver-form {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  height: 100%;
}

.ecosystem .solver-form__fields {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 14px;
}



.ecosystem .solver-form input {
  width: 100%;
  height: 44px;
  border: none;
  outline: none;
  border-radius: 4px;
  background: #fff!important;
  padding: 10px 16px;
  font-weight: 400;
  font-size: 16px!important;
  line-height: 24px;
  color: #8A8B8B;
}

.ecosystem .solver-form select, .solver-form__fields .common_select .common_select-link {
  width: 100%;
  height: 44px;
  border: none;
  outline: none;
  border-radius: 4px;
  background: #fff!important;
  padding: 5px 16px;
  font-weight: 400;
  font-size: 16px!important;
  line-height: 24px;
  color: #8A8B8B;
}

.ecosystem .solver-form__fields .common_select .common_select-link .ik_select_link_text {
  font-size: 16px!important;
  color: #8A8B8B;
}

.ecosystem .solver-form__fields .common_select .common_select-link .trigger {
  right: 7px;
}

.ecosystem .solver-form__fields .common_select .common_select-link .trigger:before {
  width: 13px;
  height: 8px;
  background: url('data:image/svg+xml,<svg width="13" height="8" viewBox="0 0 13 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.65556 7.071L-0.0014382 1.414L1.41256 -4.94551e-07L6.36256 4.95L11.3126 -6.18079e-08L12.7266 1.414L7.06956 7.071C6.88203 7.25847 6.62773 7.36379 6.36256 7.36379C6.0974 7.36379 5.84309 7.25847 5.65556 7.071Z" fill="black"/></svg>') 0 0 no-repeat;
}

.ecosystem .solver-form input::placeholder {
  color: #8a8b8b;
}

.ecosystem .solver-form .btn {
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ecosystem .solver-form .btn:hover {
  opacity: 0.95;
}

.ecosystem .solver-form .btn:active {
  transform: translateY(1px);
}

.ecosystem .solver-form .btn--primary {
  width: 100%;
  height: 46px;
  border-radius: 4px;
  background: linear-gradient(106.99deg, #31b8b5 0%, #00bfbb 100%);
  color: #fff;
  font-size: 16px!important;
  font-weight: 400!important;
  padding: 0!important;
}

/* Изображения */
.ecosystem .card__image {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.ecosystem .card__image--calculator {
  right: 0;
  bottom: 0;
}

.ecosystem .card__image--training {
  right: 0;
  bottom: 0;
}

.ecosystem .card__image--knowledge {
  right: 0;
  bottom: 0;
}

.ecosystem .card__image--systems {
  right: 0;
  bottom: 0;
}

/* Декоративные паттерны */
.ecosystem .card--dots::before,
.ecosystem .card--dots-on-gradient::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: 0;
  background-image: url("/include/mainpage/components/ecosystem/images/back.png");
  background-size: auto;
  background-position: 7px 7px;
}

/* Блюр-пятна */
.ecosystem .card--support::after,
.ecosystem .card--docs::after,
.ecosystem .card--samples::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #a6fffd;
  filter: blur(110px);
  opacity: 0.6;
  z-index: 0;
}

.ecosystem .card--support::after {
  width: 180px;
  height: 180px;
  right: -40px;
  bottom: -20px;
}

.ecosystem .card--docs::after {
  width: 220px;
  height: 220px;
  right: -20px;
  top: 80px;
}

.ecosystem .card--samples::after {
  width: 220px;
  height: 220px;
  right: -10px;
  top: 80px;
}

/* Специфичные правки */
.ecosystem .card--calculator .card__title {
  max-width: 65%;
}

.ecosystem .card--knowledge .card__title,
.ecosystem .card--support .card__title {
  max-width: 80%;
}

.ecosystem .card--docs .card__title {
  max-width: 180px;
}

.ecosystem .card--samples .card__title {
  max-width: 220px;
  font-size: 24px;
}

/* Адаптив */
@media (max-width: 1200px) {

  .ecosystem__grid {
    grid-template-columns: repeat(8, 1fr);
    grid-auto-rows: minmax(128px, auto);
  }

  .ecosystem .card--solver {
    grid-column: 1 / -1;
  }

  .ecosystem .card--calculator {
    grid-column: 1 / span 4;
  }

  .ecosystem .card--training {
    grid-column: 5 / span 4;
  }

  .ecosystem .card--support {
    grid-column: 1 / span 4;
  }

  .ecosystem .card--knowledge {
    grid-column: 5 / span 4;
  }

  .ecosystem .card--docs {
    grid-column: 1 / span 4;
  }

  .ecosystem .card--systems {
    grid-column: 5 / span 4;
  }

  .ecosystem .card--samples {
    grid-column: 1 / -1;
  }

  .ecosystem .card:not(.card--solver) {
    max-height: 128px;
    min-height: 128px;
  }

  .ecosystem .card__image--calculator {
    height: 110%;
  }

  .ecosystem .card__image--training {
    height: 100%;
  }

  .ecosystem .card__image--knowledge {
    height: 100%;
  }

  .ecosystem .card__image--systems {
    height: 75%;
  }

}

@media (max-width: 768px) {
  .ecosystem {
    padding: 28px 0 48px;
  }

  .ecosystem__title {
    margin-bottom: 20px;
  }

  .ecosystem__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .ecosystem .card,
  .ecosystem .card--solver,
  .ecosystem .card--calculator,
  .ecosystem .card--training,
  .ecosystem .card--support,
  .ecosystem .card--knowledge,
  .ecosystem .card--docs,
  .ecosystem .card--systems,
  .ecosystem .card--samples {
    grid-column: auto;
    min-height: auto;
  }

  .ecosystem .card {
    min-height: 180px;
  }

  .ecosystem .card--solver {
    min-height: auto;
  }

  .ecosystem .solver-form__fields {
    grid-template-columns: 1fr;
  }

  .ecosystem .card__title {
    max-width: 100%;
    font-size: 22px;
  }
}

@media (max-width: 550px) {
  .ecosystem .card__title,
  .ecosystem .card--samples .card__title {
    font-size: 18px;
    max-width: 100%;
  }

  .ecosystem .card__title br {
    display: none;
  }

  .ecosystem .card--docs .card__title {
    max-width: 100%;
  }
}
