/* Custom styles for collaboration carousel */

.collaboration-carousel-section {
    padding: 3rem 0;
}

.collaboration-carousel-section .section-heading {
    text-align: center;
    margin-bottom: 2rem;
}

.collaboration-carousel-section .section-heading h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.collaboration-carousel-wrapper {
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
}

.collaboration-carousel-wrapper::before,
.collaboration-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.collaboration-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.collaboration-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

/* Dark mode support */
body.dark .collaboration-carousel-wrapper::before {
    background: linear-gradient(to right, rgba(31, 41, 55, 1), rgba(31, 41, 55, 0));
}

body.dark .collaboration-carousel-wrapper::after {
    background: linear-gradient(to left, rgba(31, 41, 55, 1), rgba(31, 41, 55, 0));
}

.collaboration-carousel {
    display: flex;
    gap: 4rem;
    animation: scroll-carousel 60s linear infinite;
    width: fit-content;
}

.collaboration-carousel:hover {
    animation-play-state: paused;
}

.collaboration-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 280px;
    height: 180px;
    padding: 1.5rem;
}

.collaboration-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
}

.collaboration-item a:hover {
    transform: scale(1.1);
    opacity: 1;
}

.collaboration-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.collaboration-item a:hover .collaboration-logo {
    filter: grayscale(0%);
}

@keyframes scroll-carousel {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-280px * 16 - 4rem * 16));
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .collaboration-carousel-section {
        padding: 2rem 0;
    }

    .collaboration-carousel-section .section-heading h2 {
        font-size: 1.5rem;
    }

    .collaboration-carousel {
        gap: 3rem;
    }

    .collaboration-item {
        min-width: 200px;
        height: 140px;
    }

    @keyframes scroll-carousel {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-140px * 7 - 2rem * 7));
        }
    }
}