/* HPBC Statistics Widget Styles */

.hpbc-stats-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.hpbc-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin: 0;
    align-items: stretch;
}

.stat-item {
    background: #f8fafc;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
    color: #3b82f6;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
}

.stat-title {
    font-size: 16px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
    margin: 0;
}

/* Animation classes for counting effect */
.stat-number.counting {
    animation: pulse 0.1s ease-in-out;
}

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

/* Tablet Styles */
@media (max-width: 1024px) {
    .hpbc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .stat-number {
        font-size: 42px;
    }
    
    .stat-title {
        font-size: 15px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .hpbc-stats-container {
        padding: 15px 0;
    }
    
    .hpbc-stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stat-item {
        padding: 25px 15px;
        margin: 0 10px;
    }
    
    .stat-number {
        font-size: 36px;
        margin-bottom: 6px;
    }
    
    .stat-title {
        font-size: 14px;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .hpbc-stats-container {
        padding: 10px 0;
    }
    
    .hpbc-stats-grid {
        gap: 15px;
    }
    
    .stat-item {
        padding: 20px 10px;
        margin: 0 5px;
    }
    
    .stat-number {
        font-size: 32px;
    }
    
    .stat-title {
        font-size: 13px;
        letter-spacing: 0.3px;
    }
}

/* Loading state */
.stat-item.loading .stat-number {
    opacity: 0.6;
    animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Custom color variations */
.stat-item.blue .stat-number {
    color: #3b82f6;
}

.stat-item.green .stat-number {
    color: #10b981;
}

.stat-item.yellow .stat-number {
    color: #f59e0b;
}

.stat-item.red .stat-number {
    color: #ef4444;
}

.stat-item.purple .stat-number {
    color: #8b5cf6;
}

.stat-item.pink .stat-number {
    color: #ec4899;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .stat-item,
    .stat-number,
    .stat-item::before {
        transition: none;
        animation: none;
    }
    
    .stat-item:hover {
        transform: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .stat-item {
        border: 2px solid #000;
        background: #fff;
    }
    
    .stat-number {
        color: #000;
    }
    
    .stat-title {
        color: #333;
    }
}

/* Print styles */
@media print {
    .hpbc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-item {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    .stat-item:hover {
        transform: none;
        box-shadow: none;
    }
}