/* ============================================================
   PÍDELOYA — ANIMACIONES Y REVEAL ON SCROLL
   ============================================================ */

/* ---------- REVEAL ON SCROLL ---------- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Retraso escalonado para grids */
.problema-grid .reveal:nth-child(1) { transition-delay: 0s; }
.problema-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.problema-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.problema-grid .reveal:nth-child(4) { transition-delay: 0.24s; }
.problema-grid .reveal:nth-child(5) { transition-delay: 0.32s; }
.problema-grid .reveal:nth-child(6) { transition-delay: 0.40s; }

.inventario-grid .reveal:nth-child(1) { transition-delay: 0s; }
.inventario-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.inventario-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.inventario-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.anuncios-grid .reveal:nth-child(1) { transition-delay: 0s; }
.anuncios-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.anuncios-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.anuncios-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.planes-grid .plan-card:nth-child(1) { animation-delay: 0s; }
.planes-grid .plan-card:nth-child(2) { animation-delay: 0.1s; }
.planes-grid .plan-card:nth-child(3) { animation-delay: 0.2s; }
.planes-grid .plan-card:nth-child(4) { animation-delay: 0.3s; }

/* ---------- CONTADOR ANIMADO ---------- */
.stat-number.counting {
    animation: countPulse 0.4s ease;
}

@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); color: var(--orange-600); }
}

/* ---------- HOVER SUAVE EN CARDS ---------- */
.finanza-card,
.inventario-card,
.anuncio-card,
.plan-card,
.problema-card {
    will-change: transform;
}

/* ---------- SKELETON LOADER (planes) ---------- */
.skeleton {
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: skeleton 1.4s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---------- FADE IN DE PESTAÑAS ---------- */
.finanzas-tab-panel.active {
    animation: panelIn 0.35s ease;
}

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

/* ---------- BOTÓN FLOTANTE PULSE ---------- */
@keyframes pulseBtn {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

.plan-btn:not(.gratis) {
    animation: pulseBtn 3s ease infinite;
}

.plan-btn:not(.gratis):hover {
    animation: none;
}

/* ---------- RESPETO A REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .plan-btn:not(.gratis),
    .whatsapp-float,
    .floating-emoji {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}