@if(!$items->isEmpty())
    @foreach($items as $item)
        <div class="articles-grid__item articles-grid__item--hidden" data-role="cta-block" @if(!empty($isEnd)) data-page="final" @endif>
            <div data-action="click-cta">
                <div class="articles-grid__item-image">
                    @if($item->media)
                        <picture>
                            {!! getMediaImg($item->media, '1200x627', htmlspecialchars($item->title)) !!}
                        </picture>
                    @endif
                </div>


                <div class="articles-grid__item-content">
                    <span class="articles-grid__item-date">
                        @if(!empty($item->end_date))
                            {{ event_date($item->date, $item->end_date) }}
                        @else
                            {{ format_date($item->date, true) }}
                        @endif
                    </span>

                    <h2 class="articles-grid__item-title">
                        @title($item->title)
                    </h2>

                    <div class="articles-grid__item-actions">
                        @if(!empty($item->type))
                            <span class="articles-grid__item-tag">@lang('frontend.article_type_' . $item->type)</span>
                        @endif

                        @if($item->content || $item->layout_type == "blocks")
                            <a class="link-left-arrow link-animation-arrow" href="{{ lang_url($item->lang_uri) }}">@lang('frontend.read_more')</a>
                        @elseif(!empty($item->pardot_url))
                            <a
                                href="#"
                                class="link-left-arrow link-animation-arrow"
                                data-download_id="{{ $item->id }}"
                                data-download="{{ base64_encode(json_encode(["title" => $item->title, "url" => $item->pardot_url ])) }}"
                                data-controller="components/form-modal"
                                data-popupid="download-modal"
                            >
                                @lang('frontend.download')
                            </a>
                        @endif
                    </div>
                </div>
            </div>
        </div>
    @endforeach
@endif
