/* Lightbox Overlay */
.lightbox {
    /* Hidden by default */
    display: none;
    
    /* Overlay taking up full screen */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    
    /* Semi-transparent black background */
    background-color: rgba(0, 0, 0, 0.85);
    
    /* Center the image inside */
    align-items: center;
    justify-content: center;
}

/* Show the lightbox when it's the target of the URL hash */
.lightbox:target {
    display: flex;
}

/* Lightbox Content (The Image) */
.lightbox img {
    /* Large but constrained size */
    max-width: 90%;
    max-height: 90%;
    
    /* High quality rounded corners and shadows */
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    
    /* Reset any hover transforms from base styles */
    transform: none;
}

.lightbox img:hover {
    transform: none;
}

/* Close Button (Fills the entire screen acting as a click-away closer) */
.lightbox-close-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: zoom-out;
}

/* Visible Close 'X' */
.lightbox-close-btn {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
    z-index: 1001; /* Ensure it stays above the overlay link */
}

.lightbox-close-btn:hover {
    color: #bbb;
}
