<html>

<x-head />

<body>
    <!-- header-end -->
<x-header />

    <!-- slider_area_start -->
    <div class="slider_area">
        <div class="single_slider  d-flex align-items-center slider_bg_1">
            <div class="container">
                <div class="row align-items-center">
                    <div class="col-lg-7 col-md-6">
                        <div class="slider_text">
                            <h5 class="wow fadeInLeft" data-wow-duration="1s" data-wow-delay=".2s">В списке более {{$jobs->count()}} вакансий</h5>
                            <h3 class="wow fadeInLeft" data-wow-duration="1s" data-wow-delay=".3s">Найдите работу своей мечты</h3>
                            <p class="wow fadeInLeft" data-wow-duration="1s" data-wow-delay=".4s">Мы предоставляем мгновенные вакансии онлайн с быстрым одобрением на любой срок</p>
                           
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="ilstration_img wow fadeInRight d-none d-lg-block text-right" data-wow-duration="1s" data-wow-delay=".2s">
            <img src="public/images/banner/illustration.png" alt="">
        </div>
    </div>
    <!-- slider_area_end -->


    <!-- popular_catagory_area_start  -->
    <div class="popular_catagory_area">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="section_title mb-40">
                        <h3>Популярные категории</h3>
                    </div>
                </div>
            </div>
            <div class="row">
                @foreach($pcategories as $pc)
                <div class="col-lg-4 col-xl-3 col-md-6">
                    <div class="single_catagory">
                        <a>{{$pc->name}}</a>
                        <p>Кол-во вакансий: <span>{{$pc->job->count()}}</span></p>
                    </div>
                </div>
                @endforeach
            </div>
        </div>
    </div>
    <!-- popular_catagory_area_end  -->

    <!-- job_listing_area_start  -->
    <div class="job_listing_area">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-lg-6">
                    <div class="section_title">
                        <h3>Список вакансий</h3>
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="brouse_job text-right">
                        <a href="{{ Route('jobs') }}" class="boxed-btn4">Посмотреть все вакансии</a>
                    </div>
                </div>
            </div>
            <div class="job_lists">
                <div class="row">
                    @foreach($jobs as $job)
                    <div class="col-lg-12 col-md-12">
                        <div class="single_jobs white-bg d-flex justify-content-between">
                            <div class="jobs_left d-flex align-items-center">
                                <div class="thumb">
                                    <img src="public/{{$job->icon}}" alt="">
                                </div>
                                <div class="jobs_conetent">
                                    <a href="{{ Route('jobs_details', $job->id) }}"><h4>{{$job->name}}</h4></a>
                                    <div class="links_locat d-flex align-items-center">
                                        <div class="location">
                                            <p> <i class="fa fa-map-marker"></i>{{$job->city->name}}</p>
                                        </div>
                                        <div class="location">
                                            <p> <i class="fa fa-clock-o"></i>{{$job->jobnature}}</p>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="jobs_right">
                                <div class="apply_now">
                                    <a href="{{ Route('jobs_details', $job->id) }}" class="boxed-btn3">Подробнее</a>
                                </div>
                                <div class="date">
                                    <p>Дата публикации: {{$job->created_at}}</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    @endforeach
                </div>
            </div>
        </div>
    </div>
    <!-- job_listing_area_end  -->

    <!-- featured_candidates_area_start  -->
    <div class="featured_candidates_area">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="section_title text-center mb-40">
                        <h3>Кандидаты</h3>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="candidate_active owl-carousel">
                        @foreach($users as $user)
                        <div class="single_candidates text-center">
                            <div class="thumb">
                                <img src="public/{{$user->avatar}}" alt="">
                            </div>
                            <a><h4>{{$user->name}}</h4></a>
                            <p>{{$user->email}}</p>
                        </div>
                        @endforeach
                        
                    </div>
                </div>
            </div>
        </div>
    </div>

    <x-footer />
    

    <x-scripts />
</body>

</html>