<nav class="public-header sticky top-0 z-40">
    <div class="public-topbar">
        <div class="public-shell topbar-inner">
            <div class="topbar-note hidden sm:block">Trusted Study Abroad Guidance</div>
            <div class="topbar-social">
                <?php
                    $socialLinks = $siteSettings['social_links'] ?? [];
                    if (empty($socialLinks)) {
                        $socialLinks = [
                            ['label' => 'Facebook', 'url' => 'https://facebook.com'],
                            ['label' => 'Instagram', 'url' => 'https://instagram.com'],
                            ['label' => 'YouTube', 'url' => 'https://youtube.com'],
                            ['label' => 'LinkedIn', 'url' => 'https://linkedin.com'],
                        ];
                    }
                    $socialTokens = [
                        'facebook' => 'f',
                        'instagram' => 'i',
                        'youtube' => 'y',
                        'linkedin' => 'in',
                        'twitter' => 'x',
                        'x' => 'x',
                        'tiktok' => 't',
                    ];
                ?>
                <?php $__currentLoopData = $socialLinks; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $socialLink): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php
                        $socialLabel = trim((string) ($socialLink['label'] ?? 'Social'));
                        $socialUrl = trim((string) ($socialLink['url'] ?? ''));
                        $socialKey = strtolower($socialLabel);
                        $socialText = $socialTokens[$socialKey] ?? strtoupper(substr($socialLabel, 0, 1));
                    ?>
                    <?php if($socialUrl !== ''): ?>
                        <a href="<?php echo e($socialUrl); ?>" target="_blank" rel="noopener" aria-label="<?php echo e($socialLabel); ?>"><?php echo e($socialText); ?></a>
                    <?php endif; ?>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
            <div class="topbar-phone"><?php echo e($siteSettings['phone'] ?? '09610883388'); ?></div>
        </div>
    </div>

    <div class="public-shell nav-wrap">
        <div class="public-navbar">
            <a href="<?php echo e(url('/')); ?>" class="brand-wrap">
                <?php if(!empty($branding['logo_url'])): ?>
                    <img src="<?php echo e($branding['logo_url']); ?>" alt="<?php echo e($branding['site_name']); ?>" class="brand-logo" />
                <?php else: ?>
                    <div class="brand-fallback-mark"><?php echo e($branding['initial'] ?? 'G'); ?></div>
                    <div class="brand-meta">
                        <span class="brand-name"><?php echo e($branding['site_name'] ?? 'GPS Migration'); ?></span>
                        <span class="brand-tagline"><?php echo e($branding['tagline'] ?: 'Study Abroad Experts'); ?></span>
                    </div>
                <?php endif; ?>
            </a>

            <div class="nav-links hidden md:flex">
                <a href="<?php echo e(route('countries.index')); ?>" class="<?php echo e(request()->routeIs('countries.*') ? 'is-active' : ''); ?>">Countries</a>
                <a href="<?php echo e(route('blogs.index')); ?>" class="<?php echo e(request()->routeIs('blogs.*') ? 'is-active' : ''); ?>">Blogs</a>
                <a href="<?php echo e(route('success-stories')); ?>" class="<?php echo e(request()->routeIs('success-stories') ? 'is-active' : ''); ?>">Success Stories</a>
                <a href="<?php echo e(route('services')); ?>" class="<?php echo e(request()->routeIs('services') ? 'is-active' : ''); ?>">Services</a>
                <a href="<?php echo e(route('events.index')); ?>" class="<?php echo e(request()->routeIs('events.*') ? 'is-active' : ''); ?>">Events & News</a>
                <a href="<?php echo e(route('contact')); ?>" class="<?php echo e(request()->routeIs('contact') ? 'is-active' : ''); ?>">Contact</a>
            </div>

            <div class="nav-right">
                <button type="button" onclick="ApplyModal.open()" class="nav-cta hidden sm:inline-flex">Book A Free Consultation</button>
                <button id="mobile-menu-btn" class="md:hidden nav-menu-btn" aria-label="menu">
                    <span></span><span></span><span></span>
                </button>
            </div>
        </div>

        
        <?php
            $waNumber = preg_replace('/\\D+/', '', $siteSettings['whatsapp_number'] ?? '');
            $waLink = $waNumber ? ('https://wa.me/' . $waNumber) : null;
            $phoneDisplay = $siteSettings['phone'] ?? '';
        ?>
        <div id="mobile-drawer-overlay" class="mobile-drawer-overlay"></div>
        <div id="mobile-drawer" class="mobile-drawer">
            <div class="mobile-drawer__head">
                <a href="<?php echo e(url('/')); ?>" class="mobile-drawer__brand">
                    <?php if(!empty($branding['logo_url'])): ?>
                        <img src="<?php echo e($branding['logo_url']); ?>" alt="<?php echo e($branding['site_name']); ?>">
                    <?php else: ?>
                        <span><?php echo e($branding['site_name'] ?? 'GPS Migration'); ?></span>
                    <?php endif; ?>
                </a>
                <button id="mobile-drawer-close" class="mobile-drawer__close" aria-label="close">×</button>
            </div>
            <div class="mobile-drawer__follow">
                <span>Follow us:</span>
                <div class="mobile-drawer__social">
                    <?php $drawerSocial = $socialLinks ?? []; ?>
                    <?php $__currentLoopData = $drawerSocial; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $socialLink): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php
                            $label = trim((string) ($socialLink['label'] ?? ''));
                            $url = trim((string) ($socialLink['url'] ?? ''));
                            $token = $socialTokens[strtolower($label)] ?? strtoupper(substr($label, 0, 1));
                        ?>
                        <?php if($url): ?>
                            <a href="<?php echo e($url); ?>" target="_blank" aria-label="<?php echo e($label); ?>"><?php echo e($token); ?></a>
                        <?php endif; ?>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <?php if(!empty($waLink)): ?>
                        <a href="<?php echo e($waLink); ?>" target="_blank" aria-label="WhatsApp">WA</a>
                    <?php endif; ?>
                </div>
            </div>
            <?php if($phoneDisplay): ?>
                <div class="mobile-drawer__phone">
                    <svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke="currentColor">
                        <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5.5A2.5 2.5 0 015.5 3h1.047a2 2 0 011.878 1.316l.716 1.91a2 2 0 01-.45 2.06l-.793.793a12.06 12.06 0 005.829 5.829l.793-.793a2 2 0 012.06-.45l1.91.716A2 2 0 0121 17.453V18.5A2.5 2.5 0 0118.5 21H18A15 15 0 013 6v-.5z" />
                    </svg>
                    <a href="tel:<?php echo e(preg_replace('/\\D+/', '', $phoneDisplay)); ?>" style="color:inherit;text-decoration:none;"><?php echo e($phoneDisplay); ?></a>
                </div>
            <?php endif; ?>
            <div class="mobile-drawer__links">
                <a href="<?php echo e(route('countries.index')); ?>">Countries</a>
                <a href="<?php echo e(route('blogs.index')); ?>">Blogs</a>
                <a href="<?php echo e(route('success-stories')); ?>">Success Stories</a>
                <a href="<?php echo e(route('services')); ?>">Services</a>
                <a href="<?php echo e(route('events.index')); ?>">Events & News</a>
                <a href="<?php echo e(route('contact')); ?>">Contact</a>
            </div>
            <button class="mobile-drawer__cta" onclick="ApplyModal.open()">Apply / Book Free Consultation</button>
            <div class="mobile-drawer__footer"></div>
        </div>
    </div>
</nav>

<?php echo $__env->make('partials.apply-modal', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

<script>
const drawer = document.getElementById('mobile-drawer');
const drawerOverlay = document.getElementById('mobile-drawer-overlay');
const drawerOpenBtn = document.getElementById('mobile-menu-btn');
const drawerCloseBtn = document.getElementById('mobile-drawer-close');

function openDrawer() {
    drawer?.classList.add('is-open');
    drawerOverlay?.classList.add('is-open');
}
function closeDrawer() {
    drawer?.classList.remove('is-open');
    drawerOverlay?.classList.remove('is-open');
}

drawerOpenBtn?.addEventListener('click', openDrawer);
drawerCloseBtn?.addEventListener('click', closeDrawer);
drawerOverlay?.addEventListener('click', closeDrawer);
</script>
<?php /**PATH /home/gpsmigration/public_html/gpsmigration.com/resources/views/partials/navbar.blade.php ENDPATH**/ ?>