/**
 * ==========================================================================
 * KHOSLA STONE KIDNEY & SURGICAL CENTRE — SLIM LOGO MARQUEE CAROUSEL
 * File: assets/css/logo-marquee.css
 * Description: Dedicated, lightweight, 60fps infinite marquee ticker for partner & insurance logos
 * ==========================================================================
 */

.ks-marquee-wrapper {
    width: 100%;
    padding: 35px 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.ks-marquee-wrapper.ks-marquee-dark {
    background: #081d28;
    border-color: rgba(255, 255, 255, 0.08);
}

.ks-marquee-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Subtle Gradient Edge Faders */
.ks-marquee-fader-left,
.ks-marquee-fader-right {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    pointer-events: none;
    z-index: 5;
}

.ks-marquee-fader-left {
    left: 0;
    background: linear-gradient(to right, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.ks-marquee-dark .ks-marquee-fader-left {
    background: linear-gradient(to right, #081d28 0%, rgba(8, 29, 40, 0) 100%);
}

.ks-marquee-fader-right {
    right: 0;
    background: linear-gradient(to left, #ffffff 0%, rgba(255, 255, 255, 0) 100%);
}

.ks-marquee-dark .ks-marquee-fader-right {
    background: linear-gradient(to left, #081d28 0%, rgba(8, 29, 40, 0) 100%);
}

/* Marquee Track */
.ks-marquee-viewport {
    display: flex;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    gap: 40px;
}

.ks-marquee-track {
    display: flex;
    align-items: center;
    gap: 45px;
    flex-shrink: 0;
    animation: ksMarqueeScroll 40s linear infinite;
    will-change: transform;
}

.ks-marquee-viewport:hover .ks-marquee-track {
    animation-play-state: paused;
}

/* Individual Logo Item (Slim, clean, no bulky content) */
.ks-marquee-item {
    flex: 0 0 auto;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    background: #ffffff;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, filter 0.25s ease;
}

.ks-marquee-dark .ks-marquee-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.ks-marquee-item:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.12);
    border-color: rgba(15, 118, 110, 0.35);
}

.ks-marquee-dark .ks-marquee-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(45, 212, 191, 0.4);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.ks-marquee-img {
    max-height: 38px;
    max-width: 130px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    filter: grayscale(20%);
    opacity: 0.9;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

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

/* Keyframe for continuous horizontal loop */
@keyframes ksMarqueeScroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-100% - 45px));
    }
}

@media (max-width: 768px) {
    .ks-marquee-wrapper {
        padding: 24px 0;
    }
    .ks-marquee-fader-left,
    .ks-marquee-fader-right {
        width: 50px;
    }
    .ks-marquee-item {
        height: 44px;
        padding: 4px 12px;
    }
    .ks-marquee-img {
        max-height: 30px;
        max-width: 105px;
    }
    .ks-marquee-track {
        gap: 30px;
        animation-duration: 30s;
    }
}
