@php $type = $section['type']; $content = $section['content'] ?? []; $style = $section['style'] ?? []; $image = !empty($content['image_id']) ? ($mediaUrls[$content['image_id']] ?? null) : null; $backgroundImage = !empty($content['background_image_id']) ? ($mediaUrls[$content['background_image_id']] ?? null) : null; @endphp
@if($type === 'hero')
{{ $content['eyebrow'] ?? '' }}

{{ $content['title'] ?? '' }}

{!! $content['body'] ?? '' !!}
@if(!empty($content['button_label']) && !empty($content['button_url'])){{ $content['button_label'] }}@endif
@if($image)@endif
@elseif(in_array($type, ['features', 'how_it_works', 'statistics', 'testimonials'], true))

{{ $content['title'] ?? '' }}

@foreach((array)($content['items'] ?? []) as $item)

{{ $item['title'] ?? '' }}

{{ $item['text'] ?? '' }}

@endforeach
@elseif($type === 'categories') @php $selectedCategoryIds = array_map('intval', (array) ($content['category_ids'] ?? [])); $visibleCategories = count($selectedCategoryIds) ? $categories->sortBy(fn ($category) => array_search($category->id, $selectedCategoryIds, true))->values() : $categories; @endphp

{{ $content['title'] ?? '' }}

{{ $content['subtitle'] ?? '' }}

@foreach($visibleCategories->take((int)($content['limit'] ?? 8)) as $category)

{{ $category->title }}

@endforeach
@elseif($type === 'faq')

{{ $content['title'] ?? '' }}

@foreach((array)($content['items'] ?? []) as $item)
{{ $item['title'] ?? '' }}

{{ $item['text'] ?? '' }}

@endforeach
@elseif($type === 'app_download')

{{ $content['title'] ?? '' }}

{!! $content['body'] ?? '' !!}
@if(!empty($content['play_url']))Google Play@endif @if(!empty($content['app_store_url']))App Store@endif
@if($image)@endif
@elseif($type === 'contact_footer')

{{ $content['title'] ?? '' }}

{!! $content['body'] ?? '' !!}
@if(!empty($content['email'])){{ $content['email'] }}@endif @if(!empty($content['phone'])){{ $content['phone'] }}@endif {{ $content['address'] ?? '' }}
{{ $content['copyright'] ?? '' }}
@else

{{ $content['title'] ?? '' }}

{!! $content['body'] ?? '' !!}
@if(!empty($content['button_label']) && !empty($content['button_url'])){{ $content['button_label'] }}@endif
@if($image)@endif
@endif