<?php
$base_url = 'https://pearldesigns.co.za/boulinkafrica.co.za/';
$current_page = basename($_SERVER['PHP_SELF']);
function active_link($page, $current_page) { return $page === $current_page ? 'active' : ''; }
?>
<header class="site-header" id="siteHeader">
    <div class="top-bar">
        <div class="container top-inner">
            <a href="tel:+27794042389"><i class="fa-solid fa-phone"></i> 079 404 2389</a>
            <a href="mailto:ttmojapelo@gmail.com"><i class="fa-solid fa-envelope"></i> ttmojapelo@gmail.com</a>
            <div class="language-widget">
                <button class="language-toggle" type="button"><i class="fa-solid fa-globe"></i> Language</button>
                <div class="language-menu">
                    <button data-lang="en">English</button>
                    <button data-lang="af">Afrikaans</button>
                    <button data-lang="zu">isiZulu</button>
                    <button data-lang="xh">isiXhosa</button>
                    <button data-lang="st">Sesotho</button>
                    <button data-lang="tn">Setswana</button>
                    <span>Powered by Google Translate</span>
                </div>
            </div>
            <div id="google_translate_element"></div>
        </div>
    </div>
    <div class="main-nav">
        <div class="container nav-inner">
            <a class="brand" href="<?= $base_url ?>">
                <img class="brand-logo logo-light" src="<?= $base_url ?>assets/img/logo-white.png" alt="Boulink Africa white logo">
                <img class="brand-logo logo-dark" src="<?= $base_url ?>assets/img/logo.png" alt="Boulink Africa logo">
            </a>
            <button class="menu-toggle" type="button" aria-label="Open menu"><span></span><span></span><span></span></button>
            <nav class="nav-menu">
                <a class="<?= active_link('index.php',$current_page) ?>" href="<?= $base_url ?>">Home</a>
                <a class="<?= active_link('about-us.php',$current_page) ?>" href="<?= $base_url ?>about-us">About Us</a>
                <a class="<?= active_link('services.php',$current_page) ?>" href="<?= $base_url ?>services">Services</a>
                <a class="<?= active_link('projects.php',$current_page) ?>" href="<?= $base_url ?>projects">Property Projects</a>
                <a class="<?= active_link('contact.php',$current_page) ?>" href="<?= $base_url ?>contact">Contact</a>
                <a class="nav-social" href="mailto:ttmojapelo@gmail.com" aria-label="Email Boulink Africa"><i class="fa-solid fa-envelope"></i></a>
                <a class="nav-social" href="tel:+27794042389" aria-label="Call Boulink Africa"><i class="fa-solid fa-phone"></i></a>
            </nav>
        </div>
    </div>
</header>
