/* ===== SCROLL ANIMATIONS ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== PARALLAX SCROLL EFFECT ===== */
.parallax-section {
    will-change: transform;
    transition: transform 0.1s linear;
}

[data-parallax] {
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== TEXT REVEAL ANIMATION ===== */
.text-reveal {
    overflow: hidden;
}

.text-reveal .word {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.text-reveal .word:nth-child(1) { transition-delay: 0.05s; }
.text-reveal .word:nth-child(2) { transition-delay: 0.1s; }
.text-reveal .word:nth-child(3) { transition-delay: 0.15s; }
.text-reveal .word:nth-child(4) { transition-delay: 0.2s; }
.text-reveal .word:nth-child(5) { transition-delay: 0.25s; }
.text-reveal .word:nth-child(6) { transition-delay: 0.3s; }
.text-reveal .word:nth-child(7) { transition-delay: 0.35s; }
.text-reveal .word:nth-child(8) { transition-delay: 0.4s; }
.text-reveal .word:nth-child(9) { transition-delay: 0.45s; }
.text-reveal .word:nth-child(10) { transition-delay: 0.5s; }

/* ===== CARD 3D TILT ON HOVER ===== */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: transform 0.4s cubic-bezier(0.03, 0.98, 0.52, 0.99);
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) scale3d(1.02, 1.02, 1.02);
}

.tilt-card .tilt-inner {
    transform: translateZ(30px);
    transition: transform 0.4s ease;
}

.tilt-card:hover .tilt-inner {
    transform: translateZ(40px);
}

/* ===== GRADIENT TEXT SHIMMER ===== */
@keyframes gradientShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.shimmer-text {
    background: linear-gradient(90deg, var(--primary-dark), var(--primary-light), var(--primary), var(--primary-dark));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShimmer 4s ease infinite;
}

/* ===== SMOOTH NUMBER COUNTING ===== */
@keyframes countPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.counter-animate {
    animation: countPulse 0.3s ease;
}

/* ===== IMAGE ZOOM WITH OVERLAY ===== */
.image-hover-zoom {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}

.image-hover-zoom img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-hover-zoom:hover img {
    transform: scale(1.1);
}

.image-hover-zoom::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(139, 154, 43, 0.3), rgba(45, 90, 39, 0.5));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.image-hover-zoom:hover::after {
    opacity: 1;
}

/* ===== FLOATING PARTICLES BACKGROUND ===== */
.particles-bg {
    position: relative;
    overflow: hidden;
}

.particles-bg::before,
.particles-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
    pointer-events: none;
}

.particles-bg::before {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    animation: floatParticle1 8s ease-in-out infinite;
}

.particles-bg::after {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    bottom: -50px;
    left: -50px;
    animation: floatParticle2 10s ease-in-out infinite;
}

@keyframes floatParticle1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-30px, 20px) scale(1.1); }
    66% { transform: translate(20px, -15px) scale(0.9); }
}

@keyframes floatParticle2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(25px, -20px) scale(1.15); }
    66% { transform: translate(-15px, 25px) scale(0.85); }
}

/* Extra floating dots */
.floating-dots {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.floating-dots span {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.2;
    animation: floatDot 6s ease-in-out infinite;
}

.floating-dots span:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; animation-duration: 7s; }
.floating-dots span:nth-child(2) { top: 60%; left: 80%; animation-delay: 1s; animation-duration: 8s; }
.floating-dots span:nth-child(3) { top: 40%; left: 50%; animation-delay: 2s; animation-duration: 6s; }
.floating-dots span:nth-child(4) { top: 80%; left: 30%; animation-delay: 3s; animation-duration: 9s; }
.floating-dots span:nth-child(5) { top: 10%; left: 70%; animation-delay: 1.5s; animation-duration: 7.5s; }
.floating-dots span:nth-child(6) { top: 50%; left: 20%; animation-delay: 2.5s; animation-duration: 8.5s; }

@keyframes floatDot {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0.2; }
    25% { transform: translateY(-20px) translateX(10px); opacity: 0.4; }
    50% { transform: translateY(-10px) translateX(-5px); opacity: 0.2; }
    75% { transform: translateY(-25px) translateX(15px); opacity: 0.35; }
}

