document.querySelectorAll("ul li.has-sub div").forEach(el => {
    el.addEventListener("click", (event)=> {
        let parent = el.parentElement;
        if(parent.classList.contains("active")){
            parent.classList.remove("active")
        } else parent.classList.add("active");
    });
});

if(window.innerWidth < 768){
    document.addEventListener("DOMContentLoaded", function() {

        setTimeout(()=>{

            window.scroll({
                top: document.querySelector('.main-wrapper .content').offsetTop - 60,
                behavior: 'smooth'
            })
        },400);

    });

}
