/* Copyright Mehdi Hachem from Weynspire - Follow me on LinkedIn: https://www.linkedin.com/in/mehdi-hachem-54a8672b0/ */

@import url('https://fonts.googleapis.com/css?family=Montserrat');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --marquee-width: 80vw;
    --marquee-height: 20vh;
    --marquee-elements-displayed: 5;
    --marquee-element-width: calc(var(--marquee-width) / var(--marquee-elements-displayed));
    --marquee-animation-duration: calc(var(--marquee-elements) * 2s);
}

.marquee {
    width: 90vw;
    height: var(--marquee-height);
    color: #eee;
    overflow: hidden;
    position: relative;
}

.marquee:before,
.marquee:after {
    position: absolute;
    top: 0;
    width: 10rem;
    height: 50%;
    content: "";
    z-index: 1;
}

.marquee:before {
    left: 0;
}

.marquee:after {
    right: 0;
}

.marquee-content {
    list-style: none;
    height: 100%;
    display: flex;
    animation: scrolling var(--marquee-animation-duration) linear infinite;
}

.marquee-content:hover {
animation-play-state: paused;
} 
@keyframes scrolling {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-1 * var(--marquee-element-width) * var(--marquee-elements)));
    }
}

.marquee-content li {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: var(--marquee-element-width);
    max-height: 70%;
    font-size: calc(var(--marquee-height)*3/4);
    white-space: nowrap;
}

.marquee-content li img {
    width: 100%;
    border: 2px solid #eee;
}

@media (max-width: 600px) {
    html {
        font-size: 12px;
    }

    :root {
        --marquee-width: 100vw;
        --marquee-height: 16vh;
        --marquee-elements-displayed: 3;
    }

    .marquee:before,
    .marquee:after {
        width: 5rem;
    }
}