@extends('home.layout', ['template' => $template, 'content' => $content])

@section('body')
    <main class="home-main">
        <section class="home-hero home-hero-showcase">
            <div class="home-hero-showcase-bg" aria-hidden="true"></div>
            <div class="container position-relative">
                <div class="row align-items-center g-4 g-lg-5 py-5 py-lg-0 min-vh-100">
                    <div class="col-lg-6 col-xl-5">
                        <span class="home-eyebrow">{{ $content['subtitle'] }}</span>
                        <h1 class="home-headline">{{ $content['headline'] }}</h1>
                        <div class="home-description">
                            {!! \App\Support\HomepageSettings::sanitizeHtml($content['description']) !!}
                        </div>

                        @guest
                            <div class="home-cta-group">
                                <a href="{{ route('login') }}" class="btn btn-light btn-lg home-cta-primary">
                                    <i class="bi bi-box-arrow-in-right"></i>
                                    {{ $content['button_text'] }}
                                </a>
                                <a href="#home-features" class="btn btn-outline-light btn-lg home-cta-secondary">
                                    Explore features
                                </a>
                            </div>
                        @else
                            <div class="home-cta-group">
                                <a href="{{ route('dashboard') }}" class="btn btn-light btn-lg home-cta-primary">
                                    <i class="bi bi-speedometer2"></i>
                                    Go to Dashboard
                                </a>
                            </div>
                        @endguest

                        <div class="home-trust-row">
                            <div class="home-trust-item">
                                <i class="bi bi-shield-check"></i>
                                <span>Enterprise security</span>
                            </div>
                            <div class="home-trust-item">
                                <i class="bi bi-phone"></i>
                                <span>Mobile ready</span>
                            </div>
                            <div class="home-trust-item">
                                <i class="bi bi-lightning-charge"></i>
                                <span>Fast setup</span>
                            </div>
                        </div>
                    </div>

                    <div class="col-lg-6 col-xl-7">
                        @include('home.partials.hero-media', ['content' => $content, 'variant' => 'showcase'])
                    </div>
                </div>
            </div>
        </section>

        <section class="home-stats-strip">
            <div class="container">
                <div class="row g-3 g-md-4 text-center">
                    <div class="col-6 col-md-3">
                        <div class="home-stat-card">
                            <strong>99.9%</strong>
                            <span>Platform uptime</span>
                        </div>
                    </div>
                    <div class="col-6 col-md-3">
                        <div class="home-stat-card">
                            <strong>50+</strong>
                            <span>Admin modules</span>
                        </div>
                    </div>
                    <div class="col-6 col-md-3">
                        <div class="home-stat-card">
                            <strong>24/7</strong>
                            <span>Support coverage</span>
                        </div>
                    </div>
                    <div class="col-6 col-md-3">
                        <div class="home-stat-card">
                            <strong>100%</strong>
                            <span>Mobile responsive</span>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <div id="home-features">
            @include('home.partials.features', ['features' => $content['features'] ?? []])
        </div>

        @include('home.partials.cta-band', ['content' => $content])
    </main>
@endsection
