<?php
/**
 * Display Header.
 * @package Expert Computer Repair
 */

?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
	<meta charset="<?php bloginfo( 'charset' ); ?>">
	<meta name="viewport" content="width=device-width">
	<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
	<?php if ( function_exists( 'wp_body_open' ) ) {
	    wp_body_open();
	} else {
	    do_action( 'wp_body_open' );
	}?>

	
	<!-- <header role="banner" class="banner"> -->
	<header >
		<a class="screen-reader-text skip-link" href="#main"><?php esc_html_e( 'Skip to content', 'expert-computer-repair' ); ?></a>
		<div id="header">
			<div class="top-header">
				<div class="container">
					<div class="row m-0 p-0">
						<div class="hlbx">
							<div class="row m-0 p-0">
								<div class="phonenum">
									<?php 
									$phone_number = get_theme_mod('expert_computer_repair_header_phonenum', '000-111-2222'); 

									if( $phone_number != '' ){ ?>
										<a href="<?php echo esc_attr( 'tel:' . preg_replace( '/[^0-9+]/', '', $phone_number ) ); ?>">
											<i class="fas fa-phone" aria-hidden="true"></i>
											<?php echo esc_html( $phone_number ); ?>
										</a>
									<?php } ?>
								</div>
								<div class="email">
									<?php 
									$header_email = get_theme_mod('expert_computer_repair_headeremail', 'example@example.com'); // Add default email here

									if( $header_email != '' ){ ?>
										<a href="<?php echo esc_attr( 'mailto:' . sanitize_email( $header_email ) ); ?>">
											<i class="far fa-envelope" aria-hidden="true"></i>
											<?php echo esc_html( $header_email ); ?>
										</a>
									<?php } ?>
								</div>
							</div>
						</div>
						<div class="hmbx">
							<div class="hmbxinn blink">
								<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-award w-7 h-7 text-white"><path d="m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526"></path><circle cx="12" cy="8" r="6"></circle></svg> 
								<?php echo esc_html(get_theme_mod('expert_computer_repair_header_tophead_text', ' Certified Experts | Same Day Service Available')); ?> <span><?php esc_html_e( 'premium', 'expert-computer-repair' ); ?></span>
							</div>
						</div>
						<div class="hrbx">
							<div class="row p-0 m-0">
								<div class="timing">
									<div class="timbx">
										<i class="fa-regular fa-clock"></i>
										<?php echo esc_html(get_theme_mod('expert_computer_repair_timingheading', ' OPEN 24/7')); ?> <br>
										<b><?php echo esc_html(get_theme_mod('expert_computer_repair_timing', ' MON-SUN : 8AM - 8PM ')); ?></b>
									</div>
								</div>
								<div class="socialicons">
									<a href="<?php echo esc_url(get_theme_mod('expert_computer_repair_headertwitterlink')); ?>">
										<i class="fa-brands fa-twitter"></i>
									</a>
									<a href="<?php echo esc_url(get_theme_mod('expert_computer_repair_headerinstagramlink')); ?>">
										<i class="fa-brands fa-instagram"></i>
									</a>
									<a href="<?php echo esc_url(get_theme_mod('expert_computer_repair_headerpinterestlink')); ?>">
										<i class="fa-brands fa-pinterest-p"></i>
									</a>
									<a href="<?php echo esc_url(get_theme_mod('expert_computer_repair_headerfacebooklink')); ?>">
										<i class="fab fa-facebook-f"></i>
									</a>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="header-box">
				<div class="<?php if( get_theme_mod( 'expert_computer_repair_sticky_header', false) != '') { ?>sticky-menubox<?php } else { ?>close-sticky <?php } ?> top-head ">
					<div class="container">	
						<div class="row m-0 p-0">
							<div class="logobx_m">
								<div class="logobx">
									<!-- <div class="logobxinn"></div> -->
									<?php get_template_part( 'template-parts/header/site', 'branding' ); ?>
								</div>
							</div>
							<div class="m-mnu">
								<div class="menu-section ">
									<div class="">
										<?php get_template_part( 'template-parts/navigation/site', 'nav' ); ?>
									</div>
								</div>
							</div>
							<div class="m-btn"> 
								<a class="bttn2" href="<?php echo esc_url(get_theme_mod('expert_computer_repair_header_btnlink', '#')); ?>">
								<?php echo esc_html(get_theme_mod('expert_computer_repair_header_btntext', 'Get Quote')); ?>	
								<i class="fa-solid fa-chevron-right"></i>
								</a>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</header>

	<?php if(is_singular()) {?>
	<div class="inner-head">
		<div class="container">
			<div class="row">
				<div class="col-lg-6 col-md-6 align-self-center">
					<div class="header-content">
						<h1><?php single_post_title(); ?></h1>
						<div class="lt-breadcrumbs">
							<?php expert_computer_repair_breadcrumb(); ?>
						</div>
					</div>
				</div>
				<?php if(has_post_thumbnail()){?>
					<div class="col-lg-6 col-md-6 align-self-end">
						
					</div>
				<?php }?>
			</div>
			
		</div>
	</div>
	<?php }?>