
jQuery(document).ready(function() {
    jQuery('.hamburger-nav').click(function() {
        jQuery('.main-header').toggleClass('mobile-menu-open');
    });
    jQuery('.menu-item-has-children').click(function() {
        jQuery('.sub-menu').toggleClass('sub-menu-open');
    });
    jQuery('.menu-has-children').click(function() {
        jQuery('.menu-has-children').toggleClass('menu-has-children-open');
    });
});



// Function to handle the scroll event
function handleScroll() {
  if (jQuery(window).scrollTop() >= 100) {
    jQuery('header').addClass('fixed');
  } else {
    jQuery('header').removeClass('fixed');
  }
}

// Execute the function on page load
jQuery(document).ready(function() {
  handleScroll();
});

// Execute the function on window scroll
jQuery(window).scroll(function() {
  handleScroll();
});



jQuery(document).ready(function(){
AOS.init();
});



jQuery(document).ready(function() {
    const swiper = new Swiper('.banner-slider', {
        loop: true,
        autoplay: {
            delay: 5000,
            disableOnInteraction: false,
        },
        pagination: {
            el: '.swiper-pagination',
            clickable: true,
        },
        breakpoints: {
            320: { // Mobile
                slidesPerView: 1,
            },
            768: { // Tablet
                slidesPerView: 1,
            },
            1024: { // Desktop
                slidesPerView: 1,
            }
        }
    });

    // Pause autoplay on mouse hover
    jQuery('.banner-slider').on('mouseenter', function() {
        swiper.autoplay.stop();
    });

    // Resume autoplay on mouse leave
    jQuery('.banner-slider').on('mouseleave', function() {
        swiper.autoplay.start();
    });
});



jQuery(document).ready(function() {
    const swiper = new Swiper('.area-of-prac-slider', {
        loop: true,
        autoplay: {
            delay: 5000,
            disableOnInteraction: false,
        },
        spaceBetween: 20,
        pagination: {
            el: '.area-of-prac-slider-pag', 
            clickable: true,           
        },
        breakpoints: {
            320: {  // Mobile
                slidesPerView: 1,
            },
            768: { // Tablet
                slidesPerView: 2,
            },
            1024: { // Desktop
                slidesPerView: 4,
            }
        }
    });

    // Pause autoplay on hover
    jQuery('.area-of-prac-slider').on('mouseenter', function() {
        swiper.autoplay.stop();
    });

    // Resume autoplay when hover ends
    jQuery('.area-of-prac-slider').on('mouseleave', function() {
        swiper.autoplay.start();
    });
});


jQuery(document).ready(function() {
    const swiper = new Swiper('.team-slider', {
        loop: true,
        autoplay: {
            delay: 1000000,
            disableOnInteraction: false,
        },
        spaceBetween: 40,
        navigation: {
            nextEl: '.swiper-team-next',
            prevEl: '.swiper-team-prev',
        },
        breakpoints: {
            320: {  // Mobile
                slidesPerView: 1,
            },
            768: { // Tablet
                slidesPerView: 2,
            },
            1024: { // Desktop
                slidesPerView: 3,
            }
        }
    });

    // Pause autoplay on hover if needed
    jQuery('.team-slider').on('mouseenter', function() {
        swiper.autoplay && swiper.autoplay.stop();
    });

    jQuery('.team-slider').on('mouseleave', function() {
        swiper.autoplay && swiper.autoplay.start();
    });
});





jQuery(document).ready(function() {
    const swiper = new Swiper('.blog-sec-slider', {
        loop: true,
        // autoplay: {
        //     delay: 5000,
        //     disableOnInteraction: false,
        // },
        spaceBetween: 20,
        pagination: {
            el: '.blog-sec-slider-pag', 
            clickable: true,           
        },
        breakpoints: {
            320: {  // Mobile
                slidesPerView: 1,
            },
            768: { // Tablet
                slidesPerView: 2,
            },
            1024: { // Desktop
                slidesPerView: 3,
            }
        }
    });

    // Pause autoplay on hover if needed
    jQuery('.blog-sec-slider').on('mouseenter', function() {
        swiper.autoplay && swiper.autoplay.stop();
    });

    jQuery('.blog-sec-slider').on('mouseleave', function() {
        swiper.autoplay && swiper.autoplay.start();
    });
});




