/* ==========================================
   ANGEL FUND - ANIMATIONS STYLESHEET
   ========================================== */

/* --- 1. Fade Up Animation (Core Scroll Reveal) --- */
@keyframes fadeUp {
    from { 
        opacity: 0; 
        transform: translateY(40px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.animate-fade-up { 
    opacity: 0; 
    animation: fadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards; 
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* --- 2. Floating Animation for Hero Graphic --- */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.floating { 
    animation: float 4s ease-in-out infinite; 
}

/* --- 3. Pulse Animation for the Yellow Dot --- */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
    100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0); }
}

.badge i { 
    animation: pulse 2s infinite; 
}

/* --- 4. About Section Floating Effects --- */
@keyframes floatSlow {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes floatDelayed {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.floating-slow {
    animation: floatSlow 5s ease-in-out infinite;
}

.floating-delayed {
    animation: floatDelayed 6s ease-in-out infinite;
    animation-delay: 1s;
}

/* --- 5. Floating Animation for FAQ Support Card --- */
@keyframes floatSupport {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
    100% { transform: translateY(0px); }
}

.faq-support-card.floating {
    animation: floatSupport 4s ease-in-out infinite;
}

/* --- 6. Rotating Ring Around Heart Icon (Premium Touch) --- */
@keyframes spinSlow {
    from { 
        transform: rotate(0deg); 
    }
    to { 
        transform: rotate(360deg); 
    }
}

.card-icon::before {
    content: '';
    position: absolute;
    width: 130px;
    height: 130px;
    border: 2px dashed rgba(251, 191, 36, 0.4);
    border-radius: 50%;
    animation: spinSlow 20s linear infinite;
}

/* --- 7. Heart Beat Animation (Subtle Pulse) --- */
@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

.card-icon i {
    animation: heartBeat 2.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(251, 191, 36, 0.3));
}

/* --- 8. Shimmer Effect for Buttons (Premium Glow) --- */
@keyframes shimmer {
    0% { 
        background-position: -1000px 0; 
    }
    100% { 
        background-position: 1000px 0; 
    }
}

.btn-primary {
    background-image: linear-gradient(
        90deg, 
        var(--accent-yellow) 0%, 
        #fde68a 50%, 
        var(--accent-yellow) 100%
    );
    background-size: 1000px 100%;
}

.btn-primary:hover {
    animation: shimmer 2s infinite linear;
}

/* --- 9. Glow Pulse for Card Icons --- */
@keyframes glowPulse {
    0% { 
        box-shadow: 0 10px 30px rgba(251, 191, 36, 0.25); 
    }
    50% { 
        box-shadow: 0 15px 45px rgba(251, 191, 36, 0.5); 
    }
    100% { 
        box-shadow: 0 10px 30px rgba(251, 191, 36, 0.25); 
    }
}

.card-icon {
    animation: glowPulse 3s ease-in-out infinite;
}

/* --- 10. Fade In from Left --- */
@keyframes fadeInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-50px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.animate-fade-left {
    opacity: 0;
    animation: fadeInLeft 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- 11. Fade In from Right --- */
@keyframes fadeInRight {
    from { 
        opacity: 0; 
        transform: translateX(50px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

.animate-fade-right {
    opacity: 0;
    animation: fadeInRight 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- 12. Zoom In Animation --- */
@keyframes zoomIn {
    from { 
        opacity: 0; 
        transform: scale(0.85); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.animate-zoom-in {
    opacity: 0;
    animation: zoomIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* --- 13. Bounce Animation for Notification Badges --- */
@keyframes bounce {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-8px); 
    }
}

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

/* --- 14. Rotate Animation --- */
@keyframes rotate {
    from { 
        transform: rotate(0deg); 
    }
    to { 
        transform: rotate(360deg); 
    }
}

.animate-rotate {
    animation: rotate 3s linear infinite;
}

/* --- 15. Slide Up on Hover (For Cards) --- */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* --- 16. Underline Grow Animation --- */
@keyframes underlineGrow {
    from { width: 0; }
    to { width: 100%; }
}

.title-underline {
    animation: underlineGrow 1s ease-out forwards;
}

/* --- 17. Fade In Slow (For Background Elements) --- */
@keyframes fadeInSlow {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeInSlow 1.5s ease-out forwards;
}

/* --- 18. Scale Pulse for Stats --- */
@keyframes scalePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.stat-item:hover h3 {
    animation: scalePulse 1s ease-in-out infinite;
}

/* --- 19. Shake Animation (For Alerts) --- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* --- 20. Typewriter Cursor Blink --- */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.cursor-blink::after {
    content: '|';
    animation: blink 1s step-end infinite;
    color: var(--accent-yellow);
    font-weight: 300;
}

/* ==========================================
   SCROLL REVEAL ANIMATIONS (Triggered by JS)
   ========================================== */

/* Elements start hidden and animate when in view */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }

/* ==========================================
   REDUCED MOTION ACCESSIBILITY
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}