<?php

require_once('__header.php'); ?>
    <div class="wrap">
        <div class="grid"></div>

        <div class="cover">
            <img src="<?php echo $page->image->url; ?>">
        </div>

        <div class="container">
            <h1 class="big"><?php echo $page->headline; ?></h1>
            <?php echo $page->body; ?>

            
            <!-- AddToAny BEGIN -->
            <div class="a2a_kit a2a_kit_size_32 a2a_default_style">
            <a class="a2a_button_facebook"></a>
            <a class="a2a_button_twitter"></a>
            <a class="a2a_button_linkedin"></a>
            </div>
            <script async src="https://static.addtoany.com/menu/page.js"></script>
            <!-- AddToAny END -->

        </div>








        <ul class="directions inner-directions">
            <?php
            foreach ($pages->get('/directions-of-activity/')->children() as $item):
                echo '<li><img src="' . $item->image->url . '">'
                    . '<div class="li_content">'
                    . '<figure>' . substr($item->title, 0, 1) . '</figure>'
                    . '<h3>' . $item->title . '</h3>'
                    . '<ul>';
                foreach ($item->children() as $subitem):

                    if ($subitem->numChildren):
                        echo '<li><a href="javascript:void(0)">' . $subitem->title . '</a>';
                        echo '<ul>';
                        foreach ($subitem->children() as $child):
                            echo '<li><a href="' . $child->url() . '">' . $child->title . '</a></li>';
                        endforeach;
                        echo '</ul>';
                    else:
                        echo '<li><a href="' . $subitem->url . '">' . $subitem->title . '</a>';
                    endif;

                    echo '</li>';
                endforeach;
                echo '</ul></div></li>';
            endforeach;
            ?>
        </ul>








<!-- 
        <?php
        if ($page->numChildren):
            $next = $page->children()->first();
        else:
            $next = $page->siblings('sort>' . $page->sort)->first();
            if (!$next) $next = $page->siblings('sort<' . $page->sort)->first();
        endif;
        if ($next) :
            echo '<a href="' . $next->url . '" class="next-page"><small>' . _x('Next industry', '-') . '</small>' . $next->title . '</a>';
        endif;
        ?> -->


    </div>
    <script>
        var swiper = new Swiper('.swiper-container', {
            pagination: '.swiper-pagination',
            slidesPerView: 3,
            centeredSlides: true,
            paginationClickable: true,
            spaceBetween: 0,
            grabCursor: true,
            nextButton: '.swiper-button-next',
            prevButton: '.swiper-button-prev'
        });
    </script>
<?php require_once('__footer.php'); ?>