/* ================================================================
   BROGASIS LIGHTBOX — content image viewer
   ================================================================ */

/* Make content images clickable */
.bgl-lightbox-content img {
    cursor: zoom-in;
    transition: opacity .2s, transform .2s;
    border-radius: 8px;
}
.bgl-lightbox-content img:hover {
    opacity: .92;
    transform: scale(1.01);
}

/* Lightbox overlay */
.bgl-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, .92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: bglFadeIn .2s ease;
}

.bgl-lightbox.open {
    display: flex;
}

@keyframes bglFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Inner container */
.bgl-lb-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 80px);
    animation: bglScaleIn .22s cubic-bezier(.4,0,.2,1);
}

@keyframes bglScaleIn {
    from { transform: scale(.92); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* Lightbox image */
#bglLbImg {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
    display: block;
}

/* Caption */
.bgl-lb-caption {
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
    max-width: 600px;
    line-height: 1.5;
}

/* Counter */
.bgl-lb-counter {
    color: rgba(255, 255, 255, .4);
    font-size: 11px;
    letter-spacing: 1.5px;
    margin-top: 6px;
}

/* Close button */
.bgl-lb-close {
    position: fixed;
    top: 16px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, transform .18s;
    z-index: 10001;
}
.bgl-lb-close:hover {
    background: rgba(255, 255, 255, .25);
    transform: rotate(90deg);
}

/* Prev / Next buttons */
.bgl-lb-prev,
.bgl-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, transform .18s;
    z-index: 10001;
}
.bgl-lb-prev { left: 16px; }
.bgl-lb-next { right: 16px; }
.bgl-lb-prev:hover { background: rgba(255,255,255,.25); transform: translateY(-50%) translateX(-2px); }
.bgl-lb-next:hover { background: rgba(255,255,255,.25); transform: translateY(-50%) translateX(2px); }
.bgl-lb-prev.hidden,
.bgl-lb-next.hidden { opacity: 0; pointer-events: none; }

/* Hide when only 1 image */
.bgl-lb-prev.single-img,
.bgl-lb-next.single-img { display: none; }

/* Touch swipe hint */
@media (max-width: 600px) {
    .bgl-lb-inner { max-width: 100vw; }
    .bgl-lb-prev { left: 8px; }
    .bgl-lb-next { right: 8px; }
    .bgl-lb-close { top: 8px; right: 10px; }
}
