<?php
require_once __DIR__ . '/../functions.php';
$siteName = get_setting('site_name', 'Tumaini Cyber');
$siteLogo = get_setting('site_logo');
$sitePhone = get_setting('site_phone', '+254759607619');
$siteWhatsapp = get_setting('site_whatsapp', '+254759607619');
$navItems = [
    'Home' => 'index.php',
    'About' => 'about.php',
    'Services' => 'services.php',
    'Portfolio' => 'portfolio.php',
    'Blog' => 'blog.php',
    'Shop' => 'shop.php',
    'Contact' => 'contact.php',
];
?>
<header class="site-header">
    <div class="brand-group">
        <a class="brand-link" href="<?= BASE_URL ?>">
            <?php if ($siteLogo): ?>
                <img class="brand-logo" src="<?= BASE_URL . UPLOAD_URL . '/' . clean($siteLogo) ?>" alt="<?= clean($siteName) ?> logo">
            <?php endif; ?>
            <div>
                <span class="brand-name"><?= clean($siteName) ?></span>
                <span class="brand-tagline">Smart Digital Solutions for Modern Businesses</span>
            </div>
        </a>
    </div>
    <button class="nav-toggle" type="button" aria-label="Toggle navigation" aria-controls="main-navigation" aria-expanded="false">☰</button>
    <nav class="site-nav" id="main-navigation">
        <button class="nav-close" type="button" aria-label="Close navigation">×</button>
        <ul class="nav-list">
            <?php foreach ($navItems as $label => $path): ?>
                <li><a class="<?= build_active_class(basename($path)) ?>" href="<?= BASE_URL . $path ?>"><?= clean($label) ?></a></li>
            <?php endforeach; ?>
        </ul>
        <div class="nav-actions">
            <a class="btn btn-outline" href="tel:<?= clean(preg_replace('/[^0-9+]/', '', $sitePhone)) ?>"><?= clean($sitePhone) ?></a>
            <a class="btn btn-primary" href="quote.php">Request Quote</a>
        </div>
    </nav>
</header>
