/* =============================================================
   HOME PARTNERS & CLIENTS LOGO LOOP
   Matches reference: Deep dark blue background, seamless horizontal
   scrolling marquee, hover color restore, and pause-on-hover.
   Package: Clena Child Theme
   ============================================================= */

.home-logos {
    padding: 60px 0 80px 0;
    background: #ffffff; /* Clean white background */
    position: relative;
    overflow: hidden;
}

.logos-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 3;
}

/* ─────────────────────────────────────────────────────────────
   SECTION HEADER
   ───────────────────────────────────────────────────────────── */
.logos-heading {
    text-align: center;
    font-size: clamp(26px, 3.2vw, 38px);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 auto 100px;
    letter-spacing: -0.3px;
    color: var(--primary); /* Matches the heading color of the home categories section */
}
/* ─────────────────────────────────────────────────────────────
   TRACK & SLIDES
   ───────────────────────────────────────────────────────────── */
.logos-track {
    display: flex;
    width: max-content;
    animation: scrollLogos 35s linear infinite;
    will-change: transform;
}

/* Pause the animation on hover so users can interact */
.logos-track:hover {
    animation-play-state: paused;
}

.logos-slide {
    display: flex;
    align-items: center;
    gap: 50px; /* Restored previous consistent gap */
    padding-right: 50px;
}

/* ─────────────────────────────────────────────────────────────
   LOGO ITEMS
   ───────────────────────────────────────────────────────────── */
.logo-item {
    margin-top: 10px; /* Reduced top margin to fix vertical gap */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 260px; /* Rectangular width to allow wide logos to be larger */
    height: 100px; /* Proportional height */
    flex-shrink: 0;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.5s ease;
    filter: drop-shadow(0 5px 12px rgba(0, 0, 0, 0.05));
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0.9;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.5s ease;
}

/* Premium micro-animations on hover */
.logo-item:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.15));
}

.logo-item:hover img {
    opacity: 1;
}

/* ─────────────────────────────────────────────────────────────
   SCROLL KEYFRAMES
   ───────────────────────────────────────────────────────────── */
@keyframes scrollLogos {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        /* Move the track left by exactly half its width (one slide) */
        transform: translate3d(-50%, 0, 0);
    }
}

/* ─────────────────────────────────────────────────────────────
   RESPONSIVE DESIGN
   ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .home-logos {
        padding: 50px 0 60px 0;
    }

    .logos-heading {
        margin-bottom: 40px;
    }

    .logos-slide {
        gap: 80px;
        padding-right: 80px;
    }

    .logo-item {
        width: 190px;
        height: 85px;
    }

    .logos-marquee::before,
    .logos-marquee::after {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .home-logos {
        padding: 40px 0 50px 0;
    }

    .logos-heading {
        margin-bottom: 30px;
    }

    .logos-slide {
        gap: 50px;
        padding-right: 50px;
    }

    .logo-item {
        width: 140px;
        height: 65px;
    }

    .logos-marquee::before,
    .logos-marquee::after {
        width: 50px;
    }
}
