/* Professional Animations & Effects */
/* =================================== */

/* Keyframe Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@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;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 10000;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5);
}

/* Header Scroll Effect */
.header {
    transition: all 0.3s ease-in-out;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header.scrolled .logo {
    transform: scale(0.9);
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: all 0.15s ease-out;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.custom-cursor.active {
    width: 40px;
    height: 40px;
    background: rgba(0, 123, 255, 0.1);
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Card Animations */
.card, .service-card, .testimonial-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card:hover, .service-card:hover, .testimonial-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Button Animations */
.btn, .btn-primary, .btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Shimmer Effect for Loading */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Hero Section Animations */
.hero-content h1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-content p {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-content .btn {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Trust Badges Animation */
.trust-badges {
    animation: fadeIn 1s ease-out 0.8s both;
}

.trust-badge {
    transition: all 0.3s ease;
}

.trust-badge:hover {
    transform: translateY(-5px) scale(1.05);
}

/* Stats Counter Animation */
.stat-number {
    font-weight: 700;
    display: inline-block;
}

/* Service Cards Stagger */
.service-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }

/* Section Title Animations */
.section-title {
    animation: fadeInDown 0.8s ease-out both;
}

.section-subtitle {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

/* Image Hover Effects */
.image-hover-zoom {
    overflow: hidden;
}

.image-hover-zoom img {
    transition: transform 0.5s ease;
}

.image-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Link Underline Animation */
.animated-link {
    position: relative;
    text-decoration: none;
}

.animated-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.animated-link:hover::after {
    width: 100%;
}

/* Parallax Sections */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -50%;
    left: 0;
    width: 100%;
    height: 150%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* Gradient Animation */
.gradient-animate {
    background: linear-gradient(
        45deg,
        var(--primary-color),
        var(--secondary-color),
        var(--primary-color)
    );
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Loading Animation */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 123, 255, 0.1);
    border-left-color: var(--primary-color);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Icon Animations */
.icon-bounce {
    animation: bounce 2s infinite;
}

.icon-spin {
    animation: rotate 2s linear infinite;
}

.icon-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Modal/Popup Animations */
.modal-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.modal-slide-up {
    animation: fadeInUp 0.4s ease-out;
}

/* Notification Toast */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-notification {
    animation: slideInRight 0.4s ease-out;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Reveal on Scroll - Initial State */
[data-reveal] {
    opacity: 0;
}

/* Page Load Animation */
body {
    opacity: 0;
}

body.loaded {
    opacity: 1;
    transition: opacity 0.5s ease-in;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* WhatsApp Button Pulse */
.whatsapp-button {
    animation: pulse 2s ease-in-out infinite;
}

.whatsapp-button:hover {
    animation: none;
    transform: scale(1.1);
}

/* CTA Box Animation */
.cta-box {
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: rotate 20s linear infinite;
}

/* Form Input Focus Animation */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.2);
}

/* Testimonial Card Hover */
.testimonial-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05), rgba(0, 86, 179, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.testimonial-card:hover::before {
    opacity: 1;
}

/* Service Area Items */
.service-area-item {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-area-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.service-area-item:hover::before {
    left: 100%;
}

/* Responsive Animations */
@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .custom-cursor {
        display: none;
    }
    
    .card:hover,
    .service-card:hover,
    .testimonial-card:hover {
        transform: none;
    }
    
    [data-parallax] {
        transform: none !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

