/* Performance Optimizations */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Smooth Counter Animations */
.count {
    display: inline-block;
    font-weight: bold;
    color: #2563eb;
    transition: all 0.3s ease;
    text-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.count.animated {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Lazy Loading Placeholder */
.lazy {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Performance Critical Animations */
.securtiy-col-inner {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.securtiy-col-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Enhanced Counter Section */
.onlinesecurity-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.onlinesecurity-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

/* Smooth Scroll Performance */
html {
    scroll-behavior: smooth;
}

body {
    font-display: swap;
}

/* Optimized Images */
img {
    content-visibility: auto;
    contain-intrinsic-size: 800px 600px;
}

/* Enhanced Button Interactions */
.banner-btn, .primary-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.banner-btn::before, .primary-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.banner-btn:hover::before, .primary-button:hover::before {
    left: 100%;
}

/* Performance Optimized Transitions */
* {
    will-change: auto;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .count {
        font-size: 2rem;
    }
    
    .securtiy-col-inner {
        transform: none;
        transition: opacity 0.3s ease;
    }
}

/* Preload Critical Fonts */
@font-face {
    font-family: 'Inter';
    font-display: swap;
    src: local('Inter');
}

/* Enhanced Counter Glow Effect */
.count.animated {
    animation: counterglow 2s ease-in-out;
}

@keyframes counterglow {
    0% { 
        transform: scale(1);
        text-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 0 0 30px rgba(37, 99, 235, 0.6);
    }
    100% { 
        transform: scale(1);
        text-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
    }
}