﻿/* ============================================
       DYNAMIC STATS - 4 Different Color Schemes
       Smaller & Fully Responsive
       ============================================ */
.counter-section {
    padding: 30px 0;
    background: linear-gradient(135deg, #f8f9fc 0%, #fef9f0 25%, #f5f7fa 50%, #fdf8f3 75%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.counter-section::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 112, 183, 0.05) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    animation: orbFloat1 8s ease-in-out infinite;
    pointer-events: none;
}

.counter-section::after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.05) 0%, transparent 70%);
    bottom: -80px;
    right: -80px;
    animation: orbFloat2 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes orbFloat1 {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(30px, -20px);
    }
}

@keyframes orbFloat2 {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-20px, 30px);
    }
}

.stat-col {
    padding: 10px;
}

/* Base Card */
.stat-card {
    border-radius: 20px;
    padding: 22px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

    .stat-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    }

/* ============================================ */
/* Card 1: Deep Blue to Cyan (OCEAN) */
/* ============================================ */
.stat-card-1 {
    background: linear-gradient(135deg, #003d6b 0%, #0070b7 30%, #0099cc 60%, #00b3d9 100%);
    background-size: 200% 200%;
    animation: gradientShift1 5s ease infinite;
}

@keyframes gradientShift1 {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ============================================ */
/* Card 2: Warm Orange to Red (SUNSET) */
/* ============================================ */
.stat-card-2 {
    background: linear-gradient(135deg, #f98c48 0%, #f7723e 30%, #e84855 60%, #d72a2e 100%);
    background-size: 200% 200%;
    animation: gradientShift2 5s ease infinite;
}

@keyframes gradientShift2 {
    0%, 100% {
        background-position: 100% 50%;
    }

    50% {
        background-position: 0% 50%;
    }
}

/* ============================================ */
/* Card 3: Gold to Amber (GOLDEN) */
/* ============================================ */
.stat-card-3 {
    background: linear-gradient(135deg, #c9952f 0%, #d4a843 30%, #e8b84b 60%, #f5c960 100%);
    background-size: 200% 200%;
    animation: gradientShift3 6s ease infinite;
}

@keyframes gradientShift3 {
    0%, 100% {
        background-position: 50% 0%;
    }

    50% {
        background-position: 50% 100%;
    }
}

/* ============================================ */
/* Card 4: Green to Teal (FOREST) */
/* ============================================ */
.stat-card-4 {
    background: linear-gradient(135deg, #0d6b4e 0%, #198f6b 30%, #27ae60 60%, #2ecc71 100%);
    background-size: 200% 200%;
    animation: gradientShift4 6s ease infinite;
}

@keyframes gradientShift4 {
    0%, 100% {
        background-position: 0% 100%;
    }

    50% {
        background-position: 100% 0%;
    }
}

/* Shine sweep */
.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient( 45deg, transparent 40%, rgba(255, 255, 255, 0.08) 45%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.08) 55%, transparent 60% );
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s ease;
    z-index: 2;
    pointer-events: none;
}

.stat-card:hover::before {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

/* Top glow line */
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0 0 3px 3px;
    transition: all 0.4s ease;
    z-index: 3;
}

.stat-card:hover::after {
    width: 90%;
    background: rgba(255, 255, 255, 0.9);
}

.stat-card-inner {
    position: relative;
    z-index: 1;
}

/* Sparkles */
.stat-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    animation: sparkle 3s ease-in-out infinite;
}

.sparkle-1 {
    top: 15%;
    left: 15%;
    animation-delay: 0s;
}

.sparkle-2 {
    top: 60%;
    right: 20%;
    animation-delay: 1s;
    width: 3px;
    height: 3px;
}

.sparkle-3 {
    bottom: 20%;
    left: 30%;
    animation-delay: 2s;
    width: 5px;
    height: 5px;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateY(-8px) scale(1.5);
    }
}

/* Icon */
.stat-icon-wrap {
    margin-bottom: 10px;
}

.stat-icon {
    font-size: 2rem;
    display: inline-block;
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.15));
}

.stat-card:hover .stat-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5));
}

/* Number */
.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 6px 0;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
}

.stat-value {
    display: inline-block;
    animation: countUpBounce 2s ease-out;
}

@keyframes countUpBounce {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.3);
    }

    50% {
        opacity: 1;
        transform: translateY(-5px) scale(1.05);
    }

    70% {
        transform: translateY(2px) scale(0.97);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

/* Label */
.stat-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
    transition: all 0.3s ease;
    position: relative;
    padding-top: 10px;
}

    .stat-label::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 20px;
        height: 2px;
        background: rgba(255, 255, 255, 0.4);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

.stat-card:hover .stat-label {
    color: #ffffff;
    letter-spacing: 2px;
}

    .stat-card:hover .stat-label::before {
        width: 50px;
        background: rgba(255, 255, 255, 0.8);
    }

/* ============================================ */
/* ARABIC RTL */
/* ============================================ */
html[lang="ar"] .stat-label {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    font-size: 0.78rem;
    letter-spacing: 1px;
}

html[lang="ar"] .stat-number {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
}

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 991px) {
    .stat-card {
        min-height: 150px;
        padding: 18px 14px;
        border-radius: 16px;
    }

    .stat-icon {
        font-size: 1.7rem;
    }

    .stat-number {
        font-size: 1.7rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 767px) {
    .counter-section {
        padding: 25px 0;
    }

    .stat-col {
        padding: 8px;
    }

    .stat-card {
        min-height: 130px;
        padding: 16px 12px;
        border-radius: 14px;
    }

    .stat-icon-wrap {
        margin-bottom: 8px;
    }

    .stat-icon {
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
        margin: 4px 0;
    }

    .stat-label {
        font-size: 0.68rem;
        letter-spacing: 1px;
    }

    html[lang="ar"] .stat-label {
        font-size: 0.7rem;
    }
}

@media (max-width: 575px) {
    .counter-section {
        padding: 20px 0;
    }

    .stat-col {
        padding: 6px;
    }

    .stat-card {
        min-height: 110px;
        padding: 14px 10px;
        border-radius: 12px;
    }

    .stat-icon {
        font-size: 1.3rem;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.65rem;
        letter-spacing: 0.8px;
    }
}

@media (max-width: 399px) {
    .stat-col {
        padding: 4px;
    }

    .stat-card {
        min-height: 95px;
        padding: 12px 8px;
        border-radius: 10px;
    }

    .stat-icon-wrap {
        margin-bottom: 5px;
    }

    .stat-icon {
        font-size: 1.1rem;
    }

    .stat-number {
        font-size: 1.1rem;
        margin: 2px 0;
    }

    .stat-label {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stat-value, .stat-card, .stat-sparkle,
    .counter-section::before, .counter-section::after {
        animation: none !important;
        transition: none !important;
    }

        .stat-card:hover {
            transform: none !important;
        }
}

@media print {
    .counter-section {
        background: #ffffff;
    }

    .stat-card {
        animation: none !important;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .stat-number {
        color: #1e293b;
    }

    .stat-label {
        color: #64748b;
    }
}

