document.addEventListener('DOMContentLoaded', function () {

  // Scroll to top button
  const scrollBtn = document.querySelector('.scrolltotop');

  scrollBtn.addEventListener('click', function (e) {
    e.preventDefault();
    window.scrollTo({ top: 0, behavior: 'smooth' });
  });

  window.addEventListener('scroll', function () {
    if (window.scrollY > 500) {
      scrollBtn.style.display = 'block';
      scrollBtn.style.opacity = '1';
    } else {
      scrollBtn.style.opacity = '0';
      setTimeout(() => {
        scrollBtn.style.display = 'none';
      }, 300);
    }
  });
  

 //flitiky-slider
  var mainGallery1 = new Flickity('.gallery-main-1', {
    cellAlign: 'center',
    contain: true,
    pageDots: false,
    prevNextButtons: true,
    wrapAround: true,
    asNavFor: '.gallery-nav-1'
  });

  var navGallery1 = new Flickity('.gallery-nav-1', {
    asNavFor: '.gallery-main-1',
    contain: true,
    pageDots: false,
    wrapAround: true,
    prevNextButtons: false,
    cellAlign: 'left'
  });




// main
});