.overlay-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 10000000020;
  opacity: 0;
  transition: opacity 0.3s ease;
  /* animation: fadeIn 0.5s ease forwards; */
  animation: fadeInZoom 0.5s ease forwards;
  transform: scale(1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    display: none;
  }
}

@keyframes fadeInZoom {
  from {
    opacity: 0;
    transform: scale(1.2); /* Start slightly zoomed in */
  }
  to {
    opacity: 1;
    transform: scale(1); /* End at normal scale */
  }
}

@keyframes fadeOutZoom {
  from {
    opacity: 1;
    transform: scale(1); /* Start at normal scale */
  }
  to {
    opacity: 0;
    transform: scale(0.8); /* Zoom out slightly */
  }
}

.image-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  bottom: 0;
  object-fit: fill;
  z-index: -1;
}

/* Popup content styling */
.popup-card {
  background-color: white;
  padding: 0.3rem;
  width: 600px;
  max-width: 90%;
  max-height: 90vh;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 2;
  transition: all 1s ease-in-out;
}

.popup-card.landscape {
  flex-direction: row;
}

.popup-card > .main {
  display: none;
}

.popup-card.landscape > .main {
  display: flex;
}

.popup-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.popup-card .popup-content > .main {
  display: block;
}

.popup-card.landscape .popup-content > .main {
  display: none;
}

/* Close button styling */
.popup-close {
  position: absolute;
  /* top: -2rem; */
  top: 0.5rem;
  right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: #ff9107;
  border: 3px solid #ff9107;
  outline: none;
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.popup-card.landscape .popup-close {
  width: 1.3rem;
  height: 1.3rem;
}

#popup.hide {
  opacity: 0 !important;
  display: none !important;
  animation: fadeOutZoom 0.3s ease forwards;
}

.popup-close:hover {
  color: #bf6b02;
  border: 4px solid #bf6b02;
  transform: scale(1.2);
}

.popup-card .image {
  width: 100%;
  object-fit: contain;
}
.image-title {
  width: 70% !important;
}

.popup-card a {
  max-width: 100%;
}

.popup-card.landscape #closeButton{
  max-width: 70%;
  font-size:11pt;
  padding: 0.3rem .2rem;
  margin-bottom:0rem
}

#closeButton {
  text-transform: uppercase;
  padding: 0.5rem 0.5rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  background: linear-gradient(to bottom, #bf6b02, #ff9107);
  /* color: #1e61b3; */
  color: #fff;
  max-width: 100%;
  width: 200px;
  font-weight: bold;
  font-size: 16pt;
  border: none;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.7),
    inset 0px 0px 10px rgba(86, 86, 86, 1);
  animation: pulse 2s infinite ease-in-out;
}
#closeButton:hover {
  background: linear-gradient(to bottom, #1b5ba8, #5cacec);
  animation-play-state: paused;
  color: #fff;
}

.message,
q {
  font-size: 14pt;
  text-transform: uppercase;
  font-weight: 500;
}

.popup-card.landscape :where(.message, q) {
  font-size: 10pt;
}

q {
  quotes: none;
}
/* Pulse animation keyframes */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1); /* Slightly larger scale */
    opacity: 1; /* Reduce opacity */
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.8);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* 
.social-links {
  display: flex;
  padding: 0.5rem 1rem;
  border-radius: 12px 12px 0px 0px;
  position: absolute;
  bottom: 0;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  border: none;
  max-width: 70%;
  background: linear-gradient(to bottom, #1b5ba8, #5cacec);
  box-shadow: inset 0px 0px 10px rgba(86, 86, 86, 1);
}

.social-links ul {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.social-links ul img {
  width: 1rem;
  object-fit: contain;
}
.social-links ul li {
  position: relative;
  transition: all 1s ease-in-out;
}

.social-links ul li:hover img {
  animation: bounce 1s infinite ease-in-out alternate;
  transition: transform 0.5s ease-in-out;
}

@keyframes bounce {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

/* Add a gradient overlay using ::before pseudo-element */
/*
.social-links ul li:hover::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #bf6b02, #ff9107);
  opacity: 0.5; 
  z-index: -1;
  transition: opacity 0.5s ease-in-out;
} */

@media screen and (min-width: 320px) {
  .popup-card {
    padding: 1rem;
    gap: 1rem;
  }
  #closeButton {
    margin-bottom: 2rem;
    /* max-width: 98%; */
  }

  .social-links ul {
    flex-wrap: nowrap;
  }
}

@media screen and (min-width: 768px) {
  .popup-card {
    padding: 1rem 1rem;
    gap: 1rem;
    max-height: 85vh;
  }
  /* .popup-close {
    top: 0.2rem;
    right: -2rem;
  } */
  #closeButton {
    margin-bottom: 1rem;
  }

  .social-links ul {
    flex-wrap: nowrap;
  }
}

/* Glow effect on hover */
.popup-card:hover {
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.8); /* Glow effect on the card */
}

