/* Единый медиаблок карточек «Почему инженеры выбирают EULER».
   Его горизонтальные границы совпадают с текстом, а изображения любого
   формата вписываются внутрь без деформации. Файл подключается после всех
   home-breakpoints, чтобы геометрия оставалась предсказуемой. */

.home-feature-card__media {
  box-sizing: border-box;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}

.home-feature-card__media > .home-feature-card__icon {
  position: static !important;
  inset: auto !important;
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  object-fit: contain;
  object-position: center;
  transform: none !important;
}

@media (min-width: 1201px) {
  .home-feature-card__media {
    width: 100%;
    height: clamp(140px, calc(140px + (164 - 140) * (100vw - 1200px) / 240), 164px);
  }

  .home-feature-card__content,
  .home-feature-card__title,
  .home-feature-card__desc {
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 1024px) and (max-width: 1200px) {
  .home-feature-card__media {
    position: absolute;
    top: clamp(48px, calc(48px + (52 - 48) * (100vw - 1024px) / 176), 52px);
    right: 30px;
    left: 30px;
    width: auto;
    height: 152px;
  }
}

@media (min-width: 944px) and (max-width: 1023px) {
  .home-feature-card__media {
    position: static;
    width: 100%;
    height: clamp(128px, calc(128px + (152 - 128) * (100vw - 944px) / 79), 152px);
  }
}

@media (min-width: 688px) and (max-width: 943px) {
  .home-feature-card__media {
    position: absolute;
    top: 44px;
    right: clamp(16px, 2.8vw, 22px);
    left: clamp(16px, 2.8vw, 22px);
    width: auto;
    height: clamp(108px, 16vw, 128px);
  }
}

@media (max-width: 687px) {
  .home-feature-card__media {
    position: absolute;
    top: calc(18 / 345 * 100%);
    right: 30px;
    left: 30px;
    width: auto;
    height: calc(164 / 345 * 100%);
  }
}

@media (max-width: 375px) {
  .home-feature-card__media {
    top: 18px;
    height: 164px;
  }
}
