<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything up until <div id="content">
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*
* @package bizconsulting
*/

?>
<!doctype html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">

<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<?php 
wp_body_open();
if(get_theme_mod('bptloading')==1){ do_action('bpt_preloader');}

if (is_front_page() && !is_home()){
	$HeaderClass = 'header-one';
	$TopBar = 'topbar-area fix hidden-xs';
	$HeaderAreaStart = 'header-area hidden-xs';
}else{
	$HeaderClass = 'header-two';
	$TopBar = 'topbar-area topbar-area-2 fix hidden-xs';
	$HeaderAreaStart = 'header-area header-area-2 hidden-xs';
}
?>
<header class="<?php echo esc_attr($HeaderClass);?>">
    <!-- Start top bar -->
    <div class="<?php echo esc_attr($TopBar);?>">
        <div class="container">
            <div class="row">
                <div class="col-md-6 col-sm-6">
                    <div class="topbar-left">
                        <ul>
                            <?php if(get_theme_mod('bpt_phone')!=''){?>
                                <li><i class="fa fa-phone"></i> <?php echo esc_html(get_theme_mod('bpt_phone')); ?></li>
                            <?php }?>
                            <?php if(get_theme_mod('bpt_email')!=''){?>
                                <li><i class="fa fa-envelope"></i> <?php echo esc_html(get_theme_mod('bpt_email')); ?></li>
                            <?php }?>
                            <?php if(get_theme_mod('bpt_skype')!=''){?>
                                <li><i class="fa fa-skype"></i> <?php echo esc_html(get_theme_mod('bpt_skype')); ?></li>
                            <?php }?>
                        </ul>  
                    </div>
                </div>
                <div class="col-md-6 col-sm-6">
                    <div class="topbar-right">
                        <?php if(get_theme_mod('header_btn_name')!='' && get_theme_mod('header_btn_url')!=''){?>
                            <div class="quote-button">
                                <a href="<?php echo esc_url(get_theme_mod('header_btn_url'));?>" class="quote-btn"><?php echo esc_html(get_theme_mod('header_btn_name'));?></a>
                            </div>
                        <?php }?>
                        <div class="top-social">
                            <ul>
                                <?php if(get_theme_mod('fb_link')!=''){?>
                                    <li><a href="<?php echo esc_url(get_theme_mod('fb_link'));?>" target="_blank"><i class="fa fa-facebook"></i></a></li>
                                <?php }?>
                                <?php if(get_theme_mod('tw_link')!=''){?>
                                    <li><a href="<?php echo esc_url(get_theme_mod('tw_link'));?>" target="_blank"><i class="fa fa-twitter"></i></a></li>
                                <?php }?>
                                <?php if(get_theme_mod('google_plus')!=''){?>
                                    <li><a href="<?php echo esc_url(get_theme_mod('google_plus'));?>" target="_blank"><i class="fa fa-google-plus"></i></a></li>
                                <?php }?>
                                <?php if(get_theme_mod('linkedin')!=''){?>
                                    <li><a href="<?php echo esc_url(get_theme_mod('linkedin'));?>" target="_blank"><i class="fa fa-linkedin"></i></a></li>
                                <?php }?>
                                <?php if(get_theme_mod('youtube')!=''){?>
                                    <li><a href="<?php echo esc_url(get_theme_mod('youtube'));?>" target="_blank"><i class="fa fa-youtube"></i></a></li>
                                <?php }?>
                                <?php if(get_theme_mod('instagram')!=''){?>
                                    <li><a href="<?php echo esc_url(get_theme_mod('instagram'));?>" target="_blank"><i class="fa fa-instagram"></i></a></li>
                                <?php }?>
							</ul> 
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End top bar -->
    <!-- header-area start -->
    <div id="sticker" class="<?php echo esc_attr($HeaderAreaStart);?>">
        <div class="container">
            <div class="row">
                <!-- logo start -->
                <div class="col-md-3 col-sm-3">
                    <div class="logo">
                        <!-- Brand -->
                        <?php
                            if (has_custom_logo()) {
                                 the_custom_logo();
                            } else { ?>
                                <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="brand"> 
                                    <h1 class='logo_text site-title'><?php bloginfo( 'name' ) ?></h1>
                                    <?php
                                    $description = get_bloginfo( 'description' );
                                    if ( $description ) {
                                        echo  '<p class="site-description">' . esc_html( $description ) . '</p>' ;
                                    }
                                echo "</a>";
                            }
                        ?>
                    </div>
                </div>
                <!-- logo end -->
                <div class="col-md-9 col-sm-9">
                    <div class="header-right-link">
                        <!-- search option start -->
                        <?php do_action('bpt_search');?>
                        <!-- search option end -->
                    </div>
                    <!-- mainmenu start -->
                    <nav class="navbar navbar-default">
                        <div class="collapse navbar-collapse" id="navbar-example">
                            <div class="main-menu">
                                <?php
                                    wp_nav_menu( array(
                                        'theme_location'    => 'menu-1',
                                        'depth'             => 3,
                                        'container'         => '',
                                        'container_class'   => '',
                                        'container_id'      => '',
                                        'menu_class'        => 'nav navbar-nav navbar-right',
                                        'fallback_cb'       => 'WP_Bootstrap_Navwalker::fallback',
                                        'walker'            => new WP_Bootstrap_Navwalker())
                                    );
                                ?>
                            </div>
                        </div>
                    </nav>
                    <!-- mainmenu end -->
                </div>
            </div>
        </div>
    </div>
    <!-- header-area end -->
    <!-- mobile-menu-area start -->
    <div class="mobile-menu-area hidden-lg hidden-md hidden-sm">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="mobile-menu">
                        <div class="logo">
                            <?php
                                if (has_custom_logo()) {
                                     the_custom_logo();
                                } else { ?>
                                    <a href="<?php echo esc_url( home_url( '/' ) ); ?>" class="brand"> 
                                        <h1 class='logo_text site-title'><?php bloginfo( 'name' ) ?></h1>
                                        <?php
                                        $description = get_bloginfo( 'description' );
                                        if ( $description ) {
                                            echo  '<p class="site-description">' . esc_html( $description ) . '</p>' ;
                                        }
                                    echo "</a>";
                                }
                            ?>
                        </div>
                        <nav id="dropdown">
                            <?php
                                wp_nav_menu( array(
                                    'theme_location'    => 'menu-1',
                                    'depth'             => 3,
                                    'container'         => '',
                                    'container_class'   => '',
                                    'container_id'      => '',
                                    'menu_class'        => '',
                                    'fallback_cb'       => 'WP_Bootstrap_Navwalker::fallback',
                                    'walker'            => new WP_Bootstrap_Navwalker())
                                );
                            ?>
                        </nav>
                    </div>					
                </div>
            </div>
        </div>
    </div>
    <!-- mobile-menu-area end -->		
</header>
<!-- header end -->

<?php if (!is_front_page()){
    do_action('bpt_breadcumb');
}?>
