/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 85vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
    /* Ensure on top */
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

/* Add cursor pointer to zoomable images */
.bio-image img,
.gallery-grid img,
.feature-img,
.philosophy-images img {
    cursor: zoom-in;
}

/* Mobile Responsiveness for Lightbox */
@media only screen and (max-width: 700px) {
    .lightbox-content {
        width: 100%;
        max-height: 70vh;
        /* Leave room for close button if needed or just styling */
        margin-top: 30%;
        /* Center vertically structurally if needed, but flex is better. stick to margin auto for now with padding top */
    }

    .lightbox {
        padding-top: 100px;
        /* Push down a bit more on mobile to avoid overlap with address bars overlay */
        display: flex;
        /* Use flex to center on mobile */
        align-items: center;
        justify-content: center;
    }

    .close-lightbox {
        top: 20px;
        right: 20px;
        font-size: 50px;
        /* Make it easier to tap */
        background: rgba(0, 0, 0, 0.5);
        /* Background to make it visible on images */
        width: 40px;
        height: 40px;
        line-height: 40px;
        text-align: center;
        border-radius: 50%;
    }
}