


<?php $__env->startSection('title', 'Universities'); ?>

<?php $__env->startSection('content'); ?>

    <?php echo $__env->make('layouts.partials.page_header', [
        'title' => 'Universities',
        'breadcrumbs' => [
            ['label' => 'Home', 'url' => route('home')],
            ['label' => 'Universities', 'url' => '']
        ]
    ], array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>


    <!--Course Grid Start (Universities)-->
    <section class="course-grid">
        <div class="container">
            <div class="row">
                <!-- Sidebar Filters -->
                <?php echo $__env->make('universities.partials.sidebar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>
                <!-- Main Content Grid -->
                <div class="col-xl-8 col-lg-7">
                    <div class="course-grid__right">
                        <!-- Top Bar -->
                       <?php echo $__env->make('universities.partials.topbar', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?>

                        <!-- Universities Grid -->
                        <div class="course-grid__right-content-box">
                            <div class="row">
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__empty_1 = true; $__currentLoopData = $universities; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $university): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoopIteration(); ?><?php endif; ?>
                                    <div class="col-xl-6">
                                        <div class="courses-two__single">
                                            <div class="courses-two__img-box">
                                                <div class="courses-two__img">
                                                    <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($university->logo_path): ?>
                                                        <img style="height:150px;width:auto;display: block;
  margin: auto;" src="<?php echo e(asset('storage/' . $university->logo_path)); ?>"
                                                             alt="<?php echo e($university->name); ?>">
                                                    <?php else: ?>
                                                        <img
                                                            src="<?php echo e(asset('images/resources/courses-2-1.jpg')); ?>"
                                                            alt="<?php echo e($university->name); ?>">
                                                    <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                </div>
                                                <div class="courses-two__heart">
                                                    <a href="<?php echo e(route('universities.show', $university->slug ?? $university->id)); ?>"><span
                                                            class="icon-heart"></span></a>
                                                </div>
                                            </div>
                                            <div class="courses-two__content">
                                                <div class="courses-two__doller-and-review">
                                                    <div class="courses-two__doller">
                                                        <p>#<?php echo e($university->ranking); ?></p>
                                                    </div>
                                                    <div class="courses-two__review">
                                                        <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($university->featured): ?>
                                                            <p><i class="icon-star"></i> Featured</p>
                                                        <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                                    </div>
                                                </div>
                                                <h3 class="courses-two__title"><a
                                                        href="<?php echo e(route('universities.show', $university->slug ?? $university->id)); ?>"><?php echo e($university->name); ?></a>
                                                </h3>
                                                <div class="courses-two__btn-and-client-box">
                                                   
                                                    <div class="courses-two__client-box">
                                                        <!-- <div class="courses-two__client-img">
                                                            <img
                                                                src="<?php echo e($university->country->flag_path ? asset('storage/'.$university->country->flag_path) : asset('images/resources/courses-two-client-img-1.jpg')); ?>"
                                                                alt="">
                                                        </div> -->
                                                        <div class="courses-two__client-content">
                                                            <h4><?php echo e($university->country->name); ?></h4>
                                                            <p><?php echo e($university->location ?? 'Location'); ?></p>
                                                        </div>
                                                    </div> <div class="courses-two__btn-box">
                                                        <a href="<?php echo e(route('universities.show', $university->slug ?? $university->id)); ?>"
                                                           class="thm-btn-two">
                                                            <span>View Details</span>
                                                            <i class="icon-angles-right"></i>
                                                        </a>
                                                    </div>
                                                </div>
                                                <ul class="courses-two__meta list-unstyled">
                                                    <li>
                                                        <div class="icon"><span class="icon-chart-simple"></span></div>
                                                        <p>Rank #<?php echo e($university->ranking); ?></p>
                                                    </li>
                                                    <li>
                                                        <div class="icon"><span class="icon-book"></span></div>
                                                        <p><?php echo e($university->programs_count ?? '0'); ?> Programs</p>
                                                    </li>
                                                    <li>
                                                        <div class="icon"><span class="icon-clock"></span></div>
                                                        <p><?php echo e($university->created_at->format('Y')); ?></p>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                                    <div class="col-12 text-center py-5">
                                        <h4>No universities found.</h4>
                                    </div>
                                <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                            </div>
                        </div>

                        <!-- Pagination -->
                        <div class="blog-list__pagination">
                            <?php echo e($universities->appends(request()->except('page'))->links('vendor.pagination.custom')); ?>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!--Course Grid End-->

<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
    <script>
        // Initialize ranking slider
        $(function () {
            $("#ranking-slider").slider({
                range: true,
                min: <?php echo e($minRanking); ?>,
                max: <?php echo e($maxRanking); ?>,
                values: [<?php echo e($currentMin); ?>, <?php echo e($currentMax); ?>],
                slide: function (event, ui) {
                    $(".min").val(ui.values[0]);
                    $(".max").val(ui.values[1]);
                    $("#ranking_min").val(ui.values[0]);
                    $("#ranking_max").val(ui.values[1]);
                    $(".course-grid__price-filter-title").text("Ranking: #" + ui.values[0] + " - #" + ui.values[1]);
                }
            });
            $(".min").val($("#ranking-slider").slider("values", 0));
            $(".max").val($("#ranking-slider").slider("values", 1));
            $("#ranking_min").val($("#ranking-slider").slider("values", 0));
            $("#ranking_max").val($("#ranking-slider").slider("values", 1));
        });

        // Sorting function
        function updateSort(value) {
            var parts = value.split('-');
            var sort = parts[0];
            var direction = parts[1];
            var url = new URL(window.location.href);
            url.searchParams.set('sort', sort);
            url.searchParams.set('direction', direction);
            window.location.href = url.toString();
        }
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/insightg/public_html/resources/views/universities/index.blade.php ENDPATH**/ ?>