/* ===== SMOOTH PAGE TRANSITIONS ===== */
.page-transition-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-transition-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body {
    animation: pageLoad 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ===== PULSE ANIMATION ===== */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== FLOAT ANIMATION ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.about-badge {
    animation: float 3s ease-in-out infinite;
}

/* ===== SHIMMER EFFECT ===== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.cause-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    z-index: 1;
}

.cause-card:hover::before {
    opacity: 1;
    animation: shimmer 1.5s infinite;
}

/* ===== COUNTER ANIMATION ===== */
@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== ROTATE ANIMATION ===== */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== BOUNCE ===== */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}

#backToTop:hover {
    animation: bounce 0.6s;
}

/* ===== SLIDE IN ===== */
@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ===== SCALE IN ===== */
@keyframes scaleIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ===== GLOW EFFECT ===== */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(139, 154, 43, 0.3); }
    50% { box-shadow: 0 0 20px rgba(139, 154, 43, 0.6); }
}

.btn-primary:focus {
    animation: glow 1.5s infinite;
}

/* ===== TYPING EFFECT ===== */
@keyframes blink {
    0%, 100% { border-color: transparent; }
    50% { border-color: var(--primary); }
}

.typed-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--white);
    margin-left: 4px;
    animation: blink 0.8s infinite;
    vertical-align: middle;
}

/* ===== WAVE ANIMATION ===== */
@keyframes wave {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    30% { transform: rotate(14deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
    60% { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* ===== PROGRESS BAR ANIMATION ===== */
@keyframes progressFill {
    from { width: 0; }
}

.progress-fill.animated {
    animation: progressFill 1.5s ease-out;
}

/* ===== HERO TEXT ANIMATION ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-slide.active .hero-subtitle {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-slide.active .hero-title {
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-slide.active .hero-desc {
    animation: fadeInUp 0.8s ease 0.6s both;
}

.hero-slide.active .hero-btns {
    animation: fadeInUp 0.8s ease 0.8s both;
}

/* ===== HOVER EFFECTS ===== */
.cause-card {
    position: relative;
    overflow: hidden;
}

.how-icon {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-item {
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: scale(1.05);
}

/* ===== STAGGER DELAYS ===== */
[data-delay="200"] { transition-delay: 0.2s; }
[data-delay="400"] { transition-delay: 0.4s; }
[data-delay="600"] { transition-delay: 0.6s; }
[data-delay="800"] { transition-delay: 0.8s; }

/* ===== NAV CLICK RIPPLE ===== */
.nav-ripple {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    animation: navRipple 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes navRipple {
    to {
        transform: translate(-50%, -50%) scale(15);
        opacity: 0;
    }
}

/* ===== BUTTON CLICK EFFECT ===== */
.btn:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease;
}

/* ===== CARD TILT ON HOVER ===== */
.service-card:hover {
    transform: translateY(-10px);
}

.cause-card:hover,
.mission-card:hover,
.event-card:hover {
    transform: translateY(-8px);
}

/* ===== ANIMATED BORDER ===== */
@keyframes borderRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-border {
    position: relative;
}

.animated-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--secondary), var(--primary));
    background-size: 300% 100%;
    animation: borderRotate 4s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.animated-border:hover::before {
    opacity: 1;
}

/* ===== MARQUEE ANIMATION ===== */
@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-track {
    display: flex;
    animation: marqueeScroll 30s linear infinite;
    width: max-content;
}

.marquee-track:hover {
    animation-play-state: paused;
}

/* ===== RIPPLE BUTTON EFFECT ===== */
@keyframes btnRipple {
    0% { transform: scale(0); opacity: 0.6; }
    100% { transform: scale(4); opacity: 0; }
}

.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    width: 50px;
    height: 50px;
    pointer-events: none;
    animation: btnRipple 0.6s ease-out forwards;
}

/* ===== SCALE REVEAL ===== */
.scale-reveal {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.scale-reveal.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== BACKGROUND GRADIENT ANIMATION ===== */
@keyframes bgGradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animated-gradient-bg {
    background: linear-gradient(-45deg, #2d5a27, #6d7a1f, #8B9A2B, #a8b84a);
    background-size: 400% 400%;
    animation: bgGradientMove 8s ease infinite;
}
