/* Intentionally scoped; no global Elementor or theme styles are changed. */
.kf-marquee {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    --kf-duration: 30s;
}
.kf-marquee__viewport { overflow: hidden; width: 100%; min-width: 0; }
/* Edge fading is applied to the stationary viewport rather than the animated
 * track, so the content scrolls through one continuous, stable opacity mask. */
.kf-marquee--fade-edges { --kf-edge-fade: 120px; --kf-edge-alpha: 0; }
.kf-marquee--fade-edges > .kf-marquee__viewport {
    /* Keep at least 16% of either viewport axis fully visible on small screens. */
    --kf-fade-length: min(var(--kf-edge-fade), 42%);
    --kf-edge-color: rgba(0, 0, 0, var(--kf-edge-alpha));
    --kf-fade-stops: var(--kf-edge-color) 0%,
        #000 var(--kf-fade-length),
        #000 calc(100% - var(--kf-fade-length)),
        var(--kf-edge-color) 100%;
    -webkit-mask-image: linear-gradient(var(--kf-fade-direction, to right), var(--kf-fade-stops));
    mask-image: linear-gradient(var(--kf-fade-direction, to right), var(--kf-fade-stops));
}
.kf-marquee--vertical.kf-marquee--fade-edges > .kf-marquee__viewport {
    --kf-fade-direction: to bottom;
}
.kf-marquee--fade-edges.kf-marquee--fade-soft > .kf-marquee__viewport {
    /* 8 subdivisions sample a symmetric smootherstep curve (6t^5-15t^4+10t^3).
     * The gentle start and finish prevent an obvious boundary even on large logos.
     * Honor Fade strength by interpolating from the chosen edge alpha to solid. */
    --kf-soft-12: calc(var(--kf-fade-length) * 0.125);
    --kf-soft-25: calc(var(--kf-fade-length) * 0.25);
    --kf-soft-37: calc(var(--kf-fade-length) * 0.375);
    --kf-soft-50: calc(var(--kf-fade-length) * 0.5);
    --kf-soft-62: calc(var(--kf-fade-length) * 0.625);
    --kf-soft-75: calc(var(--kf-fade-length) * 0.75);
    --kf-soft-87: calc(var(--kf-fade-length) * 0.875);
    --kf-fade-opacity-range: calc(1 - var(--kf-edge-alpha));
    --kf-soft-color-1: rgba(0, 0, 0, calc(var(--kf-edge-alpha) + var(--kf-fade-opacity-range) * 0.016052));
    --kf-soft-color-2: rgba(0, 0, 0, calc(var(--kf-edge-alpha) + var(--kf-fade-opacity-range) * 0.103516));
    --kf-soft-color-3: rgba(0, 0, 0, calc(var(--kf-edge-alpha) + var(--kf-fade-opacity-range) * 0.275208));
    --kf-soft-color-4: rgba(0, 0, 0, calc(var(--kf-edge-alpha) + var(--kf-fade-opacity-range) * 0.5));
    --kf-soft-color-5: rgba(0, 0, 0, calc(var(--kf-edge-alpha) + var(--kf-fade-opacity-range) * 0.724792));
    --kf-soft-color-6: rgba(0, 0, 0, calc(var(--kf-edge-alpha) + var(--kf-fade-opacity-range) * 0.896484));
    --kf-soft-color-7: rgba(0, 0, 0, calc(var(--kf-edge-alpha) + var(--kf-fade-opacity-range) * 0.983948));
    --kf-fade-stops: var(--kf-edge-color) 0%,
        var(--kf-soft-color-1) var(--kf-soft-12),
        var(--kf-soft-color-2) var(--kf-soft-25),
        var(--kf-soft-color-3) var(--kf-soft-37),
        var(--kf-soft-color-4) var(--kf-soft-50),
        var(--kf-soft-color-5) var(--kf-soft-62),
        var(--kf-soft-color-6) var(--kf-soft-75),
        var(--kf-soft-color-7) var(--kf-soft-87),
        #000 var(--kf-fade-length),
        #000 calc(100% - var(--kf-fade-length)),
        var(--kf-soft-color-7) calc(100% - var(--kf-soft-87)),
        var(--kf-soft-color-6) calc(100% - var(--kf-soft-75)),
        var(--kf-soft-color-5) calc(100% - var(--kf-soft-62)),
        var(--kf-soft-color-4) calc(100% - var(--kf-soft-50)),
        var(--kf-soft-color-3) calc(100% - var(--kf-soft-37)),
        var(--kf-soft-color-2) calc(100% - var(--kf-soft-25)),
        var(--kf-soft-color-1) calc(100% - var(--kf-soft-12)),
        var(--kf-edge-color) 100%;
}
.kf-marquee__track {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 0;
    width: max-content;
    max-width: none;
    direction: ltr;
    will-change: transform;
}
.kf-marquee__group {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0;
    width: max-content;
    max-width: none;
}
.kf-marquee[data-kf-ready="1"] .kf-marquee__track {
    animation: kf-marquee-scroll var(--kf-duration) linear infinite;
}
.kf-marquee[data-kf-direction="right"] .kf-marquee__track { animation-direction: reverse; }
.kf-marquee--pause:hover .kf-marquee__track,
.kf-marquee--pause:focus-within .kf-marquee__track { animation-play-state: paused; }
@keyframes kf-marquee-scroll { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
.kf-marquee--text {
    --kf-divider-size: 24px;
    --kf-divider-gap: 24px;
    --kf-divider-color: currentColor;
}
.kf-marquee--text .kf-marquee__item {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    white-space: nowrap;
    line-height: normal;
}
.kf-marquee--text .kf-marquee__text,
.kf-marquee--text .kf-marquee__text a {
    white-space: nowrap;
    display: inline-block;
    line-height: inherit;
    text-decoration: inherit;
    color: inherit;
}
.kf-marquee--text .kf-marquee__text { unicode-bidi: plaintext; }
.kf-marquee--text .kf-marquee__divider {
    flex: 0 0 auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: var(--kf-divider-size);
    color: var(--kf-divider-color);
    margin-inline: var(--kf-divider-gap); /* Symmetrical spacing on both sides. */
    line-height: 1;
    pointer-events: none;
}
.kf-marquee--text .kf-marquee__divider svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}
.kf-marquee--text .kf-marquee__divider i { font-size: 1em; line-height: 1; }
/* Image spacing belongs to the flex group, not to figure margins: themes and
 * Elementor commonly reset figure margins. The group's trailing padding provides
 * exactly one gap between the final image and the first image in the next loop. */
