﻿/* ═══════════════════════════════════════════════════════
   Gallery Lightbox — Shared CSS
   Thumbnail hover effects, modal overlay, gallery nav
   ═══════════════════════════════════════════════════════ */

/* Clickable thumbnail images */
.gallery-thumb {
    cursor: zoom-in;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-thumb:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.gallery-thumb:focus-visible {
    outline: 3px solid #1754cf;
    outline-offset: 4px;
    border-radius: 8px;
}

/* Lightbox overlay */
.glb-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    cursor: zoom-out;
}
.glb-overlay.active {
    display: flex;
    animation: glbFadeIn 0.3s ease;
}
@keyframes glbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Lightbox content wrapper */
.glb-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Full-size lightbox image */
.glb-image {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    object-fit: contain;
    background: #111;
}

/* Close button */
.glb-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: transform 0.2s ease;
    z-index: 10;
}
.glb-close:hover {
    transform: scale(1.2);
}
.glb-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Previous / Next buttons */
.glb-prev,
.glb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10;
}
.glb-prev { left: -60px; }
.glb-next { right: -60px; }
.glb-prev:hover,
.glb-next:hover {
    background: rgba(255, 255, 255, 0.25);
}
.glb-prev:focus-visible,
.glb-next:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Counter "2 / 6" */
.glb-counter {
    position: absolute;
    top: -40px;
    left: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
}

/* Caption */
.glb-caption {
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    max-width: 600px;
}

/* Hide nav when single image */
.glb-overlay[data-count="1"] .glb-prev,
.glb-overlay[data-count="1"] .glb-next,
.glb-overlay[data-count="1"] .glb-counter {
    display: none;
}

/* Prevent body scroll when lightbox open */
body.glb-open {
    overflow: hidden;
}

/* Responsive: move nav buttons inside on smaller screens */
@media (max-width: 768px) {
    .glb-prev { left: 8px; }
    .glb-next { right: 8px; }
    .glb-prev,
    .glb-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
        background: rgba(0, 0, 0, 0.5);
    }
    .glb-counter {
        position: static;
        margin-bottom: 8px;
    }
    .glb-close {
        top: -36px;
        font-size: 28px;
    }
}
