/* =============================================================================
 * Blue Horse Pictures — Clients logo marquee (two rows, full colour)
 * =============================================================================
 * Loaded after style.css so these rules win on cascade order. Replaces the
 * owl-carousel "partner-slider" for the "Our Trusted Clients" section with a
 * pure-CSS two-row marquee. No greyscale — logos render in full colour.
 *
 * Markup expected (built in index.php):
 *   .bhp-marquee
 *     .bhp-marquee-row.row-ltr        (scrolls right-to-left)
 *       .bhp-marquee-track
 *         .bhp-logo (xN)  ← original set
 *         .bhp-logo (xN)  ← duplicate set (for seamless loop)
 *     .bhp-marquee-row.row-rtl        (scrolls left-to-right)
 *       .bhp-marquee-track ...
 * ============================================================================= */

.bhp-marquee {
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.bhp-marquee-row {
    width: 100%;
    overflow: hidden;
    position: relative;
    /* Fade the left/right edges so logos slide in/out softly */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.bhp-marquee-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    will-change: transform;
}

/* Row 1 scrolls right → left. Row 2 scrolls left → right. */
.row-ltr .bhp-marquee-track {
    animation: bhp-scroll-left 60s linear infinite;
}
.row-rtl .bhp-marquee-track {
    animation: bhp-scroll-right 60s linear infinite;
}

/* Pause both rows when hovering anywhere in the marquee */
.bhp-marquee:hover .bhp-marquee-track {
    animation-play-state: paused;
}

/* Each logo tile */
.bhp-logo {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 100px;
    margin: 0 12px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid #ededed;
    border-radius: 10px;
    box-sizing: border-box;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.bhp-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    /* FULL COLOUR — no greyscale filter */
    filter: none;
}

.bhp-logo:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 50, 0.12);
}

/* The two keyframe sets. Each track holds the logo set TWICE, so translating
   by exactly -50% lands on an identical frame → seamless loop. */
@keyframes bhp-scroll-left {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@keyframes bhp-scroll-right {
    from { transform: translateX(-50%); }
    to   { transform: translateX(0); }
}

/* Responsive: smaller tiles + faster loop on mobile */
@media (max-width: 767px) {
    .bhp-marquee { gap: 16px; }
    .bhp-logo {
        width: 130px;
        height: 74px;
        margin: 0 8px;
        padding: 10px 12px;
        border-radius: 8px;
    }
    .row-ltr .bhp-marquee-track { animation-duration: 40s; }
    .row-rtl .bhp-marquee-track { animation-duration: 40s; }
}

/* Respect reduced-motion — stop the scroll, show a static, wrapped grid */
@media (prefers-reduced-motion: reduce) {
    .row-ltr .bhp-marquee-track,
    .row-rtl .bhp-marquee-track {
        animation: none;
    }
    .bhp-marquee-row {
        -webkit-mask-image: none;
                mask-image: none;
        overflow-x: auto;
    }
}
