/* ========================================
   قسم الإحصائيات - Stats Section
   الملف: public/web/css/stats.css
======================================== */

.site-stats {
    position: relative;
    padding: 100px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

.stats-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://mohammed-almalgami.com/public/web/img/pattern-3.jpg');
    opacity: 0.05;
}

/* رأس القسم */
.site-stats .section-header {
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.site-stats .section-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255,215,0,0.2), rgba(255,193,7,0.1));
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 14px;
    color: #ffd700;
    margin-bottom: 20px;
    border: 1px solid rgba(255,215,0,0.3);
}

.site-stats .section-subtitle i {
    font-size: 16px;
    animation: pulse 2s infinite;
}

.site-stats .section-title {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.3);
}

.site-stats .section-desc {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
}

/* بطاقات الإحصائيات */
.stats-row {
    position: relative;
    z-index: 2;
}

.stat-card {
    position: relative;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-15px);
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,215,0,0.4);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3),
                0 0 30px rgba(255,215,0,0.2);
}

/* أيقونة الإحصائية */
.stat-icon {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffab00 100%);
    color: #1a1a2e;
    font-size: 36px;
    box-shadow: 0 10px 30px rgba(255,215,0,0.4);
    transition: all 0.4s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 40px rgba(255,215,0,0.5);
}

.icon-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd700 0%, #ffab00 100%);
    opacity: 0.3;
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.1; }
}

/* أيقونة النبض للمتصلين */
.pulse-icon .live-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 16px;
    height: 16px;
    background: #00ff88;
    border-radius: 50%;
    border: 3px solid #1a1a2e;
    animation: liveDot 1s infinite;
}

@keyframes liveDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(0.9); }
}

/* محتوى الإحصائية */
.stat-content {
    position: relative;
    z-index: 2;
}

.stat-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-bottom: 10px;
}

.stat-number .counter {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #fff 0%, #ffd700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 32px;
    color: #ffd700;
    font-weight: 700;
}

.live-badge {
    font-size: 12px;
    background: linear-gradient(135deg, #00ff88 0%, #00d4aa 100%);
    color: #1a1a2e;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    animation: badgePulse 1.5s infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,255,136,0.5); }
    50% { box-shadow: 0 0 0 10px rgba(0,255,136,0); }
}

.stat-label {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
    margin: 0;
}

/* موجة أسفل البطاقة */
.stat-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    color: rgba(255,215,0,0.1);
}

.stat-card:hover .stat-wave {
    color: rgba(255,215,0,0.2);
}

/* شريط التحديث المباشر */
.live-update-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    padding: 15px 30px;
    margin-top: 30px;
    border: 1px solid rgba(255,255,255,0.1);
}

.update-indicator {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00ff88 0%, #00d4aa 100%);
    border-radius: 50%;
    color: #1a1a2e;
    font-size: 16px;
}

.pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #00ff88;
    animation: pulseRing 1.5s infinite;
}

@keyframes pulseRing {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

.update-text {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.last-update {
    color: #ffd700;
    font-size: 13px;
    font-weight: 500;
}

/* الأشكال العائمة */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #ffd700, #ff6b6b);
    top: -100px;
    right: -100px;
    animation: float1 15s infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    bottom: -50px;
    left: -50px;
    animation: float2 12s infinite;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #ff6b6b, #ffd700);
    top: 50%;
    left: 10%;
    animation: float3 10s infinite;
}

.shape-4 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #00d4ff, #00ff88);
    top: 20%;
    right: 15%;
    animation: float4 8s infinite;
}

@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-30px, 30px) rotate(180deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(30px, -30px) rotate(-180deg); }
}

@keyframes float3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, 20px) scale(1.2); }
}

@keyframes float4 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-20px, -20px) scale(0.8); }
}

/* التجاوب مع الشاشات */
@media (max-width: 991px) {
    .site-stats {
        padding: 70px 0;
    }
    
    .site-stats .section-title {
        font-size: 32px;
    }
    
    .stat-number .counter {
        font-size: 40px;
    }
}

@media (max-width: 767px) {
    .site-stats .section-title {
        font-size: 28px;
    }
    
    .stat-card {
        padding: 30px 20px;
    }
    
    .stat-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .stat-number .counter {
        font-size: 36px;
    }
    
    .live-update-bar {
        flex-direction: column;
        gap: 10px;
        padding: 20px;
    }
}