/*
====================================
PageYaRona - Trusted By Carousel
====================================
Infinite scroll carousel for displaying client logos
*/

/* 1. CONTAINER STYLES
------------------------------------ */
.trusted-by-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    background: var(--page-bg);
    padding: 60px 0;
}

.trusted-by-header {
    text-align: center;
    margin-bottom: 3rem;
}

.trusted-by-header h2 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--heading-color);
}

.trusted-by-header p {
    font-size: 1.05rem;
    color: var(--text-color);
    opacity: 0.8;
    max-width: 500px;
    margin: 0 auto;
}

/* 2. SCROLL TRACK & CARDS
------------------------------------ */
.trusted-by-track {
    display: flex;
    gap: 30px;
    animation: scroll-logos 30s linear infinite;
    padding: 20px 0;
    will-change: transform;
}

.trusted-by-card {
    flex: 0 0 200px;
    height: 120px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.trusted-by-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--services-accent-1, #69cbc0);
}

/* 3. LOGO STYLING
------------------------------------ */
.logo-content {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
}

.logo-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.trusted-by-card:hover .logo-content img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Fallback for text-based logos */
.logo-content h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0;
    letter-spacing: 0.5px;
}

/* 4. ANIMATIONS
------------------------------------ */
@keyframes scroll-logos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-200px * 6 - 180px));
    }
}

/* Pause animation on hover for desktop */
@media (hover: hover) {
    .trusted-by-track:hover {
        animation-play-state: paused;
    }
}

/* 5. RESPONSIVE DESIGN
------------------------------------ */
@media (max-width: 1024px) {
    .trusted-by-card {
        flex: 0 0 160px;
        height: 100px;
    }

    .logo-content img {
        max-width: 90%;
        max-height: 90%;
    }

    @keyframes scroll-logos {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-160px * 6 - 180px));
        }
    }
}

@media (max-width: 768px) {
    .trusted-by-container {
        padding: 40px 0;
    }

    .trusted-by-header h2 {
        font-size: 1.8rem;
    }

    .trusted-by-header p {
        font-size: 1rem;
    }

    .trusted-by-track {
        gap: 20px;
    }

    .trusted-by-card {
        flex: 0 0 140px;
        height: 90px;
        padding: 12px;
    }

    .logo-content img {
        max-width: 85%;
        max-height: 85%;
    }

    @keyframes scroll-logos {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-140px * 6 - 120px));
        }
    }
}

@media (max-width: 576px) {
    .trusted-by-container {
        padding: 30px 0;
    }

    .trusted-by-header h2 {
        font-size: 1.5rem;
    }

    .trusted-by-header p {
        font-size: 0.95rem;
    }

    .trusted-by-track {
        gap: 15px;
        padding: 15px 0;
    }

    .trusted-by-card {
        flex: 0 0 120px;
        height: 80px;
        padding: 10px;
        border-radius: 10px;
    }

    .logo-content img {
        max-width: 80%;
        max-height: 80%;
    }

    .logo-content h4 {
        font-size: 0.85rem;
    }

    @keyframes scroll-logos {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-120px * 6 - 90px));
        }
    }
}

/* 6. DARK MODE COMPATIBILITY
------------------------------------ */
body.dark-mode .trusted-by-card {
    background: #2a5a64;
    border-color: #335a61;
}

body.dark-mode .trusted-by-card:hover {
    border-color: #69cbc0;
    background: #1f4a54;
}

body.dark-mode .logo-content img {
    filter: grayscale(100%) brightness(1.2);
}

body.dark-mode .trusted-by-card:hover .logo-content img {
    filter: grayscale(0%) brightness(1);
}

/* 7. ACCESSIBILITY
------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .trusted-by-track {
        animation: none;
        display: flex;
        overflow-x: auto;
        scroll-behavior: smooth;
    }

    .trusted-by-card {
        transition: none;
    }

    .trusted-by-card:hover {
        transform: none;
    }
}

/* 8. CONTAINER WITH BACKGROUND
------------------------------------ */
.trusted-by-container.subtle-bg {
    background: var(--subtle-bg);
}

.trusted-by-container.with-accent {
    background: linear-gradient(135deg, var(--page-bg) 0%, rgba(105, 203, 192, 0.05) 100%);
}

/* Optional: Add padding container for better spacing */
.trusted-by-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
