<?= $this->extend('App\Views\website\index') ?>
<?= $this->section('content') ?>
 
<div class="container-fluid">
    <div class="row">
        <div class="col">
            <section class="header-wrap fade-up mb-3" style="background: linear-gradient(to right, rgba(94, 196, 1, 0.8) 70%, rgba(94, 196, 1, 0.4) 100%), url('<?= $post->photo;?>') no-repeat;background-size: cover;background-position: top center; ">
		    <div class="overlay">
		    <div class="page-title">
        		  <div class="container">
                    <div class="row justify-content-between">
                    <div class="col-lg-12 align-self-end"> 
                        <h1><?= esc($post->title) ?></h1>
                        <p><?= esc($post->excerpt) ?> </p>
                    </div>
                    </div>
                </div>
		    </div>
		    </div>
        </section>
        </div>
    </div><!-- Header Section !-->
    
    <div class="row">
        <div class="col-md-12">
            <?php if (!empty($blocks['text'][0]['content'])): ?>
                   <p class="fade-up"><?= nl2br($blocks['text'][0]['content']) ?></p>
             <?php endif; ?>
        </div>
    </div>
    <!-- Cards -->
    <?php if (!empty($cards)): ?>
    <div class="row row-cols-2 row-cols-lg-5 g-2 g-lg-3">
        <?php foreach ($cards as $card): ?>
            <div class="col carbon-card mb-3">
                <div class="card card-body border-0 shadow-sm  text-center fade-up">
                    <img src="<?= esc($card['photo']) ?>" alt="<?= esc($card['title']) ?>" class="img-fluid"/>
                    <p class="py-2 fw-bold"><?= esc($card['description']) ?></p>
                    <h6 class="fw-normal small"><?= esc($card['title']) ?></h6>
                </div>
            </div>
        <?php endforeach; ?>
    </div>
    <?php endif; ?>
    <pre></pre>
    <?php if (!empty($blocks['heading'][0]['heading'])): ?>
           <<?= $blocks['heading'][0]['heading_type'] ?> style="color:<?= $blocks['heading'][0]['color'] ?>" class="fade-up"><?= esc($blocks['heading'][0]['heading']) ?></<?= $blocks['heading'][0]['heading_type'] ?>>
    <?php endif; ?>
    <?php if (!empty($blocks['text'][1]['content'])): ?>
        <p class="fade-up"><?= nl2br($blocks['text'][1]['content']) ?></p>
    <?php endif; ?>

</div>

<?= $this->endSection() ?>