/* ===================================
   STAT VISUAL ENHANCEMENTS
   Making static stats visually stunning
   =================================== */

/* Enhanced stat container with fluid responsive padding */
.epic-stat {
    position: relative;
    padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1rem, 3vw, 2rem);
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.08) 0%, 
        rgba(168, 85, 247, 0.08) 50%, 
        rgba(59, 130, 246, 0.08) 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: clamp(12px, 3vw, 20px);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: visible; /* Changed from hidden to visible to prevent text cutoff */
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    
    /* Ensure consistent sizing with extra room for text */
    min-height: clamp(140px, 22vw, 200px); /* Increased min-height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%; /* Ensure full width */
}

/* Enhanced hover effect for the entire stat card */
.epic-stat:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 25px 50px rgba(59, 130, 246, 0.25),
        0 0 80px rgba(168, 85, 247, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

/* Beautiful animated background for stat cards */
.epic-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 0%,
        rgba(59, 130, 246, 0.03) 25%,
        rgba(168, 85, 247, 0.03) 50%,
        rgba(59, 130, 246, 0.03) 75%,
        transparent 100%
    );
    animation: shimmer 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; transform: translateX(-100%); }
    50% { opacity: 1; transform: translateX(100%); }
}

/* Enhanced stat number styling with PERFECT fluid responsive sizing */
.stat-number {
    /* Perfect fluid typography that scales smoothly from mobile (1.2rem) to desktop (2.2rem) */
    font-size: clamp(1.2rem, 1rem + 2vw, 2.2rem) !important; /* Reduced desktop max from 2.5rem to 2.2rem for longer text */
    font-weight: 900 !important;
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif !important;
    letter-spacing: clamp(-0.02em, -0.01em + -0.02vw, -0.04em) !important;
    line-height: clamp(0.9, 0.95, 1) !important; /* Improved line-height for better display */
    margin-bottom: clamp(0.5rem, 2vw, 1.2rem) !important;
    display: block !important; /* Ensure proper display */
    width: 100% !important; /* Full width to prevent cutoff */
    text-align: center !important;
    overflow: visible !important; /* Ensure text isn't clipped */
    word-wrap: break-word !important; /* Handle long content */
    hyphens: none !important; /* Prevent hyphenation of numbers */
}
    display: block !important;
    text-align: center !important;
    word-break: keep-all !important;
    white-space: nowrap !important;
    
    /* Beautiful gradient text with more vibrant colors */
    background: linear-gradient(135deg, 
        #60a5fa 0%, 
        #a855f7 25%, 
        #3b82f6 50%, 
        #8b5cf6 75%,
        #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 400% 400%;
    
    /* Enhanced glowing effect */
    filter: drop-shadow(0 0 25px rgba(59, 130, 246, 0.6)) 
            drop-shadow(0 0 50px rgba(168, 85, 247, 0.4))
            drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    
    /* Multiple layered animations */
    animation: 
        gradientFlow 8s ease-in-out infinite,
        gentlePulse 4s ease-in-out infinite,
        subtleGlow 6s ease-in-out infinite;
    
    /* Disable any counting animations while keeping visual effects */
    transition: none !important;
    will-change: filter, background-position, transform;
    
    /* Add text outline for better visibility */
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.1);
}

/* Gradient flow animation */
@keyframes gradientFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Gentle pulse effect */
@keyframes gentlePulse {
    0%, 100% { 
        transform: scale(1); 
        filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5)) 
                drop-shadow(0 0 40px rgba(168, 85, 247, 0.3));
    }
    50% { 
        transform: scale(1.05); 
        filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.7)) 
                drop-shadow(0 0 60px rgba(168, 85, 247, 0.5));
    }
}

/* Subtle glow animation */
@keyframes subtleGlow {
    0%, 100% { 
        text-shadow: 0 0 20px rgba(59, 130, 246, 0.6),
                     0 0 40px rgba(168, 85, 247, 0.4);
    }
    50% { 
        text-shadow: 0 0 30px rgba(59, 130, 246, 0.8),
                     0 0 60px rgba(168, 85, 247, 0.6),
                     0 0 80px rgba(59, 130, 246, 0.3);
    }
}

