<?php

declare(strict_types=1);

/**
 * Sportheimbuchung — Hero → 4 Argumente → Bento (Fotos + Lage + CTA) → Formular → FAQ.
 * Inhalte: data/sportheimbuchung.json. Adresse: data/club.json (Single Source of Truth).
 */
$page = json_load('sportheimbuchung');
$club = json_load('club');

$meta = [
    'title'       => 'Sportheim mieten in Kulmbach',
    'description' => 'Sportheim in Kulmbach mieten: auf der Hans-Rausch-Sportanlage, mit Küche, Außenbereich und Beamer auf Wunsch. Jetzt unverbindlich anfragen!',
    'og_image'    => 'img/pages/sportheim-2.jpg',
    'schema'      => page_schema(
        [
            ['name' => 'Startseite',       'slug' => ''],
            ['name' => 'Der Verein',       'slug' => 'verein'],
            ['name' => 'Sportheim mieten', 'slug' => 'sportheimbuchung'],
        ],
        $page['faq'] ?? []
    ),
];

$addr = $club['address'];

component('hero', ['hero' => $page['hero']]);
?>
        <?php /* === argumente === */ ?>
        <section class="section sponsor-arguments" id="ausstattung">
            <div class="container">
                <h2 class="visually-hidden"><?= e($page['features']['title']) ?></h2>
                <ul class="sponsor-arguments__grid" role="list">
<?php foreach ($page['features']['items'] as $item): ?>
                    <li class="sponsor-arguments__item">
                        <div class="sponsor-arguments__icon" aria-hidden="true"><?= icon($item['icon']) ?></div>
                        <div class="sponsor-arguments__body">
                            <h3 class="sponsor-arguments__title"><?= e($item['title']) ?></h3>
                            <p class="sponsor-arguments__text"><?= e($item['text']) ?></p>
                        </div>
                    </li>
<?php endforeach; ?>
                </ul>
            </div>
        </section>

        <?php /* === bento: fotos + lage + cta === */ ?>
        <section class="section section--tinted" id="lage" aria-label="Impressionen und Lage">
            <div class="container">
                <div class="sportheim-bento">
                    <div class="sportheim-bento__photo sportheim-bento__photo--main">
                        <img src="<?= e(asset('img/pages/sportheim-1.jpg')) ?>"
                             alt="Innenansicht des Veranstaltungsraums im Sportheim"
                             width="1600" height="1066"
                             loading="lazy" decoding="async">
                    </div>
                    <div class="sportheim-bento__photo sportheim-bento__photo--sec">
                        <img src="<?= e(asset('img/pages/sportheim-2.jpg')) ?>"
                             alt="Das Sportheim auf der Hans-Rausch-Sportanlage"
                             width="1600" height="1066"
                             loading="lazy" decoding="async">
                    </div>
                    <div class="sportheim-bento__map">
                        <img src="<?= e(asset('img/pages/verein-1000.jpg')) ?>"
                             alt="Luftaufnahme der Hans-Rausch-Sportanlage mit Sportheim, Rasenplatz und Turnhalle"
                             width="1000" height="667"
                             loading="lazy" decoding="async">
                    </div>
                    <address class="sportheim-bento__addr">
                        <p class="sportheim-bento__addr-label">Lage &amp; Adresse</p>
                        <p class="sportheim-bento__addr-text">
                            <strong><?= e($addr['venue']) ?></strong><br>
                            <?= e($addr['street']) ?><br>
                            <?= e($addr['zip']) ?> <?= e($addr['city']) ?>
                        </p>
                    </address>
                    <div class="sportheim-bento__cta">
                        <p class="sportheim-bento__cta-title">Jetzt anfragen</p>
                        <a class="btn btn--outline" href="#buchung">Anfrage senden</a>
                    </div>
                </div>
            </div>
        </section>

<?php
component('sportheimbuchung-form', ['form' => $page['form']]);
component('faq', ['faq' => $page['faq'] ?? []]);
