/*---*\
Logo Slider
Single row of brand logos that scrolls continuously, with an optional heading.

KEY FEATURES:
- Heading set: heading above the row below 1200px, to the left of the row at 1200px+; row fades on the left edge
- Heading empty: row spans the full viewport width and fades on both edges
- The row always bleeds past the right edge of the screen
- Logos sit in fixed 2:1 boxes (matches the 400x200 upload size) with object-fit contain
- Slanted bottom uses .section-slanted in global.css. Horizontal overflow is clipped without clipping the wedge that hangs below the section

IMPLEMENTATION NOTES:
- Depends on fx_slick; JS runs a linear, zero-delay autoplay for the continuous scroll
- With prefers-reduced-motion Slick is not initialized and the row scrolls horizontally instead
\*---*/

.logo-carousel {
    position: relative;
    container-type: inline-size;
    overflow-x: clip;
    overflow-y: visible;
}

.logo-carousel__inner {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.logo-carousel__headline {
    margin: 0;
    color: var(--color-heading);
    font-family: var(--font-heading);
    font-weight: var(--font-weight-heading);
    line-height: 1.2;
}

.logo-carousel__track {
    min-width: 0;
    margin-right: calc(50% - 50cqw);
    overflow: hidden;
}

.logo-carousel--has-heading .logo-carousel__track {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20%);
    mask-image: linear-gradient(to right, transparent 0, #000 20%);
}

.logo-carousel--no-heading .logo-carousel__track {
    margin-left: calc(50% - 50cqw);
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 40%, #000 60%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 40%, #000 60%, transparent 100%);
}

.logo-carousel__slider:not(.slick-initialized) {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.logo-carousel--no-heading .logo-carousel__slider:not(.slick-initialized) {
    justify-content: safe center;
}

.logo-carousel .slick-track {
    display: flex;
    align-items: center;
}

.logo-carousel__slide {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
}

.logo-carousel__logo {
    display: block;
    width: 84px;
    max-width: none;
    height: 42px;
    object-fit: contain;
}

@media (min-width: 768px) {
    .logo-carousel__slide {
        padding: 0 26px;
    }

    .logo-carousel__logo {
        width: 140px;
        height: 70px;
    }
}

@media (min-width: 1200px) {
    .logo-carousel--has-heading .logo-carousel__inner {
        flex-direction: row;
        align-items: center;
    }

    .logo-carousel--has-heading .logo-carousel__headline {
        flex: 0 0 251px;
    }

    .logo-carousel--has-heading .logo-carousel__track {
        flex: 1 1 auto;
    }

    .logo-carousel__slide {
        padding: 0 38px;
    }

    .logo-carousel__logo {
        width: 200px;
        height: 100px;
    }
}
