@if(count($articles) > 0)
@php $onIndexPage = Route::currentRouteName() === 'knowledgebase.index'; $displayedArticles = $onIndexPage ? $articles : $articles->take(3); @endphp {{-- Header Section --}}

{{ __('Documentation') }}

{{ __('Explore guides, runbooks, and product tutorials.') }}

{{-- Documentation Grid --}}
@foreach($displayedArticles as $index => $article)
{{-- Card Header --}}
{{ $article->category->name ?? __('General') }}

{{ $article->title }}

{{ $article->description }}
{{-- Card Footer --}}
{{ optional($article->published_at)->format('M d, Y') ?? $article->created_at->format('M d, Y') }}
{{ __('general.view') }}
{{-- Hover Overlay --}}
@endforeach
@if(!$onIndexPage) {{-- View More Button --}}
{{ __('View More Articles') }}
@endif
@endif