/* Special sizing for percentage stats that tend to be longer */
.stat-number:contains('%'),
.stat-number[data-content*='%'] {
    font-size: clamp(1.1rem, 1rem + 1.8vw, 2rem) !important; /* Even smaller for % content */
}

/* Enhanced stat label styling with responsive sizing */
.stat-label {
    font-size: clamp(0.75rem, 0.5rem + 1vw, 1rem) !important; /* Reduced desktop max from 1.1rem to 1rem */
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    text-transform: uppercase !important;
    letter-spacing: clamp(0.05em, 0.1em + 0.05vw, 0.15em) !important;
    margin-top: clamp(0.25rem, 1vw, 0.75rem) !important;
    position: relative;
    text-align: center !important;
    line-height: 1.2 !important;
    
    /* Subtle glow for labels too */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Add a subtle line under each label */
.stat-label::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(59, 130, 246, 0.8) 50%, 
        transparent 100%);
    border-radius: 1px;
    animation: labelGlow 3s ease-in-out infinite;
}

@keyframes labelGlow {
    0%, 100% { opacity: 0.5; width: 40px; }
    50% { opacity: 1; width: 60px; }
}

/* Special effects for each stat type */
.epic-stat:nth-child(1) .stat-number {
    /* Accuracy - Green tint */
    background: linear-gradient(135deg, #10b981 0%, #60a5fa 50%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.5));
}

.epic-stat:nth-child(2) .stat-number {
    /* Turnaround - Orange tint */
    background: linear-gradient(135deg, #f59e0b 0%, #60a5fa 50%, #f97316 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(245, 158, 11, 0.5));
}

.epic-stat:nth-child(3) .stat-number {
    /* Experience - Purple tint */
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.5));
}

.epic-stat:nth-child(4) .stat-number {
    /* Staff - Blue tint */
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
}

/* Container enhancements for better layout with responsive gaps */
.epic-stats {
    gap: clamp(1rem, 4vw, 2.5rem);
    perspective: 1000px;
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(200px, 25vw, 280px), 1fr));
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
}

/* Add floating particles around stats */
.epic-stats::before,
.epic-stats::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.8) 0%, transparent 70%);
    animation: floatingParticles 8s linear infinite;
    pointer-events: none;
}

.epic-stats::before {
    top: 10%;
    left: 15%;
    animation-delay: 0s;
}

.epic-stats::after {
    top: 70%;
    right: 20%;
    animation-delay: 4s;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.8) 0%, transparent 70%);
}

@keyframes floatingParticles {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.7;
    }
    25% { 
        transform: translateY(-20px) rotate(90deg); 
        opacity: 1;
    }
    50% { 
        transform: translateY(-10px) rotate(180deg); 
        opacity: 0.8;
    }
    75% { 
        transform: translateY(-30px) rotate(270deg); 
        opacity: 1;
    }
}

/* Comprehensive responsive breakpoints for all devices */

/* ===================================
   MEDIA QUERIES DISABLED 
   Using only fluid clamp() for smooth scaling
   =================================== */

