@php
    /*
     * Footer entry point.
     *
     * Like the navbar, $sections only exists on the legacy section site; builder
     * pages pass none. Defaulting it here keeps one footer serving both.
     */
    $sections = $sections ?? collect();

    $navBase = request()->routeIs('website.show')
        ? ''
        : route('website.show', ['slug' => $academy->slug]);

    $footerStyle = $settings->footer_style ?? 'dark';
    $validStyles = ['dark', 'light', 'accent', 'transparent'];

    if (! in_array($footerStyle, $validStyles, true)) {
        $footerStyle = 'dark';
    }
@endphp

@include("website.footers.{$footerStyle}", [
    'sections' => $sections,
    'navBase' => $navBase,
    'academy' => $academy,
    'settings' => $settings,
])
