/* ================================================== */
/* CAPTIVATING ANIMATIONS FOR PEAK PERFORMANCE */
/* ================================================== */

/* Fast smooth scrolling - controlled by JavaScript for better performance */
html {
    scroll-behavior: auto;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ================================================== */
/* 1. STICKY HEADER WITH FADE-IN BACKGROUND */
/* ================================================== */

header,
header.autoshow,
header.autoshow.scrollOn,
header.autoshow.scrollOff {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    background-color: rgba(0, 0, 0, 0.85);
    padding: 15px 0;
    transform: translateY(0) !important;
}

header.scrolled,
header.autoshow.scrolled {
    background-color: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    padding: 10px 0;
    transform: translateY(0) !important;
}

/* Adjust body to prevent content from hiding under fixed header */
body {
    padding-top: 120px;
}

/* ================================================== */
/* 2. MENU HOVER EFFECTS WITH ANIMATED UNDERLINE */
/* ================================================== */

#mainmenu li a.menu-item {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    padding: 10px 15px;
}

#mainmenu li a.menu-item:hover {
    color: #ff6b00;
    transform: translateY(-2px);
}

/* Animated underline effect */
#mainmenu li a.menu-item::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff6b00, transparent);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mainmenu li a.menu-item:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* Active menu item */
#mainmenu li a.menu-item.active {
    color: #ff6b00;
}

#mainmenu li a.menu-item.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Magnetic hover effect - subtle pull */
#mainmenu li a.menu-item:hover {
    letter-spacing: 0.5px;
}

/* ================================================== */
/* 3. SCROLL PROGRESS INDICATOR */
/* ================================================== */

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, #ff6b00, #ff9500);
    z-index: 9999;
    transition: width 0.1s ease;
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.5);
}

/* ================================================== */
/* 4. SCROLL REVEAL ANIMATIONS */
/* ================================================== */

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delay for multiple elements */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ================================================== */
/* 5. SERVICE CARDS HOVER EFFECTS */
/* ================================================== */

.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 107, 0, 0.2);
}

/* 3D Tilt Effect */
.service-card {
    transform-style: preserve-3d;
}

/* Glow effect on hover */
.service-card:hover {
    box-shadow:
        0 0 20px rgba(255, 107, 0, 0.3),
        0 0 40px rgba(255, 107, 0, 0.2),
        0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ================================================== */
/* 6. IMAGE ZOOM ON HOVER */
/* ================================================== */

.image-zoom-container {
    overflow: hidden;
    border-radius: 8px;
}

.image-zoom {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    width: 100%;
}

.image-zoom-container:hover .image-zoom {
    transform: scale(1.1);
}

/* ================================================== */
/* 7. BUTTON RIPPLE EFFECT */
/* ================================================== */

.btn-ripple {
    position: relative;
    overflow: hidden;
}

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

.btn-ripple:hover::after {
    width: 300px;
    height: 300px;
}

/* ================================================== */
/* 8. FLOATING ANIMATION FOR HERO ELEMENTS */
/* ================================================== */

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

/* ================================================== */
/* 9. TESTIMONIAL CARD EFFECTS */
/* ================================================== */

.testimonial-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* ================================================== */
/* 10. FORM INPUT ANIMATIONS */
/* ================================================== */

.form-control {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.form-control:focus {
    border-color: #ff6b00;
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
    transform: translateY(-2px);
}

/* ================================================== */
/* 11. LOADING PULSE ANIMATION */
/* ================================================== */

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ================================================== */
/* 12. GRADIENT TEXT ANIMATION */
/* ================================================== */

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-text {
    background: linear-gradient(90deg, #ff6b00, #ff9500, #ff6b00);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

/* ================================================== */
/* 13. SECTION DIVIDER ANIMATION */
/* ================================================== */

@keyframes slide-in {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #ff6b00, transparent);
    margin: 40px auto;
    max-width: 600px;
    animation: slide-in 1s ease-out;
}

/* ================================================== */
/* 14. NUMBER COUNTER ANIMATION */
/* ================================================== */

.counter {
    font-size: 3rem;
    font-weight: bold;
    color: #ff6b00;
}

/* ================================================== */
/* 15. PARALLAX EFFECT (Applied via JS) */
/* ================================================== */

.parallax-element {
    transition: transform 0.1s ease-out;
}

/* ================================================== */
/* 16. BACK TO TOP BUTTON ENHANCEMENT */
/* ================================================== */

#back-to-top {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

#back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.4);
}

/* ================================================== */
/* 17. RESPONSIVE ADJUSTMENTS */
/* ================================================== */

@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }

    header.scrolled {
        padding: 8px 0;
    }

    .service-card:hover {
        transform: translateY(-5px) scale(1.01);
    }

    #mainmenu li a.menu-item::after {
        display: none;
    }
}

/* ================================================== */
/* 18. PERFORMANCE OPTIMIZATIONS */
/* ================================================== */

/* GPU acceleration for animations */
.service-card,
.testimonial-card,
.image-zoom,
#mainmenu li a.menu-item {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}