/* Extra large screens (1400px+) - DISABLED for fluid scaling
@media (min-width: 1400px) {
    .stat-number {
        font-size: 2rem !important;
        letter-spacing: -0.04em !important;
    }
    
    .stat-label {
        font-size: 0.9rem !important;
    }
    
    .epic-stat {
        padding: 3rem 2.5rem;
        min-height: 200px;
    }
}

Large screens (1200px to 1399px) - DISABLED for fluid scaling
@media (min-width: 1200px) and (max-width: 1399px) {
    .stat-number {
        font-size: 1.8rem !important;
    }
    
    .stat-label {
        font-size: 0.85rem !important;
    }
}

Medium screens (992px to 1199px) - DISABLED for fluid scaling
@media (min-width: 992px) and (max-width: 1199px) {
    .stat-number {
        font-size: 1.6rem !important;
    }
}
*/
    
    .stat-label {
        font-size: 1.1rem !important;
    }
    
    .epic-stats {
        gap: 2rem;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small tablets (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .stat-number {
        font-size: 3.2rem !important;
        line-height: 0.95 !important;
    }
    
    .stat-label {
        font-size: 1rem !important;
        letter-spacing: 0.08em !important;
    }
    
    .epic-stat {
        padding: 2rem 1.5rem;
        min-height: 150px;
    }
    
    .epic-stats {
        gap: 1.5rem;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile devices (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .stat-number {
        font-size: 2.8rem !important;
        line-height: 1 !important;
        margin-bottom: 0.8rem !important;
    }
    
    .stat-label {
        font-size: 0.9rem !important;
        letter-spacing: 0.05em !important;
    }
    
    .epic-stat {
        padding: 1.8rem 1.2rem;
        min-height: 130px;
        border-radius: 16px;
    }
    
    .epic-stats {
        gap: 1.2rem;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small mobile devices (up to 575px) */
@media (max-width: 575px) {
    .stat-number {
        font-size: 2.2rem !important;
        line-height: 1.1 !important;
        margin-bottom: 0.6rem !important;
        letter-spacing: -0.01em !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
        letter-spacing: 0.03em !important;
        line-height: 1.3 !important;
    }
    
    .epic-stat {
        padding: 1.5rem 1rem;
        min-height: 110px;
        border-radius: 12px;
    }
    
    .epic-stats {
        gap: 1rem;
        grid-template-columns: repeat(2, 1fr);
        padding: 0 1rem;
    }
    
    /* Reduce animation intensity on very small screens */
    .stat-number {
        animation-duration: 10s, 8s, 10s;
        filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4)) 
                drop-shadow(0 0 30px rgba(168, 85, 247, 0.3));
    }
}

/* Ultra small screens (up to 375px) */
@media (max-width: 375px) {
    .stat-number {
        font-size: 1.8rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .stat-label {
        font-size: 0.7rem !important;
    }
    
    .epic-stat {
        padding: 1.2rem 0.8rem;
        min-height: 100px;
    }
    
    .epic-stats {
        gap: 0.8rem;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .epic-stat {
        background: linear-gradient(135deg, 
            rgba(59, 130, 246, 0.08) 0%, 
            rgba(168, 85, 247, 0.08) 50%, 
            rgba(59, 130, 246, 0.08) 100%);
        border-color: rgba(255, 255, 255, 0.15);
    }
}

/* Accessibility: Reduce animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .stat-number,
    .epic-stat::before,
    .stat-label::after {
        animation: none !important;
    }
    
    .epic-stat:hover {
        transform: none;
    }
    
    /* Still keep the gradient and glow effects for visual appeal */
    .stat-number {
        background: linear-gradient(135deg, #60a5fa 0%, #a855f7 100%);
        -webkit-background-clip: text;
        background-clip: text;
        filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
    }
}

/* Performance optimizations with text overflow protection */
.epic-stat,
.stat-number,
.stat-label {
    contain: layout style paint;
    will-change: transform, filter;
}

/* Ensure text remains selectable and accessible with overflow protection */
.stat-number {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    
    /* Prevent text overflow */
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.stat-label {
    /* Prevent label text from breaking awkwardly */
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Landscape mobile orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .epic-stats {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.8rem;
    }
    
    .epic-stat {
        padding: 1rem 0.8rem;
        min-height: 80px;
    }
    
    .stat-number {
        font-size: clamp(1.5rem, 4vw, 2.2rem) !important;
        margin-bottom: 0.3rem !important;
    }
    
    .stat-label {
        font-size: clamp(0.6rem, 1.8vw, 0.8rem) !important;
    }
}

/* Container queries for modern browsers (progressive enhancement) */
@container (max-width: 600px) {
    .epic-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@container (max-width: 300px) {
    .epic-stats {
        grid-template-columns: 1fr;
    }
}