/* Background overlay */
#popup-background {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Transparent dark background */
    z-index: 999; /* Just below the popup */
    display: flex;
    justify-content: center;
    align-items: center; /* This centers the popup both vertically and horizontally */
}

/* Popup styling */
#popup {
    padding: 15px;
    background-color: white;
    border: 2px solid black;
    z-index: 1000; /* Ensures it's above other content */
    width: 80%; /* Responsive width */
    max-width: 600px; /* Max width on larger screens */
    text-align: center;
    position: relative; /* For close button positioning */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

#popup img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 8px;
}

#popup a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}

#popup a:hover {
    background-color: #0056b3;
}

/* Close button styling */
.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
}

.close-btn:hover {
    color: red;
}

/* Media query for smaller screens */
@media (max-width: 600px) {
    #popup {
        width: 90%; /* More space for smaller screens */
    }

    #popup a {
        width: 100%; /* Make button take full width on small screens */
    }
}
