.nfm-agro-crm {
  --nfm-red: #e30613;
  --nfm-red-dark: #a90912;
  --nfm-ink: #17191f;
  --nfm-graphite: #252830;
  --nfm-mist: #f1f2f4;
  --nfm-white: #fff;
}

.nfm-agro-crm .seo-page-title {
  max-width: 1120px;
  margin: 0 0 34px;
  color: var(--nfm-ink);
  font-family: "Gilroy", "Montserrat", Arial, sans-serif;
  font-size: clamp(34px, 4.25vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -.035em;
  text-wrap: balance;
}

.nfm-agro-crm .onvalid-message,
.nfm-agro-crm .onvalid-file,
.nfm-agro-crm .form__status {
  min-height: 22px;
  margin-top: 8px;
  color: var(--nfm-red-dark);
  font-size: 14px;
  line-height: 1.35;
}

.nfm-agro-crm .form__status {
  width: 100%;
  color: var(--nfm-graphite);
  font-weight: 600;
}

.nfm-agro-crm .form__status--error { color: var(--nfm-red-dark); }
.nfm-agro-crm .button__input[disabled] { cursor: wait; opacity: .72; }
.nfm-agro-crm .button__input:active { transform: scale(.98); }

.nfm-agro-crm .astra-sub-header__result {
  aspect-ratio: 1770 / 620;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 14px;
  background: var(--nfm-ink);
}

.nfm-agro-crm .astra-sub-header__result picture,
.nfm-agro-crm .astra-sub-header__result .astra-fon {
  display: block;
  width: 100%;
  height: 100%;
}

.nfm-agro-crm .astra-sub-header__result .astra-fon { object-fit: cover; }

.nfm-agro-crm .astra-sub-header__result-container {
  left: clamp(46px, 7.5vw, 130px);
  top: 50%;
  margin-top: 0;
  transform: translateY(-50%);
}

.nfm-agro-crm .nfm-case-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}

.nfm-agro-crm .nfm-case-logo img {
  display: block;
  width: clamp(92px, 9vw, 148px);
  height: auto;
}

.nfm-agro-crm .astra-about__body {
  height: 653px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 14px;
  background: url("../../img/cases-import/nfm_ua/designed/about-desktop.webp") center / cover no-repeat;
}

.nfm-agro-crm .astra-about__content {
  width: 55%;
  border-radius: 14px 0 0 14px;
  background: linear-gradient(90deg, rgba(20, 22, 28, .97), rgba(27, 29, 35, .9) 80%, rgba(27, 29, 35, .58));
}

.nfm-agro-crm .astra-about__content-container { padding: 0 clamp(42px, 5vw, 80px); }
.nfm-agro-crm .astra-about__logo .nfm-case-logo { padding: 8px 13px; }
.nfm-agro-crm .astra-about__logo .nfm-case-logo img { width: 88px; }
.nfm-agro-crm .astra-about__text { margin-top: 30px; }
.nfm-agro-crm .astra-about__text p { font-size: 19px; line-height: 1.5; }
.nfm-agro-crm .astra-about__content-border { height: 14px; background: var(--nfm-red); }
.nfm-agro-crm .astra-task__lists li::before { background: var(--nfm-red); }

/* The template's solution media slot stays intact; only its order and presentation change. */
.nfm-agro-crm .astra-task-solution__body {
  height: auto;
  padding: 0;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.nfm-agro-crm .astra-task-solution__body-container {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
}

.nfm-agro-crm .astra-task-solution__img {
  order: 1;
  position: static;
  width: 100%;
}

.nfm-agro-crm .astra-task-solution__img picture { display: block; width: 100%; }

.nfm-agro-crm .astra-task-solution__img img {
  position: static;
  width: 100%;
  max-width: none;
  max-height: none;
  height: auto;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 14px;
  object-fit: cover;
  transform: none;
}

.nfm-agro-crm .astra-task-solution__text {
  order: 2;
  width: 100%;
  max-width: none;
  padding: 42px 50px;
  box-sizing: border-box;
  border-radius: 14px;
  background: linear-gradient(125deg, var(--nfm-ink), #353941 70%, var(--nfm-red-dark));
}

.nfm-agro-crm .astra-task-solution__text p { line-height: 1.5; }

.nfm-agro-crm .astra-task-general__item {
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 12px;
  background: var(--nfm-mist);
}

.nfm-agro-crm .astra-bot__items {
  gap: 24px;
  padding: 0 24px;
  box-sizing: border-box;
}

.nfm-agro-crm .astra-bot__item {
  display: flex;
  height: 720px;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 16px;
  background: linear-gradient(145deg, #17191f, #292d35 62%, #5c0b10);
}

.nfm-agro-crm .astra-bot__item-1 { flex-basis: 61%; }
.nfm-agro-crm .astra-bot__item-2 { flex-basis: calc(39% - 24px); }
.nfm-agro-crm .astra-bot__text,
.nfm-agro-crm .astra-bot__item-1 .astra-bot__text,
.nfm-agro-crm .astra-bot__item-2 .astra-bot__text {
  position: relative;
  z-index: 2;
  width: auto;
  max-width: none;
  padding: 32px 38px 10px;
}
.nfm-agro-crm .astra-bot__text p { font-size: 17px; line-height: 1.42; text-wrap: pretty; }

.nfm-agro-crm .astra-bot__img {
  position: relative;
  right: auto;
  bottom: auto;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
}

.nfm-agro-crm .astra-bot__img picture {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: flex-end;
  justify-content: center;
}

.nfm-agro-crm .astra-bot__item img {
  width: 100%;
  height: 500px;
  max-width: 100%;
  object-fit: contain;
  outline: 1px solid rgba(255, 255, 255, .1);
  outline-offset: -1px;
}

.nfm-agro-crm .astra-bot__item-2 img { height: 440px; }

@media (min-width: 768px) {
  .nfm-agro-crm .astra-bot__item-3,
  .nfm-agro-crm .astra-bot__item-4 {
    display: none;
  }
}

.nfm-agro-crm .astra-admin__item {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .08);
  background: var(--nfm-mist);
}

.nfm-agro-crm .astra-admin__item img,
.nfm-agro-crm .astra-panel-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--nfm-white);
}

