<div class="page-header">
    <h3>Attractions</h3>
</div>
<div id="attractions" class="container  mt-5">

    <?php foreach ($attractions as $ak => $av) {
        if ($ak % 2 == 0) { ?>
            <div class="row <?= ($ak > 0 ? 'mt-20' : '') ?>">
                <div class="col-lg-6 col-md-6 col-sm-12">
                    <img class="img img-fluid img-responsive " src="<?= SITE_URL . 'public/images/attractions/' . $av['image'] ?>" alt="beach-villa-home-mobile">
                </div>
                <div class="col-lg-6 col-md-6 col-sm-12">
                    <div class="attraction_div">
                        <p class="tags">LOCATION</p>
                        <h3><?= $av['title'] ?></h3>
                        <p class="text-desc"><?= html_entity_decode($av['description']) ?></p>
                        <?php if (!empty($av['url'])) { ?>
                            <a href="<?= $av['url'] ?>" class="btn-gradient-bg">Learn More</a>
                        <?php } ?>
                    </div>
                </div>
            </div>
        <?php } else { ?>
            <div class="row mt-20">
                <div class="col-lg-6 col-md-6 col-sm-12">
                    <div class="attraction_div">
                        <p class="tags">LOCATION</p>
                        <h3><?= $av['title'] ?></h3>
                        <p class="text-desc"><?= html_entity_decode($av['description']) ?></p>
                        <?php if (!empty($av['url'])) { ?>
                            <a href="<?= $av['url'] ?>" class="btn-gradient-bg">Learn More</a>
                        <?php } ?>
                    </div>
                </div>
                <div class="col-lg-6 col-md-6 col-sm-12">
                    <img class="img img-fluid img-responsive" src="<?= SITE_URL . 'public/images/attractions/' . $av['image'] ?>" alt="beach-villa-home-mobile">
                </div>
            </div>
    <?php }
    } ?>

</div>