@php
    $faqItems = [];
    if (!empty($items)) {
        $decoded = json_decode($items, true);
        if (is_array($decoded)) $faqItems = $decoded;
    }
@endphp
@php $fw = $full_width ?? false; @endphp
@if(count($faqItems))
<div style="{{ $fw ? 'padding:24px 0;' : 'max-width:1100px; margin:0 auto; padding:24px 20px;' }}">
    @foreach($faqItems as $item)
    @if(!empty($item['q']))
    <details style="border:1px solid #e5e7eb; border-radius:8px; margin-bottom:8px; overflow:hidden;">
        <summary style="display:flex; align-items:center; justify-content:space-between; padding:14px 18px; cursor:pointer; font-weight:700; font-size:14px; color:#111; list-style:none; background:#fff;"
                 onmouseover="this.style.background='var(--news-red-bg)'" onmouseout="this.style.background='#fff'">
            {{ $item['q'] }}
            <svg style="width:16px; height:16px; color:var(--news-red); flex-shrink:0; margin-left:12px;" fill="none" stroke="currentColor" viewBox="0 0 24 24">
                <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"/>
            </svg>
        </summary>
        @if(!empty($item['a']))
        <div style="padding:14px 18px; font-size:14px; color:#374151; line-height:1.7; border-top:1px solid #f3f4f6; background:#fafafa;">
            {{ $item['a'] }}
        </div>
        @endif
    </details>
    @endif
    @endforeach
</div>
@endif
