/* Stats Section - UFG IN NUMBERS - Clean Implementation */

.stats-section {
    position: relative;
    width: 100%;
    min-height: 500px;
    padding: 80px 64px;
    z-index: 0;
}

/* Dark Overlay for Better Text Contrast */
.stats-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: -1;
    pointer-events: none;
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.stats-header {
    text-align: center;
    margin-bottom: 48px;
}

/* Stats Title - Exact Match to Elementor */
.stats-title {
    font-family: "Poppins", sans-serif;
    font-size: 40px;
    font-weight: 700;
    text-transform: uppercase;
    font-style: normal;
    text-decoration: none;
    line-height: 1em;
    letter-spacing: 0.08em;
    color: white;
    margin: 0;
    text-align: center;
}

/* Stats Grid Layout */
.stats-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    flex-wrap: nowrap;
    width: 100%;
}

/* Individual Stat Card */
.stat-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    border-radius: 16px;
    padding: 32px;
    flex: 1;
    text-align: center;
    min-width: 200px;
    
    /* Fade animation setup */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Fade in when stat cards are in view */
.stat-card.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stat Icon */
.stat-icon {
    z-index: 0;
}

.stat-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

/* Stat Counter Container - Exact Match to Elementor */
.stat-counter {
    align-items: center;
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    text-align: center;
}

/* Stat Title - Exact Match to Elementor */
.stat-title {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
    margin: 0;
    padding: 0;
    color: #E8F1FA;
    font-family: "Poppins", sans-serif;
    text-align: center;
}

/* Stat Number Wrapper - Exact Match to Elementor */
.stat-number-wrapper {
    display: flex;
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: "Poppins", sans-serif;
}

/* Stat Number */
.stat-number {
    flex-grow: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

/* Stat Suffix */
.stat-suffix {
    flex-grow: var(--counter-suffix-grow, 1);
    text-align: start;
    white-space: pre-wrap;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

/* Animation Classes */
.stat-number.counting {
    animation: countingPulse 0.3s ease-in-out infinite;
    transition: all 0.3s ease;
}

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

/* Enhanced visual feedback during counting */
.stat-number {
    transition: all 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-section {
        padding: 60px 32px;
    }
    
    .stats-grid {
        gap: 20px;
    }
    
    .stat-card {
        padding: 24px;
    }
    
    .stats-title {
        font-size: 36px;
    }
    
    .stat-number-wrapper {
        font-size: 40px;
    }
    
    .stat-title {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .stats-section {
        padding: 60px 32px;
    }
    
    .stats-grid {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    .stat-card {
        min-width: 150px;
        flex: 1 1 calc(50% - 10px);
        max-width: 200px;
    }
    
    .stats-title {
        font-size: 32px;
    }
    
    .stat-number-wrapper {
        font-size: 32px;
    }
    
    .stat-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .stats-section {
        padding: 40px 16px;
    }
    
    .stats-container {
        padding: 0 15px;
    }
    
    .stats-header {
        margin-bottom: 30px;
    }
    
    .stats-title {
        font-size: 24px;
        letter-spacing: 0.04em;
    }
    
    .stats-grid {
        flex-direction: column;
        align-items: center;
        gap: 24px;
    }
    
    .stat-number-wrapper {
        font-size: 28px;
    }
    
    .stat-title {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .stat-card {
        width: 100%;
        max-width: 280px;
        flex: none;
    }
}

/* Ensure proper typography */
.stats-section * {
    box-sizing: border-box;
}