.scroll-gallery-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    outline: none;
}

.scroll-gallery-wrapper {
    position: relative;
    width: 100%;
    height: 440px;
}

.scroll-gallery-track {
    display: flex;
    width: 200%;
    height: 100%;
    will-change: transform;
    touch-action: pan-y;
}

.scroll-gallery-slide {
    flex: 0 0 33.333%;
    height: 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

.scroll-gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    user-select: none;
}

.scroll-gallery-slide img:hover {
    transform: scale(1.02);
}

.scroll-gallery-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scroll-gallery-container:hover .scroll-gallery-nav,
.scroll-gallery-container:focus .scroll-gallery-nav {
    opacity: 1;
}

.scroll-gallery-container.scroll-active:hover .scroll-gallery-nav {
    opacity: 1;
}

.nav-prev,
.nav-next {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    pointer-events: all;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    outline: none;
}

.nav-prev {
    margin-left: 20px;
}

.nav-next {
    margin-right: 20px;
}

.nav-prev:hover,
.nav-next:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.nav-prev:active,
.nav-next:active {
    transform: scale(0.95);
}

.nav-prev:disabled,
.nav-next:disabled {
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.3);
}

.nav-prev:disabled:hover,
.nav-next:disabled:hover {
    transform: none;
    background: rgba(0, 0, 0, 0.3);
}

/* Extra small mobile - 2 slides visible */
@media (max-width: 480px) {
    .scroll-gallery-slide {
        flex: 0 0 50%;
    }
    
    .scroll-gallery-wrapper {
        height: 200px;
    }
    
    .nav-prev,
    .nav-next {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .nav-prev {
        margin-left: 10px;
    }
    
    .nav-next {
        margin-right: 10px;
    }
    
    .scroll-gallery-nav {
        opacity: 1;
    }
}

/* Mobile - 3 slides visible */
@media (min-width: 481px) and (max-width: 768px) {
    .scroll-gallery-slide {
        flex: 0 0 33.333%;
    }
    
    .scroll-gallery-wrapper {
        height: 250px;
    }
    
    .nav-prev,
    .nav-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .nav-prev {
        margin-left: 15px;
    }
    
    .nav-next {
        margin-right: 15px;
    }
    
    .scroll-gallery-nav {
        opacity: 1;
    }
}

/* Tablet - 4 slides visible */
@media (min-width: 769px) and (max-width: 1024px) {
    .scroll-gallery-slide {
        flex: 0 0 25%;
    }
    
    .scroll-gallery-wrapper {
        height: 280px;
    }
}

/* Small desktop - 5 slides visible */
@media (min-width: 1025px) and (max-width: 1366px) {
    .scroll-gallery-slide {
        flex: 0 0 20%;
    }
    
    .scroll-gallery-wrapper {
        height: 320px;
    }
}

/* Large desktop - 6 slides visible */
@media (min-width: 1367px) and (max-width: 1920px) {
    .scroll-gallery-slide {
        flex: 0 0 16.666%;
    }
    
    .scroll-gallery-wrapper {
        height: 440px;
    }
}

/* Extra large screens - 7 slides visible */
@media (min-width: 1921px) {
    .scroll-gallery-slide {
        flex: 0 0 14.2857%;
    }
    
    .scroll-gallery-wrapper {
        height: 400px;
    }
    
    .nav-prev,
    .nav-next {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .nav-prev {
        margin-left: 30px;
    }
    
    .nav-next {
        margin-right: 30px;
    }
}

/* Loading animation */
.scroll-gallery-container:not(.scroll-active) .scroll-gallery-track {
    transform: translateX(0);
}

/* Smooth transitions */
.scroll-gallery-slide {
    transition: opacity 0.3s ease;
}

.scroll-gallery-container.scroll-active .scroll-gallery-slide {
    opacity: 1;
}

/* Focus styles for accessibility */
.scroll-gallery-container:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.nav-prev:focus,
.nav-next:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}