.popup-card:hover::after {
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.8); /* Stronger glow effect on reflection */
}

/* Container for falling stars */
.falling-stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* Prevent overflow */
  pointer-events: none; /* Allow clicks to pass through */
}

/* Star styles */
.star {
  position: absolute;
  width: 6px; /* Star size */
  height: 6px;
  background-color: white; /* Star color */
  border-radius: 50%; /* Make it round */
  opacity: 0.8; /* Slight transparency */
  animation: fall linear infinite;
}

/* Falling animation */
@keyframes fall {
  0% {
    transform: translateY(-10px); /* Start just above the top */
    opacity: 1; /* Fully visible */
  }
  100% {
    transform: translateY(100vh); /* Fall to the bottom */
    opacity: 0; /* Fade out */
  }
}

/* Randomize star positions and animation durations */
.star:nth-child(1) {
  left: 10%;
  animation-duration: 3s;
  animation-delay: 0s;
}
.star:nth-child(2) {
  left: 30%;
  animation-duration: 4s;
  animation-delay: 1s;
}
.star:nth-child(3) {
  left: 50%;
  animation-duration: 2s;
  animation-delay: 0.5s;
}
.star:nth-child(4) {
  left: 70%;
  animation-duration: 5s;
  animation-delay: 2s;
}
.star:nth-child(5) {
  left: 20%;
  animation-duration: 3.5s;
  animation-delay: 1.5s;
}
.star:nth-child(6) {
  left: 80%;
  animation-duration: 4.5s;
  animation-delay: 3s;
}
.star:nth-child(7) {
  left: 60%;
  animation-duration: 3s;
  animation-delay: 1s;
}
.star:nth-child(8) {
  left: 15%;
  animation-duration: 4s;
  animation-delay: 0.4s;
}
.star:nth-child(9) {
  left: 25%;
  animation-duration: 3.2s;
  animation-delay: 1.2s;
}
.star:nth-child(10) {
  left: 35%;
  animation-duration: 2.8s;
  animation-delay: 0.3s;
}
.star:nth-child(11) {
  left: 45%;
  animation-duration: 3.6s;
  animation-delay: 1.8s;
}
.star:nth-child(12) {
  left: 55%;
  animation-duration: 4.1s;
  animation-delay: 0.6s;
}
.star:nth-child(13) {
  left: 65%;
  animation-duration: 2.9s;
  animation-delay: 1.4s;
}
.star:nth-child(14) {
  left: 75%;
  animation-duration: 3.7s;
  animation-delay: 2.2s;
}
.star:nth-child(15) {
  left: 85%;
  animation-duration: 4.3s;
  animation-delay: 0.9s;
}
.star:nth-child(16) {
  left: 5%;
  animation-duration: 3.1s;
  animation-delay: 1.1s;
}
.star:nth-child(17) {
  left: 90%;
  animation-duration: 2.5s;
  animation-delay: 2.5s;
}
.star:nth-child(18) {
  left: 40%;
  animation-duration: 3.9s;
  animation-delay: 1.7s;
}
.star:nth-child(19) {
  left: 55%;
  animation-duration: 4.4s;
  animation-delay: 0.8s;
}
.star:nth-child(20) {
  left: 95%;
  animation-duration: 3.8s;
  animation-delay: 2.3s;
}

/*** add glass shining mask ***/

.animation-card-container {
  width: 100%;
  height: 100%;
  position: absolute;
  overflow: hidden;
  border-radius: 20px;
  animation: fadeOut 1ms ease forwards;
  animation-delay: 3s;
}
/* Glass mask container */
.glass-mask {
  width: 100%;
  height: 140%;
  position: absolute;
  bottom: -100%;
  left: -100%;
  transform: rotate(-45deg);
  /* z-index: 4; */
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.5),
    rgba(255, 255, 255, 0.1)
  ); /* Light overlay */
  backdrop-filter: blur(15px); /* Frosted glass effect */
  -webkit-backdrop-filter: blur(15px); /* Safari support */
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3); /* Glow effect */
  animation: moveToTopRight 3s ease-in-out forwards;

  opacity: 0.4;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Inner glow effect */
.glass-mask::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -20%;
  width: 140%;
  height: 140%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.4),
    transparent 60%
  );
  border-radius: 20px;
  /* z-index: 1; */
  opacity: 0.7;
  pointer-events: none;
}

/* Outer glow effect */
.glass-mask::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5),
    0 0 50px rgba(173, 216, 230, 0.5);
  opacity: 0.8;
  pointer-events: none;
}

#mask2 {
  animation-delay: 1s;
}

/* Animation for the mask */

@keyframes moveToTopRight {
  0% {
    bottom: -100%;
    left: -100%;
  }
  100% {
    bottom: 100%;
    left: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .popup-card,
  .glass-mask,
  .closeButton {
    animation: none;
  }
}
