/* Respawnerz GTA VI screenshot carousel
   Standalone component. No JavaScript, links, or image lightbox. */

.rz-gallery {
    --rz-gallery-card-width:  min(78vw, 340px);
    --rz-gallery-gap: 16px;
    --rz-gallery-radius: 12px;
    --rz-gallery-surface: #151821;
    --rz-gallery-border: rgba(255, 255, 255, 0.09);
    --rz-gallery-text: #f2f3f5;
    --rz-gallery-muted: #aeb4c0;

    width: 100%;
    margin: 30px 0;
    color: var(--rz-gallery-text);
}

.rz-gallery-heading {
    margin: 0 0 14px;
    color: var(--rz-gallery-text);
    font: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
}

.rz-gallery-track {
    display: grid;
    grid-auto-columns: var(--rz-gallery-card-width);
    grid-auto-flow: column;
    gap: var(--rz-gallery-gap);
    width: 100%;
    margin: 0;
    padding: 4px 2px 14px;
    overflow-x: auto;
    overflow-y: hidden;
    list-style: none;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scroll-padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.rz-gallery-track::-webkit-scrollbar {
    height: 6px;
}

.rz-gallery-track::-webkit-scrollbar-track {
    background: transparent;
}

.rz-gallery-track::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 999px;
}

.rz-gallery-item {
    min-width: 0;
    overflow: hidden;
    margin: 0;
    padding: 7px;
    background: var(--rz-gallery-surface);
    border: 1px solid var(--rz-gallery-border);
    border-radius: var(--rz-gallery-radius);
    scroll-snap-align: start;
}

.rz-gallery-item img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: calc(var(--rz-gallery-radius) - 5px);
    background: #0b0d12;
}

.rz-gallery-item figcaption {
    padding: 11px 5px 5px;
    color: var(--rz-gallery-muted);
    font-size: 0.88rem;
    line-height: 1.4;
}

/* Slightly wider cards on larger screens, without changing the article layout. */
@media (min-width: 768px) {
    .rz-gallery {
        --rz-gallery-card-width: 320px;
        --rz-gallery-gap: 18px;
    }
}

@media (max-width: 480px) {
    .rz-gallery {
        --rz-gallery-card-width: 84vw;
        --rz-gallery-gap: 12px;
        margin: 24px 0;
    }

    .rz-gallery-heading {
        font-size: 1.05rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rz-gallery-track {
        scroll-behavior: auto;
    }
}
