<?php
/**
 * The header for our theme
 *
 * @subpackage Woodworker
 * @since 1.0
 * @version 0.1
 */

?><!DOCTYPE html>
<html <?php language_attributes(); ?> class="no-js no-svg">
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<?php wp_head(); ?>
</head>

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

<?php if ( function_exists( 'wp_body_open' ) ) {
    wp_body_open();
} else {
    do_action( 'wp_body_open' );
}?>

<a class="screen-reader-text skip-link" href="#skip-content"><?php esc_html_e( 'Skip to content', 'woodworker' ); ?></a>

<div id="header">
	<div class="main-header">
		<div class="tphead">
			<div class="container">
				<div class="row mr-0">
					<div class="col-xxl-10 col-xl-10 col-lg-9 col-md-9 col-sm-8 col-9 pl-0">
						<div class="topheadtxt">
							<div class="row mr-0">
								<div id="mail-container">
									<div class="mail">
										<?php
											$header_mail = esc_html(get_theme_mod('luzuk_woodworker_header_mail', 'Info1234@Gmail.Com'));
										?>
										<?php if($header_mail) { ?>
											<a href="mailto:<?php echo $header_mail ?>">
												<i class="fas fa-envelope"></i>
												<div class="btninn">
													<div class="num tooltiptext"><?php echo $header_mail ?></div>
												</div>
											</a>
										<?php } ?>
									</div>
								</div>
								
								<div id="phn-container">
									<?php
										$header_phoneno = esc_html(get_theme_mod('luzuk_woodworker_header_phoneno', '(00) 123-456-789'));
									?>
									<?php if($header_phoneno) { ?>
										<div class="headerbtn phn">
											<a href="tel:<?php echo $header_phoneno ?>">
												<i class="fas fa-phone"></i>
												<div class="btninn">
													<div class="num tooltiptext"><?php echo $header_phoneno ?></div>
												</div>
											</a>
										</div>
									<?php } ?>
								</div>

								<div id="address-container">
									<?php
										$heade_address = esc_html(get_theme_mod('luzuk_woodworker_heade_address', '3261 Anmoore Lorem Ipsum , NY 11230'));
									?>
									<?php if($heade_address) { ?>
										<div class="addressbtn">
											
												<i class="fas fa-map-marker-alt"></i>
												<div class="btninn">
													<div class="address"><?php echo $heade_address ?></div>
												</div>
											
										</div>
									<?php } ?>
								</div>
							</div>
						</div>
					</div>
					<div class="col-xxl-2 col-xl-2 col-lg-3 col-md-3 col-sm-4 col-3 pd-0">
						<div class="s-media">

							<div id="share-icon">
								<a href="#">
									<i class="fa fa-share-alt"></i>
								</a>
							</div>
							
							<div id="icons-container">
								<li>
									<?php 
										$twitter_link = get_theme_mod('luzuk_woodworker_twitterlink', '#');
										if ($twitter_link) { 
										?>
											<a href="<?php echo esc_html($twitter_link); ?>">
												<i class="fa-brands fa-x-twitter"></i>
											</a>
									<?php } ?>
								</li> 

								<li>
									<?php 
										$insta_link = get_theme_mod('luzuk_woodworker_instalink', '#');
										if ($insta_link) { 
										?>
											<a href="<?php echo esc_html($insta_link); ?>">
												<i class="fab fa-instagram"></i>
											</a>
									<?php } ?>
								</li>

								<li>
									<?php 
										$linkedin_link = get_theme_mod('luzuk_woodworker_linkedinlink', '#');
										if ($linkedin_link) { 
										?>
											<a href="<?php echo esc_html($linkedin_link); ?>">
												<i class="fab fa-linkedin-in"></i>			
											</a>
									<?php } ?>
								</li>

								<li>
									<?php 
										$fb_link = get_theme_mod('luzuk_woodworker_fblink', '#');
										if ($fb_link) { 
										?>
											<a href="<?php echo esc_html($fb_link); ?>">
												<i class="fab fa-facebook-f"></i>
											</a>
									<?php } ?>
								</li>
							</div>
						</div>
						<div class="clearfix"></div>
					</div>
				</div>
			</div>
		</div>
		<div class="bott-head">
			<div class="container">
				<div class="row mr-0">
					<!-- <div class="col-lg-3 col-md-4 col-sm-12 col-12"> -->
						<div class="logo">
							<?php if ( has_custom_logo() ) : ?>
								<?php the_custom_logo(); ?>
							<?php endif; ?>
							<?php if (get_theme_mod('luzuk_woodworker_show_site_title',true)) {?>
								<?php $blog_info = get_bloginfo( 'name' ); ?>
								<?php if ( ! empty( $blog_info ) ) : ?>
									<?php if ( is_front_page() && is_home() ) : ?>
										<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
									<?php else : ?>
										<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></p>
									<?php endif; ?>
								<?php endif; ?>
							<?php }?>
							<?php if (get_theme_mod('luzuk_woodworker_show_tagline',true)) {?>
								<?php $description = get_bloginfo( 'description', 'display' );
								if ( $description || is_customize_preview() ) : ?>
									<p class="site-description"><?php echo esc_html($description); ?></p>
								<?php endif; ?>
							<?php }?>
						</div>
					<!-- </div> -->
					<div class=" m-headbox">
						<div class="m-head">
							<div class="header-inner section-inner">
								<div class="header-titles-wrapper">
									<button class="toggle nav-toggle mobile-nav-toggle" data-toggle-target=".menu-modal"  data-toggle-body-class="showing-menu-modal" aria-expanded="false" data-set-focus=".close-nav-toggle">
										<span class="toggle-inner">
											<span class="toggle-icon">
												<i class="fas fa-bars"></i>
											</span>
											<!-- <span class="toggle-text"><//?php _e( 'Menu', 'woodworker' ); ?></span> -->
										</span>
									</button><!-- .nav-toggle -->
								</div><!-- .header-titles-wrapper -->

								<div class="header-navigation-wrapper">
									<?php
									if ( has_nav_menu( 'primary' ) || ! has_nav_menu( 'expanded' ) ) {
										?>
										<nav class="primary-menu-wrapper" aria-label="<?php echo esc_attr_x( 'Horizontal', 'menu', 'woodworker' ); ?>">
											<ul class="primary-menu reset-list-style">
												<?php
												if ( has_nav_menu( 'primary' ) ) {

													wp_nav_menu(
														array(
															'container'  => '',
															'items_wrap' => '%3$s',
															'theme_location' => 'primary',
														)
													);

												} elseif ( ! has_nav_menu( 'expanded' ) ) {

													wp_list_pages(
														array(
															'match_menu_classes' => true,
															'show_sub_menu_icons' => true,
															'title_li' => false,
															'walker'   => new Woodworker_Walker_Page(),
														)
													);

												}
												?>
											</ul>
										</nav><!-- .primary-menu-wrapper -->
									<?php } ?>
								</div><!-- .header-navigation-wrapper -->
							</div><!-- .header-inner -->
							<?php
								// Output the menu modal.
								get_template_part( '/inc/modal-menu' );
							?>
							<!-- </div> -->
						</div>
						
					</div>
					<div class="searchbx">
						<div class="search">
							<!-- Add tabindex to make the search icon focusable -->
							<div id="search-icon" tabindex="0" role="button" aria-label="Open search form">
								<i class="fa fa-search" aria-hidden="true"></i>
							</div>
						</div>
						<div id="search-form-container">
							<?php get_search_form(); ?>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<?php if(is_singular()) {?>
	<div id="inner-pages-header">
		<div class="header-overlay"></div>
	    <div class="header-content">
		    <div class="container"> 
		      	<h1><?php single_post_title(); ?></h1>
		      	<div class="innheader-border"></div>
		      	<div class="theme-breadcrumb mt-2">
					<?php luzuk_woodworker_breadcrumb();?>
				</div>
		    </div>
		</div>
	</div>
<?php } ?>

