<?php
/**
 * The header for our theme
 *
 * @subpackage Expert Handyman
 * @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', 'expert-handyman' ); ?></a>

<div id="header">
	<div class="main-header">
		<div class="tphead">
			<div class="container">
				<div class="topheadtxt">
					<div class="row mr-0">
						<div class="col-lg-6 col-md-6 col-sm-12">
							<?php
								$topheadtext = esc_html(get_theme_mod('luzuk_experthandyman_topheadtext', 'There are many variations of passages of Lorem Ipsum'));
							?>
							<?php if($topheadtext) { ?>
								<p><?php echo $topheadtext ?></p>
							<?php } ?>
						</div>
						<div class="col-lg-6 col-md-6 col-sm-12">
							<div id="mail-container">
								<div class="mail">
									<?php
										$header_mail = esc_html(get_theme_mod('luzuk_experthandyman_header_mail', 'info@example.com'));
									?>
									<?php if($header_mail) { ?>
									<a href="mailto:<?php echo $header_mail ?>">
									    <i class="fa-solid fa-mobile"></i>									
									    <div class="num tooltiptext"><?php echo $header_mail ?></div>
									</a>
									<?php } ?>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="bott-head">
			<div class="container">
				<div class="bott-headbx">
					<div class="row mr-0">
						<div class="headerbtn">
							<?php
								$header_phnheading = esc_html(get_theme_mod('luzuk_experthandyman_header_phnheading', '24/7 Emergency Care'));
								$header_phoneno = esc_html(get_theme_mod('luzuk_experthandyman_header_phoneno', '123 456 7890'));
							?>
							<h4><?php echo $header_phnheading ?></h4>
							<h3>	
								<?php if($header_phoneno) { ?>
									<div class="phn">
										<i class="fa fa-reply-all"></i>
										<i class="fa fa-phone" id="show-number" tabindex="0" role="button" aria-label="Show phone number"></i>
										<a href="tel:<?php echo $header_phoneno ?>" class="hidden-number" id="phone-number">
											<div class="btninn">
												<div class="num tooltip-text"><?php echo $header_phoneno ?></div>
											</div>
										</a>
									</div>
								<?php } ?>
							</h3>
						</div>
						<div class="logobx">
							<div class="logo">
								<?php if ( has_custom_logo() ) : ?>
									<?php the_custom_logo(); ?>
								<?php endif; ?>
								<?php if (get_theme_mod('luzuk_experthandyman_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_experthandyman_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="appbtn">
							<h4>
								<?php
									$header_requesttext = esc_html(get_theme_mod('luzuk_experthandyman_header_requesttext', 'Request an'));
								?>	
								<?php echo $header_requesttext ?>
							</h4>
							<h3>
								<div class="h-btn">
									<?php
										$header_appointment = esc_html(get_theme_mod('luzuk_experthandyman_header_appointment', 'Appointment'));
										$header_appointmentlink = esc_html(get_theme_mod('luzuk_experthandyman_header_appointmentlink', '#'));
									?>

									<?php if (!empty($header_appointment)): ?>
										<i class="fa fa-reply-all" id="toggle-appointment" tabindex="0" role="button" aria-label="Show appointment button"></i>
										<a href="<?php echo $header_appointmentlink ?>" class="hidden-appointment" id="appointment-button">
											<div class="btninn">
												<div class="tooltip-text"><?php echo $header_appointment ?></div>
											</div>
										</a>
									<?php endif; ?>
								</div>
							</h3>
						</div>
					</div>

					<div class="menu">
						<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', 'expert-handyman' ); ?></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', 'expert-handyman' ); ?>">
												<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 ExpertHandyman_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>
				</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_experthandyman_breadcrumb();?>
				</div>
		    </div>
		</div>
	</div>
<?php } ?>

