.charge {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  height: 800px;
  overflow: hidden;
}

.charge_photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.25s ease;
}

.charge_photo.is_changing {
  opacity: 0;
}

.charge_shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0) 41.562%, rgba(0, 0, 0, 0.39) 54.609%, rgba(0, 0, 0, 0.65) 93.037%),
    rgba(0, 0, 0, 0.2);
  transition: opacity 0.25s ease;
}

.charge .wrapper {
  display: flex;
  justify-content: flex-end;
  transition: opacity 0.25s ease;
}

.charge.is_text_off .charge_shade,
.charge.is_text_off .wrapper {
  opacity: 0;
}

.charge_text {
  font-weight: 700;
  font-size: 48px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  text-align: right;
}

.dots {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 31px;
  translate: -50% 0;
  display: flex;
  gap: 4px;
}

.dot_button {
  position: relative;
  width: 33px;
  height: 14px;
  padding: 0;
  border: none;
  border-radius: 100px;
  overflow: hidden;
  background: rgba(217, 217, 217, 0.27);
  transition: background-color 0.2s ease;
}

.dot_button {
  --dot-h: 14px;
}

.dot_button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d9d9d9;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dot_button:hover {
  background: rgba(217, 217, 217, 0.5);
}

.dot_button.is_on {
  background: rgba(217, 217, 217, 0.3);
}

.dot_button.is_on::before {
  opacity: 1;
}

/* шкала заполнения: светлая заливка растёт от кружка до всей длины точки за время показа слайда */
.dot_button.is_on.is_running::before {
  border-radius: 100px;
  animation: dot_fill var(--autoplay, 7s) linear forwards;
}

@media (prefers-reduced-motion: reduce) {
  .dot_button.is_on.is_running::before {
    animation: none;
  }
}

@media (max-width: 1199px) {
  .charge {
    height: 480px;
  }

  .charge_text {
    font-size: 32px;
  }
}

/* мобильная версия: вертикальный кадр во всю ширину, текст справа сверху */
@media (max-width: 767px) {
  .charge {
    align-items: flex-start;
    height: min(177.78vw, 760px);
  }

  .charge_shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0, rgba(0, 0, 0, 0.65) 8%, rgba(0, 0, 0, 0.35) 27%, rgba(0, 0, 0, 0.1) 45%, rgba(0, 0, 0, 0) 62%);
  }

  .charge .wrapper {
    padding-top: 58.6px;
  }

  .charge_text {
    font-size: 26px;
    line-height: 31.2px;
    letter-spacing: -0.02em;
  }

  .dots {
    bottom: 16px;
  }

  .dot_button {
    --dot-h: 12px;
    width: 25px;
    height: 12px;
  }

  .dot_button::before {
    width: 12px;
    height: 12px;
  }
}
