/* =======================
   POPUP OVERLAY
======================= */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  background-color: rgba(42, 42, 42, 0.5);
  display: none;
  z-index: 1000;
}

/* =======================
   POPUP BOX
======================= */
.popup-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: linear-gradient(135deg, #000000, #1F1F1F);
  width: 420px;
  padding: 70px;
  border-radius: 16px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4),
              inset 0 0 25px #8d1b3d66;
  text-align: center;
  display: none;
  z-index: 1001;
  opacity: 0;
  transition: all 0.3s ease;
  color: #fff;
  font-family: "Segoe UI", sans-serif;
}

.popup-box h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: #fff;
  font-weight: 600;
}

.popup-box p {
  font-size: 1rem;
  color: #d1c4e9;
  margin-bottom: 20px;
}

/* =======================
   BUTTONS
======================= */
.popup-btn {
  background: linear-gradient(45deg, #8d1b3d, #8d1b3d);
  color: #fff;
  border: none;
  padding: 12px 50px;
  letter-spacing: 1.3px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 5px 20px rgba(141, 21, 67, 0.2);
  transition: all 0.3s ease;
  margin: 10px 0;
  font-weight: 700;
}

.popup-btn:hover {
  background: linear-gradient(45deg, #8d1b3d, #464646);
  transform: translateY(-2px);
}

/* =======================
   CLOSE BUTTON
======================= */
.popup-close {
  position: absolute;
  top: 10px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: #fff;
  cursor: pointer;
}

/* =======================
   ACTIVE STATES
======================= */
.popup-overlay.active {
  display: block;
}

.popup-box.active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* =======================
   LARGE VARIANT
======================= */
.popup-box.large {
  width: 90%;
  max-width: 700px;
  padding: 50px 40px;
}

/* =======================
   VIDEO WRAPPER
======================= */
.popup-video-wrapper {
  width: 100%;
  margin-bottom: 30px;
  display: flex;
  justify-content: center;
}

.popup-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(88, 115, 107, 0.5);
  animation: glow 2s ease-in-out infinite alternate;
  transition: transform 0.3s ease;
}

.popup-video-frame:hover {
  transform: scale(1.015);
}

.popup-video-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* =======================
   GLOW EFFECT
======================= */
@keyframes glow {
  from {
    box-shadow: 0 0 20px rgba(141, 27, 61, 0.4),
                0 0 40px rgba(141, 27, 61, 0.4);
  }
  to {
    box-shadow: 0 0 30px rgba(141, 27, 61, 0.6),
                0 0 60px rgba(141, 27, 61, 0.6);
  }
}

/* =======================
   RESPONSIVE DESIGN
======================= */
@media (max-width: 768px) {
  .popup-box {
    width: 80%;
    padding: 50px 40px;
  }
  .popup-box.large {
    width: 95%;
    padding: 40px 30px;
  }
  .popup-box h2 { font-size: 1.4rem; }
  .popup-box p { font-size: 0.9rem; }
  .popup-btn {
    padding: 10px 40px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .popup-box {
    width: 90%;
    padding: 40px 30px;
    border-radius: 12px;
  }
  .popup-box h2 { font-size: 1.2rem; }
  .popup-box p { font-size: 0.85rem; }
  .popup-btn {
    padding: 8px 30px;
    font-size: 0.85rem;
  }
  .popup-close {
    font-size: 20px;
    top: 8px;
    right: 12px;
  }
}

@media (max-width: 400px) {
  .popup-box {
    padding: 30px 20px;
    border-radius: 10px;
  }
  .popup-box h2 { font-size: 1.1rem; }
  .popup-box p { font-size: 0.8rem; }
  .popup-btn {
    padding: 8px 25px;
    letter-spacing: 1px;
  }
  .popup-overlay {
    backdrop-filter: blur(5px);
  }
}

@media (max-width: 350px) and (orientation: portrait) {
  .popup-box {
    width: 95%;
    padding: 25px 15px;
  }
  .popup-btn {
    width: 100%;
    padding: 8px 0;
  }
}
