/**
 * AI Innovation Hub – Panoramic infinite scrolling picture gallery
 */

.ai-hub-gallery-section
{
    overflow: hidden;
}

.ai-hub-gallery-overflow
{
    width: 100%;
    overflow: hidden;
    padding: 0.5rem 0;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.ai-hub-gallery-track
{
    display: flex;
    gap: 1rem;
    width: max-content;
    will-change: transform;
}

.ai-hub-gallery-item
{
    flex: 0 0 auto;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.ai-hub-gallery-item:hover
{
    transform: scale(1.08);
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.18);
    z-index: 1;
}

.ai-hub-gallery-item img
{
    display: block;
    height: 140px;
    width: auto;
    object-fit: cover;
    pointer-events: auto;
    -webkit-user-drag: none;
    user-drag: none;
}

@media (max-width: 575.98px)
{
    .ai-hub-gallery-item img
    {
        height: 100px;
    }
}

/* ── Lightbox overlay ── */
.ai-hub-lightbox
{
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    cursor: pointer;
}

.ai-hub-lightbox.active
{
    opacity: 1;
    visibility: visible;
}

.ai-hub-lightbox-content
{
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    transform: scale(0.92);
    transition: transform 0.25s ease;
}

.ai-hub-lightbox.active .ai-hub-lightbox-content
{
    transform: scale(1);
}

.ai-hub-lightbox-caption
{
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    margin: 0 0 0.75rem;
    padding: 0 1rem;
    max-width: 70ch;
    line-height: 1.5;
}

.ai-hub-lightbox-content img
{
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 0.5rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}

.ai-hub-lightbox-close
{
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.ai-hub-lightbox-close:hover
{
    opacity: 1;
}
