<div class="container-fluid  top-management pdr-con">



    <div class="row justify-content-center">

        <div class="col-12 text-center">

            <h1>Zastupujeme</h1>
            <br><br>
        </div>

    </div>


    <div class="row h-100">
        <?php
$featured_post = get_sub_field('top_klient_1');
if( $featured_post ): ?>

        <div class="col-lg-2 col-md-4 col-sm-12 top-lide-box">
            <img class="img-fluid" src="<?php echo get_sub_field('obrazek', get_the_ID()); ?>">
        </div>

        <div class="col-lg-4 col-md-4 col-sm-12 top-lide-box-txt">
            <div class="top-lide-pointer"></div>
            <img class="img-fluid top-lide-logo" src="<?php echo get_sub_field('logo', get_the_ID()); ?>">

            <h1>
                <?php echo get_sub_field('jmeno', get_the_ID()); ?>
            </h1>
            <h2>
                <?php echo get_sub_field('funkce', get_the_ID()); ?>
            </h2>
            <div class="top-lide-line"></div>
            <p>
                Datum narození:
                <?php echo get_sub_field('narozeni', get_the_ID()); ?><br>
                Výška:
                <?php echo get_sub_field('vyska', get_the_ID()); ?><br>
                Váha:
                <?php echo get_sub_field('vaha', get_the_ID()); ?><br>
                Noha:
                <?php echo get_sub_field('noha', get_the_ID()); ?><br>
                Klub:
                <?php echo get_sub_field('klub', get_the_ID()); ?><br>
                Reprezentace:
                <?php echo get_sub_field('reprezentace', get_the_ID()); ?>
            </p>
            <div class="top-lide-line2"></div>
            <p>
                <?php echo get_sub_field('text', get_the_ID()); ?>
            </p>
        </div>
        <?php endif; ?>

        <?php
$featured_post = get_sub_field('top_klient_2');
if( $featured_post ): ?>
        <div class="col-lg-2 col-md-4 col-sm-12 top-lide-box">
            <img class="img-fluid" src="<?php echo get_sub_field('obrazek', get_the_ID()); ?>">
        </div>

        <div class="col-lg-4 col-md-4 col-sm-12 top-lide-box-txt">
            <div class="top-lide-pointer"></div>
            <img class="img-fluid top-lide-logo" src="<?php echo get_sub_field('logo', get_the_ID()); ?>">

            <h1>
                <?php echo get_sub_field('jmeno', get_the_ID()); ?>
            </h1>
            <h2>
                <?php echo get_sub_field('funkce', get_the_ID()); ?>
            </h2>
            <div class="top-lide-line"></div>
            <p>
                Datum narození:
                <?php echo get_sub_field('narozeni', get_the_ID()); ?><br>
                Výška:
                <?php echo get_sub_field('vyska', get_the_ID()); ?><br>
                Váha:
                <?php echo get_sub_field('vaha', get_the_ID()); ?><br>
                Noha:
                <?php echo get_sub_field('noha', get_the_ID()); ?><br>
                Klub:
                <?php echo get_sub_field('klub', get_the_ID()); ?><br>
                Reprezentace:
                <?php echo get_sub_field('reprezentace', get_the_ID()); ?>
            </p>
            <div class="top-lide-line2"></div>
            <p>
                <?php echo get_sub_field('text', get_the_ID()); ?>
            </p>

        </div>
        <?php endif; ?>

    </div>


    <div class="row justify-content-center">

        <div class="col-12 text-center">
            <br><br><br>
            <a href="" class="top-lide-btn">Zobrazit všechny klienty</a>
            <br><br><br>
        </div>

    </div>


</div>

<?php

$post_object = get_field('top_klient_1');

if( $post_object ): 

	// override $post
	$post = $post_object;
	setup_postdata( $post ); 

	?>
<div>
    <h3><a href="<?php the_permalink(); ?>">
            <?php the_title(); ?></a></h3>
    <span>Post Object Custom Field:
        <?php the_field('narozeni'); ?></span>
</div>
<?php wp_reset_postdata(); // IMPORTANT - reset the $post object so the rest of the page works correctly ?>
<?php endif; ?>
