/* ── Customer Logo Carousel – Frontend Styles ──
   Matches the Blocksy theme: colors and corner radius read Blocksy's
   Customizer settings. The value after each comma is Blocksy's default,
   used only if the theme variable is missing. */

.clc-carousel-wrap {
    width: 100%;
    overflow: hidden;
    background: var(--clc-bg, transparent);
    padding: 12px 0;
    position: relative;
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

.clc-track {
    display: flex;
    align-items: center;
    gap: var(--clc-gap, 60px);
    width: max-content;
    will-change: transform;
}

.clc-carousel-wrap:hover .clc-track {
    /* pause handled by JS */
}

.clc-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    border-radius: 3px;
}

/* Keyboard focus on linked logos, in the theme's brand blue */
a.clc-item:focus-visible {
    outline: 2px solid var(--theme-palette-color-1, #2872fa);
    outline-offset: 4px;
}

.clc-item img {
    height: var(--clc-height, 80px);
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
    opacity: 0.75;
    transition: filter 0.35s ease, opacity 0.35s ease;
}

/* When any item in the track is hovered, dim all siblings to greyscale */
.clc-track:has(.clc-item:hover) .clc-item img {
    filter: grayscale(100%);
    opacity: 0.35;
}

/* …but the hovered item itself stays full colour and full opacity */
.clc-track:has(.clc-item:hover) .clc-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Greyscale mode (setting toggled in admin) — default state is greyscale */
.clc-greyscale .clc-item img {
    filter: grayscale(100%);
    opacity: 0.55;
}

/* On hover: hovered item goes full colour, rest go greyscale+dim */
.clc-greyscale .clc-track:has(.clc-item:hover) .clc-item img {
    filter: grayscale(100%);
    opacity: 0.35;
}

.clc-greyscale .clc-track:has(.clc-item:hover) .clc-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .clc-track {
        /* JS ticker checks this and sets speed to 0 */
    }
}

/* ── Logo border option: flat Blocksy-style tile ── */
.clc-logo-border .clc-item {
    background: var(--theme-palette-color-8, #ffffff);
    border: 1px solid var(--theme-border-color, var(--theme-palette-color-5, #e1e8ed));
    border-radius: 3px;
    padding: var(--clc-border-padding, 8px);
    box-sizing: border-box;
    box-shadow: none;
}
