/* The background overlay */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(1px); /* Increased slightly for better focus */
}

.modal-content {
    background-image: url("../gifs/impr.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    overflow-y: auto; /* Keeps it scrollable */
    max-height: 80vh;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Padded area for text */
#modalBody {
padding: 30px;
color: #333;
text-align: center; /* Centers the figure and text */
h2 { margin-top: 10px; font-weight: normal; }
#modalBody p { line-height: 1.5; }
}

/* --- The Image & Caption Fix --- */
figure {
    margin: 0 auto 20px auto; /* Removes default 40px margin; centers the block */
    padding: 0;
    display: inline-block; /* Wraps tightly around the image */
}

.modal-img {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block; /* Removes the bottom whitespace gap */
    margin: 0;
    border-radius: 4px;
    border: 2px solid #fff; /* Optional: adds a nice frame against the background */
}

figcaption {
    margin-top: 5px; /* Tiny gap between photo and text */
    padding: 0;
    font-size: 0.85rem;
    font-style: italic;
    color: #444;
}

/* Close button */
.close-modal {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 30px;
    color: #333;
    z-index: 10;
    cursor: pointer;
}


