<?php
    // Page: O nas
    // ID: 75

    get_header();
    
    $box_1 = get_field('box_1');
    $box_2 = get_field('box_2');
    $box_3 = get_field('box_3');
    $box_4 = get_field('box_4');
?>
<main id="primary" class="site-main">
    <section class="box-1">
        <div class="box-bg">
            <img src="/wp-content/uploads/2025/10/img-2.svg" alt="">
        </div>
        <div class="container">
            <div class="row">
                <div class="col-1">
                    <div id="box-page-name">
                        <?php echo get_the_title(); ?>
                    </div>
                    <div class="box-title">
                        <h2><?php echo $box_1['title']; ?></h2>
                    </div>
                    <div class="box-text">
                        <?php echo $box_1['text']; ?>
                    </div>
                    <div class="box-info-text">
                        <?php echo $box_1['text_2']; ?>
                    </div>
                </div>
                <div class="col-2">
                    <div class="box-img">
                        <img src="<?php echo $box_1['img']; ?>" alt="">
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="box-2">
        <div class="box-bg">
            <img src="/wp-content/uploads/2025/10/img-2.svg" alt="">
        </div>
        <div class="container">
            <div class="row">
                <div class="c-tabs">
                    <div class="box-title">
                        <h2><?php echo $box_2['title']; ?></h2>
                    </div>
                    <ul class="c-tabs--nav">
                        <?php
                            $counter = 1;
                            foreach ($box_2['tabs'] as $i => $tab) :
                                if(is_array($tab)) :
                        ?>
                            <li tab_id="<?= $counter ; ?>" <?= $counter === 1 ? 'class="active"' : ''; ?>>
                                <svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
                                    <path fill-rule="evenodd" clip-rule="evenodd" d="M9.52187 4.22626C9.81511 4.37275 10 4.67231 10 5C10 5.3277 9.81511 5.62725 9.52187 5.77374C7.31005 6.87965 3.28801 8.89079 1.25214 9.90859C0.983877 10.0427 0.665386 10.0285 0.410277 9.87072C0.155431 9.71318 -4.12403e-07 9.43467 -3.99297e-07 9.13485C-3.06386e-07 7.0093 -1.30727e-07 2.99069 -3.78167e-08 0.865145C-2.47113e-08 0.565328 0.155432 0.286814 0.410277 0.129278C0.665386 -0.0285209 0.983877 -0.0427212 1.25214 0.0914077C3.28801 1.10921 7.31005 3.12035 9.52187 4.22626Z" fill="white"/>
                                </svg>
                                <span><?= $tab['tab_name']; ?></span>
                            </li>
                        <?php $counter++; endif; endforeach; ?>
                    </ul>
                    <div class="c-tabs--content">
                        <div tab_id="1" class="c-tab--item" style="display: block;">
                            <div class="row">
                                <div class="col-1">
                                    <div class="box-img">
                                        <img src="<?php echo $box_2['img']; ?>" alt="">
                                    </div>
                                </div>
                                <div class="col-2">
                                    <div class="c-tab--item--wrapper">
                                        <div class="text-box-info">
                                            <p><?php echo $box_2['tabs']['tab_1']['info']; ?></p>
                                        </div>
                                        <div class="text-box">
                                            <?php echo $box_2['tabs']['tab_1']['text']; ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div tab_id="2" class="c-tab--item">
                            <div class="row">
                                <div class="col-1">
                                    <div class="box-img">
                                        <img src="<?php echo $box_2['img']; ?>" alt="">
                                    </div>
                                </div>
                                <div class="col-2">
                                    <div class="c-tab--item--wrapper">
                                        <ul>
                                            <?php foreach ($box_2['tabs']['tab_2']['lists'] as $i => $item) : ?>
                                            <li>
                                                <p class="item-title"><?php echo $item['title']; ?></p>
                                                <p class="item-text"><?php echo $item['text']; ?></p>
                                            </li>
                                            <?php endforeach; ?>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div tab_id="3" class="c-tab--item">
                            <div class="row">
                                <div class="col-2">
                                    <div class="c-tab--item--wrapper">
                                        <ul>
                                            <?php foreach ($box_2['tabs']['tab_3']['lists'] as $i => $item) : ?>
                                            <li>
                                                <p class="item-title"><?php echo $item['title']; ?></p>
                                                <?php if( $item['text_more'] == 1 ) :?>
                                                    <?php echo $item['tekst_big']; ?>
                                                <?php else: ?>
                                                    <?php if (!empty($item['text'])): ?>
                                                        <p class="item-text"><?php echo $item['text']; ?></p>
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                            </li>
                                            <?php endforeach; ?>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div tab_id="4" class="c-tab--item">
                            <div class="row">
                                <div class="col-2">
                                    <div class="c-tab--item--wrapper">
                                        <ul>
                                            <?php foreach ($box_2['tabs']['tab_4']['lists'] as $i => $item) : ?>
                                            <li>
                                                <p class="item-title"><?php echo $item['title']; ?></p>
                                                <ol>
                                                    <?php foreach ($item['urls'] as $i => $sub_item) : ?>
                                                        <?php if($sub_item['link']['title']) : ?>
                                                            <li>
                                                                <a href="<?php echo $sub_item['link']['url']; ?>" target="<?php echo $sub_item['link']['target']; ?>">
                                                                    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                                        <path d="M4.99219 9.00482L9.00482 4.99219" stroke="#000" stroke-linecap="round" stroke-linejoin="round"/>
                                                                        <path d="M5.99512 3.74512L7.8798 1.8642C8.44574 1.3074 9.20876 0.996792 10.0027 1.00002C10.7966 1.00326 11.5571 1.32007 12.1184 1.88146C12.6798 2.44284 12.9966 3.20331 12.9999 3.99722C13.0031 4.79113 12.6925 5.55416 12.1357 6.1201L10.251 8.00165" stroke="#000" stroke-linecap="round" stroke-linejoin="round"/>
                                                                        <path d="M3.74512 5.99512L1.8642 7.8798C1.3074 8.44574 0.996792 9.20876 1.00002 10.0027C1.00326 10.7966 1.32007 11.5571 1.88146 12.1184C2.44284 12.6798 3.20331 12.9966 3.99722 12.9999C4.79113 13.0031 5.55416 12.6925 6.1201 12.1357L8.00165 10.251" stroke="#000" stroke-linecap="round" stroke-linejoin="round"/>
                                                                    </svg>
                                                                    <span><?php echo $sub_item['link']['title']; ?></span>
                                                                </a>
                                                            </li>
                                                        <?php endif; ?>
                                                    <?php endforeach; ?>
                                                </ol>
                                            </li>
                                            <?php endforeach; ?>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div tab_id="5" class="c-tab--item">
                            <div class="row">
                                <div class="col-1">
                                    <div class="box-img">
                                        <img src="<?php echo $box_2['img']; ?>" alt="">
                                    </div>
                                </div>
                                <div class="col-2">
                                    <div class="c-tab--item--wrapper">
                                        <ol class="contact-list">
                                            <li class="contact-item">
                                                <div class="item-bg">
                                                    <img src="/wp-content/uploads/2025/10/kontakt-3.svg" alt="">
                                                </div>
                                                <div class="contact-item-img">
                                                    <img src="/wp-content/uploads/2025/10/Group-561.svg" alt="">
                                                    <div class="img">
                                                        <img src="<?php echo $box_2['tabs']['tab_5']['contacts']['img']; ?>" alt="">
                                                    </div>
                                                </div>
                                                <div class="contact-item-content">
                                                    <div class="contact-name">
                                                        <p><?php echo $box_2['tabs']['tab_5']['contacts']['name']; ?></p>
                                                    </div>
                                                    <ul>
                                                        <?php foreach ($box_2['tabs']['tab_5']['contacts']['lista'] as $item) : ?>
                                                            <?php if ($item['link']['title']): ?>
                                                                <li>
                                                                    <img src="<?php echo $item['icon']; ?>" alt="">
                                                                    <a href="<?php echo $item['link']['url']; ?>"><?php echo $item['link']['title']; ?></a>
                                                                </li>
                                                            <?php endif; ?>
                                                        <?php endforeach; ?>
                                                    </ul>
                                                </div>
                                            </li>
                                        </ol>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="box-3">
        <div class="box-bg">
            <img src="/wp-content/uploads/2025/10/img-3.svg" alt="">
        </div>
        <div class="container">
            <div class="row">
                <div class="c-tabs">
                    <div class="box-title">
                        <h2><?php echo $box_3['title']; ?></h2>
                    </div>
                    <ul class="c-tabs--nav">
                        <?php
                            $counter = 1;
                            foreach ($box_3['tabs'] as $i => $tab) :
                                if(is_array($tab)) :
                        ?>
                            <li tab_id="<?= $counter ; ?>" <?= $counter === 1 ? 'class="active"' : ''; ?>>
                                <svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
                                    <path fill-rule="evenodd" clip-rule="evenodd" d="M9.52187 4.22626C9.81511 4.37275 10 4.67231 10 5C10 5.3277 9.81511 5.62725 9.52187 5.77374C7.31005 6.87965 3.28801 8.89079 1.25214 9.90859C0.983877 10.0427 0.665386 10.0285 0.410277 9.87072C0.155431 9.71318 -4.12403e-07 9.43467 -3.99297e-07 9.13485C-3.06386e-07 7.0093 -1.30727e-07 2.99069 -3.78167e-08 0.865145C-2.47113e-08 0.565328 0.155432 0.286814 0.410277 0.129278C0.665386 -0.0285209 0.983877 -0.0427212 1.25214 0.0914077C3.28801 1.10921 7.31005 3.12035 9.52187 4.22626Z" fill="#BDAED4"/>
                                </svg>
                                <span><?= $tab['tab_name']; ?></span>
                            </li>
                        <?php $counter++; endif; endforeach; ?>
                    </ul>
                    <div class="c-tabs--content">
                        <div tab_id="1" class="c-tab--item" style="display: block;">
                            <div class="row">
                                <div class="col-1">
                                    <div class="c-tab--item--wrapper">
                                        <div class="text-box-info">
                                            <p><?php echo $box_3['tabs']['tab_1']['info']; ?></p>
                                        </div>
                                        <div class="text-box">
                                            <?php echo $box_3['tabs']['tab_1']['text']; ?>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-2">
                                    <div class="box-img">
                                        <img src="<?php echo $box_3['img']; ?>" alt="">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div tab_id="2" class="c-tab--item">
                            <div class="row">
                                <div class="col-1">
                                    <div class="c-tab--item--wrapper">
                                        <ul>
                                            <?php foreach ($box_3['tabs']['tab_2']['lists'] as $i => $item) : ?>
                                            <li>
                                                <p class="item-title"><?php echo $item['title']; ?></p>
                                                <p class="item-text"><?php echo $item['text']; ?></p>
                                            </li>
                                            <?php endforeach; ?>
                                        </ul>
                                    </div>
                                </div>
                                <div class="col-2">
                                    <div class="box-img">
                                        <img src="<?php echo $box_3['img']; ?>" alt="">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div tab_id="3" class="c-tab--item">
                            <div class="row">
                                <div class="col-1">
                                    <div class="c-tab--item--wrapper">
                                        <ul>
                                            <?php foreach ($box_3['tabs']['tab_3']['lists'] as $i => $item) : ?>
                                            <li>
                                                <p class="item-title"><?php echo $item['title']; ?></p>
                                                <?php if( $item['text_more'] == 1 ) :?>
                                                    <?php echo $item['tekst_big']; ?>
                                                <?php else: ?>
                                                    <?php if (!empty($item['text'])): ?>
                                                        <p class="item-text"><?php echo $item['text']; ?></p>
                                                    <?php endif; ?>
                                                <?php endif; ?>
                                            </li>
                                            <?php endforeach; ?>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div tab_id="4" class="c-tab--item">
                            <div class="row">
                                <div class="col-1">
                                    <div class="c-tab--item--wrapper">
                                        <ul>
                                            <?php foreach ($box_3['tabs']['tab_4']['lists'] as $i => $item) : ?>
                                            <li>
                                                <p class="item-title"><?php echo $item['title']; ?></p>
                                                <ol>
                                                    <?php foreach ($item['urls'] as $i => $sub_item) : ?>
                                                        <?php if($sub_item['link']['title']) : ?>
                                                            <li>
                                                                <a href="<?php echo $sub_item['link']['url']; ?>" target="<?php echo $sub_item['link']['target']; ?>">
                                                                    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                                        <path d="M4.99219 9.00482L9.00482 4.99219" stroke="#fff" stroke-linecap="round" stroke-linejoin="round"/>
                                                                        <path d="M5.99512 3.74512L7.8798 1.8642C8.44574 1.3074 9.20876 0.996792 10.0027 1.00002C10.7966 1.00326 11.5571 1.32007 12.1184 1.88146C12.6798 2.44284 12.9966 3.20331 12.9999 3.99722C13.0031 4.79113 12.6925 5.55416 12.1357 6.1201L10.251 8.00165" stroke="#fff" stroke-linecap="round" stroke-linejoin="round"/>
                                                                        <path d="M3.74512 5.99512L1.8642 7.8798C1.3074 8.44574 0.996792 9.20876 1.00002 10.0027C1.00326 10.7966 1.32007 11.5571 1.88146 12.1184C2.44284 12.6798 3.20331 12.9966 3.99722 12.9999C4.79113 13.0031 5.55416 12.6925 6.1201 12.1357L8.00165 10.251" stroke="#fff" stroke-linecap="round" stroke-linejoin="round"/>
                                                                    </svg>
                                                                    <span><?php echo $sub_item['link']['title']; ?></span>
                                                                </a>
                                                            </li>
                                                        <?php endif; ?>
                                                    <?php endforeach; ?>
                                                </ol>
                                            </li>
                                            <?php endforeach; ?>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div tab_id="5" class="c-tab--item">
                            <div class="row">
                                <div class="col-1">
                                    <div class="c-tab--item--wrapper">
                                        <ol class="contact-list">
                                            <li class="contact-item">
                                                <div class="item-bg">
                                                    <img src="/wp-content/uploads/2025/10/kontakt-3.svg" alt="">
                                                </div>
                                                <div class="contact-item-img">
                                                    <img src="/wp-content/uploads/2025/10/Group-561.svg" alt="">
                                                    <div class="img">
                                                        <img src="<?php echo $box_3['tabs']['tab_5']['contacts']['img']; ?>" alt="">
                                                    </div>
                                                </div>
                                                <div class="contact-item-content">
                                                    <div class="contact-name">
                                                        <p><?php echo $box_3['tabs']['tab_5']['contacts']['name']; ?></p>
                                                    </div>
                                                    <ul>
                                                        <?php foreach ($box_3['tabs']['tab_5']['contacts']['lista'] as $item) : ?>
                                                            <?php if ($item['link']['title']): ?>
                                                                <li>
                                                                    <img src="<?php echo $item['icon']; ?>" alt="">
                                                                    <a href="<?php echo $item['link']['url']; ?>"><?php echo $item['link']['title']; ?></a>
                                                                </li>
                                                            <?php endif; ?>
                                                        <?php endforeach; ?>
                                                    </ul>
                                                </div>
                                            </li>
                                        </ol>
                                    </div>
                                </div>

                                <div class="col-2">
                                    <div class="box-img">
                                        <img src="<?php echo $box_3['img']; ?>" alt="">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <section class="box-4">
        <div class="box-bg">
            <img src="/wp-content/uploads/2025/10/img-7.svg" alt="">
        </div>
        <div class="container">
            <div class="row">
                <div class="col col-1">
                    <div class="box-title">
                        <h2><?php echo $box_4['title']; ?></h2>
                    </div>
                    <div class="box-text">
                        <?php echo $box_4['text']; ?>
                    </div>
                    <ul class="box-nav">
                        <li>
                            <?php if ($box_4['btn']['title']): ?>
                            <a class="btn-3" href="<?php echo $box_4['btn']['url']; ?>"><?php echo $box_4['btn']['title']; ?></a>
                            <?php endif; ?>
                        </li>
                    </ul>
                </div>
                <div class="col col-2">
                    <div class="box-img">
                        <img src="<?php echo $box_4['img']; ?>" alt="">
                    </div>
                </div>
            </div>
        </div>
    </section>
</main>
<?php get_footer(); ?>