<?php
$current_page = basename($_SERVER['PHP_SELF']); // e.g. "about.php"
?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>

  <style>
    /* Reset theme forcing first menu active */
    .main-menu li a { color: inherit; }
    .main-menu li.active-menu > a,
    .main-menu li.active-sub > a {
        color: #0d6efd; /* highlight blue */
        font-weight: 600;
    }
    
  </style>
</head>
<body>
<!-- Header Start  -->
<div id="header" class="section header-section header-section-2 header-section-6 transparent-header">
    <div class="container">

        <!-- Header Wrap Start  -->
        <div class="header-wrap">

            <div class="header-logo header-logo-3">
                <a class="logo-white" href="index.php"><img src="assets/images/logo.png" alt=""></a>
                <a class="logo-black" href="index.php"><img src="assets/images/logo.png" alt=""></a>
            </div>

            <div class="header-menu header-menu-2 d-none d-lg-block">
                <ul class="main-menu">
                    <li class="<?php echo ($current_page == 'index.php') ? 'active-menu' : ''; ?>">
                        <a href="index.php">Home</a>
                    </li>
                    <li class="<?php echo ($current_page == 'about.php') ? 'active-menu' : ''; ?>">
                        <a href="about.php">About Us</a>
                    </li>
                    <li class="<?php echo (in_array($current_page, ['service1.php','service2.php','service3.php'])) ? 'active-menu' : ''; ?>">
                        <a href="#">Services</a>
                        <ul class="sub-menu">
                            <li class="<?php echo ($current_page == 'service1.php') ? 'active-sub' : ''; ?>"><a href="databse_services.php">Database Services</a></li>
                            <li class="<?php echo ($current_page == 'service2.php') ? 'active-sub' : ''; ?>"><a href="callcenter_services.php">Callcenter Services</a></li>
                            <li class="<?php echo ($current_page == 'service3.php') ? 'active-sub' : ''; ?>"><a href="digitalmarketing.php">Digital Marketing</a></li>
                        </ul>
                    </li>
                    <li class="<?php echo ($current_page == 'contact.php') ? 'active-menu' : ''; ?>">
                        <a href="contact.php">Contact Us</a>
                    </li>
                </ul>
            </div>

            <!-- Header Toggle Start -->
            <div class="header-toggle d-lg-none">
                <button data-bs-toggle="offcanvas" data-bs-target="#offcanvasExample">
                    <span></span>
                    <span></span>
                    <span></span>
                </button>
            </div>
            <!-- Header Toggle End -->
        </div>
        <!-- Header Meta End  -->

    </div>
    <!-- Header Wrap End  -->

</div>
<!-- Header End -->

<!-- Offcanvas Start-->
<div class="offcanvas offcanvas-start" id="offcanvasExample">
    <div class="offcanvas-header">
        <!-- Offcanvas Logo Start -->
        <div class="offcanvas-logo">
            <a href="index.php"><img src="assets/images/logo-white.png" alt=""></a>
        </div>
        <!-- Offcanvas Logo End -->
        <button type="button" class="close-btn" data-bs-dismiss="offcanvas"><i class="flaticon-close"></i></button>
    </div>

    <!-- Offcanvas Body Start -->
    <div class="offcanvas-body">
        <div class="offcanvas-menu">
            <ul class="main-menu">
                <li class="<?php echo ($current_page == 'index.php') ? 'active-menu' : ''; ?>">
                    <a href="index.php">Home</a>
                </li>
                <li class="<?php echo ($current_page == 'about.php') ? 'active-menu' : ''; ?>">
                    <a href="about.php">About Us</a>
                </li>
                <li class="<?php echo (in_array($current_page, ['service1.php','service2.php','service3.php'])) ? 'active-menu' : ''; ?>">
                    <a href="#">Services</a>
                    <ul class="sub-menu">
                        <li class="<?php echo ($current_page == 'service1.php') ? 'active-sub' : ''; ?>"><a href="databse_services.php">Databse Services</a></li>
                        <li class="<?php echo ($current_page == 'service2.php') ? 'active-sub' : ''; ?>"><a href="callcenter_services.php">Call Center Services</a></li>
                        <li class="<?php echo ($current_page == 'service3.php') ? 'active-sub' : ''; ?>"><a href="digitalmarketing.php">Service Three</a></li>
                    </ul>
                </li>
                <li class="<?php echo ($current_page == 'contact.php') ? 'active-menu' : ''; ?>">
                    <a href="contact.php">Contact Us</a>
                </li>
            </ul>
        </div>
    </div>
    <!-- Offcanvas Body End -->
</div>
<!-- Offcanvas End -->
