<!-- Start Navigation -->
<div class="header header-light head-shadow">
<div class="container">
    <nav id="navigation" class="navigation navigation-landscape">
        <div class="nav-header">
            <a class="nav-brand text-logo" href="index.php">
                <span class="svg-icon text-primary svg-icon-2hx">
                    <svg width="50" height="50" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <path d="M15.8797 15.375C15.9797 15.075 15.9797 14.775 15.9797 14.475C15.9797 13.775 15.7797 13.075 15.4797 12.475C14.7797 11.275 13.4797 10.475 11.9797 10.475C11.7797 10.475 11.5797 10.475 11.3797 10.575C7.37971 11.075 4.67971 14.575 2.57971 18.075L10.8797 3.675C11.3797 2.775 12.5797 2.775 13.0797 3.675C13.1797 3.875 13.2797 3.975 13.3797 4.175C15.2797 7.575 16.9797 11.675 15.8797 15.375Z" fill="currentColor"/>
                        <path opacity="0.3" d="M20.6797 20.6749C16.7797 20.6749 12.3797 20.275 9.57972 17.575C10.2797 18.075 11.0797 18.375 11.9797 18.375C13.4797 18.375 14.7797 17.5749 15.4797 16.2749C15.6797 15.9749 15.7797 15.675 15.7797 15.375V15.2749C16.8797 11.5749 15.2797 7.47495 13.2797 4.07495L21.6797 18.6749C22.2797 19.5749 21.6797 20.6749 20.6797 20.6749ZM8.67972 18.6749C8.17972 17.8749 7.97972 16.975 7.77972 15.975C7.37972 13.575 8.67972 10.775 11.3797 10.375C7.37972 10.875 4.67972 14.375 2.57972 17.875C2.47972 18.075 2.27972 18.375 2.17972 18.575C1.67972 19.475 2.27972 20.475 3.27972 20.475H10.3797C9.67972 20.175 9.07972 19.3749 8.67972 18.6749Z" fill="currentColor"/>
                    </svg>
                </span><h5 class="fs-3 fw-bold ms-1 my-0">Resido</h5>
            </a>
            <div class="nav-toggle"></div>
            <div class="mobile_nav">
                <ul>
                    <li>
                        <a href="submit-property.php" class="text-primary">
                            <span class="svg-icon svg-icon-2hx">
                                <svg width="35" height="35" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                    <rect opacity="0.3" x="2" y="2" width="20" height="20" rx="10" fill="currentColor"/>
                                    <rect x="10.8891" y="17.8033" width="12" height="2" rx="1" transform="rotate(-90 10.8891 17.8033)" fill="currentColor"/>
                                    <rect x="6.01041" y="10.9247" width="12" height="2" rx="1" fill="currentColor"/>
                                </svg>
                            </span>	
                        </a>
                    </li>
                    <li>
                        <div class="btn-group account-drop">
                            <button type="button" class="btn btn-order-by-filt dropdown-toggle" id="showbuttons" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                <img src="<?php echo $static_url; ?>/img/team-1.jpg" class="avater-img" alt="">
                            </button>
                            <div class="dropdown-menu pull-right animated flipInX" id="showings">
                                <a href="dashboard.php"><i class="fa-solid fa-gauge"></i>Dashboard</a>
                                <a href="my-profile.php"><i class="fa-solid fa-address-card"></i>My Profile</a>                                  
                                <a href="my-property.php"><i class="fa-solid fa-building-circle-check"></i>My Property</a>                                   
                                <a href="bookmark-list.php"><i class="fa-solid fa-bookmark"></i>Bookmarked Property</a>                                   
                                <a href="submit-property-dashboard.php"><i class="fa-solid fa-house"></i>Submit Property</a>                                   
                                <a href="change-password.php"><i class="fa-solid fa-unlock"></i>Change Password</a>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="nav-menus-wrapper" style="transition-property: none;">
            <ul class="nav-menu">
            
                <li class="relative parent-parent-menu-item">
                    <a href="#" class="home-link">Home<span class="submenu-indicator"></span></a>
                    <ul class="nav-dropdown nav-submenu">
                        <li><a href="/Resido/index.php" class="sub-menu-item">Home Layout 1</a></li>
                        <li><a href="/Resido/home-2.php" class="sub-menu-item">Home Layout 2</a></li>
                        <li><a href="/Resido/home-3.php" class="sub-menu-item">Home Layout 3</a></li>
                        <li><a href="/Resido/home-4.php" class="sub-menu-item">Home Layout 4</a></li>
                        <li><a href="/Resido/home-5.php" class="sub-menu-item">Home Layout 5</a></li>
                        <li><a href="/Resido/home-6.php" class="sub-menu-item">Home Layout 6</a></li>
                        <li><a href="/Resido/home-7.php" class="sub-menu-item">Home Layout 7</a></li>
                        <li><a href="/Resido/home-8.php" class="sub-menu-item">Home Layout 8</a></li>
                        <li><a href="/Resido/home-9.php" class="sub-menu-item">Home Layout 9</a></li>
                        <li><a href="/Resido/home-10.php" class="sub-menu-item">Home Layout 10</a></li>
                        <li><a href="/Resido/home-11.php" class="sub-menu-item">Home Layout 11</a></li>
                        <li><a href="/Resido/video.php" class="sub-menu-item">Video Home</a></li>
                        <li><a href="/Resido/map.php" class="sub-menu-item">Map Home Layout</a></li>
                    </ul>
                </li>
                
                <li class="relative parent-parent-menu-item">
                    <a class="home-link" href="JavaScript:Void(0);">Listings<span class="submenu-indicator"></span></a>
                    <ul class="nav-dropdown nav-submenu">
                        <li class="relative parent-menu-item"><a href="JavaScript:Void(0);">List Layout<span class="submenu-indicator"></span></a>
                            <ul class="nav-dropdown nav-submenu">
                                <li><a href="/Resido/list-layout-one.php" class="sub-menu-item">List Layout Simple</a></li>
                                <li><a href="/Resido/list-layout-two.php" class="sub-menu-item">List Layout Modern</a></li>                                    
                                <li><a href="/Resido/list-layout-three.php" class="sub-menu-item">List Layout Advance</a></li> 
                                <li><a href="/Resido/list-layout-with-sidebar.php" class="sub-menu-item">List Layout With Sidebar</a></li>
                                <li><a href="/Resido/listings-list-with-sidebar.php" class="sub-menu-item">Listings List With Sidebar</a></li>                                   
                                <li><a href="/Resido/list-layout-with-map.php" class="sub-menu-item">With Map</a></li>                                    
                                <li><a href="/Resido/list-layout-full.php" class="sub-menu-item">Full Width</a></li>
                            </ul>
                        </li>
                        <li class="relative parent-menu-item"><a href="JavaScript:Void(0);">Grid Layout<span class="submenu-indicator"></span></a>
                            <ul class="nav-dropdown nav-submenu">
                                <li><a href="/Resido/grid-layout-with-sidebar.php" class="sub-menu-item">With Sidebar</a></li>                                    
                                <li><a href="/Resido/classical-layout-with-sidebar.php" class="sub-menu-item">Classical With Sidebar</a></li>                                    
                                <li><a href="/Resido/grid-layout-with-map.php" class="sub-menu-item">With Map</a></li>                                    
                                <li><a href="/Resido/grid.php" class="sub-menu-item">Full Width</a></li>
                                <li><a href="/Resido/classical-property.php" class="sub-menu-item">Classical Full Width</a></li>	 
                            </ul>
                        </li>
                        <li class="relative parent-menu-item"><a href="JavaScript:Void(0);">With Map Property<span class="submenu-indicator"></span></a>
                            <ul class="nav-dropdown nav-submenu">
                                <li><a href="/Resido/list-layout-with-map.php" class="sub-menu-item">List With Map</a></li>                                    
                                <li><a href="/Resido/grid-layout-with-map.php" class="sub-menu-item">Grid With Map</a></li>                                    
                                <li><a href="/Resido/classical-layout-with-map.php" class="sub-menu-item">Classical With Map</a></li>     
                                <li><a href="/Resido/place-search.php" class="sub-menu-item">Place Search</a></li>                               
                                <li><a href="/Resido/half-map.php" class="sub-menu-item">Half Map Search</a></li>
                                <li><a href="/Resido/half-map-2.php" class="sub-menu-item">Half Map Search 02</a></li>												
                            </ul>
                        </li>
                    </ul>
                </li>
                
                <li class="relative parent-parent-menu-item"><a class="home-link" href="JavaScript:Void(0);">Features<span class="submenu-indicator"></span></a>
                    <ul class="nav-dropdown nav-submenu">
                        <li class="relative parent-menu-item"><a href="JavaScript:Void(0);">Single Property<span class="submenu-indicator"></span></a>
                            <ul class="nav-dropdown nav-submenu">
                                <li><a href="/Resido/single-property-1.php" class="sub-menu-item">Single Property 1</a></li>                                    
                                <li><a href="/Resido/single-property-2.php" class="sub-menu-item">Single Property 2</a></li>                                    
                                <li><a href="/Resido/single-property-3.php" class="sub-menu-item">Single Property 3</a></li> 
                                <li><a href="/Resido/single-property-4.php" class="sub-menu-item">Single Property 4</a></li> 												
                            </ul>
                        </li>
                        <li class="relative parent-menu-item"><a href="JavaScript:Void(0);">Agents<span class="submenu-indicator"></span></a>
                            <ul class="nav-dropdown nav-submenu">
                                <li><a href="/Resido/agents.php" class="sub-menu-item">Agents List</a></li>                                    
                                <li><a href="/Resido/agent-page.php" class="sub-menu-item">Agent Page</a></li>  
                                <li><a href="/Resido/add-agent.php" class="sub-menu-item">Add Agent</a></li>
                                <li><a href="/Resido/edit-agent.php" class="sub-menu-item">Edit Agent</a></li>
                            </ul>
                        </li>
                        <li class="relative parent-menu-item"><a href="JavaScript:Void(0);">Agencies<span class="submenu-indicator"></span></a>
                            <ul class="nav-dropdown nav-submenu">                                   
                                <li><a href="/Resido/agencies.php" class="sub-menu-item">Agencies List</a></li>                                    
                                <li><a href="/Resido/agency-page.php" class="sub-menu-item">Agency Page</a></li> 
                            </ul>
                        </li>
                        <li class="relative parent-menu-item"><a href="JavaScript:Void(0);">My Account<span class="submenu-indicator"></span></a>
                            <ul class="nav-dropdown nav-submenu">
                                <li><a href="/Resido/dashboard.php" class="sub-menu-item">User Dashboard</a></li>
                                <li><a href="/Resido/create-account.php" class="sub-menu-item">Create Account</a></li>                                
                                <li><a href="/Resido/payment.php" class="sub-menu-item">Payment Confirmation</a></li>
                                <li><a href="/Resido/checkout.php" class="sub-menu-item">Checkout</a></li>
                                <li><a href="/Resido/my-profile.php" class="sub-menu-item">My Profile</a></li>                                    
                                <li><a href="/Resido/my-property.php" class="sub-menu-item">Property List</a></li>                                    
                                <li><a href="/Resido/bookmark-list.php" class="sub-menu-item">Bookmarked Listings</a></li>                                    
                                <li><a href="/Resido/change-password.php" class="sub-menu-item">Change Password</a></li> 
                            </ul>
                        </li>
                        <li>
                            <a href="/Resido/compare-property.php" class="sub-menu-item">Compare Property</a>                                
                        </li>
                        <li>
                            <a href="/Resido/submit-property.php" class="sub-menu-item">Submit Property</a>                                
                        </li>
                        <li>
                            <a href="/Resido/property-detail.php" class="sub-menu-item">Property Detail</a>                                
                        </li>
                    </ul>
                </li>
                    
                <li class="relative parent-parent-menu-item"><a class="home-link" href="JavaScript:Void(0);">Pages<span class="submenu-indicator"></span></a>
                    <ul class="nav-dropdown nav-submenu">
                        <li><a href="/Resido/about-us.php" class="sub-menu-item">About Us</a></li>                                    
                        <li><a href="/Resido/blog.php" class="sub-menu-item">Blogs Page</a></li>                                    
                        <li><a href="/Resido/blog-detail.php" class="sub-menu-item">Blog Detail</a></li>                                    
                        <li><a href="/Resido/component.php" class="sub-menu-item">Shortcodes</a></li> 
                        <li><a href="/Resido/pricing.php" class="sub-menu-item">Pricing</a></li>  
                        <li><a href="/Resido/faq.php" class="sub-menu-item">faq</a></li> 
                        <li><a href="/Resido/404.php" class="sub-menu-item">Error Page</a></li>
                        <li><a href="/Resido/contact.php" class="sub-menu-item">Contacts</a></li>
                    </ul>
                </li>
                
            </ul>
            
            <ul class="nav-menu nav-menu-social align-to-right">
                <li class="relative parent-parent-menu-item">
                    <div class="btn-group account-drop">
                        <button type="button" class="btn btn-order-by-filt dropdown-toggle" id="showbutton" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <img src="<?php echo $static_url; ?>/img/team-1.jpg" class="avater-img" alt="">Hi, Admin
                        </button>
                        <div class="dropdown-menu pull-right animated flipInX" id="showing">
                            <a href="/Resido/dashboard.php" class="sub-menu-item"><i class="fa-solid fa-gauge"></i>Dashboard</a>
                            <a href="/Resido/my-profile.php" class="sub-menu-item"><i class="fa-solid fa-address-card"></i>My Profile</a>                                  
                            <a href="/Resido/my-property.php" class="sub-menu-item"><i class="fa-solid fa-building-circle-check"></i>My Property</a>                                   
                            <a href="/Resido/bookmark-list.php" class="sub-menu-item"><i class="fa-solid fa-bookmark"></i>Bookmarked Property</a>                                   
                            <a href="/Resido/submit-property-dashboard.php" class="sub-menu-item"><i class="fa-solid fa-house"></i>Submit Property</a>                                   
                            <a href="/Resido/change-password.php" class="sub-menu-item"><i class="fa-solid fa-unlock"></i>Change Password</a>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </nav>
</div>
</div>
<!-- End Navigation -->
<div class="clearfix"></div>


<script>
    const currentPath = window.location.pathname;
    console.log(currentPath);

    // Find and highlight the active submenu item
    const subMenuItems = document.querySelectorAll('.sub-menu-item');
    subMenuItems.forEach((item) => {
        if (item.getAttribute('href') === currentPath) {
            item.classList.add('active');

            // Highlight all parent menus recursively
            let parentMenu = item.closest('.parent-menu-item');
            while (parentMenu && !parentMenu.classList.contains('processed')) {
                const parentLink = parentMenu.querySelector('a');
                if (parentLink) {
                    parentLink.classList.add('active');
                }
                parentMenu.classList.add('processed'); // Mark as processed to avoid re-processing
                parentMenu = parentMenu.closest('.parent-parent-menu-item');
            }

            // Highlight the top-level parent menu
            const topLevelMenu = item.closest('.parent-parent-menu-item');
            if (topLevelMenu) {
                const topLevelLink = topLevelMenu.querySelector('.home-link');
                if (topLevelLink) {
                    topLevelLink.classList.add('active');
                }
            }
        }
    });
</script>