 @php
    $args['post_type'] = 'services';
    $blogs = HelpDesk::elementPostsByArgs($args);
@endphp
<section class="dark:bg-secondary relative z-1 after:absolute after:-bottom-50 after:-right-70 after:bg-primary after:size-[533.43px] after:blur-[252px] after:-z-1 after:rounded-full before:absolute before:top-80 before:-left-80 before:bg-primary before:size-[533.43px] before:blur-[252px] before:-z-1 before:rounded-full">
    <div class="sm:pb-137 pb-40 lg:pt-150 pt-70">
        <div class="container 2xl:!p-0">
            <div class="grid grid-cols-12 mb-40">
                <div class="col-span-12">
                    <div class="flex items-center justify-between site-filters">
                        <div>
                            @if(isset($args['subtitle']) && $args['subtitle'] != '')
                            <p class="sm:text-2xl text-lg dark:text-white text-heading mb-10">{{ $args['subtitle'] }}</p>
                            @endif
                            <h2 class="2xl:text-7xxl xl:text-5xl lg:text-4xxl sm:text-4xl text-3xl dark:text-white font-medium headline">{{ isset($args['title']) ? $args['title'] : '' }}</h2>
                            @if(isset($args['description']) && $args['description'] != '')
                            <p class="sm:text-xl text-lg font-normal">{{ $args['description'] }}</p>
                            @endif
                        </div>
                        @if (isset($args['view_all']) && $args['view_all'] == 'true')
                        <a href="{{ isset($args['page_id']) ? DzHelper::laraPageLink($args['page_id']) : 'javascript:void(0);' }}" class="text-base font-medium text-primary flex items-center">View All<svg class="ml-5" width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path d="M3.75 9H14.25" stroke="var(--primary)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
                            <path d="M9 3.75L14.25 9L9 14.25" stroke="var(--primary)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
                            </svg>
                        </a>
                        @endif
                    </div>	
                </div>
            </div>
        </div>
        <div class="wrapper">
            <div class="pxl-team-list" id="{{ $args['base'] }}LoadmoreContent">
                @php $ajax_view = 'ajax_service_listing_2'; @endphp
                @include('elements.service_listing.service_listing_2',compact('blogs'))
            </div>
            @if ($args['pagination'] ?? false)
            <div class="container">
                <div class="grid grid-cols-12 gap-20 sm:mt-50 mt-20">
                    <div class="col-span-12 text-center">
                        @if (@$args['pagination_type'] == 'load_more') 
                            @if ($blogs->hasMorePages())
                            <form id="W3Ajax{{ $args['base'] }}Form">
                                <input type="hidden" name="ajax_container" value="{{ $args['base'] }}LoadmoreContent">
                                <input type="hidden" name="no_of_posts" value="{{$args['no_of_posts']}}">
                                <input type="hidden" name="order" value="{{$args['order']}}">
                                <input type="hidden" name="orderby" value="{{$args['orderby']}}">
                                <input type="hidden" name="page" value="2">
                                <input type="hidden" name="post_type" value="{{ $args['post_type'] }}">
                                <input type="hidden" name="ajax_view" value="{{ $ajax_view }}">
                                <input type="hidden" name="view_name" value="index">

                                <button class="btn style-1 cursor-pointer btn-outline light ms-auto p-2 px-20 group button--stroke flairBtn magneticBtn ajax-load-more" data-form-id="W3Ajax{{ $args['base'] }}Form">
                                    <span class="button-flair"></span>
                                    <span class="button__label font-semibold pr-10 inline-flex items-center gap-14">{{ __('Load More') }}</span>
                                    <span class="inline-flex justify-center items-center size-32 -mr-18 rounded-full dark:bg-primary bg-dark duration-100 dark:group-hover:bg-secondary group-hover:bg-white z-0">
                                        <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
                                            <g clip-path="url(#clip0_572_9501)">
                                            <path class="dark:stroke-dark stroke-white duration-100 dark:group-hover:stroke-white group-hover:stroke-dark" d="M19.167 3.33325V8.33325H14.167" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                                            <path class="dark:stroke-dark stroke-white duration-100 dark:group-hover:stroke-white group-hover:stroke-dark" d="M0.833008 16.6667V11.6667H5.83301" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                                            <path class="dark:stroke-dark stroke-white duration-100 dark:group-hover:stroke-white group-hover:stroke-dark" d="M2.92467 7.49998C3.34731 6.30564 4.06562 5.23782 5.01256 4.39616C5.95951 3.55451 7.10423 2.96645 8.33991 2.68686C9.5756 2.40727 10.862 2.44527 12.079 2.79729C13.296 3.14932 14.4041 3.80391 15.2997 4.69998L19.1663 8.33331M0.833008 11.6666L4.69967 15.3C5.5953 16.1961 6.70332 16.8506 7.92035 17.2027C9.13738 17.5547 10.4238 17.5927 11.6594 17.3131C12.8951 17.0335 14.0398 16.4455 14.9868 15.6038C15.9337 14.7621 16.652 13.6943 17.0747 12.5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                                            </g>
                                            <defs>
                                            <clipPath id="clip0_572_9501">
                                            <rect width="20" height="20" fill="white"/>
                                            </clipPath>
                                            </defs>
                                        </svg>
                                    </span>
                                </button>
                            </form>
                            @else
                            <a href="javascript:void(0);" class="btn btn-primary px-15 btn-skew disabled"><span>{{ DzHelper::theme_lang('No More Posts') }}</span></a>
                            @endif
                        @else
                        {!! $blogs->links('elements.pagination') !!}
                        @endif
                    </div>
                </div>
            </div>
            @endif
        </div>
    </div>
</section>