<?php include('../components/header-link.php'); ?>

<?php
// Get the current file name without the extension
$current_page = basename($_SERVER['PHP_SELF'], ".php");

// Define arrays for dropdown categories
$mobile_apps_pages = ['mobile-app-developmentt', 'ioss', 'androidd', 'hybridd', 'nativee'];
$product_development_pages = ['product-developmentt', 'ai-mll', 'app-modernizationn', 'ui-uxx', 'complete-digital-transformationn'];
$company_pages = ['company-about-uss', 'project-managementt', 'portfolioo'];
?>

<!-- Preloader -->
<div id="pre_loader">
    <img loading="lazy" src="../assets/images/new-img/loader.gif">
</div>

<!-- Header Start -->
<header class="header" id="header">
    <div class="head_inner">
        <div class="head_logo">
            <a href="homepage.php">
                <img loading="lazy" class="for_fix_img" src="../assets/images/new-img/wdi_logo.svg" alt="logo">
            </a>
        </div>

        <nav class="nav_bar">
            <div class="nav_cross">
                <i class="nav_cross_btn">✕</i>
            </div>
            <ul>
                <!-- Mobile Apps -->
                <li class="drop_down single_line_drop <?php echo (in_array($current_page, $mobile_apps_pages)) ? 'active' : ''; ?>"
                    data_dropdown>
                    <button class="nav_link" data_dropdown_button>Mobile Apps
                        <svg width="8" height="5" viewBox="0 0 8 5" xmlns="http://www.w3.org/2000/svg">
                            <path d="M4 5L7.89711 0.5H0.102886L4 5Z" />
                        </svg>
                    </button>
                    <div class="dropdown_content">
                        <div class="grid_btns">
                            <div class="">
                                <a class="nav-link <?php echo ($current_page === 'mobile-app-development') ? 'active' : ''; ?>"
                                    href="mobile-app-development.php">Mobile App Development</a>
                                <a class="nav-link <?php echo ($current_page === 'ios') ? 'active' : ''; ?>"
                                    href="ios.php">iOS App Development</a>
                                <a class="nav-link <?php echo ($current_page === 'android') ? 'active' : ''; ?>"
                                    href="android.php">Android App Development</a>
                                <a class="nav-link <?php echo ($current_page === 'hybrid') ? 'active' : ''; ?>"
                                    href="hybrid.php">Hybrid App Development</a>
                                <a class="nav-link <?php echo ($current_page === 'native') ? 'active' : ''; ?>"
                                    href="native.php">Native App Development</a>
                            </div>
                        </div>
                    </div>
                </li>

                <!-- Web Apps -->
                <li class="drop_down single_line_drop <?php echo ($current_page === 'web-app-development') ? 'active' : ''; ?>"
                    data_dropdown>
                    <a class="nav_link" href="web-app-development.php">Web Apps</a>
                </li>

                <!-- Product Development -->
                <li class="drop_down single_line_drop <?php echo (in_array($current_page, $product_development_pages)) ? 'active' : ''; ?>"
                    data_dropdown>
                    <button class="nav_link" data_dropdown_button>Product Development
                        <svg width="8" height="5" viewBox="0 0 8 5" fill="#ababab" xmlns="http://www.w3.org/2000/svg">
                            <path d="M4 5L7.89711 0.5H0.102886L4 5Z" fill="white" fill-opacity="0.67" />
                        </svg>
                    </button>
                    <div class="dropdown_content">
                        <div class="grid_btns">
                            <div class="">
                                <a class="nav-link <?php echo ($current_page === 'product-development') ? 'active' : ''; ?>"
                                    href="product-development.php">Product Development</a>
                                <!-- <a class="nav-link <?php echo ($current_page === 'ai-ml') ? 'active' : ''; ?>"
                                    href="ai-ml.php">AI-Powered Solutions</a> -->
                                <a class="nav-link <?php echo ($current_page === 'app-modernization') ? 'active' : ''; ?>"
                                    href="app-modernization.php">Application Modernization</a>
                                <a class="nav-link <?php echo ($current_page === 'ui-ux') ? 'active' : ''; ?>"
                                    href="ui-ux.php">UI/UX Modernization</a>
                                <a class="nav-link <?php echo ($current_page === 'complete-digital-transformation') ? 'active' : ''; ?>"
                                    href="complete-digital-transformation.php">Complete Digital Transformation</a>
                            </div>
                        </div>
                    </div>
                </li>

                <!-- AI Solutions -->
                <li class="drop_down single_line_drop <?php echo ($current_page === 'ai-ml') ? 'active' : ''; ?>"
                    data_dropdown>
                    <a class="nav_link" href="ai-ml.php">AI Solutions</a>
                </li>

                <!-- AI Apps -->
                <li class="drop_down single_line_drop <?php echo ($current_page === 'ai-app') ? 'active' : ''; ?>"
                    data_dropdown>
                    <a class="nav_link" href="ai-app.php">AI Apps</a>
                </li>

                <!-- Solutions -->
                <li class="drop_down single_line_drop <?php echo ($current_page === 'consulting') ? 'active' : ''; ?>">
                    <a class="nav_link" href="consulting.php">Solutions</a>
                </li>

                <!-- Company -->
                <li class="drop_down single_line_drop <?php echo (in_array($current_page, $company_pages)) ? 'active' : ''; ?>"
                    data_dropdown>
                    <button class="nav_link" data_dropdown_button>Company
                        <svg width="8" height="5" viewBox="0 0 8 5" fill="#ababab" xmlns="http://www.w3.org/2000/svg">
                            <path d="M4 5L7.89711 0.5H0.102886L4 5Z" fill="white" fill-opacity="0.67" />
                        </svg>
                    </button>
                    <div class="dropdown_content">
                        <div class="grid_btns">
                            <div class="">
                                <a class="nav-link <?php echo ($current_page === 'company-about-us') ? 'active' : ''; ?>"
                                    href="company-about-us.php">About Us</a>
                                <a class="nav-link <?php echo ($current_page === 'project-management') ? 'active' : ''; ?>"
                                    href="project-management.php">Project Management</a>
                                <a class="nav-link <?php echo ($current_page === 'portfolio') ? 'active' : ''; ?>"
                                    href="portfolio.php">Portfolio</a>
                            </div>
                        </div>
                    </div>
                </li>


                <!-- Contact Us -->
                <li class="drop_down">
                    <a href="contact-us.php"
                        class="nav_link contact_us <?php echo ($current_page === 'contact-us') ? 'active' : ''; ?>">
                        Do you have a project
                        <img loading="lazy" src="../assets/images/arrow-up-right.webp" class="arrow_up" alt="arrow-up">
                    </a>
                </li>
            </ul>
        </nav>

        <!-- Hamburger Menu -->
        <div class="ham_burger">
            <button aria-label="button"><i class="fa-solid fa-bars"></i></button>
        </div>
        <div class="overlay"></div>
    </div>
</header>