/* ====================================
   Clients Slider Section - شريط العملاء المتحرك
   Performance Optimized
   ==================================== */

.clients-slider-section {
    position: relative;
    padding: 60px 0;
    background: linear-gradient(135deg, #0a1628 0%, #0f1f3a 25%, #1a2744 50%, #0f1f3a 75%, #0a1628 100%);
    overflow: hidden;
    /* Performance optimization */
    contain: layout style paint;
    will-change: auto;
    /* Inset shadows - Recessed effect */
    box-shadow: 
        inset 0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 -8px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        inset 0 -1px 0 rgba(255, 255, 255, 0.03);
}

/* Animated Background Effects */
.clients-slider-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(139, 92, 246, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

/* Decorative Pattern */
.clients-slider-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(0, 212, 255, 0.03) 35px, rgba(0, 212, 255, 0.03) 36px);
    pointer-events: none;
    z-index: 1;
}

/* Container */
.clients-slider-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Header */
.clients-slider-header {
    text-align: center;
    margin-bottom: 50px;
}

.clients-slider-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 28px;
    border-radius: 9999px;
    background: rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 212, 255, 0.3);
    box-shadow: 
        0 8px 32px rgba(0, 212, 255, 0.2),
        0 4px 16px rgba(139, 92, 246, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.clients-slider-badge:hover {
    transform: scale(1.05);
    box-shadow: 
        0 12px 40px rgba(0, 212, 255, 0.3),
        0 6px 20px rgba(139, 92, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.clients-slider-badge-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #06b6d4, #8b5cf6);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

.clients-slider-badge-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.clients-slider-title {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 212, 255, 0.3);
}

.clients-slider-description {
    font-size: 16px;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto !important;
    line-height: 1.6;
    text-align: center !important;
    display: block;
}

/* Slider Wrapper - Hardware Accelerated */
.clients-slider-wrapper {
    position: relative;
    overflow: hidden;
    padding: 30px 0;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 2%,
        rgba(0, 0, 0, 0.7) 4%,
        black 8%,
        black 92%,
        rgba(0, 0, 0, 0.7) 96%,
        rgba(0, 0, 0, 0.3) 98%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 2%,
        rgba(0, 0, 0, 0.7) 4%,
        black 8%,
        black 92%,
        rgba(0, 0, 0, 0.7) 96%,
        rgba(0, 0, 0, 0.3) 98%,
        transparent 100%
    );
    /* Hardware acceleration for smooth performance */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

/* Slider Track - Smooth Animation */
.clients-slider-track {
    display: flex;
    gap: 60px;
    animation: scroll-clients-smooth 25s linear infinite;
    will-change: transform;
    /* Animation will be overridden dynamically by JavaScript */
}

/* Smooth Fade Effect for Cards */
.clients-slider-track .client-card {
    will-change: opacity, transform;
}

/* Pause animation on hover - Smooth */
.clients-slider-wrapper:hover .clients-slider-track {
    animation-play-state: paused;
}

/* Smooth Continuous Animation - No Jumps */
/* مع 8 نسخ من القائمة، نتحرك 12.5% فقط (نسخة واحدة) */
@keyframes scroll-clients-smooth {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(-12.5%, 0, 0);
    }
}

/* Client Card - Optimized for Performance */
.client-card {
    flex-shrink: 0;
    width: 180px;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: 
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;  /* Changed from hidden to visible */
    /* Hardware acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Hover Effect - Elegant & Subtle */
.client-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.1);
}

/* Subtle Background on Hover */
.client-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.03);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-card:hover::before {
    opacity: 1;
}

/* Client Logo Wrapper */
.client-logo-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    position: relative;
    z-index: 1;
}

/* Client Logo - Smooth Transitions */
.client-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: grayscale(100%) brightness(2) opacity(0.7);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.client-card:hover .client-logo {
    filter: grayscale(0%) brightness(1.1) opacity(1);
    transform: scale(1.1) translateZ(0);
}

/* Client Tooltip - Compact Version */
.client-tooltip {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 4px 12px;
    border-radius: 9999px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.client-tooltip-text {
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.client-card:hover .client-tooltip {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .clients-slider-section {
        padding: 50px 0;
    }
    
    .clients-slider-title {
        font-size: 32px;
    }
    
    .client-card {
        width: 160px;
        height: 100px;
        padding: 20px;
    }
    
    .clients-slider-track {
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .clients-slider-section {
        padding: 40px 0;
    }
    
    .clients-slider-header {
        margin-bottom: 30px;
    }
    
    .clients-slider-title {
        font-size: 28px;
    }
    
    .clients-slider-description {
        font-size: 15px;
    }
    
    .client-card {
        width: 140px;
        height: 90px;
        padding: 18px;
    }
    
    .clients-slider-track {
        gap: 40px;
        animation-duration: 30s;
    }
    
    .clients-slider-wrapper {
        padding: 25px 0;
    }
}

@media (max-width: 480px) {
    .clients-slider-section {
        padding: 35px 0;
    }
    
    .clients-slider-header {
        margin-bottom: 25px;
    }
    
    .clients-slider-badge-text {
        font-size: 16px;
    }
    
    .clients-slider-title {
        font-size: 24px;
    }
    
    .clients-slider-description {
        font-size: 14px;
    }
    
    .client-card {
        width: 120px;
        height: 80px;
        padding: 15px;
    }
    
    .clients-slider-track {
        gap: 30px;
        animation-duration: 25s;
    }
    
    .clients-slider-wrapper {
        padding: 20px 0;
    }
}

/* RTL Support - Smooth */
[dir="rtl"] .clients-slider-track {
    animation-name: scroll-clients-rtl-smooth;
}

@keyframes scroll-clients-rtl-smooth {
    from {
        transform: translate3d(0, 0, 0);
    }
    to {
        transform: translate3d(12.5%, 0, 0);
    }
}

/* Loading State */
.clients-slider-loading {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    font-size: 18px;
}

.clients-slider-loading::after {
    content: '...';
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

/* Error State */
.clients-slider-error {
    text-align: center;
    padding: 60px 20px;
    color: #ef4444;
    font-size: 16px;
}
