/**
 * Horizontal Scrolling Carousel for Latest Uploads
 * Auto-scrolls from right to left with smooth animation
 */

.latest-uploads-carousel {
    position: relative;
    overflow: hidden;
    padding: 20px 0;
    margin: 0;
}

.carousel-track {
    display: flex;
    gap: 20px;
    animation: scrollContinuous 30s linear infinite;
    width: fit-content;
    padding: 0 40px;
    /* Left and right margin */
}

.carousel-track:hover {
    animation-play-state: paused;
}

/* Duplicate items for seamless loop */
.carousel-track.duplicated {
    animation: scrollRTL 60s linear infinite;
}

@keyframes scrollContinuous {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Carousel card styling */
.carousel-card {
    flex: 0 0 280px;
    min-width: 280px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.carousel-card-image {
    position: relative;
    padding-top: 140%;
    background: #f7fafc;
    overflow: hidden;
}

.carousel-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-card-content {
    padding: 15px;
}

.carousel-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.carousel-card-author {
    font-size: 0.85rem;
    color: #718096;
    margin: 0 0 12px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.carousel-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #a0aec0;
}

.carousel-card-meta i {
    margin-right: 4px;
}



/* Dark mode support */
body.dark-mode .carousel-card {
    background: #2d3748;
}

body.dark-mode .carousel-card-title {
    color: #f7fafc;
}

body.dark-mode .carousel-card-author {
    color: #cbd5e0;
}

body.dark-mode .carousel-card-meta {
    color: #718096;
}



/* Mobile responsive */
@media (max-width: 768px) {
    .carousel-card {
        flex: 0 0 200px;
        min-width: 200px;
    }

}