.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox img,
.lightbox video {
    max-width: 100%;
    max-height: calc(90vh - 60px); /* Adjust based on expected caption height */
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 30px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 10px;
    max-width: 90%;
    margin-top: 10px;
}

/* Ensure videos are responsive */
.lightbox video {
    width: 100%;
    height: auto;
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .lightbox-close {
        top: 5px;
        right: 10px;
        font-size: 24px;
    }

    .lightbox-caption {
        font-size: 14px;
    }
}

figure {
    cursor: pointer;
}
