/* ════════════════════════════════════════════════════════════
   GALERIJ - Auto-scroll slider
   ════════════════════════════════════════════════════════════ */
.gallery-section {
    padding: 15rem 0;
    background: var(--color-bg);
    overflow: hidden;
}

.gallery-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.gallery-wrapper::-webkit-scrollbar {
    display: none;
}

.gallery-wrapper:active {
    cursor: grabbing;
}

.gallery-track {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: galleryScroll 40s linear infinite;
}

.gallery-track:hover {
    animation-play-state: paused;
}

.gallery-item {
    flex-shrink: 0;
    width: 400px;
    height: 555px;
    scroll-snap-align: start;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    user-select: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: transparent;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    padding: 1rem;
    transition: opacity 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.7;
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 4rem;
    line-height: 1;
}

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes galleryScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-item {
        width: 300px;
        height: 355px;
    }
    
    .gallery-track {
        animation-duration: 30s;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        width: 250px;
        height: 355px;
    }
}