.nfm-agro-crm .astra-admin__item-1 img { bottom: 0; }
.nfm-agro-crm .astra-functionality__number p { color: var(--nfm-red); }
.nfm-agro-crm .astra-functionality__item:nth-child(even) .astra-functionality__number p { color: var(--nfm-graphite); }

@media (max-width: 1199.98px) and (min-width: 768px) {
  .nfm-agro-crm .astra-task-solution__text { padding: 36px 40px; }
  .nfm-agro-crm .astra-bot__item { height: 650px; }
  .nfm-agro-crm .astra-bot__text p { font-size: 15px; }
  .nfm-agro-crm .astra-bot__item-1 .astra-bot__text,
  .nfm-agro-crm .astra-bot__item-2 .astra-bot__text { padding: 24px 24px 8px; }
  .nfm-agro-crm .astra-bot__item-2 .astra-bot__text p { font-size: 14px; }
  .nfm-agro-crm .astra-bot__item img { height: 410px; }
  .nfm-agro-crm .astra-bot__item-2 img { height: 340px; }
}

@media (max-width: 767.98px) {
  .nfm-agro-crm .seo-page-title { margin-bottom: 22px; font-size: clamp(30px, 9vw, 44px); line-height: 1.08; }

  .nfm-agro-crm .astra-sub-header__result {
    aspect-ratio: 750 / 900;
    min-height: 0;
    border-radius: 10px;
  }

  .nfm-agro-crm .astra-sub-header__result .astra-fon { min-height: 0; }
  .nfm-agro-crm .astra-sub-header__result-container { left: 24px; top: 25%; }
  .nfm-agro-crm .astra-sub-header__result-logo .nfm-case-logo { padding: 7px 10px; }
  .nfm-agro-crm .astra-sub-header__result-logo .nfm-case-logo img { width: 76px; }

  .nfm-agro-crm .astra-about__body {
    height: 800px;
    background-image: url("../../img/cases-import/nfm_ua/designed/about-mobile.webp");
    background-position: center;
  }

  .nfm-agro-crm .astra-about__content {
    width: 100%;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(18, 20, 25, .98) 0 58%, rgba(18, 20, 25, .82) 72%, rgba(18, 20, 25, .18));
    justify-content: flex-start;
  }

  .nfm-agro-crm .astra-about__content-container { padding: 44px 26px 0; }
  .nfm-agro-crm .astra-about__logo .nfm-case-logo img { width: 72px; }
  .nfm-agro-crm .astra-about__text { max-width: none; margin-top: 22px; }
  .nfm-agro-crm .astra-about__text p { font-size: 16px; line-height: 1.48; }
  .nfm-agro-crm .astra-about__content-border { width: 100%; border-radius: 0 0 10px 10px; }

  .nfm-agro-crm .astra-task-solution__body { height: auto; padding: 0; align-items: stretch; }
  .nfm-agro-crm .astra-task-solution__body-container { width: 100%; gap: 16px; }
  .nfm-agro-crm .astra-task-solution__text { padding: 30px 26px; }
  .nfm-agro-crm .astra-task-solution__text p { font-size: 16px; }
  .nfm-agro-crm .astra-task-solution__img img { position: static; width: 100%; transform: none; }

  .nfm-agro-crm .astra-bot__items { gap: 18px; padding: 0 18px; overflow: visible; }
  .nfm-agro-crm .astra-bot__item { width: 100%; min-height: 630px; height: auto; overflow: hidden; }

  .nfm-agro-crm .astra-bot__item .astra-bot__text,
  .nfm-agro-crm .astra-bot__item-1 .astra-bot__text,
  .nfm-agro-crm .astra-bot__item-2 .astra-bot__text,
  .nfm-agro-crm .astra-bot__item-3 .astra-bot__text,
  .nfm-agro-crm .astra-bot__item-4 .astra-bot__text {
    order: 1;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 28px 24px 8px;
  }

  .nfm-agro-crm .astra-bot__text p { font-size: 16px; line-height: 1.43; }

  .nfm-agro-crm .astra-bot__item .astra-bot__img {
    order: 2;
    position: relative;
    right: auto;
    bottom: auto;
    flex: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
  }

  .nfm-agro-crm .astra-bot__item .astra-bot__img img {
    position: static;
    width: auto;
    height: 440px;
    max-width: 94%;
    max-height: none;
    object-fit: contain;
  }

  .nfm-agro-crm .astra-admin__item-1 { margin: 18px; }
  .nfm-agro-crm .astra-admin__item img,
  .nfm-agro-crm .astra-panel-img img { height: auto; }
  .nfm-agro-crm .astra-panel__img-item { margin-bottom: 16px; }
}

@media (max-width: 399.98px) {
  .nfm-agro-crm .astra-about__body { height: 830px; }
  .nfm-agro-crm .astra-bot__item { min-height: 610px; }
  .nfm-agro-crm .astra-bot__item .astra-bot__img img { height: 405px; }
}
