/* ============================================
   ANIMATIONS & SCROLL EFFECTS
   ============================================ */

/* --- Scroll Animation Classes --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.zoom-in {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* Stagger delays */
.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

.delay-5 {
    transition-delay: 0.5s;
}

/* --- Pulse Glow --- */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 106, 0, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(255, 106, 0, 0);
    }
}

.pulse-glow {
    animation: pulse-glow 2s infinite;
}

/* --- Float Animation --- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }
}

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

/* --- Spin Slow --- */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* --- Shimmer effect --- */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* --- Loading spinner --- */
@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spinner 0.6s linear infinite;
    display: inline-block;
}

/* --- Button ripple --- */
.btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.3s;
    border-radius: inherit;
}

.btn:active::after {
    transform: scale(2.5);
    opacity: 1;
    transition: 0s;
}

/* --- Counter animation class --- */
.counter-animate {
    display: inline-block;
}

/* --- Parallax background --- */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* --- Lazy load fade --- */
.lazy-img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.lazy-img.loaded {
    opacity: 1;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animated-gradient-text {
    background: linear-gradient(270deg, var(--primary), var(--accent), var(--secondary), var(--primary));
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 4s ease infinite;
}

/* --- Card hover tilt effect (applied via JS) --- */
.tilt-card {
    transition: transform 0.3s ease;
    transform-style: preserve-3d;
}

/* --- Notification slide in --- */
@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    background: var(--bg-white);
    box-shadow: var(--shadow-lg);
    animation: slide-in-right 0.4s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 400px;
}

.notification.success {
    border-left: 4px solid var(--primary);
}

.notification.error {
    border-left: 4px solid #ef4444;
}