<?php
$section1 = get_field('section_1');
$section2 = get_field('section_2');
$section3 = get_field('section_3');
?>

<?php /* Template Name: Strefa korzysci */ ?>

<?php get_header() ?>

<section class="page zone zone1">
    <div class="page__row">
        <div class="page__left">
            <img src="<?php echo $section1['image'] ?>" />
            <div class="zone__tiles">
                <?php foreach($section1['tiles'] as $row): ?>
                    <div class="zone__tile">
                        <div class="zone__svg"><?php echo $row['svg'] ?></div>
                        <div class="zone__name"><?php echo nl2br($row['name']) ?></div>
                    </div>
                <?php endforeach; ?>
            </div>
        </div>
        <div class="page__right">
            <div class="page__titles">
                <h1><?php the_title() ?></h1>
                <div class="page__title"><?php echo $section1['title'] ?></div>
            </div>

            <div class="page__desc description">
                <?php echo $section1['description'] ?>
            </div>
        </div>
    </div>
</section>

<section class="page zone zone2">
    <div class="page__row">
        <div class="page__left">
            <img src="<?php echo $section2['image'] ?>" />
            <div class="zone__tiles">
                <?php foreach($section2['tiles'] as $row): ?>
                    <div class="zone__tile">
                        <div class="zone__svg"><?php echo $row['svg'] ?></div>
                        <div class="zone__name"><?php echo nl2br($row['name']) ?></div>
                    </div>
                <?php endforeach; ?>
            </div>
        </div>
        <div class="page__right">
            <div class="page__desc description">
                <?php echo $section2['description'] ?>
            </div>
        </div>
    </div>
</section>

<section class="page zone zone3">
    <div class="page__row">
        <div class="page__left">
            <img src="<?php echo $section3['image'] ?>" />
            <div class="zone__tiles">
                <?php foreach($section3['tiles'] as $row): ?>
                    <div class="zone__tile">
                        <div class="zone__svg"><?php echo $row['svg'] ?></div>
                        <div class="zone__name"><?php echo nl2br($row['name']) ?></div>
                    </div>
                <?php endforeach; ?>
            </div>
        </div>
        <div class="page__right">
            <div class="page__desc description">
                <?php echo $section3['description'] ?>
            </div>
        </div>
    </div>
</section>

<?php get_footer() ?>