.gallery-container {
    width: 100%;
    /* max-width: 1200px; */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.gallery-title {
    text-align: center;
    color: rgb(78, 0, 118);
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    font-weight: 300;
    letter-spacing: 2px;
}

.scroll-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.1);
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.2);
}

.scroll-container {
    display: flex;
    width: calc(300px * 24);
    /* 12 images * 2 for seamless loop */
    height: 100%;
    animation: scroll 30s linear infinite;
}

.photo-item {
    flex: 0 0 300px;
    height: 100%;
    position: relative;
    overflow: hidden;
    margin-right: 20px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.photo-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-item:hover img {
    transform: scale(1.1);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.photo-item:hover .photo-overlay {
    transform: translateY(0);
}

.photo-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.photo-description {
    font-size: 0.9rem;
    opacity: 0.9;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-300px * 12 - 20px * 12));
    }
}

/* Pause animation on hover */
.scroll-wrapper:hover .scroll-container {
    animation-play-state: paused;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .gallery-container {
        padding: 20px;
    }

    .scroll-wrapper {
        height: 250px;
    }

    .photo-item {
        flex: 0 0 250px;
    }

    .scroll-container {
        width: calc(250px * 24);
    }

    @keyframes scroll {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-250px * 12 - 20px * 12));
        }
    }
}

@media (max-width: 480px) {
    .gallery-title {
        font-size: 1.5rem;
    }

    .gallery-container {
        padding: 15px;
    }

    .scroll-wrapper {
        height: 200px;
    }

    .photo-item {
        flex: 0 0 200px;
    }

    .scroll-container {
        width: calc(200px * 24);
    }

    @keyframes scroll {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-200px * 12 - 20px * 12));
        }
    }

    .photo-overlay {
        padding: 15px;
    }

    .photo-title {
        font-size: 1rem;
    }

    .photo-description {
        font-size: 0.8rem;
    }
}

/* Speed controls */
.speed-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.speed-btn {
    background: linear-gradient(90deg, rgba(148, 73, 201, 0.92) 0%, rgba(115, 105, 255, 0.83) 54%, rgba(68, 0, 255, 0.88) 100%);
    color: rgb(255, 255, 255);
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.speed-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.speed-btn.active {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* Direction indicator */
.direction-indicator {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 2rem;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(-50%) translateX(0);
    }

    50% {
        transform: translateY(-50%) translateX(10px);
    }
}