
/* =========================================================
   SR AGENCIES — CONTINUOUS BRAND MARQUEE
   Independent stylesheet
   Works across desktop, tablet and mobile.
========================================================= */


/* =========================================================
   MARQUEE WRAPPER
========================================================= */

.brands-marquee {
    --brand-card-width: 195px;
    --brand-card-height: 112px;
    --brand-card-gap: 16px;
    --brand-marquee-speed: 42s;

    position: relative;

    width: 100%;
    max-width: 100%;

    margin: 5px 0 34px;
    padding: 8px 0 14px;

    overflow: hidden;
    isolation: isolate;

    /* Soft fade at both edges */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 4%,
        #000 96%,
        transparent 100%
    );

    mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 4%,
        #000 96%,
        transparent 100%
    );
}


/* =========================================================
   MOVING TRACK
========================================================= */

.brands-marquee-track {

    display: flex;
    align-items: center;

    width: max-content;
    max-width: none;

    gap: 0;

    will-change: transform;

    animation: brandsMarqueeScroll
        var(--brand-marquee-speed)
        linear
        infinite;

}


/* =========================================================
   LOGO GROUPS
   Two identical groups create a seamless loop.
========================================================= */

.brands-marquee-group {

    display: flex;
    align-items: center;

    flex: 0 0 auto;

    gap: var(--brand-card-gap);

    padding-right: var(--brand-card-gap);

    list-style: none;

    margin: 0;
    padding-top: 0;
    padding-bottom: 0;

}


/* =========================================================
   INDIVIDUAL BRAND CARD
========================================================= */

.brands-marquee-item {

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 var(--brand-card-width);

    width: var(--brand-card-width);
    height: var(--brand-card-height);

    min-width: 0;

    padding: 18px 20px;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.96);

    border: 1px solid rgba(40, 91, 214, 0.09);

    border-radius: 14px;

    box-shadow:
        0 7px 22px rgba(8, 31, 70, 0.045);

    text-decoration: none;

    outline: none;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        box-shadow 0.3s ease;

}


/* =========================================================
   BRAND LOGO IMAGE
========================================================= */

.brands-marquee-item img {

    display: block;

    width: 100%;
    height: 100%;

    max-width: 100%;
    max-height: 65px;

    object-fit: contain;
    object-position: center;

    transform: translateZ(0);

    transition:
        transform 0.35s ease;

}


/* =========================================================
   OPTIONAL BRAND NAME
   Use only when a brand name is included in the HTML.
========================================================= */

.brands-marquee-item span {

    display: block;

    margin-top: 7px;

    color: #526985;

    font-size: 11px;
    font-weight: 650;

    text-align: center;

}


/* =========================================================
   HOVER INTERACTIONS
========================================================= */

.brands-marquee-item:hover {

    background: #f7faff;

    border-color: rgba(40, 91, 214, 0.19);

    transform: translateY(-4px);

    box-shadow:
        0 14px 30px rgba(8, 31, 70, 0.085);

}

.brands-marquee-item:hover img {

    transform: scale(1.045);

}


/* =========================================================
   KEYBOARD ACCESSIBILITY
========================================================= */

.brands-marquee-item:focus-visible {

    outline: 3px solid #285bd6;
    outline-offset: 3px;

}


/* =========================================================
   PAUSE ON HOVER / FOCUS
========================================================= */

.brands-marquee:hover .brands-marquee-track,
.brands-marquee:focus-within .brands-marquee-track {

    animation-play-state: paused;

}


/* =========================================================
   CONTINUOUS RIGHT-TO-LEFT ANIMATION
========================================================= */

@keyframes brandsMarqueeScroll {

    from {

        transform: translate3d(0, 0, 0);

    }

    to {

        transform: translate3d(-50%, 0, 0);

    }

}


/* =========================================================
   LARGE TABLET / SMALL DESKTOP — 1024px
========================================================= */

@media screen and (max-width: 1024px) {

    .brands-marquee {

        --brand-card-width: 180px;
        --brand-card-height: 104px;
        --brand-card-gap: 14px;
        --brand-marquee-speed: 39s;

    }

    .brands-marquee-item {

        padding: 16px 17px;

        border-radius: 13px;

    }

    .brands-marquee-item img {

        max-height: 59px;

    }

}


/* =========================================================
   MOBILE — 600px
========================================================= */

@media screen and (max-width: 600px) {

    .brands-marquee {

        --brand-card-width: 156px;
        --brand-card-height: 91px;
        --brand-card-gap: 11px;
        --brand-marquee-speed: 35s;

        margin: 2px 0 27px;

        padding: 7px 0 12px;

    }

    .brands-marquee-item {

        padding: 14px 13px;

        border-radius: 12px;

        box-shadow:
            0 5px 17px rgba(8, 31, 70, 0.045);

    }

    .brands-marquee-item img {

        max-height: 53px;

    }

    .brands-marquee-item span {

        margin-top: 5px;

        font-size: 9px;

    }

}


/* =========================================================
   SMALL MOBILE — 390px
========================================================= */

@media screen and (max-width: 390px) {

    .brands-marquee {

        --brand-card-width: 147px;
        --brand-card-height: 86px;
        --brand-card-gap: 10px;

    }

    .brands-marquee-item {

        padding: 12px;

        border-radius: 11px;

    }

    .brands-marquee-item img {

        max-height: 49px;

    }

}


/* =========================================================
   TOUCH DEVICES
========================================================= */

@media (hover: none) {

    .brands-marquee-item:hover {

        transform: none;

        box-shadow:
            0 7px 22px rgba(8, 31, 70, 0.045);

    }

    .brands-marquee-item:hover img {

        transform: none;

    }

}


/* =========================================================
   REDUCED MOTION ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .brands-marquee {

        overflow-x: auto;
        overflow-y: hidden;

        -webkit-mask-image: none;
        mask-image: none;

        scrollbar-width: none;

    }

    .brands-marquee::-webkit-scrollbar {

        display: none;

    }

    .brands-marquee-track {

        animation: none;

        transform: none;

        will-change: auto;

    }

    /* Only show the original set when animation is disabled */
    .brands-marquee-group[aria-hidden="true"] {

        display: none;

    }

    .brands-marquee-item,
    .brands-marquee-item img {

        transition: none;

    }

}
