/* ============================================
   SECCIÓN DE CONTADORES ANIMADOS - STATS CARDS
   ============================================ */

/* Contenedor principal de las tarjetas */
.stats-cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
    padding: 20px;
    flex-wrap: nowrap;
    position: relative;
}

/* Efecto de partículas de fondo */
.stats-cards-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 180, 216, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(0, 119, 182, 0.05) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, rgba(0, 180, 216, 0.03) 1px, transparent 1px);
    background-size: 30px 30px, 40px 40px, 50px 50px;
    animation: particlesMove 20s linear infinite;
    pointer-events: none;
}

@keyframes particlesMove {
    0% {
        background-position: 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 30px 30px, -40px -40px, 50px 50px;
    }
}

/* Tarjeta individual */
.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 25px 20px;
    width: 180px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
    border: 1px solid rgba(0, 123, 255, 0.1);
}

/* Efecto de borde luminoso animado */
.stat-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        #00b4d8, 
        #0077b6, 
        #00b4d8, 
        #48cae4);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: borderGlow 3s linear infinite;
    background-size: 400%;
}

@keyframes borderGlow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.stat-card:hover::before {
    opacity: 1;
}

/* Efecto de escaneo holográfico */
.stat-card::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(0, 180, 216, 0.2),
        transparent
    );
    transition: top 0.7s ease;
}

.stat-card:hover::after {
    top: 100%;
}

/* Animación de entrada - cada tarjeta con delay */
.stat-card:nth-child(1) {
    animation-delay: 0s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efecto hover en las tarjetas */
.stat-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 123, 255, 0.25),
                0 0 30px rgba(0, 180, 216, 0.3);
}

/* Ícono circular con degradado azul */
.stat-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    box-shadow: 0 8px 20px rgba(0, 119, 182, 0.3),
                0 0 20px rgba(0, 180, 216, 0.2);
    position: relative;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: iconFloat 3s ease-in-out infinite;
}

/* Animación de flotación con glow */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        box-shadow: 0 8px 20px rgba(0, 119, 182, 0.3),
                    0 0 20px rgba(0, 180, 216, 0.2);
    }
    50% {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 12px 30px rgba(0, 119, 182, 0.5),
                    0 0 40px rgba(0, 180, 216, 0.5);
    }
}

/* Efecto hover mejorado con rotación y escala */
.stat-card:hover .stat-icon-circle {
    transform: scale(1.2) rotate(360deg);
    box-shadow: 0 15px 40px rgba(0, 119, 182, 0.7),
                0 0 50px rgba(0, 180, 216, 0.6);
    animation: none;
}

/* Ícono dentro del círculo */
.stat-icon-circle i {
    font-size: 24px;
    color: #ffffff;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Animación del ícono en hover */
.stat-card:hover .stat-icon-circle i {
    transform: scale(1.15);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
}

/* Anillos animados alrededor del ícono - múltiples capas */
.stat-icon-circle::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    border: 2px solid rgba(0, 180, 216, 0.4);
    animation: ringExpand 2s ease-in-out infinite;
}

.stat-icon-circle::after {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border-radius: 50%;
    border: 2px solid rgba(0, 180, 216, 0.2);
    animation: ringExpand 2s ease-in-out infinite 1s;
}

@keyframes ringExpand {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Contenedor del número */
.stat-number-wrapper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 15px;
}

/* Número animado */
.stat-animated-number {
    font-size: 40px;
    font-weight: 700;
    color: #0077b6;
    line-height: 1;
    font-family: 'Arial', sans-serif;
    text-shadow: 0 0 10px rgba(0, 119, 182, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-animated-number {
    color: #00b4d8;
    text-shadow: 0 0 20px rgba(0, 180, 216, 0.6),
                 0 0 30px rgba(0, 180, 216, 0.4);
    transform: scale(1.1);
}

/* Símbolo + */
.stat-plus {
    font-size: 24px;
    font-weight: 600;
    color: #0077b6;
    margin-left: 3px;
    margin-top: 3px;
    transition: all 0.3s ease;
    animation: plusGlow 2s ease-in-out infinite;
}

@keyframes plusGlow {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 5px rgba(0, 180, 216, 0.3);
    }
    50% {
        opacity: 0.8;
        text-shadow: 0 0 15px rgba(0, 180, 216, 0.6);
    }
}

.stat-card:hover .stat-plus {
    color: #00b4d8;
    transform: rotate(180deg);
}

/* Descripción del contador */
.stat-description {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
    letter-spacing: 0.5px;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

/* Contenedor de la barra de progreso */
.stat-progress-wrapper {
    width: 100%;
    height: 6px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

/* Barra de progreso animada */
.stat-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, 
        #00b4d8 0%, 
        #0096c7 25%,
        #0077b6 50%,
        #0096c7 75%,
        #00b4d8 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    box-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
    animation: progressFlow 2s linear infinite;
}

@keyframes progressFlow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

/* Efecto de brillo en la barra */
.stat-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.6), 
        transparent
    );
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* Estado activado - cuando la animación inicia */
.stat-card.active .stat-progress-bar {
    width: 100%;
}

/* ============================================
   RESPONSIVE - DISEÑO MÓVIL
   ============================================ */

@media (max-width: 992px) {
    .stats-cards-container {
        gap: 20px;
    }
    
    .stat-card {
        width: 260px;
        padding: 35px 25px;
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    .stats-cards-container {
        flex-wrap: wrap;
        gap: 20px;
        margin-top: 30px;
    }
    
    .stat-card {
        width: 160px;
        min-height: 220px;
    }
    
    .stat-icon-circle {
        width: 80px;
        height: 80px;
    }
    
    .stat-icon-circle i {
        font-size: 32px;
    }
    
    .stat-animated-number {
        font-size: 48px;
    }
    
    .stat-plus {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .stats-cards-container {
        flex-direction: column;
        align-items: center;
    }
    
    .stat-card {
        padding: 25px 20px;
        width: 100%;
        max-width: 280px;
    }
    
    .stat-animated-number {
        font-size: 36px;
    }
    
    .stat-description {
        font-size: 10px;
    }
}
