@props([ 'subject' => null, 'title' => null, 'subtitle' => null, 'align' => 'left', 'class' => '', 'level' => 'h2', // heading tag: 'h1' on pages without a hero ]) @php $alignClass = match ($align) { 'center' => 'text-center', 'right' => 'text-right', default => 'text-left', }; $marginClass = match ($align) { 'center' => 'mx-auto', 'right' => 'mr-0 ml-auto', default => 'ml-0', }; $tag = in_array($level, ['h1', 'h2', 'h3'], true) ? $level : 'h2'; $subtitles = is_array($subtitle) ? $subtitle : ($subtitle ? [$subtitle] : []); @endphp
merge(['class' => cn('mb-10', $alignClass, $class)]) }} data-animate="appear"> @if($subject) {{ $subject }} @endif @if($title) <{{ $tag }} class="{{ cn('w-fit text-3xl md:text-4xl lg:text-5xl font-regular text-foreground mb-8 leading-[--gold] text-pretty', $marginClass) }}"> {!! $title !!} @endif @foreach($subtitles as $text)

{!! $text !!}

@endforeach