<?php
    /**
     * Page: Kontakt
     */

    get_header();

    $box1 = get_field('box-1');
?>
	<main id="primary" class="site-main">
        <div class="box-0">
            <?php get_template_part('inc/breadcrumb');?>
        </div>
        <div class="box-1">
            <div class="container">
                <div class="row">
                    <div class="col col-1">
                        <div class="box-head">
                            <h2><?php echo esc_html($box1['title']); ?></h2>
                        </div>
                        <div class="box-text">
                            <p><?php echo esc_html($box1['text']); ?></p>
                        </div>

                        <div class="contact-cards">
                            <?php foreach ($box1['contacts'] as $item) : ?>
                                <div class="contact-card">
                                    <div class="card-title">
                                        <h3><?php echo esc_html($item['title']); ?></h3>
                                    </div>
                                    <div class="card-data">
                                        <?php echo wp_kses_post($item['text']); ?>
                                        <ul class="card-list">
                                            <?php foreach ($item['contacts_types'] as $contact) : ?>
                                                <li>
                                                    <a href="<?php echo esc_url($contact['url']); ?>"><?php echo esc_html($contact['title']); ?></a>
                                                </li>
                                            <?php endforeach; ?>
                                        </ul>
                                    </div>
                                </div>
                            <?php endforeach; ?>
                        </div>

                        <div class="contact-description">
                            <?php echo wp_kses_post($box1['description']); ?>
                        </div>
                    </div>
                    <div class="col col-2">
                        <img src="<?php echo esc_url($box1['img']); ?>" alt="">
                    </div>
                </div>
            </div>
        </div>
    </main>
<?php get_footer();