@if(is_array($node) && ($node['enabled'] ?? false)) @php $type = $node['type'] ?? ''; $content = (array) ($node['content'] ?? []); $settings = (array) ($node['settings'] ?? []); $children = (array) ($node['children'] ?? []); $destination = (array) ($node['resolved_destination'] ?? []); $destinationUrl = $destination['url'] ?? null; $destinationTarget = ($destination['new_tab'] ?? false) ? '_blank' : null; $background = !empty($settings['background_image_id']) ? ($mediaUrls[$settings['background_image_id']] ?? null) : null; $shadows = ['none' => 'none', 'small' => '0 4px 12px rgba(31,41,55,.10)', 'medium' => '0 12px 30px rgba(31,41,55,.16)', 'large' => '0 24px 60px rgba(31,41,55,.22)']; $style = '--lp-node-bg:'.($settings['background_color'] ?? '#ffffff').';--lp-node-text:'.($settings['text_color'] ?? '#182433').';--lp-node-gap:'.($settings['gap'] ?? 16).'px;--lp-node-pad:'.($settings['padding'] ?? 0).'px;--lp-node-margin:'.($settings['margin'] ?? 0).'px;--lp-node-radius:'.($settings['radius'] ?? 0).'px;--lp-node-max:'.($settings['max_width'] ?? 1200).'px;--lp-node-min-height:'.($settings['min_height'] ?? 0).'px;--lp-node-size:'.($settings['font_size'] ?? 16).'px;--lp-node-weight:'.($settings['font_weight'] ?? 400).';--lp-node-columns:'.($settings['columns'] ?? 1).';width:'.(($settings['width'] ?? 'full') === 'full' ? '100%' : 'auto').';text-align:'.($settings['alignment'] ?? 'center').';flex-direction:'.($settings['direction'] ?? 'column').';flex-wrap:'.(($settings['wrap'] ?? true) ? 'wrap' : 'nowrap').';justify-content:'.(['start' => 'flex-start', 'center' => 'center', 'end' => 'flex-end', 'space-between' => 'space-between'][$settings['justify'] ?? 'center'] ?? 'center').';border:'.($settings['border_width'] ?? 0).'px '.($settings['border_style'] ?? 'solid').' '.($settings['border_color'] ?? '#dce1e7').';box-shadow:'.($shadows[$settings['shadow'] ?? 'none'] ?? 'none').';'.($background ? "background-image:url('".e($background)."');background-size:".($settings['background_fit'] ?? 'cover').';background-position:'.($settings['background_position'] ?? 'center').';' : ''); @endphp @if(in_array($type, ['section', 'container', 'row', 'column', 'grid', 'card', 'card_grid', 'button_group', 'link_box'], true)) @if($destinationUrl && in_array($type, ['card', 'link_box'], true))@else
@endif @foreach($children as $child) @include('landing-page.partials.node', ['node' => $child]) @endforeach @if($destinationUrl && in_array($type, ['card', 'link_box'], true))@else
@endif @elseif($type === 'heading') @php($level = min(6, max(1, (int) ($content['level'] ?? 2)))) {{ $content['text'] ?? '' }} @elseif($type === 'plain_text')

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

@elseif($type === 'rich_text')
{!! $content['html'] ?? '' !!}
@elseif($type === 'link') {{ $content['label'] ?? '' }} @elseif($type === 'quote')

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

@if($content['citation'] ?? null){{ $content['citation'] }}@endif
@elseif($type === 'image') @if($url = ($mediaUrls[$content['image_id'] ?? 0] ?? null))@if($destinationUrl)@endif{{ $content['alt'] ?? '' }}@if($destinationUrl)@endif @endif @elseif($type === 'button') {{ $content['label'] ?? '' }} @elseif($type === 'icon') @if($destinationUrl)@endif@if($destinationUrl)@endif @elseif($type === 'divider')
@elseif($type === 'spacer') @elseif(in_array($type, ['list', 'statistics', 'testimonial'], true))
@foreach((array) ($content['items'] ?? []) as $item)

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

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

@endforeach
@elseif($type === 'faq')
@foreach((array) ($content['items'] ?? []) as $item)
{{ $item['title'] ?? '' }}

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

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

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

@foreach($visible->take((int) ($content['limit'] ?? 8)) as $category)@if($categoryUrl = ($categoryDestinations[$category->id] ?? null))@else@endif @endforeach
@elseif($type === 'app_badges')
@if(($content['play_url'] ?? null) || $destinationUrl)Google Play@endif @if(($content['app_store_url'] ?? null) || $destinationUrl)App Store@endif
@endif @endif