/* ================================
   HIPAA STATS SECTION STYLES
   ================================ */

/* Statistics section container */
.stats-section {
    background: linear-gradient(135deg, #1e3d6f 0%, #2c5aa0 100%);
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    width: 100%;
}

/* Add subtle texture overlay */
.stats-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="20" cy="20" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="60" cy="45" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="35" cy="70" r="1" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

/* Stats grid layout */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 100%;
}

/* Individual stat item */
.stat-item {
    padding: 20px;
    transition: transform 0.3s ease, filter 0.3s ease;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.stat-item:hover {
    transform: translateY(-5px);
    filter: brightness(1.1);
}

/* Large statistic numbers */
.stat-number {
    font-size: 3.5em;
    font-weight: bold;
    color: #ffc107;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1;
    transition: all 0.3s ease;
    font-family: 'Arial', sans-serif;
    letter-spacing: -0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Stat number hover effect */
.stat-item:hover .stat-number {
    transform: scale(1.05);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
}

/* Descriptive labels */
.stat-label {
    font-size: 1.1em;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    line-height: 1.3;
    max-width: 250px;
    margin: 0 auto;
    transition: color 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.stat-item:hover .stat-label {
    color: rgba(255,255,255,1);
}

/* Animation classes for JavaScript countup */
.stat-number.counting {
    color: rgba(255, 193, 7, 0.7);
}

.stat-number.complete {
    color: #ffc107;
}

/* ================================
   RESPONSIVE DESIGN - ALIGNED WITH MAIN STYLES
   ================================ */

/* Large desktops - 1200px and down */
@media (max-width: 1200px) {
    .stats-section {
        padding: 55px 0;
    }
    
    .stats-grid {
        gap: 35px;
    }
    
    .stat-number {
        font-size: 3.3em;
    }
    
    .stat-label {
        font-size: 1.08em;
    }
}

/* Medium desktops and large tablets - 992px and down */
@media (max-width: 992px) {
    .stats-section {
        padding: 50px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .stat-number {
        font-size: 3.1em;
    }
    
    .stat-label {
        font-size: 1.05em;
        max-width: 200px;
    }
    
    .stat-item {
        padding: 18px;
    }
}

/* Tablets - 768px and down */
@media (max-width: 768px) {
    .stats-section {
        padding: 40px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        max-width: 500px;
    }

    .stat-number {
        font-size: 2.8em;
        margin-bottom: 8px;
    }

    .stat-label {
        font-size: 1em;
        max-width: 180px;
    }
    
    .stat-item {
        padding: 15px;
    }
}

/* Large phones - 480px and down */
@media (max-width: 480px) {
    .stats-section {
        padding: 35px 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 280px;
        margin: 0 auto;
    }

    .stat-number {
        font-size: 2.5em;
        margin-bottom: 6px;
    }

    .stat-label {
        font-size: 0.95em;
        max-width: none;
    }
    
    .stat-item {
        padding: 12px;
    }
    
    .stat-item:hover {
        transform: none; /* Disable hover effects on mobile */
        filter: none;
    }
    
    .stat-item:hover .stat-number {
        transform: none;
    }
}

/* Small phones - 320px and down */
@media (max-width: 320px) {
    .stats-section {
        padding: 30px 0;
    }
    
    .stats-grid {
        gap: 15px;
        max-width: 250px;
    }
    
    .stat-number {
        font-size: 2.2em;
    }
    
    .stat-label {
        font-size: 0.9em;
        line-height: 1.2;
    }
    
    .stat-item {
        padding: 10px;
    }
}

/* Landscape orientation for phones */
@media (max-width: 896px) and (orientation: landscape) {
    .stats-section {
        padding: 25px 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-number {
        font-size: 2.2em;
        margin-bottom: 4px;
    }
    
    .stat-label {
        font-size: 0.85em;
    }
    
    .stat-item {
        padding: 8px;
    }
}

/* ================================
   ACCESSIBILITY & PERFORMANCE
   ================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .stat-item,
    .stat-number,
    .stat-label {
        transition: none;
    }
    
    .stat-item:hover {
        transform: none;
        filter: none;
    }
    
    .stat-item:hover .stat-number {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .stats-section {
        background: #1a1a1a;
        border-top: 3px solid #ffffff;
        border-bottom: 3px solid #ffffff;
    }
    
    .stat-number {
        color: #ffff00;
        text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    }
    
    .stat-label {
        color: #ffffff;
    }
}

/* Print styles */
@media print {
    .stats-section {
        background: none !important;
        color: black !important;
        padding: 20px 0 !important;
        page-break-inside: avoid;
    }
    
    .stats-section::before {
        display: none !important;
    }
    
    .stats-grid {
        display: block !important;
    }
    
    .stat-item {
        display: inline-block !important;
        width: 48% !important;
        margin-bottom: 15px !important;
        padding: 10px !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid !important;
    }
    
    .stat-number {
        color: #2c5aa0 !important;
        font-size: 2em !important;
        text-shadow: none !important;
    }
    
    .stat-label {
        color: #333 !important;
        font-size: 0.9em !important;
    }
}