 @php
    $args['post_type'] = 'services';
    $blogs = HelpDesk::elementPostsByArgs($args);
@endphp
 <section class="lg:pt-160 sm:py-100 lg:pb-140 py-60 bg-light dark:bg-bodybg">
    <div class="container">
        <div class="row masonry-grid">
            <div class="grid-sizer md:w-1/12"></div>
            <div class="card-container md:w-1/2">
                <div class="lg:mb-40 mb-30 xl:pe-120">
                    @if(isset($args['subtitle']) && $args['subtitle'] != '')
                    <span class="text-2xl dark:text-white mb-5 block">{{ $args['subtitle'] }}</span>
                    @endif
                    <h2 class="lg:text-5xxl sm:text-4xxl text-2xxl font-medium headline2">{{ isset($args['title']) ? $args['title'] : '' }}</h2>
                    @if(isset($args['description']) && $args['description'] != '')
                    <p class="text-xl font-normal text-bodytext">{{ $args['description'] }}</p>
                    @endif
                </div>
            </div>
            @forelse($blogs as $key => $blog)
            @php
                $svgIcon = CustomFieldHelper::get_custom_field_value('cpt_'.$blog->post_type,'svg_icon',optional($blog)->id);
                $pngIcon = CustomFieldHelper::get_custom_field_value('cpt_'.$blog->post_type,'png_icon',optional($blog)->id);
                $serviceIconType = CustomFieldHelper::get_custom_field_value('cpt_'.$blog->post_type,'service_icon_type',optional($blog)->id);
            @endphp
            <div class="card-container md:w-1/2">
                <div class="card service-card-box bg-white rounded-2xl overflow-hidden mb-20 border border-white duration-500 hover:border-primary border-b-4 wow fadeInUp" data-wow-delay="1s">
                    <div class="xl:p-40 py-25 px-20 sm:flex gap-24 flex-1">
                        @if($serviceIconType == 'SVG')
                        <div class="min-w-120 flex items-center sm:justify-center sm:mb-0 mb-10">
                            {!! $svgIcon !!}
                        </div>
                        @else
                            @if(isset($pngIcon))
                            <div class="min-w-120 w-120 flex items-center sm:justify-center sm:mb-0 mb-10">
                                <img src="{{ DzHelper::getStorageImage('storage/custom-fields/'.@$pngIcon) }}" alt="{{ __('image') }}">
                            </div>
                            @endif
                        @endif
                        <div class="">
                            <h3 class="sm:text-2xl/30 text-xl font-medium mb-5 text-dark service-title max-w-370"><a href="{{ DzHelper::laraBlogLink($blog->id) }}" class="hover:text-primary link-hover">{{ $blog->title }}</a></h3>
                            <p class="text-[17px]/24 text-bodytext font-medium">{!! $blog->excerpt !!}</p>
                        </div>
                    </div>
                </div>
            </div>
            @empty
            @endforelse
        </div>
    </div>
</section>