/* CapNex Fundings – Animations & Micro-interactions */

/* Glow pulse animation for primary elements */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 153, 204, 0.2); }
    50%       { box-shadow: 0 0 40px rgba(0, 153, 204, 0.45); }
}

/* Shimmer for loading states */
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position:  200% center; }
}

/* Float animation for icons */
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-6px); }
}

/* Spin animation for loading indicators */
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Gradient shift animation */
@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ---- Ripple Click Effect ---- */
.btn { position: relative; overflow: hidden; }

.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to { transform: scale(4); opacity: 0; }
}

/* ---- Glowing border on hero badge ---- */
.hero-badge {
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { border-color: rgba(0, 153, 204, 0.2); }
    50%       { border-color: rgba(0, 153, 204, 0.5); box-shadow: 0 0 15px rgba(0, 153, 204, 0.15); }
}

/* ---- Payout feed slide-in ---- */
.payout-item {
    animation: payoutSlideIn 0.4s ease forwards;
}

@keyframes payoutSlideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---- Step connector line ---- */
.step-connector {
    position: absolute;
    top: 50%;
    right: -1rem;
    width: 2rem;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.4;
    transform: translateY(-50%);
}

/* ---- Feature card icon animation ---- */
.feature-card:hover .feature-icon-wrap i {
    animation: iconFloat 1s ease-in-out infinite;
}

/* ---- Ticker item hover ---- */
.ticker-item:hover strong {
    color: var(--clr-primary);
}

/* ---- Loading spinner ---- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

/* ---- Gradient text animation ---- */
.hero-title .gradient-text,
.cta-title .gradient-text {
    background-size: 200% auto;
    animation: gradientShift 4s linear infinite;
}

/* ---- Nav link hover underline ---- */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    right: 50%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 1px;
    transition: left 0.25s ease, right 0.25s ease;
}

.nav-link { position: relative; }

.nav-item.active .nav-link::after,
.nav-link:hover::after {
    left: 0.5rem;
    right: 0.5rem;
}

/* ---- Back-to-top pulse ---- */
.back-to-top.visible {
    animation: glowPulse 2.5s ease-in-out infinite;
}

/* ---- Social link hover ring ---- */
.social-link:hover {
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

/* ---- Smooth number counter effect ---- */
[data-count] {
    transition: all 0.5s ease;
}

/* ---- Blog card image zoom ---- */
.blog-card-img { overflow: hidden; }
.blog-card:hover .blog-placeholder-img {
    transform: scale(1.05);
    transition: transform 0.4s ease;
}

/* ---- Leaderboard row highlight ---- */
.leaderboard-table tbody tr.top-gold   { background: rgba(255, 215, 0, 0.04); }
.leaderboard-table tbody tr.top-silver { background: rgba(192, 192, 192, 0.03); }
.leaderboard-table tbody tr.top-bronze { background: rgba(205, 127, 50, 0.04); }

/* ---- Stat value counting highlight ---- */
.counting {
    color: var(--clr-primary);
    transition: color 0.3s ease;
}

/* ---- Plan card hover gradient border ---- */
.plan-card-full:hover {
    background: linear-gradient(var(--clr-bg-card), var(--clr-bg-card)) padding-box,
                var(--gradient-primary) border-box;
    border: 1px solid transparent;
}

/* ---- Mobile menu link stagger ---- */
.mobile-nav-list li { opacity: 0; transform: translateX(-20px); transition: opacity 0.3s ease, transform 0.3s ease; }
.mobile-menu.open .mobile-nav-list li { opacity: 1; transform: translateX(0); }
.mobile-menu.open .mobile-nav-list li:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu.open .mobile-nav-list li:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu.open .mobile-nav-list li:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-nav-list li:nth-child(4) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-nav-list li:nth-child(5) { transition-delay: 0.25s; }
.mobile-menu.open .mobile-nav-list li:nth-child(6) { transition-delay: 0.3s; }
.mobile-menu.open .mobile-nav-list li:nth-child(7) { transition-delay: 0.35s; }
.mobile-menu.open .mobile-nav-list li:nth-child(8) { transition-delay: 0.4s; }
.mobile-menu.open .mobile-nav-list li:nth-child(9) { transition-delay: 0.45s; }
