<?php
if(get_field('header_title')){
    $header_title = get_field('header_title');
}else{
    $header_title = get_the_title();
}
if(get_field('header_background')){
    $background = get_field('header_background');
    $background_url = $background['sizes']['c_slider'];
}else{
    $background_url = get_template_directory_uri().'/images/banner2.jpg';
}
?>
<div class="d-none d-md-block banner_page container-fluid p-0 bg-brown d-flex justify-content-end align-items-end" style="background:url(<?php echo $background_url;?>) no-repeat center center / cover;">
       <span class="cover"></span>
        <div class="col-12 col-lg-8 col-xl-6 bg-white banner_page_title">
            <?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>
            <h1 class="brown h1"><?php echo $header_title;?></h1>
            <?php
            if(get_field('header_txt')){
                echo '<p class="post_content">'.get_field('header_txt').'</p>';
            }
            ?>
        </div>
</div>

<div class="d-block d-md-none banner_page_xs container-fluid">
    <div class="col-12 bg-white banner_page_title text-center py-3">
        <h1 class="brown h2 "><?php echo $header_title;?></h1>
        <?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>
    </div>
</div>


