


<div x-show="megaMenuOpen !== null"
     @click="closeMegaMenu()"
     class="fixed inset-0 z-20"
     x-cloak
     aria-hidden="true"
     style="background: transparent;"></div>

<?php
$megaMenus = [
    'sshia' => [
        'cols' => 4,
        'items' => [
            ['route' => ['pages.show','about-us'],                    'icon' => 'fa-info-circle',       'color' => 'text-green-400',  'label' => 'About Us'],
            ['route' => ['pages.show','vision-mission'],              'icon' => 'fa-eye',               'color' => 'text-green-400',  'label' => 'Vision & Mission'],
            ['route' => ['pages.show','what-we-do'],                  'icon' => 'fa-tasks',             'color' => 'text-green-400',  'label' => 'What We Do'],
            ['route' => ['pages.show','governance'],                  'icon' => 'fa-gavel',             'color' => 'text-green-400',  'label' => 'Governance'],
            ['route' => ['pages.show','contact-us'],                  'icon' => 'fa-envelope',          'color' => 'text-green-400',  'label' => 'Contact Us'],
        ],
        'auth_items' => [
            ['route' => ['organization.leadership-history.index'],    'icon' => 'fa-users-cog',         'color' => 'text-green-400',  'label' => 'Leadership'],
            ['route' => ['organization.organogram.show'],             'icon' => 'fa-sitemap',           'color' => 'text-green-400',  'label' => 'Organogram'],
        ],
    ],
    'membership' => [
        'cols' => 4,
        'items' => [
            ['route' => ['membership.categories.index'],              'icon' => 'fa-list',              'color' => 'text-blue-400',   'label' => 'Membership Categories'],
            ['route' => ['register.role.member'],                     'icon' => 'fa-user-plus',         'color' => 'text-blue-400',   'label' => 'Apply for Membership'],
            ['route' => ['membership.check-status'],                  'icon' => 'fa-search',            'color' => 'text-blue-400',   'label' => 'Check Application Status'],
            ['route' => ['register.role.contributor'],                'icon' => 'fa-pen-nib',           'color' => 'text-blue-400',   'label' => 'Become Contributor'],
        ],
    ],
    'health' => [
        'cols' => 3,
        'items' => [
            ['route' => ['institutions.index'],                       'icon' => 'fa-hospital',          'color' => 'text-teal-400',   'label' => 'Institutions Directory'],
            ['route' => ['institutions.register'],                    'icon' => 'fa-plus-circle',       'color' => 'text-teal-400',   'label' => 'Register Institution'],
            ['route' => ['machines.index'],                           'icon' => 'fa-cogs',              'color' => 'text-teal-400',   'label' => 'Digital Machines'],
        ],
    ],
    'advocacy' => [
        'cols' => 4,
        'items' => [
            ['route' => ['advocacy.public.index'],                    'icon' => 'fa-bullhorn',          'color' => 'text-cyan-400',   'label' => 'Campaigns'],
            ['route' => ['advocacy.public.stories.index'],            'icon' => 'fa-book-open',         'color' => 'text-cyan-400',   'label' => 'Health Stories'],
            ['route' => ['advocacy.public.polls.active'],             'icon' => 'fa-poll',              'color' => 'text-cyan-400',   'label' => 'Polls & Surveys'],
            ['route' => ['advocacy.public.stories.create'],           'icon' => 'fa-pen',               'color' => 'text-cyan-400',   'label' => 'Submit Story'],
        ],
    ],
    'training' => [
        'cols' => 3,
        'items' => [
            ['route' => ['public.training.index'],                    'icon' => 'fa-chalkboard-teacher','color' => 'text-yellow-400', 'label' => 'Training Programmes'],
            ['route' => ['register.role.trainee'],                    'icon' => 'fa-user-plus',         'color' => 'text-yellow-400', 'label' => 'Apply for Training'],
            ['route' => ['public.training.certificates.verify-page'],'icon' => 'fa-certificate',       'color' => 'text-yellow-400', 'label' => 'Verify Certificate'],
        ],
    ],
    'mentorship' => [
        'cols' => 3,
        'items' => [
            ['route' => ['mentorship.public.index'],                  'icon' => 'fa-user-graduate',     'color' => 'text-purple-400', 'label' => 'Mentorship Programmes'],
            ['route' => ['register.role.mentor'],                     'icon' => 'fa-user-tie',          'color' => 'text-purple-400', 'label' => 'Become Mentor'],
            ['route' => ['register.role.mentee'],                     'icon' => 'fa-user-friends',      'color' => 'text-purple-400', 'label' => 'Become Mentee'],
            ['route' => ['mentorship.public.check-status'],           'icon' => 'fa-search',            'color' => 'text-purple-400', 'label' => 'Check Status'],
            ['route' => ['mentorship.certificates.verify-page'],      'icon' => 'fa-certificate',       'color' => 'text-purple-400', 'label' => 'Verify Certificate'],
        ],
    ],
    'research' => [
        'cols' => 2,
        'items' => [
            ['route' => ['research.public.index'],                    'icon' => 'fa-book-open',         'color' => 'text-indigo-400', 'label' => 'Publications'],
            ['route' => ['research.public.search'],                   'icon' => 'fa-search',            'color' => 'text-indigo-400', 'label' => 'Search Publications'],
        ],
    ],
    'knowledge' => [
        'cols' => 2,
        'items' => [
            ['route' => ['public.knowledge-base.index'],              'icon' => 'fa-book',              'color' => 'text-green-400',  'label' => 'Knowledge Base'],
            ['route' => ['public.discussions.index'],                 'icon' => 'fa-comments',          'color' => 'text-green-400',  'label' => 'Discussions'],
        ],
    ],
    'partners' => [
        'cols' => 2,
        'items' => [
            ['route' => ['partners.public.index'],                    'icon' => 'fa-handshake',         'color' => 'text-blue-400',   'label' => 'Partners Directory'],
            ['route' => ['register.role.partner'],                    'icon' => 'fa-plus-circle',       'color' => 'text-blue-400',   'label' => 'Become Partner'],
        ],
    ],
];

