.lightbox{
    position:fixed;
    inset:0;
    background:rgba(0, 0, 0, 0.9);
    display:none;
    justify-content:center;
    align-items:center;
    z-index:9999;
    padding:20px;
}

.lightbox-content{
    position:relative;
    max-width:90%;
    max-height:90%;
    width:min(1200px, 90vw);
    display:flex;
    flex-direction:column;
    align-items:center;
}

.lightbox-img{
    max-width:100%;
    max-height:75vh;
    object-fit:contain;
    border-radius:8px;
    box-shadow:0 10px 40px rgba(255, 255, 255, 0.18);
}

.lightbox-img.is-loading{
    visibility:hidden;
}

.lightbox-caption{
    margin-top:12px;
    color:#fff;
    font-size:1rem;
    text-align:center;
    line-height:1.5;
}

.lightbox-close{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    position:absolute;
    top:8px;
    right:8px;
    z-index:1;
    width:48px;
    height:48px;
    padding:0;
    border:1px solid rgba(255,255,255,.7);
    border-radius:50%;
    background:rgba(0,0,0,.65);
    color:#fff;
    font-size:2rem;
    line-height:1;
    cursor:pointer;
    transition:0.2s;
}

.lightbox-nav{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    position:absolute;
    top:50%;
    z-index:1;
    width:48px;
    height:48px;
    padding:0;
    border:1px solid rgba(255,255,255,.7);
    border-radius:50%;
    background:rgba(0,0,0,.65);
    color:#fff;
    font-size:0;
    line-height:0;
    cursor:pointer;
    transform:translateY(-50%);
    transition:0.2s;
}

.lightbox-nav::before{
    content:"";
    width:10px;
    height:10px;
    border-top:2px solid currentColor;
    border-right:2px solid currentColor;
}

.lightbox-previous{
    left:8px;
}

.lightbox-previous::before{
    transform:rotate(-135deg);
}

.lightbox-next{
    right:8px;
}

.lightbox-next::before{
    transform:rotate(45deg);
}

.lightbox-close:hover,
.lightbox-nav:hover{
    color:var(--gold);
}

.lightbox button:focus-visible{
    outline:3px solid #fff;
    outline-offset:3px;
}

img[role="button"]{
    cursor:zoom-in;
}

img[role="button"]:focus-visible{
    outline:3px solid var(--primary);
    outline-offset:3px;
}

@media (max-width:600px){
    .lightbox{
        padding:10px;
    }

    .lightbox-content{
        width:100%;
        max-width:100%;
    }

    .lightbox-nav{
        width:42px;
        height:42px;
    }
}