<section class="hero <?= $this->class ?>"<?= $this->cssID ?>>
<?php if ($this->entry['image_path']): ?>
<div class="hero__background">
<img src="<?= $this->getImage($this->entry['image_path'], $width, $height, 'center_center'); ?>"
alt="<?= ($this->entry['row']['headline_'.$_COOKIE['target']] ? $this->entry['row']['headline_'.$_COOKIE['target']] : $this->entry['row']['headline_family']) ?>"
loading="eager">
</div>
<?php endif; ?>
<div class="hero__overlay"></div>
<div class="container hero__content">
<div class="row">
<div class="col-12 col-lg-8">
<ul class="breadcrumb">
<li class="first"><a href="/">Home</a></li>
<?php foreach($this->entry['breadcrumb'] as $bce): ?>
<li><a href="<?php echo $bce['url'] ?>"><?php echo $bce['title'] ?></a></li>
<?php endforeach ?>
<li class="last"><span><?php echo $this->entry['row']['title'] ?><span></li>
</ul>
<h1 class="hero__headline">
<span class="hero__headline-highlight"><?= ($this->entry['row']['headline_'.$_COOKIE['target']] ? $this->entry['row']['headline_'.$_COOKIE['target']] : $this->entry['row']['headline_family']) ?></span><br>
<span class="hero__headline-highlight fw-normal"><?= $this->entry['row']['pageimage_subline'] ?></span>
</h1>
<div class="hero__description">
<?= $this->entry['row']['teaser'] ?>
</div>
<?php if ($this->entry['row']['usp']): ?>
<div class="hero__usp has-checklist type-check-filled">
<?= $this->entry['row']['usp'] ?>
</div>
<?php endif; ?>
<div class="hero__cta">
<a href="{{link_url::kontakt}}?subject=<?= urlencode($this->entry['row']['title']) ?>" class="btn btn-lg btn-success">Infos & Preise unverbindlich anfordern</a>
</div>
</div>
</div>
</div>
<!-- Trust-Bar -->
<?php if (!empty($this->testimonials)): ?>
<div class="hero__trust-bar">
<div class="container">
<div class="hero__trust-rotator" aria-live="polite">
<?php foreach ($this->testimonials as $i => $t): ?>
<div class="hero__trust-item<?= $i === 0 ? ' is-active' : '' ?>" aria-hidden="<?= $i === 0 ? 'false' : 'true' ?>">
<span class="hero__trust-stars" aria-label="<?= $t->rating ?> von 5 Sternen">
<?php for ($s = 1; $s <= 5; $s++): ?>
<i class="<?= $s <= $t->rating ? 'icon-star-fat' : 'icon-star-fat hero__trust-star--empty' ?>" aria-hidden="true"></i>
<?php endfor; ?>
</span>
<!-- <span class="hero__trust-rating"><?= $t->rating ?>/5 Sterne</span> -->
<?php if ($t->title): ?>
<span class="hero__trust-quote">„<?= $t->title ?>"</span>
<?php endif; ?>
<span class="hero__trust-author">– <?= $t->name ?></span>
</div>
<?php endforeach; ?>
</div>
</div>
</div>
<?php endif; ?>
</section>