/* Stats Bar Animation Styles */

.stat-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-icon {
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stat-icon.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    }
}

.stat-icon.glow {
    animation: glow 2s ease-in-out infinite;
}

/* Number Counter Animation */
.stat-number {
    display: inline-block;
    transition: all 0.3s ease;
}

.stat-item:hover .stat-number {
    color: #3b82f6;
    transform: scale(1.1);
}

/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-item[data-aos="fade-up"] {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.stat-item[data-aos="fade-up"][data-aos-delay="0"] {
    animation-delay: 0s;
}

.stat-item[data-aos="fade-up"][data-aos-delay="100"] {
    animation-delay: 0.1s;
}

.stat-item[data-aos="fade-up"][data-aos-delay="200"] {
    animation-delay: 0.2s;
}

.stat-item[data-aos="fade-up"][data-aos-delay="300"] {
    animation-delay: 0.3s;
}

/* Shimmer Effect on Icon */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.stat-item:hover .stat-icon::before {
    left: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stat-item:hover {
        transform: translateY(-3px);
    }
    
    .stat-item:hover .stat-icon {
        transform: scale(1.05) rotate(3deg);
    }
}

/* Loading state */
.stat-number.loading {
    opacity: 0.5;
    animation: pulse 1s ease-in-out infinite;
}

/* Success state after counter finishes */
.stat-number.counted {
    animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}
