/* ============================================
   ROHIT SAMAJ - Animations & Transitions
   ============================================ */

/* --- Scroll-triggered Fade Animations --- */
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up {
    transform: translateY(30px);
}

.fade-in-left {
    transform: translateX(-30px);
}

.fade-in-right {
    transform: translateX(30px);
}

.fade-in-up.visible,
.fade-in-left.visible,
.fade-in-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* --- Hero Particle Animation --- */
@keyframes particle-float {
    0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}

.hero-particles .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    animation: particle-float linear infinite;
}

/* --- Counter Animation --- */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stat-number.counted {
    animation: countUp 0.4s ease forwards;
}

/* --- Pulse Animation (WhatsApp button) --- */
@keyframes 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-float {
    animation: pulse 2s infinite;
}

/* --- Service Card Hover Shine --- */
@keyframes shine {
    0% { left: -100%; }
    100% { left: 200%; }
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: none;
}

.service-card:hover::after {
    animation: shine 0.6s ease;
}

/* --- Slide Down (Header on scroll) --- */
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.site-header.scrolled {
    animation: slideDown 0.3s ease;
}

/* --- Skeleton Loading --- */
@keyframes skeleton-pulse {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* --- Float Animation (for badges/icons) --- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

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

/* --- Spin (for loading states) --- */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 40px auto;
}

/* --- Gradient Text Shimmer --- */
@keyframes textShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.hero-tagline {
    background: linear-gradient(90deg, #f9a825, #fdd835, #f9a825);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmer 4s linear infinite;
}

/* --- Bounce In (for modals, alerts) --- */
@keyframes bounceIn {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); opacity: 1; }
}

.bounce-in {
    animation: bounceIn 0.4s ease forwards;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in-up,
    .fade-in-left,
    .fade-in-right {
        opacity: 1;
        transform: none;
    }
}
