@php
    $testimonialItems = [];
    if (!empty($items)) {
        $decoded = json_decode($items, true);
        if (is_array($decoded)) $testimonialItems = $decoded;
    }
    if (empty($testimonialItems) && !empty($quote)) {
        $testimonialItems = [['quote' => $quote, 'author' => $author ?? '', 'role' => $role ?? '']];
    }
@endphp
@php $fw = $full_width ?? false; @endphp
@if(count($testimonialItems))
<div style="display:grid; grid-template-columns:repeat({{ min(count($testimonialItems), 2) }},1fr); gap:16px; {{ $fw ? 'padding:24px 0;' : 'max-width:1100px; margin:0 auto; padding:24px 20px;' }}">
    @foreach($testimonialItems as $item)
    @if(!empty($item['quote']))
    <div style="background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:24px; border-left:4px solid var(--news-red);">
        <svg style="width:28px; height:28px; fill:var(--news-red-light); margin-bottom:12px;" viewBox="0 0 24 24">
            <path d="M14.017 21v-7.391c0-5.704 3.731-9.57 8.983-10.609l.995 2.151c-2.432.917-3.995 3.638-3.995 5.849h4v10h-9.983zm-14.017 0v-7.391c0-5.704 3.748-9.57 9-10.609l.996 2.151c-2.433.917-3.996 3.638-3.996 5.849h3.983v10h-9.983z"/>
        </svg>
        <blockquote style="font-size:15px; font-weight:600; color:#111; line-height:1.7; margin-bottom:16px; font-style:italic;">
            "{{ $item['quote'] }}"
        </blockquote>
        @if(!empty($item['author']))
        <div style="display:flex; align-items:center; gap:10px;">
            <div style="width:34px; height:34px; border-radius:50%; background:var(--news-red-light); display:flex; align-items:center; justify-content:center; color:var(--news-red); font-weight:800; font-size:13px; flex-shrink:0;">
                {{ substr($item['author'], 0, 1) }}
            </div>
            <div>
                <p style="font-size:13px; font-weight:700; color:#111; margin:0;">{{ $item['author'] }}</p>
                @if(!empty($item['role']))
                <p style="font-size:12px; color:#9ca3af; margin:0;">{{ $item['role'] }}</p>
                @endif
            </div>
        </div>
        @endif
    </div>
    @endif
    @endforeach
</div>
@endif
