<?php
if(get_field('slider_gallery')){
    $gallery = get_field('slider_gallery');
    if(get_field('header_title')){
        $title = get_field('header_title');
    }else{
        $title = get_the_title();
    }
    if(get_field('header_suptitle')){
        $suptitle = get_field('header_suptitle');
    }else{
        $suptitle = null;
    }
    ?>
    <div class="d-none d-md-block container-fluid banner">
        <div class="row">
            <div class="col-12 col-sm-7 col-md-6 col-lg-4 banner_title_container">
                <div class="banner_title" >
                    <?php if($suptitle){?>
                        <p class="suptitle brown text-uppercase bold"><?php echo $suptitle;?></p>
                    <?php } ?>
                    <h1 class="sheila beige"><?php echo $title;?></h1>
                </div>
            </div>

            <div class="col-12 col-sm-5 col-md-6 col-lg-8 banner_img  pe-0">
                <div class="home_slider">
                    <?php
                    foreach ($gallery as $img){

                        ?>
                        <div class="item" style="height:725px;background: url(<?php echo $img['sizes']['c_slider'];?>) no-repeat center center / cover;"></div>
                    <?php

                    }
                    ?>
                </div>
                <img src="<?php echo $bg['sizes']['c_slider'];?>" alt="<?php echo $title;?>" class="d-none">
            </div>
        </div>
    </div>


        <?php if(get_field('mobile_img')){
            $mobile_img = get_field('mobile_img');
            ?>
        <div class="d-block d-md-none container-fluid banner_sm" style="background: url(<?php echo $mobile_img['sizes']['c_medium_false'];?>) no-repeat center center / cover;">
        </div>
            <?php
        }
        ?>


    <?php
}
?>
