/* Modal Overlay */
.ad-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Black with transparency */
    z-index: 1000;
    overflow: hidden; /* Prevent scrolling */
    visibility: hidden; /* Initially hidden */
    opacity: 0; /* Initially transparent */
    transition: visibility 0s, opacity 0.3s ease-in-out;
  }
  
  /* Visible Modal */
  .ad-modal.active {
    visibility: visible;
    opacity: 1;
  }
  
  /* Advertisement Content */
  .ad-content {
    position: relative;
    max-width: 600px; /* Limit maximum width of the ad */
    max-height: 80%; /* Limit maximum height of the ad */
    width: 90%; /* Adjust width to make it responsive */
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  .ad-content img {
    width: 100%; /* Scale the image to fit the container */
    height: auto; /* Maintain aspect ratio */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    object-fit: contain; /* Ensure the image fits within bounds */
  }
  
  /* Close Button */
  .ad-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 1;
  }
  
  .ad-close:hover {
    background-color: rgba(0, 0, 0, 0.8);
  }
  