/* ========================================
   SECCIÓN DE ESTADÍSTICAS
   ======================================== */

.statistics-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-lighter) 100%);
    position: relative;
    overflow: hidden;
}

.statistics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, var(--shadow-light) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, var(--shadow-light) 0%, transparent 50%);
    pointer-events: none;
}

.statistics-container {
    position: relative;
    z-index: 1;
}

.statistics-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    position: relative;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.statistics-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-main), var(--accent-green));
    border-radius: 2px;
}

.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    animation: fadeInScale 0.8s ease-out forwards;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px var(--shadow-medium);
    border-color: var(--primary-light);
}

.stat-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-main), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.4s ease;
}

.stat-icon::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-main), var(--accent-green));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-item:hover .stat-icon::before {
    opacity: 1;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon i {
    font-size: 2rem;
    color: white;
    transition: all 0.4s ease;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-main));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-medium);
    font-weight: 500;
    line-height: 1.4;
    max-width: 200px;
    margin: 0 auto;
    transition: color 0.3s ease;
}

.stat-item:hover .stat-label {
    color: var(--text-dark);
}

/* Efectos adicionales */
.stat-item::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary-main), var(--accent-green), var(--primary-light));
    border-radius: 22px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-item:hover::after {
    opacity: 0.3;
}

/* ========================================
   ANIMACIONES
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .statistics-section {
        padding: 60px 0;
    }
    
    .statistics-section .section-title {
        font-size: 2rem;
    }
    
    .statistics-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 3rem;
    }
    
    .stat-item {
        padding: 2.5rem 1.5rem;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .stat-icon {
        width: 70px;
        height: 70px;
    }
    
    .stat-icon i {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
}