/* ============================================
   EastWestTravel2go - Scroll Animations
   ============================================ */

/* --- Fade In Animations --- */
.animate-on-scroll {
    opacity: 0;
    transition: all 0.7s ease;
}
.animate-on-scroll.animated {
    opacity: 1;
}

/* Fade Up */
.fade-up {
    transform: translateY(40px);
}
.fade-up.animated {
    transform: translateY(0);
}

/* Fade Down */
.fade-down {
    transform: translateY(-40px);
}
.fade-down.animated {
    transform: translateY(0);
}

/* Fade Left */
.fade-left {
    transform: translateX(-40px);
}
.fade-left.animated {
    transform: translateX(0);
}

/* Fade Right */
.fade-right {
    transform: translateX(40px);
}
.fade-right.animated {
    transform: translateX(0);
}

/* Scale Up */
.scale-up {
    transform: scale(0.9);
}
.scale-up.animated {
    transform: scale(1);
}

/* --- Stagger Children --- */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}
.stagger-children.animated > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.animated > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.animated > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.animated > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.animated > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.animated > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-children.animated > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-children.animated > *:nth-child(8) { transition-delay: 0.4s; }
.stagger-children.animated > * {
    opacity: 1;
    transform: translateY(0);
}

/* --- Pulse Animation --- */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
.pulse { animation: pulse 2s infinite; }

/* --- Float Animation --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.float-animation { animation: float 3s ease-in-out infinite; }

/* --- Bounce --- */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}
.bounce { animation: bounce 2s infinite; }

/* --- Shimmer loading --- */
@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--light-gray) 0px, #e2e8f0 40px, var(--light-gray) 80px);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius);
}

/* --- Spin --- */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spin { animation: spin 1s linear infinite; }

/* --- Counter Animation done via JS --- */
.counter-animate {
    font-variant-numeric: tabular-nums;
}

/* --- WhatsApp Pulse Ring --- */
@keyframes whatsapp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.whatsapp-btn { animation: whatsapp-pulse 2s infinite; }

/* --- Slide In for mobile menu --- */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Hero text typing feel --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.hero-content h1 { animation: fadeInUp 0.8s ease 0.2s both; }
.hero-content p { animation: fadeInUp 0.8s ease 0.4s both; }
.hero-buttons { animation: fadeInUp 0.8s ease 0.6s both; }

/* --- Card hover glow --- */
.package-card::after,
.visa-card::after,
.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 0 25px rgba(249,115,22,0.15);
    pointer-events: none;
}
.package-card:hover::after,
.visa-card:hover::after,
.feature-card:hover::after {
    opacity: 1;
}

/* --- Progress bar for slider --- */
@keyframes sliderProgress {
    from { width: 0; }
    to { width: 100%; }
}
.hero-dot.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
    animation: sliderProgress 5s linear;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}
