/* ==========================================================================
   Logo Carousel Widget — carousel.css
   BEM: .lcw-[block]__[element]--[modifier]
   ========================================================================== */

/* ── Reset / Base ─────────────────────────────────────────────────────────── */
.lcw-wrapper {
    --lcw-fade: #ffffff;
    --lcw-transition-duration: 0.35s;
    --lcw-transition-easing: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* ── Section Title ────────────────────────────────────────────────────────── */
.lcw-title {
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #94a3b8;
    text-align: center;
    margin: 0 0 40px;
    padding: 0;

    /* Decorative rule lines flanking the title */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
}

.lcw-title::before,
.lcw-title::after {
    content: '';
    flex: 0 1 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cbd5e1);
}

.lcw-title::after {
    background: linear-gradient(270deg, transparent, #cbd5e1);
}

/* ── Viewport (clip + fade-edges) ────────────────────────────────────────── */
.lcw-viewport {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.lcw-viewport--faded::before,
.lcw-viewport--faded::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(60px, 8vw, 140px);
    z-index: 2;
    pointer-events: none;
}

.lcw-viewport--faded::before {
    left: 0;
    background: linear-gradient(
        to right,
        var(--lcw-fade, #ffffff) 0%,
        transparent 100%
    );
}

.lcw-viewport--faded::after {
    right: 0;
    background: linear-gradient(
        to left,
        var(--lcw-fade, #ffffff) 0%,
        transparent 100%
    );
}

/* ── Scrolling Track ─────────────────────────────────────────────────────── */
.lcw-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 64px;                        /* overridden per-instance by Elementor */
    width: max-content;               /* stretch to natural content width     */
    will-change: transform;
    animation: lcw-scroll var(--lcw-speed, 30s) linear infinite;
    animation-direction: var(--lcw-direction, normal);
}

/* Pause the CSS animation via JS-toggled class or inline data attr */
.lcw-track--paused,
.lcw-wrapper[data-pause-on-hover="true"]:hover .lcw-track {
    animation-play-state: paused;
}

@keyframes lcw-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }   /* exactly half = seamless loop   */
}

/* ── Logo Item ───────────────────────────────────────────────────────────── */
.lcw-logo-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;           /* default — overridden by Elementor slider      */
    transition:
        opacity var(--lcw-transition-duration) var(--lcw-transition-easing),
        transform var(--lcw-transition-duration) var(--lcw-transition-easing);
}

.lcw-logo-item:hover {
    opacity: 1 !important;
    transform: scale(1.08);
    z-index: 1;
}

/* ── Logo Image ──────────────────────────────────────────────────────────── */
.lcw-logo-img {
    display: block;
    height: 52px;           /* default — overridden by Elementor slider      */
    width: auto;
    max-width: 160px;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    transition:
        filter var(--lcw-transition-duration) var(--lcw-transition-easing);
}

/* Grayscale default → color on hover */
.lcw-logo-img--grayscale {
    filter: grayscale(100%) opacity(0.7);
}

.lcw-logo-item:hover .lcw-logo-img--grayscale {
    filter: grayscale(0%) opacity(1);
}

/* ── Logo Link ───────────────────────────────────────────────────────────── */
.lcw-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    outline-offset: 4px;
    border-radius: 4px;
}

.lcw-logo-link:focus-visible {
    outline: 2px solid #6366f1;
}

/* ── Responsive Tweaks ───────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .lcw-track {
        gap: 48px;
    }
    .lcw-logo-img {
        height: 44px;
    }
}

@media (max-width: 768px) {
    .lcw-track {
        gap: 36px;
        animation-duration: calc(var(--lcw-speed, 30s) * 0.75); /* slightly faster on small screens */
    }
    .lcw-logo-img {
        height: 36px;
    }
    .lcw-viewport--faded::before,
    .lcw-viewport--faded::after {
        width: 48px;
    }
    .lcw-title {
        font-size: 0.7rem;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .lcw-track {
        gap: 28px;
    }
    .lcw-logo-img {
        height: 30px;
    }
}

/* ── Reduced Motion Support ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .lcw-track {
        animation: none !important;
    }
    .lcw-logo-item {
        opacity: 1 !important;
    }
    .lcw-logo-img--grayscale {
        filter: none !important;
    }
}

/* ── Elementor Editor — show both sets for preview ───────────────────────── */
.elementor-editor-active .lcw-track {
    animation-play-state: paused;
}
