#my-popup {
  display: none;
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 9999;
  padding: 10px; 
}

#my-popup.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

#my-popup .popup-content {
  background: #fff;
  width: 100%;
  max-width: 550px; 
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 8px 25px rgba(0,0,0,0.3); 
  display: flex;
  flex-direction: column;
  align-items: center;
}

#my-popup .popup-content img {
  width: 100%;
  height: auto;
  padding: 30px 20px 10px; 
  object-fit: cover;
}

#my-popup .popup-content p,
#my-popup .popup-content h3 {
  padding: 12px 16px;
  text-align: center;
  color: #2a2a2a;
  margin: 0;
}

#close-popup {
  position: absolute;
  top: 2px;
  right: 2px;  
  background: transparent;
  border: none;
  font-size: 28px;
  color: #4d4d4d;
  cursor: pointer;
  line-height: 1;  
  border-radius: 50%;
  transition: background 0.3s ease, color 0.3s ease;
  z-index: 10;
}

#close-popup:hover {
  color: #000;
}

.mypopup-button {
  display: inline-block;
  margin: 10px 10px 30px;
  padding: 10px 30px;
  background: #143429;
  color: #fff;
  text-align: center;
  border-radius: 3px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  cursor: pointer;
}

.mypopup-button:hover {
  background: #D19E66;
  color: #fff;
}

/* --- RESPONSIVE --- */

@media (max-width: 991px) {
  #my-popup .popup-content h3 {
     font-size: 18px;
  }

  #my-popup .popup-content p, .mypopup-button{
     font-size: 12px;
  }
}

@media (max-width: 575px) {
  #close-popup {
    font-size: 26px;   
  }

  #my-popup .popup-content {
    max-width: 95%;
  }
}