/* The overlay that will cover the whole page */
.overlay {
    position: fixed;
    display: none;  /* Hidden by default */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0,0,0,0.8); /* Black background with opacity */
    z-index: 999; /* Ensure it sits on top */
    justify-content: center;
    align-items: center;
}

/* Container for the image and close button */
.overlay-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The full-size image inside the overlay */
.overlay-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* The "x" close button */
.close {
    position: absolute;
    top: -10px;  /* Position at the top of the image */
    right: 10px; /* Position at the right of the image */
    color: #fff;
    background-color: rgba(0, 0, 0, 0.7); /* Slightly transparent background */
    padding: 5px;
    font-size: 30px;
    font-weight: bold;
    border-radius: 50%;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Left and right arrows */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
}

.prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}
