.carousel-header {
    padding: 32px 12%;
    background: var(--black);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

/*
#MARK: Brand AutoScroll
*/

#logo-brand-autoscroll {
    width: 100%;
    height: min(100dvh, 780px);
    background: var(--black);
    display: flex;
    /* flex-direction: column; */
    position: relative;
    gap: 1rem;
    padding: 5% 12%;
    padding-top: 0;
}

#logo-brand-autoscroll .checkbox-container {
    position: absolute; 
    top: 1rem;
    left: 50%;
    translate: -50%;
}

#filter-carousel-toggle-text {
    font-size: 1.5rem;
    font-weight: 500;
    /* margin-left: 8px; */
    cursor: pointer;
    color: var(--text-white);
}

.carousel-box {
    width: 100%;
    display: flex;
    border: .5px solid rgba(255, 255, 255, 0.5);
    border-radius: 100px;
    /* padding: 3% 2%; */
}

.logo-brand-carousel {
    flex: 0 0 calc(100% / 4);
    /* background: #00000009; */
    height: 100%;
    display: flex;
    overflow-y: hidden;
    flex-direction: column;
    mask-image: linear-gradient(rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0) 12.5%, rgb(0, 0, 0) 87.5%, rgba(0, 0, 0, 0) 100%);
    /* outline: none; */
    scrollbar-width: none;
    /* touch-action: pan-x pan-y; */
    /* overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; */

    &::-webkit-scrollbar {
        display: none;
    }

    &:focus {
        /* outline: none; */
    }   

}

.logo-brand-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    animation: spin 10s infinite linear;
}

.logo-brand-group a {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    position: relative;
}

.logo-brand-group a .filter-box {
    transition: all .2s ease-out;
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(90deg, var(--light-color), var(--primary-color));
    /* background-size: 300% 300%;
    animation: logoGradient 5s linear infinite; */
    mix-blend-mode: overlay;
    pointer-events: none;
    mask-image: var(--image-mask);
    mask-repeat: no-repeat;
    mask-size: contain;
    mask-position: center;
    -webkit-mask-image: var(--image-mask);
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    -webkit-mask-position: center;
    background-position: 100% 50%;
}

.logo-brand-group a img {
    width: 100%;
    height: 100%;
    opacity: 0;
}


.logo-brand-carousel:nth-child(2) .logo-brand-group, 
.logo-brand-carousel:nth-child(4) .logo-brand-group {
    animation: spin2 10s infinite linear;
}

.logo-brand-carousel:has(img:hover) .logo-brand-group {
    animation-play-state: paused;
}

#logo-brand-autoscroll .checkbox-container:has(#filter-carousel-toggle:checked) ~ .carousel-box .logo-brand-carousel .logo-brand-group a .filter-box{
    background: none;
    mask-image: none;
    -webkit-mask-image: none;
}

#logo-brand-autoscroll .checkbox-container:has(#filter-carousel-toggle:checked) ~ .carousel-box .logo-brand-carousel .logo-brand-group a img {
    opacity: 1;
    filter: invert(1);
}

@keyframes spin {
    from {translate: 0 0;}
    to   {translate: 0 -100%;}
}

@keyframes spin2 {
    from {translate: 0 -100%;}
    to   {translate: 0 0;}
}

@keyframes spin-row {
    from {translate: 0 0;}
    to   {translate: -100% 0;}
}

@keyframes spin-row2 {
    from {translate: -100% 0;}
    to   {translate: 0 0;}
}

@media  screen and (max-width: 1399px) {}

@media screen and (max-width: 1199px) {
    #logo-brand-autoscroll {
        flex-direction: column;
        padding-left: 0;
        padding-right: 0;
        height: max-content;
    }

    .carousel-box {
        flex-direction: column;
        min-height: 200px;
        border: none;
    }

    .carousel-box {
        overflow-x: hidden;
        mask-image: linear-gradient(to right, rgba(0, 0, 0, 0) 0%, rgb(0, 0, 0) 12.5%, rgb(0, 0, 0) 87.5%, rgba(0, 0, 0, 0) 100%);
    }

    .logo-brand-carousel {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        width: calc(15rem * 10);
        /* flex: 0 0 100%; */
    }

    .logo-brand-group {
        flex-direction: row;
        /* width: max-content; */
    }

    .logo-brand-group a {
        flex: 0 0 15rem;
        height: 100%;
        /* width: auto; */
    }

    .logo-brand-carousel:nth-child(1) .logo-brand-group, 
    .logo-brand-carousel:nth-child(3) .logo-brand-group {
        animation: spin-row 15s infinite linear;
    }

    .logo-brand-carousel:nth-child(2) .logo-brand-group, 
    .logo-brand-carousel:nth-child(4) .logo-brand-group {
        animation: spin-row2 15s infinite linear;
    }
}

@media screen and (max-width: 991px) {}

@media screen and (max-width: 768px) {
    .logo-brand-carousel {width: calc(12rem * 10);}
    .logo-brand-group a {flex: 0 0 12rem;}
}

@media screen and (max-width: 575px) {
    .logo-brand-carousel {width: calc(10rem * 10);}
    .logo-brand-group a {flex: 0 0 10rem;}
}