/* ================================================================
   CLIENTS SECTION - PUIUX Landing Page
   Premium Design with Awwwards-level Quality
   ================================================================ */

/* ===============================================
   Section Container
   =============================================== */
.clients-section {
    position: relative;
    padding: 6rem 0;
    background: #000000;
    overflow: hidden;
}

/* Animated Background Pattern */
.clients-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(37, 211, 102, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(18, 140, 126, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.clients-section .container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===============================================
   Section Header
   =============================================== */
.clients-section__header {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out;
}

.clients-section__subtitle {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #25D366;
    margin-bottom: 1rem;
    padding: 0.5rem 1.5rem;
    background: rgba(37, 211, 102, 0.1);
    border-radius: 50px;
    border: 1px solid rgba(37, 211, 102, 0.2);
}

.clients-section__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.clients-section__description {
    font-size: 1.125rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin: 0 auto;
}

/* ===============================================
   Stats Section
   =============================================== */
.clients-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 5rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.stat-card {
    position: relative;
    text-align: center;
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #25D366, #128C7E);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: rgba(37, 211, 102, 0.3);
    background: rgba(37, 211, 102, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(18, 140, 126, 0.15));
    border-radius: 16px;
    border: 1px solid rgba(37, 211, 102, 0.2);
    transition: all 0.4s ease;
}

.stat-card:hover .stat-card__icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.25), rgba(18, 140, 126, 0.25));
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.stat-card__icon svg {
    width: 32px;
    height: 32px;
    stroke: #25D366;
}

.stat-card__number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #25D366, #128C7E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.4s ease;
}

.stat-card:hover .stat-card__number {
    transform: scale(1.05);
}

.stat-card__label {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.stat-card__description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
}

/* ===============================================
   Clients Logos Section
   =============================================== */
.clients-logos {
    position: relative;
    margin-bottom: 3rem;
}

.clients-logos__wrapper {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

/* Gradient Overlays for fade effect */
.clients-logos__wrapper::before,
.clients-logos__wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.clients-logos__wrapper::before {
    left: 0;
    background: linear-gradient(90deg, #000000 0%, transparent 100%);
}

.clients-logos__wrapper::after {
    right: 0;
    background: linear-gradient(270deg, #000000 0%, transparent 100%);
}

/* RTL Support for gradients */
[dir="rtl"] .clients-logos__wrapper::before {
    right: 0;
    left: auto;
    background: linear-gradient(270deg, #000000 0%, transparent 100%);
}

[dir="rtl"] .clients-logos__wrapper::after {
    left: 0;
    right: auto;
    background: linear-gradient(90deg, #000000 0%, transparent 100%);
}

.clients-logos__track {
    display: flex;
    gap: 3rem;
    animation: scroll 40s linear infinite;
    width: fit-content;
}

/* Pause animation on hover */
.clients-logos__wrapper:hover .clients-logos__track {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* RTL Animation */
[dir="rtl"] .clients-logos__track {
    animation: scrollRTL 40s linear infinite;
}

@keyframes scrollRTL {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(50%);
    }
}

.client-logo {
    flex: 0 0 auto;
    width: 180px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.client-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.1), transparent);
    transition: left 0.6s ease;
}

.client-logo:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 211, 102, 0.3);
    background: rgba(37, 211, 102, 0.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.client-logo:hover::before {
    left: 100%;
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) brightness(0) invert(1);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.client-logo:hover img {
    filter: grayscale(0%) brightness(1) invert(0);
    opacity: 1;
    transform: scale(1.05);
}

/* ===============================================
   Trust Badge Section
   =============================================== */
.clients-trust {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 3rem 2rem;
    background: rgba(37, 211, 102, 0.03);
    border: 1px solid rgba(37, 211, 102, 0.15);
    border-radius: 20px;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.trust-badge:hover {
    background: rgba(37, 211, 102, 0.05);
    border-color: rgba(37, 211, 102, 0.2);
    transform: translateX(-4px);
}

[dir="rtl"] .trust-badge:hover {
    transform: translateX(4px);
}

.trust-badge__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(18, 140, 126, 0.15));
    border-radius: 12px;
    transition: all 0.3s ease;
}

.trust-badge:hover .trust-badge__icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.25), rgba(18, 140, 126, 0.25));
}

.trust-badge__icon svg {
    width: 24px;
    height: 24px;
    stroke: #25D366;
}

.trust-badge__content {
    flex: 1;
}

.trust-badge__title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.trust-badge__description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

/* ===============================================
   Animations
   =============================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===============================================
   RESPONSIVE - TABLET (768px - 1023px)
   =============================================== */
@media screen and (min-width: 768px) {
    .clients-section {
        padding: 5rem 0;
    }

    .clients-section__title {
        font-size: 3rem;
    }

    .clients-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .stat-card__number {
        font-size: 3.5rem;
    }

    .client-logo {
        width: 200px;
        height: 110px;
    }

    .clients-trust {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* ===============================================
   RESPONSIVE - DESKTOP (1024px+)
   =============================================== */
@media screen and (min-width: 1024px) {
    .clients-section {
        padding: 6rem 0;
    }

    .clients-section__title {
        font-size: 3.5rem;
    }

    .clients-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
        margin-bottom: 6rem;
    }

    .stat-card {
        padding: 3rem 2rem;
    }

    .stat-card__number {
        font-size: 4rem;
    }

    .client-logo {
        width: 220px;
        height: 120px;
    }

    .clients-trust {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
        padding: 4rem 3rem;
    }
}

/* ===============================================
   Accessibility
   =============================================== */
@media (prefers-reduced-motion: reduce) {
    .clients-logos__track,
    .stat-card,
    .client-logo,
    .trust-badge,
    .clients-section__header,
    .clients-stats,
    .clients-trust {
        animation: none !important;
        transition: none !important;
    }

    .clients-logos__track {
        animation: none !important;
    }
}

/* Focus Styles for Keyboard Navigation */
.client-logo:focus,
.trust-badge:focus {
    outline: 2px solid #25D366;
    outline-offset: 4px;
}
