.image-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;

  display: none;
  justify-content: center;
  align-items: center;

  background: rgba(0, 0, 0, 0.8);
  z-index: 99999;
}

.image-popup.active {
  display: flex;
}

.popup-content {
  position: relative;
  width: 90%;
  max-width: 700px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-image {
  width: 100%;
  max-width: 700px;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.popup-close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-size: 18px;
  color: #000;
}

.flip-text-wrapper {
  height: 70px;
  overflow: hidden;
  margin: 10px 0 20px;
}

#flipText {
  display: inline-block;
  font-size: 35px;
  font-weight: 700;
  color: #ff6a00;
  transform-origin: center;
}

.flipInX {
  animation: flipInX 0.8s ease;
}

@keyframes flipInX {
  from {
    transform: perspective(400px) rotateX(90deg);
    opacity: 0;
  }

  40% {
    transform: perspective(400px) rotateX(-20deg);
  }

  60% {
    transform: perspective(400px) rotateX(10deg);
  }

  80% {
    transform: perspective(400px) rotateX(-5deg);
  }

  to {
    transform: perspective(400px) rotateX(0deg);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  #flipText {
    font-size: 34px;
  }
}