$colMap = [2 => 'grid-cols-2', 3 => 'grid-cols-2 md:grid-cols-3', 4 => 'grid-cols-2 md:grid-cols-4'];
?>

<?php $__currentLoopData = $megaMenus; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $menu): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div x-show="megaMenuOpen === '<?php echo e($key); ?>'"
     x-transition:enter="transition ease-out duration-150"
     x-transition:enter-start="opacity-0 -translate-y-2"
     x-transition:enter-end="opacity-100 translate-y-0"
     x-transition:leave="transition ease-in duration-100"
     x-transition:leave-start="opacity-100 translate-y-0"
     x-transition:leave-end="opacity-0 -translate-y-2"
     class="absolute left-0 right-0 bg-gray-900 border-t-2 border-green-600 shadow-2xl z-30 overflow-hidden"
     x-cloak
     role="region"
     aria-label="<?php echo e(ucfirst($key)); ?> menu">
    <div class="max-w-screen-2xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
        <div class="grid <?php echo e($colMap[$menu['cols']] ?? 'grid-cols-2 md:grid-cols-4'); ?> gap-2">
            <?php $__currentLoopData = $menu['items']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <a href="<?php echo e(route($item['route'][0], isset($item['route'][1]) ? $item['route'][1] : [])); ?>"
               @click="closeMegaMenu()"
               class="flex items-center gap-3 p-3 rounded-xl hover:bg-gray-800 border border-transparent hover:border-gray-700 transition-all duration-150 group focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 focus:ring-offset-gray-900">
                <div class="flex-shrink-0 w-9 h-9 rounded-lg bg-gray-800 group-hover:bg-gray-700 flex items-center justify-center transition">
                    <i class="fas <?php echo e($item['icon']); ?> <?php echo e($item['color']); ?> text-sm group-hover:scale-110 transition-transform" aria-hidden="true"></i>
                </div>
                <span class="text-sm font-medium text-gray-200 group-hover:text-white transition leading-tight"><?php echo e($item['label']); ?></span>
            </a>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

            <?php if(isset($menu['auth_items'])): ?>
                <?php if(auth()->guard()->check()): ?>
                <?php $__currentLoopData = $menu['auth_items']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <a href="<?php echo e(route($item['route'][0], isset($item['route'][1]) ? $item['route'][1] : [])); ?>"
                   @click="closeMegaMenu()"
                   class="flex items-center gap-3 p-3 rounded-xl hover:bg-gray-800 border border-transparent hover:border-gray-700 transition-all duration-150 group focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 focus:ring-offset-gray-900">
                    <div class="flex-shrink-0 w-9 h-9 rounded-lg bg-gray-800 group-hover:bg-gray-700 flex items-center justify-center transition">
                        <i class="fas <?php echo e($item['icon']); ?> <?php echo e($item['color']); ?> text-sm group-hover:scale-110 transition-transform" aria-hidden="true"></i>
                    </div>
                    <span class="text-sm font-medium text-gray-200 group-hover:text-white transition leading-tight"><?php echo e($item['label']); ?></span>
                </a>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
            <?php endif; ?>
        </div>
    </div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php /**PATH /home/www/sshia.org/sshia/resources/views/components/site-navigation-menus.blade.php ENDPATH**/ ?>