@php
    $cols = max(1, min(4, (int)($columns ?? 2)));
    $gap  = (int)($gap ?? 6);
    $colClass = ['grid-cols-1', 'grid-cols-1 sm:grid-cols-2', 'grid-cols-1 sm:grid-cols-3', 'grid-cols-1 sm:grid-cols-4'][$cols - 1] ?? 'sm:grid-cols-2';
    $fw = $full_width ?? false;
@endphp
<div class="{{ $fw ? 'px-0' : 'max-w-5xl mx-auto px-4 sm:px-6' }} py-12">
    <div class="grid {{ $colClass }} gap-{{ $gap }}">
        @for($i = 1; $i <= $cols; $i++)
        @php $colContent = ${"col_{$i}_content"} ?? '' @endphp
        <div class="prose max-w-none text-gray-700">
            {!! nl2br(e($colContent)) !!}
        </div>
        @endfor
    </div>
</div>
