/* ===== GLOBAL ANIMATIONS ===== */

/* Fade and slide animations */
.animate-on-scroll {
    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);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.from-left {
    transform: translateX(-60px);
}
.animate-on-scroll.from-left.visible {
    transform: translateX(0);
}

.animate-on-scroll.from-right {
    transform: translateX(60px);
}
.animate-on-scroll.from-right.visible {
    transform: translateX(0);
}

.animate-on-scroll.scale-up {
    transform: scale(0.9);
}
.animate-on-scroll.scale-up.visible {
    transform: scale(1);
}

/* Stagger delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* ===== HERO SECTION ===== */
@keyframes heroGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-gradient {
    background: linear-gradient(-45deg, #0a1628, #0e2a5c, #0d1f4a, #091330);
    background-size: 400% 400%;
    animation: heroGradient 12s ease infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-12px) rotate(1deg); }
    66% { transform: translateY(6px) rotate(-1deg); }
}

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

.float-animation-delayed {
    animation: float 7s ease-in-out 1s infinite;
}

/* Hero text reveal */
@keyframes revealUp {
    from {
        opacity: 0;
        transform: translateY(60px);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

.hero-reveal {
    animation: revealUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.hero-reveal-delay-1 { animation-delay: 0.2s; }
.hero-reveal-delay-2 { animation-delay: 0.4s; }
.hero-reveal-delay-3 { animation-delay: 0.6s; }
.hero-reveal-delay-4 { animation-delay: 0.8s; }

/* ===== PARTICLES ===== */
@keyframes particleDrift {
    0% { transform: translate(0, 0) scale(1); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translate(var(--drift-x, 100px), var(--drift-y, -200px)) scale(0.3); opacity: 0; }
}

.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: particleDrift var(--duration, 8s) var(--delay, 0s) infinite;
}

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

.counter-animate {
    animation: countUp 0.6s ease-out forwards;
}

/* ===== NAVBAR ===== */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
}

.navbar-scrolled .nav-link {
    color: #1a1a2e !important;
}

.navbar-scrolled .nav-logo {
    color: #1647b6 !important;
}

/* Nav link hover effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #1a6df5, #22c55e);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===== CARDS ===== */
.service-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
}

.service-card .icon-wrapper {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

/* ===== GLOW EFFECTS ===== */
.glow-blue {
    box-shadow: 0 0 40px rgba(26, 109, 245, 0.15);
}

.glow-green {
    box-shadow: 0 0 40px rgba(34, 197, 94, 0.15);
}

/* ===== GRADIENT TEXT ===== */
.gradient-text {
    color: #1a6df5;
}

/* ===== SECTION DIVIDERS ===== */
.wave-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* ===== PULSE RING ===== */
@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 0.2; }
    100% { transform: scale(0.9); opacity: 0.5; }
}

.pulse-ring {
    animation: pulseRing 3s ease-in-out infinite;
}

/* ===== MARQUEE ===== */
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.marquee-track {
    animation: marquee 30s linear infinite;
}

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

/* ===== SCROLL INDICATOR ===== */
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

/* ===== MAGNETIC BUTTON ===== */
.magnetic-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.magnetic-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* ===== TIMELINE ===== */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #1a6df5, #22c55e);
    transform: translateX(-50%);
}

@media (max-width: 768px) {
    .timeline-line {
        left: 20px;
    }
}

/* ===== MOBILE MENU ===== */
.mobile-menu {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
    transform: translateX(0);
}

/* ===== SMOOTH SECTION TRANSITIONS ===== */
section {
    position: relative;
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #1a6df5, #22c55e);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1647b6;
}
