</div> <!-- END MAIN CONTENT -->

<!-- ===== BOTTOM NAV (GLOBAL) ===== -->
<div class="bottom-nav">

    <a href="/digital_panchayat/admin/dashboard.php">
        <i class="fa fa-home"></i>
        <span>Home</span>
    </a>

    <a href="/digital_panchayat/admin/villages/village_data.php">
        <i class="fa fa-map"></i>
        <span>Villages</span>
    </a>

    <a href="/digital_panchayat/admin/families/view_families.php">
        <i class="fa fa-users"></i>
        <span>Families</span>
    </a>

    <a href="/digital_panchayat/admin/schemes/view_schemes.php">
        <i class="fa fa-list"></i>
        <span>Schemes</span>
    </a>

</div>

<!-- ===== SCRIPT ===== -->
<script>
document.addEventListener("DOMContentLoaded", function(){

    /* Sidebar Dropdown */
    document.querySelectorAll(".menu-title").forEach(function(menu){
        menu.addEventListener("click", function(){
            this.parentElement.classList.toggle("active");
        });
    });

    /* Auto Active Menu */
    var path = window.location.pathname;

    document.querySelectorAll(".menu-group").forEach(function(group){
        var links = group.querySelectorAll("a");

        links.forEach(function(link){
            if(path.includes(link.getAttribute("href"))){
                group.classList.add("active");
            }
        });
    });

});
</script>

</body>
</html>