.kf-marquee--image { --kf-image-height: 90px; --kf-image-gap: 48px; }
.kf-marquee--image .kf-marquee__group {
    column-gap: var(--kf-image-gap);
    padding-inline-end: var(--kf-image-gap);
    box-sizing: border-box;
}
.kf-marquee--image .kf-marquee__figure {
    display: block;
    flex: 0 0 auto;
    margin: 0 !important;
    padding: 0;
    line-height: 0;
    border: 0;
    width: max-content;
    max-width: none;
}
.kf-marquee--image .kf-marquee__image {
    display: block;
    height: var(--kf-image-height) !important;
    width: auto !important;
    min-width: 0;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    aspect-ratio: auto;
    border-radius: 0;
}
/* Keep static content accessible if motion should be reduced or scripting is unavailable. */
@media (prefers-reduced-motion: reduce) {
    .kf-marquee[data-kf-ready="1"] .kf-marquee__track { animation: none !important; }
}

/* Vertical mode uses the same duplicated-cycle technique as horizontal mode.
 * The container height is independent of the content; every item stays upright. */
.kf-marquee--vertical {
    --kf-vertical-height: 360px;
    height: var(--kf-vertical-height);
    min-height: 0;
}
.kf-marquee--vertical .kf-marquee__viewport {
    height: 100%;
    width: 100%;
}
.kf-marquee--vertical .kf-marquee__track {
    flex-flow: column nowrap;
    align-items: stretch;
    width: 100%;
    height: max-content;
}
.kf-marquee--vertical .kf-marquee__group {
    flex-flow: column nowrap;
    align-items: center;
    width: 100%;
    height: max-content;
}
.kf-marquee--vertical[data-kf-ready="1"] .kf-marquee__track {
    animation-name: kf-marquee-scroll-vertical;
}
.kf-marquee--vertical[data-kf-direction="down"] .kf-marquee__track {
    animation-direction: reverse;
}
@keyframes kf-marquee-scroll-vertical {
    from { transform: translate3d(0,0,0); }
    to { transform: translate3d(0,-50%,0); }
}
.kf-marquee--vertical.kf-marquee--text .kf-marquee__item {
    flex-flow: column nowrap;
    align-items: center;
    width: 100%;
    text-align: center;
}
.kf-marquee--vertical.kf-marquee--text .kf-marquee__divider {
    margin-inline: 0;
    margin-block: var(--kf-divider-gap); /* Exactly equal space above and below. */
}
.kf-marquee--vertical.kf-marquee--image .kf-marquee__group {
    column-gap: 0;
    row-gap: var(--kf-image-gap);
    padding-inline-end: 0;
    padding-block-end: var(--kf-image-gap);
}
.kf-marquee--vertical.kf-marquee--image .kf-marquee__figure {
    align-self: center;
}

/* Fill mode must stretch ALL THREE layers: Elementor widget, Elementor widget
 * container, and marquee. Percentage height alone used to resolve to the
 * widget's 360px intrinsic height when the surrounding column only had min-height.
 * :has() provides CSS-first support; JS applies the same scope class for editors
 * and browsers that do not support :has().
 */
.elementor-widget:has(> .elementor-widget-container > .kf-marquee--vertical.kf-marquee--grow),
.elementor-widget.kf-marquee-widget--grow {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    flex: 1 1 auto;
    min-height: 0;
}
.elementor-widget:has(> .elementor-widget-container > .kf-marquee--vertical.kf-marquee--grow) > .elementor-widget-container,
.elementor-widget.kf-marquee-widget--grow > .elementor-widget-container {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
}
.kf-marquee--vertical.kf-marquee--grow {
    /* Keep a 360px fallback for an unconstrained parent; flex grows into available
     * parent height. The repeated track is absolutely positioned below. */
    height: var(--kf-vertical-height);
    min-height: 0;
    flex: 1 1 auto;
    position: relative;
}
.kf-marquee--vertical.kf-marquee--grow > .kf-marquee__viewport {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* A full-width vertical image mode. Aspect ratios remain intrinsic; images
 * expand to the column width and have automatic, potentially varying heights. */
.kf-marquee--vertical.kf-marquee--image-full-width .kf-marquee__group {
    align-items: stretch;
}
.kf-marquee--vertical.kf-marquee--image-full-width .kf-marquee__figure {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}
.kf-marquee--vertical.kf-marquee--image-full-width .kf-marquee__image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}
