<?php
$uri = service('uri');
$segment1 = $uri->getSegment(1);
$active_home = ($segment1 === '' || $segment1 === null || $segment1 === 'home');
$active_activities = ($segment1 == 'activities');
$active_biodata = ($segment1 == 'biodata');
$active_education = ($segment1 == 'education');
?>
<nav class="navbar-custom">
    <div class="container">
        <a href="<?= base_url('/') ?>" class="navbar-brand-text" style="font-size: 1.5rem; font-family: 'Poppins', sans-serif;">Imanoel<span style="color: var(--sky-blue);">.</span></a>
        <ul class="navbar-nav">
            <li>
                <a class="nav-link <?= $active_home ? 'active' : '' ?>" href="<?= base_url('/') ?>">Dashboard Utama</a>
            </li>
            <li>
                <a class="nav-link <?= $active_activities ? 'active' : '' ?>" href="<?= base_url('activities') ?>">Log Aktivitas</a>
            </li>
            <li>
                <a class="nav-link <?= $active_biodata ? 'active' : '' ?>" href="<?= base_url('biodata') ?>">Biodata</a>
            </li>
            <li>
                <a class="nav-link <?= $active_education ? 'active' : '' ?>" href="<?= base_url('education') ?>">Rekam Akademis</a>
            </li>
        </ul>
    </div>
</nav>