/* ================================
   INFOGRAPHIC SECTION
   Desktop — як було
   Mobile — sticky stack
   ================================ */

.infographic {
  overflow: visible;
}

.infographic__content {
  display: flex;
  flex-flow: column;
  gap: 80px;
}

.infographic__head {
  display: flex;
  flex-flow: column;
  align-items: center;
  gap: 24px;
}

.infographic__desc {
  max-width: 575px;
}

.infographic__body {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.infographic__item {
  display: flex;
  flex-flow: column;
  justify-content: space-between;
  height: 282px;
  width: calc((100% - 60px) / 4);
  border-radius: 8px;
  background: #e5edfa;
  padding: 20px;
  transition: 0.3s ease;
}

.infographic__item:hover {
  background: #0d499c;
}

.infographic__item:hover .infographic__item-digits {
  color: #33ccff;
}

.infographic__item:hover .infographic__item-title {
  color: #fff;
}

.infographic__item:hover .infographic__item-desc {
  opacity: 1;
}

.infographic__item-digits {
  font-family: Poppins;
  font-weight: 500;
  font-size: 62px;
  line-height: 110%;
  letter-spacing: -3%;
  vertical-align: middle;
  text-transform: capitalize;
  color: #4d525a;
  transition: 0.3s ease;
  margin-bottom: 8px;
}

.infographic__item-title {
  font-family: Poppins;
  font-weight: 400;
  font-size: 16px;
  line-height: 130%;
  color: #898d90;
  transition: 0.3s ease;
}

.infographic__item-desc {
  font-family: Poppins;
  font-weight: 400;
  font-size: 14px;
  line-height: 130%;
  color: #fff;
  opacity: 0;
  transition: 0.3s ease;
}

/* ================================
   MOBILE — STICKY STACK EFFECT
   ================================ */
@media (max-width: 1024px) {
  .infographic {
    overflow: visible;
  }

  .infographic__content {
    gap: 40px;
  }

  .infographic__head {
    gap: 16px;
  }

  .infographic__title {
    font-family: Poppins;
    font-weight: 500;
    font-size: 32px;
    line-height: 120%;
    letter-spacing: -1%;
    text-align: center;
  }

  .infographic__desc {
    font-family: Poppins;
    font-weight: 400;
    font-size: 14px;
    line-height: 140%;
    text-align: center;
  }

  .infographic__body {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
    gap: 24px;

    --stackTop: 0px;
    --stackGap: 24px;
  }

  .infographic__item {
    width: 100%;
    height: 232px;
    position: sticky;
    top: calc(var(--stackTop) + (var(--i, 0) * var(--stackGap)));
    z-index: calc(10 - var(--i, 0));
    margin-bottom: 24px;
    border-radius: 8px;
    background: #e5edfa;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }

  /* автоматичне складання */
  .infographic__item:nth-child(1) { --i: 0; }
  .infographic__item:nth-child(2) { --i: 1; }
  .infographic__item:nth-child(3) { --i: 2; }
  .infographic__item:nth-child(4) { --i: 3; }
  .infographic__item:nth-child(5) { --i: 4; }
  .infographic__item:nth-child(6) { --i: 5; }
  .infographic__item:nth-child(7) { --i: 6; }
  .infographic__item:nth-child(8) { --i: 7; }
  .infographic__item:nth-child(9) { --i: 8; }
  .infographic__item:nth-child(10) { --i: 9; }

  .infographic__item:hover .infographic__item-desc {
    color: #ffffff97;
  }

  .infographic__item-digits {
    font-weight: 500;
    font-size: 46px;
    line-height: 110%;
    text-transform: capitalize;
  }

  .infographic__item-title {
    font-weight: 400;
    font-size: 16px;
    line-height: 130%;
  }

  .infographic__item-desc {
    color: #898d90;
    font-size: 14px;
    opacity: 1;
  }
}
