// Scroll to Top
window.onscroll = function() {
  const corporate_consultancy_button = document.querySelector('.scroll-top-box');
  if (corporate_consultancy_button) {
    if (document.body.scrollTop > 100 || document.documentElement.scrollTop > 100) {
      corporate_consultancy_button.style.display = "block";
    } else {
      corporate_consultancy_button.style.display = "none";
    }
  }
};

const scrollTopLink = document.querySelector('.scroll-top-box a');
if (scrollTopLink) {
  scrollTopLink.onclick = function(event) {
    event.preventDefault();
    window.scrollTo({ top: 0, behavior: 'smooth' });
  };
}

// project js
jQuery(document).ready(function() {
  jQuery('.project-sec .owl-carousel').owlCarousel({
    loop: true,
    margin: 0,
    nav: true,
    navText: ['<i class="fas fa-caret-left"></i>','<i class="fas fa-caret-right"></i>'],
    dots: false,
    rtl: false,
    responsive: {
    0: { 
      items: 1 
    },
    600: { 
      items: 2
    },
    1000: { 
      items: 3
    },
    1200: { 
      items: 4
    }
  },
    autoplay: false,
  });
});

// blog js
jQuery(document).ready(function() {
  jQuery('.blog-sec .owl-carousel').owlCarousel({
    loop: true,
    margin: 20,
    nav: false,
    dots: false,
    rtl: false,
    responsive: {
    0: { 
      items: 1 
    },
    600: { 
      items: 2
    },
    1000: { 
      items: 3
    },
    1200: { 
      items: 3
    }
  },
    autoplay: false,
  });
});