<?= $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>
    <?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; ?>
    
    <!-- List -->
     <?php if (!empty($blocks['list'][0]['content'])): ?>
      <ol class="carbon-list-ordered">
          <?php foreach (explode("\n", $blocks['list'][0]['content']) as $item): ?>
              <li class="fade-up mb-3"><?= trim($item);?></li>
          <?php endforeach; ?>
      </ol>
     <?php endif; ?>
    
    <?php if (!empty($blocks['heading'][1]['heading'])): ?>
           <<?= $blocks['heading'][1]['heading_type'] ?> style="color:<?= $blocks['heading'][1]['color'] ?>" class="fade-up"><?= esc($blocks['heading'][1]['heading']) ?></<?= $blocks['heading'][1]['heading_type'] ?>>
    <?php endif; ?>
    <?php if (!empty($blocks['text'][1]['content'])): ?>
        <p class="fade-up"><?= nl2br($blocks['text'][1]['content']) ?></p>
    <?php endif; ?>
    <?php if (!empty($blocks['list'][1]['content'])): ?>
      <ul>
          <?php foreach (explode("\n", $blocks['list'][1]['content']) as $item): ?>
              <li class="fade-up mb-3"><?= trim($item);?></li>
          <?php endforeach; ?>
      </ul>
    <?php endif; ?>
    <?php if (!empty($blocks['heading'][2]['heading'])): ?>
           <<?= $blocks['heading'][2]['heading_type'] ?> style="color:<?= $blocks['heading'][2]['color'] ?>" class="fade-up"><?= esc($blocks['heading'][2]['heading']) ?></<?= $blocks['heading'][2]['heading_type'] ?>>
    <?php endif; ?>
     
    <?php if (!empty($blocks['text'][2]['content'])): ?>
        <p class="fade-up"><?= nl2br($blocks['text'][2]['content']) ?></p>
    <?php endif; ?>

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