#image-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6); /* semi-transparent overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

#image-popup.visible {
  opacity: 1;
  pointer-events: auto;
}

#image-popup .popup-content {
  position: relative;
  background-color: #fff;
  padding: 10px;
  border-radius: 10px;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

#image-popup img {
  max-width: 100%;
  max-height: 80vh;
}

/* Close icon style */
#image-popup .close-icon {
  position: absolute;
  top: -15px;
  right: -15px;
  font-size: 32px;
  color: #fff; /* icon color */
  background-color: #333; /* circular background color */
  width: 30px;
  height: 30px;
  line-height: 25px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

#image-popup .close-icon:hover {
  transform: scale(1.2);
  background-color: #555; /* optional hover effect */
}

/* Screens ≤ 1024px */
@media (max-width: 1024px) {
  #image-popup .close-icon {
    top: -14px;
    right: -14px;
    font-size: 30px;
  }
}

/* Screens ≤ 991px */
@media (max-width: 991px) {
  #image-popup .close-icon {
    top: -13px;
    right: -13px;
    font-size: 28px;
  }
}

/* Screens ≤ 767px */
@media (max-width: 767px) {
  #image-popup .close-icon {
    top: -12px;
    right: -12px;
    font-size: 26px;
  }
}

/* Screens ≤ 575px */
@media (max-width: 575px) {
  #image-popup .close-icon {
    top: -11px;
    right: -11px;
    font-size: 24px;
  }
}

/* Screens ≤ 480px */
@media (max-width: 480px) {
  #image-popup .close-icon {
    top: -10px;
    right: -10px;
    font-size: 22px;
  }
}

/* Screens ≤ 360px */
@media (max-width: 360px) {
  #image-popup .close-icon {
    top: -8px;
    right: -8px;
    font-size: 20px;
  }
}