.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    justify-content: center;
    align-items: center;
    flex-direction: column; /* Ensure content is stacked vertically */
}

.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    border-radius: 10px;
    position: relative; /* Ensure caption is positioned correctly */
    display: flex;
    flex-direction: column; /* Stack image and caption vertically */
    align-items: center; /* Center content horizontally */
}

    .lightbox-content img {
        max-width: 100%;
        max-height: 80%;
    }

.title {
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    color: #fff;
    padding: 10px;
    text-align: center;
    box-sizing: border-box; /* Include padding in the width calculation */
}

.caption {
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    color: #fff;
    padding: 10px;
    text-align: center;
    box-sizing: border-box; /* Include padding in the width calculation */
}

.close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    cursor: pointer;
    color: #000;
}

.arrow {
    position: absolute;
    top: 50%;
    font-size: 40px;
    cursor: pointer;
    color: #000;
    user-select: none;
}

.arrow-left {
    left: 20px;
}

.arrow-right {
    right: 20px;
}