.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox.visible {
    opacity: 1;
    visibility: visible;
}

.lightbox-content-container {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}

.lightbox.visible .lightbox-content-container {
    transform: scale(1);
}

.lightbox-content {
    width: 100%;
    height: 100%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: -20px;
    font-size: 40px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    transform: scale(1.1) rotate(90deg);
}

/* Specific styles for PDF view to make the container larger */
.lightbox.pdf-view .lightbox-content-container {
    width: 95vw;
    height: 95vh;
}

.entry-content img:not(a img), .entry-content a[href$=".pdf"] {
    cursor: pointer;
}

.entry-content img:not(a img):hover {
    opacity: 0.85;
}

