/*
 * ThoughtNIdea homepage
 * Client proof alignment
 *
 * Keeps the client relationship block aligned to the same content
 * container as the business-problem cards and avoids changing the
 * existing homepage visual system.
 */

/*
 * ThoughtNIdea
 * Client Logo Showcase
 */

.tn-business .tn-client-proof {
    width: 100%;
    box-sizing: border-box;

    margin: 56px 0 0;
    padding: 30px 0 0;

    border-top: 1px solid rgba(255, 255, 255, 0.10);

    text-align: center;
}

/* Heading */

.tn-business .tn-client-proof-label {
    display: block;

    margin: 0 0 24px;

    font-size: 10px;
    line-height: 1.4;

    letter-spacing: 0.18em;
    text-transform: uppercase;

    opacity: 0.58;

    white-space: normal;
}


/* Visible logo area */

.tn-client-logo-window {
    position: relative;

    width: 100%;
    max-width: 1100px;

    margin: 0 auto;

    overflow: hidden;

    /*
     * Fade the extreme left/right edges.
     * This makes the animation feel more premium.
     */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        #000 7%,
        #000 93%,
        transparent 100%
    );

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


/* Moving track */

.tn-client-logo-track {
    display: flex;

    width: max-content;

    align-items: center;

    animation: tnClientLogoScroll 32s linear infinite;

    will-change: transform;
}


/* Individual logo card */

.tn-client-logo-item {
    flex: 0 0 auto;

    width: 170px;
    height: 70px;

    margin: 0 14px;
    padding: 8px 18px;

    box-sizing: border-box;

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

    border: 1px solid rgba(255, 255, 255, 0.06);

    border-radius: 9px;

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

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


/* Logo */

.tn-client-logo {
    display: block;

    width: auto;
    height: auto;

    max-width: 135px;
    max-height: 48px;

    object-fit: contain;

    margin: 0 auto;

    /*
     * Slightly soften different source image backgrounds.
     */
    opacity: 0.82;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}


/* Hover */

.tn-client-logo-item:hover {
    border-color: rgba(255, 255, 255, 0.14);

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

    transform: translateY(-2px);
}

.tn-client-logo-item:hover .tn-client-logo {
    opacity: 1;

    transform: scale(1.04);
}


/* Seamless animation */

@keyframes tnClientLogoScroll {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(calc(-50% - 14px));
    }

}


/* Pause when user interacts */

.tn-client-logo-window:hover .tn-client-logo-track {
    animation-play-state: paused;
}


/* Accessibility */

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

    .tn-client-logo-track {
        animation: none;
    }

}


/* Mobile */

@media (max-width: 680px) {

    .tn-business .tn-client-proof {
        margin-top: 42px;
        padding-top: 24px;
    }

    .tn-business .tn-client-proof-label {
        margin-bottom: 18px;

        font-size: 9px;

        letter-spacing: 0.15em;
    }

    .tn-client-logo-window {
        max-width: 100%;
    }

    .tn-client-logo-item {
        width: 245px;
        height: 112px;

        margin: 0 9px;

        padding: 7px 14px;
    }

    .tn-client-logo {
        max-width: 115px;
        max-height: 40px;
    }

    .tn-client-logo-track {
        animation-duration: 26s;
    }

}