.popup {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  /* display: flex; */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  z-index: 100;
}

.popup.open {
  display: flex;
}

.popup__close {
  position: absolute;
  top: 30%;
  right: 20%;
  cursor: pointer;
  background-image: url("./../images/cross.svg");
  background-size: cover;
  width: 4.2rem;
  height: 4.2rem;

  @media (max-width: 768px) {
    right: 6rem;
  }
}

.popup__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 106rem;
  width: 100%;
  margin: 0 auto;
  background-image: url("./../images/popup-bg.png");
  background-size: cover;
  background-position: center;
  overflow: hidden;
  gap: 2.4rem;
  padding: 7rem 8rem 11rem;
  background-color: #ffffff;
  color: #000;
  position: relative;
  border-radius: 2rem;

  @media (max-width: 768px) {
    max-width: 60rem;
    width: 100%;
    margin: 0 auto;
  }
}
.popup__title {
  font-family: "Bebas Neue Cyrillic", sans-serif;
  font-weight: 400;
  font-size: 6.6rem;
  line-height: 100%;
  text-align: center;
}
.popup__title span {
  color: #c20000;
}
.popup__text {
  font-family: "Bebas Neue Cyrillic", sans-serif;
  font-size: 4.8rem;
  line-height: 100%;
  letter-spacing: 0%;
  text-align: center;

  @media (max-width: 768px) {
    font-size: 3.6rem;
  }
}
.popup__text span {
  position: relative;
  color: #c20000;
}
.popup__text span::before {
  content: "";
  position: absolute;
  top: -1rem;
  left: -0.5rem;
  width: 110%;
  height: 9rem;
  animation: changeBg 2s steps(1, end) infinite;
  background-size: contain;
  background-repeat: no-repeat;
}
.popup__line {
  background: linear-gradient(90deg, #a80808 0%, #e61616 54%, #a80808 100%);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem 0;
  animation: runningLine 8s infinite linear;
}

.popup__line-wrapper {
  display: flex;
  align-items: center;
  position: absolute;
  left: -5rem;
  bottom: -7rem;
  rotate: 6deg;
}

.popup__line-item {
  color: #fff;
  font-family: "Bebas Neue Cyrillic", sans-serif;
  font-size: 4rem;
  line-height: 91%;
  letter-spacing: 0%;
  text-transform: uppercase;
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.popup__line-item::before {
  content: "";
  display: block;
  width: 1rem;
  height: 1rem;
  background-color: #ffffff;
  border-radius: 50%;
}

@keyframes changeBg {
  25% {
    background-image: url("./../images/popup-anim-1.svg");
  }
  50% {
    background-image: url("./../images/popup-anim-2.svg");
  }
  75% {
    background-image: url("./../images/popup-anim-3.svg");
  }
  100% {
    background-image: url("./../images/popup-anim-4.svg");
  }
}

@keyframes runningLine {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}
