<?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 Buconz Starter
 */

?>
<!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="https://gmpg.org/xfn/11">


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

<body <?php body_class(); ?>>
<?php wp_body_open(); ?>

	<div id="page" class="site full-layout">
	<a class="skip-link screen-reader-text" href="#middle"><?php esc_html_e( 'Skip to content', 'buconz-starter' ); ?></a>
		<!-- Header -->
		<header class="header">
			<?php if(get_theme_mod('buconz_starter_topbar_open', false)) : ?>
			<!-- Topbar -->
			<div class="topbar">
				<div class="container">
					<div class="row">
						<div class="col-lg-8 col-12">
							<!-- Top Contact -->
							<div class="top-right-single top-contact">
								<?php for($i=1;$i<=3;$i++):?>
								<div class="single-contact"><i class="fa <?php echo esc_attr( get_theme_mod( 'buconz_starter_topbar_icon_'.$i ) )?>"></i> <?php echo esc_html(get_theme_mod('buconz_starter_topbar_contact_'.$i)) ?></div>
								<?php endfor;?>
							</div>
							<!-- End Top Contact -->
						</div>
						<div class="col-lg-4 col-12">
							<?php if(get_theme_mod('buconz_starter_social_enable', true)) : ?>
							<div class="top-right-single top-social">
								<!-- Social Icons -->
								<ul class="social-icons">
									<?php for($i=1;$i<=5;$i++):?>
										<li><a href="<?php echo esc_url( get_theme_mod( 'buconz_starter_sidebar_social_link_'.$i ) )?>"><i class="fa <?php echo esc_attr( get_theme_mod( 'buconz_starter_social_icon_'.$i ) )?>"></i></a></li>
									<?php endfor;?>
								</ul>
							</div>
							<?php endif;?>
						</div>
					</div>
				</div>
			</div>
			<!--/ End Topbar -->
			<?php endif;?>
			
			<!-- Middle Header -->
			<div class="middle-header">
				<?php if ( get_header_image() ) : ?>
				<div class="header-image">
					<img src="<?php header_image(); ?>" width="<?php echo absint( get_custom_header()->width ); ?>" height="<?php echo absint( get_custom_header()->height ); ?>">
				</div>
				<?php endif; ?>
				<div class="container">
					<div class="row">
						<div class="col-lg-3 col-md-3 col-12">
							<!-- Logo -->
							<div class="logo">
								<?php if( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
									the_custom_logo();
								}?>
								<div class="logo-description">
									<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html(get_bloginfo('name'));?></a>
									<?php $exbico_title_description = get_bloginfo( 'description', 'display' ); ?>
									<p class="site-description"><?php echo $exbico_title_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
								</div>
							</div>
							<!-- End-Logo -->
							<!-- Mobile Menu -->
							<div class="mobile-navigation">
								<div class="menu-button"><button class="bc-btn-toggle"><i class="fa fa-bars"></i><span><?php esc_html_e('Menu','buconz-starter');?></span></button></div>
								<div class="menu-inner">
									<?php
										wp_nav_menu( array(
											'theme_location' => 'menu-1',
											'menu_id'        => 'side-menu',
											'menu_class'        => 'side-nav',
										) );
									?>
									<div class="close-menu"><button class="bc-close-menu"><i class="fa fa-remove"></i><?php esc_html_e('Close Menu','buconz-starter');?></button></div>
								</div>
							</div>
							<!-- End Mobile Menu -->
						</div>
									
						<div class="col-lg-9 col-md-9 col-12">
							<div class="menu-area">
								<!-- Main Menu -->
								<nav class="navbar navbar-expand-lg">
									<div class="navbar-collapse">	
										<div class="nav-inner">	
											<?php
												wp_nav_menu( array(
													'theme_location' => 'menu-1',
													'menu_id'        => 'primary-menu',
													'menu_class'        => 'nav main-menu menu navbar-nav',
												) );
												?>
										</div>
									</div>
								</nav>
								<!--/ End Main Menu -->	
								<div class="right-bar">
									<!-- Search Bar -->
									<div class="single-bar right-nav">
										<!-- Search Form -->
										<div class="search-top">
											<form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="search-form"  method="get">
												<input type="text" name="s" value="<?php the_search_query(); ?>" placeholder="<?php echo esc_attr( 'Search here', 'buconz-starter' ) ?>"/>
												<button type="submit" id="searchsubmit"><i class="ti-search"></i></button>
											</form>
										</div>
										<!--/ End Search Form -->
									</div>
									<!--/ End Search Bar -->
									
									<?php if(get_theme_mod('buconz_header_button_enable', true)) : ?>
									<div class="single-bar button">
										<?php
											$buconz_starter_header_button_text = get_theme_mod('buconz_starter_header_button_text');
											$buconz_starter_header_button_link = get_theme_mod('buconz_starter_header_button_link');
										?>
										<?php if(! empty (get_theme_mod('buconz_starter_header_button_text'))) : ?>
										<a href="<?php echo esc_url($buconz_starter_header_button_link);?>" class="buconz-btn effect"><span class="effect-text"><?php echo esc_html($buconz_starter_header_button_text);?></span></a>
										<?php endif;?>
									</div>
									<?php endif;?>
								</div>	
							</div>
						</div>
					</div>
				</div>
			</div>
			<!--/ End Middle Header -->
		</header>
		<!--/ End Header -->
		
		<main role="main" id="middle" class="buconz-starter-main">