/**
 * Sección Socios - Estilos adicionales
 * AGEEMCTI A.C.
 */

/* =============================================
   SECCIÓN SOCIOS - CONTADORES
   ============================================= */

/* Animación de contadores */
.stat-number {
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.counter-animated {
    animation: counterPulse 0.5s ease-out;
}

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

/* =============================================
   CARDS DE ESTADÍSTICAS
   ============================================= */

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(201, 168, 76, 0.1),
        transparent
    );
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card .group:hover i {
    animation: iconBounce 0.6s ease;
}

@keyframes iconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* =============================================
   CARDS DE BENEFICIOS
   ============================================= */

.benefit-card {
    position: relative;
    overflow: hidden;
}

.benefit-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #C9A84C, #D4B76A, #C9A84C);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.benefit-card:hover::after {
    transform: scaleX(1);
}

/* Icono en cards de beneficios */
.benefit-card > div:first-child {
    position: relative;
    overflow: hidden;
}

.benefit-card > div:first-child::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 60%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.benefit-card:hover > div:first-child::before {
    transform: translateX(100%);
}

/* =============================================
   BOTONES CTA
   ============================================= */

.cta-socios-btn {
    position: relative;
    overflow: hidden;
}

.cta-socios-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-socios-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Botón secundario - outline */
a[href*="login"].cta-socios-btn {
    position: relative;
}

a[href*="login"].cta-socios-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: #C9A84C;
    transition: height 0.3s ease;
    z-index: -1;
}

a[href*="login"].cta-socios-btn:hover::after {
    height: 100%;
}

/* =============================================
   ANIMACIONES DE ENTRADA
   ============================================= */

.benefit-card,
.stat-card {
    opacity: 1;
    transform: translateY(0);
}

/* Animación de entrada escalonada para beneficios */
@media (prefers-reduced-motion: no-preference) {
    .benefit-card:nth-child(1) { animation-delay: 0ms; }
    .benefit-card:nth-child(2) { animation-delay: 100ms; }
    .benefit-card:nth-child(3) { animation-delay: 200ms; }
    .benefit-card:nth-child(4) { animation-delay: 300ms; }
    .benefit-card:nth-child(5) { animation-delay: 400ms; }
    .benefit-card:nth-child(6) { animation-delay: 500ms; }
    
    .benefit-card.animate-in {
        animation: fadeInUp 0.6s ease forwards;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   REDUCED MOTION - ACCESIBILIDAD
   ============================================= */

@media (prefers-reduced-motion: reduce) {
    .stat-number,
    .counter-animated,
    .benefit-card,
    .stat-card {
        animation: none !important;
        transition: none !important;
    }
    
    .cta-socios-btn::before,
    .cta-socios-btn::after,
    .stat-card::before,
    .benefit-card::after,
    .benefit-card > div:first-child::before {
        display: none !important;
    }
}

/* =============================================
   RESPONSIVE ADJUSTMENTS
   ============================================= */

/* Mobile: Optimizaciones táctiles */
@media (max-width: 640px) {
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .benefit-card {
        padding: 1.25rem;
    }
    
    /* Mejor área táctil para botones */
    .cta-socios-btn {
        min-height: 48px;
        display: inline-flex;
        align-items: center;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
    .stat-number {
        font-size: 2rem;
    }
}

/* Desktop: Efectos hover completos */
@media (min-width: 1025px) {
    .stat-card:hover {
        transform: translateY(-4px);
    }
}

/* =============================================
   FOCUS STATES - ACCESIBILIDAD
   ============================================= */

.cta-socios-btn:focus-visible,
.stat-card:focus-visible,
.benefit-card:focus-visible {
    outline: 3px solid #C9A84C;
    outline-offset: 2px;
}

/* =============================================
   LOADING STATE
   ============================================= */

.js-initialized .stat-number {
    opacity: 1;
}

.stat-number {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}
