<?php if ( get_header_image() ) : ?>
	<a href="<?php echo esc_url( home_url( '/' ) ); ?>" id="custom-header" rel="home">
		<img src="<?php esc_url(header_image()); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr(get_bloginfo( 'title' )); ?>">
	</a>	
<?php endif;  ?>
<!-- Header Area -->

	<?php 
		// header 
	
		$stickyheader = esc_attr(rawindustry_sticky_menu());
	?>
<div class="main">
	<header class="main-header site-header <?php echo esc_attr(rawindustry_sticky_menu()); ?>">
		<div class="tp-header">
			<div class="container">
				<div class="row mr-0">
					<div class="col-lg-6 col-md-12 col-sm-12">
						<div class="box-info">
							<?php
								$rawindustry_site_desc = get_bloginfo( 'description');
								if ($rawindustry_site_desc) : ?>
									<p class="site-description"><?php echo esc_html($rawindustry_site_desc); ?></p>
							<?php endif; ?> 
						</div>
					</div>
					<div class="col-lg-6 col-md-12 col-sm-12">
						<div class="box-info row mr-0">
							<div class="col-lg-7 col-md-12 col-sm-12">
								<div class="mail">
									<a href="mailto:<?php echo esc_html(get_theme_mod('topheader_mail')); ?>">
									<i class="fa fa-envelope" aria-hidden="true"></i>
										<?php echo esc_html(get_theme_mod('topheader_mail')); ?>
									</a>
								</div>
							</div>
							<div class="col-lg-5 col-md-12 col-sm-12">
								<div class="social-icons">		
									<a title="<?php esc_attr_e('facebook','raw-industry'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('topheader_fblink')); ?>"><i class="fa fa-facebook"></i></a> 
										
									<a title="<?php esc_attr_e('twitter','raw-industry'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('topheader_twitterlink')); ?>"><i class="fa fa-twitter"></i></a>

									<a title="<?php esc_attr_e('instagram', 'raw-industry'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('topheader_instagramlink')); ?>"><i class="fa fa-instagram"></i></a>

									<a title="<?php esc_attr_e('linkedin', 'raw-industry'); ?>" target="_blank" href="<?php echo esc_url(get_theme_mod('topheader_linkedinlink')); ?>"><i class="fa fa-linkedin-square"></i></a>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="site-headerbg"></div>
		<div class="container">
			<div class="header-section">
				<div class="headfer-content row m-rl">
					<div class="col-lg-3 col-md-6 col-sm-12  pd-0 logo-box">
						<div class="site-logo">
							<?php
							if(has_custom_logo())
								{	
									the_custom_logo();
								}
								else { 
							?>
							<a class="site-title" href="<?php echo esc_url( home_url( '/' ) ); ?>">	
								<?php 
									echo esc_html(bloginfo('name'));
								?>
							</a>	
							<?php 						
								}
							?>
						</div>
						
					</div>
					<div class="col-lg-9 col-md-6 col-sm-12  pd-0">
						<div class="row mr-0">
							<div class="col-lg-9 col-md-12 col-sm-12">
								<div class="menu">
									<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="fa fa-bars"></i>
											</span>
										</span>

									</button><!-- .nav-toggle -->
									<div class="header-navigation-wrapper">

									<?php
									if ( has_nav_menu( 'primary_menu' ) || ! has_nav_menu( 'expanded' ) ) {
									?>

										<nav class="primary-menu-wrapper" aria-label="<?php echo esc_attr_x( 'Horizontal', 'menu', 'raw-industry' ); ?>">

											<ul class="primary-menu reset-list-style">

											<?php
											if ( has_nav_menu( 'primary_menu' ) ) {

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

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

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

											}
											?>

											</ul>									
										</nav><!-- .primary-menu-wrapper -->
										
									<?php } ?>
									</div><!-- .header-navigation-wrapper -->
									<?php
									// Output the menu modal.
									get_template_part( 'template-parts/sections/modal-menu' );
									?>
								</div>
							</div>
							<div class="col-lg-3 col-md-12 col-sm-12 pd-0">
								<div class="mb-n">
									<div class="row mr-0">
										<div class="col-lg-3 col-md-2 col-sm-12 pd-0">
											<div class="btn-icn">
												<i class="fa fa-phone" aria-hidden="true"></i>
											</div>
										</div>
										<div class="col-lg-9 col-md-10 col-sm-12 phncont">
											<div class="bt-txt">
												<p><?php esc_html_e('Call Now','raw-industry'); ?></p>
												<a class="btn" href="tel:<?php echo esc_html(get_theme_mod('topheader_telno')); ?>"><?php echo esc_html(get_theme_mod('topheader_telno')); ?></a>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>	
					</div>
				</div>
			</div>
		</div>

	</header>
	<div class="clearfix"></div>
</div>

