<?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 Roland
 */

?>
<!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(); ?>

<!-- Start Page -->
<div id="page" class="site">

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


		<!-- Header -->
		<header id="masthead" class="header site-header">
			<?php if(get_theme_mod('roland_topbar_enable', false)) : ?>
			<!-- Topbar -->
			<div class="topbar">
				<div class="container">
					<div class="row">
						<div class="col-lg-8 col-12">
							<!-- Topbar Content -->
							<div class="topbar-content">
								<?php for($i=1;$i<=3;$i++):?>
								<!-- Single Contact -->
								<div class="single-contact">
									<i class="<?php echo esc_attr( get_theme_mod( 'roland_topbar_icon_'.$i ) )?>"></i>
									<h4><?php echo esc_html(get_theme_mod('roland_topbar_contact_'.$i)) ?></h4>
									<p><?php echo esc_html(get_theme_mod('roland_topbar_contact_desc'.$i)) ?></p>
								</div>
								<?php endfor;?>
							</div>
							<!-- End Topbar Content -->
						</div>
						<div class="col-lg-4 col-12">
							<div class="topbar-right">
								<!-- Search Form -->
								<div class="search-top">
									<form action="<?php echo esc_url( home_url( '/' ) ); ?>" class="search-form">
										<input type="text" name="s" value="<?php the_search_query(); ?>" placeholder="<?php echo esc_attr( 'Search Now', 'roland' ) ?>">
										<button type="submit" id="searchsubmit"><i class="icofont-search"></i></button>
									</form>
								</div>
							</div>
						</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">	
						<!-- Header Logo -->
						<div class="col-lg-2 col-md-3 col-12">
							<div class="top-logo">
								<?php if( function_exists( 'the_custom_logo' ) && has_custom_logo() ) {
										the_custom_logo();
									}?>
								<div class="normal-text">
									<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html(get_bloginfo('name'));?></a>
									<?php $roland_title_description = get_bloginfo( 'description', 'display' ); ?>
									<p class="site-description"><?php echo $roland_title_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
								</div>
							</div>
							<!-- Roland Mobile Menu -->
							<div class="roland-mobile-menu">
								<div class="menu-click"><button class="ex-btn-toggle"><i class="fa fa-bars"></i><span><?php esc_html_e('Menu','roland');?></span></button></div>
								<div class="menu-inner">
									<?php
										wp_nav_menu( array(
											'theme_location' => 'menu-1',
											'menu_id'        => 'second-menu',
											'menu_class'        => 'mobile-nav',
										) );
									?>
									<div class="close-menu"><button class="ex-close-menu"><i class="fa fa-remove"></i><?php esc_html_e('Close Menu','roland');?></button></div>
								</div>
							</div>
							<!-- End roland Mobile Menu -->
						</div>
						<!-- End Header Logo -->
						<div class="col-lg-10 col-md-9 col-12">
							<div class="main-menu-top">
								<!-- Main Menu Start -->
								<div class="main-menu">
									<div class="navbar">
										<div class="nav-item">
											<nav role="navigation" aria-label="<?php esc_attr_e( 'Primary', 'roland' ); ?>" class="navigation-main">
													<?php
														wp_nav_menu( array(
															'theme_location' => 'menu-1',
															'menu_id'        => 'primary-menu',
															'menu_class'        => 'nav-menu mobile-menu navigation',
														) );
													?>
											</nav>
										</div>
									</div>
								</div>
								<!-- End Main Menu -->
								<!-- Menu Right -->
								<div class="menu-right">
									<!-- Contact Me -->
									<div class="contact-eme">
										<div class="icon"><i class="icofont-ui-dial-phone"></i></div>
										<div class="content">
											<?php
												$roland_emergency_title = get_theme_mod('roland_emergency_title');
												$roland_emergency_number = get_theme_mod('roland_emergency_number');
											?>
											<h4><span><?php echo esc_html($roland_emergency_title);?></span><?php echo esc_html($roland_emergency_number);?></h4>
										</div>
									</div>
								</div>
								<!-- End Menu Right -->
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- End Middle Header -->
		</header>
		<!-- End Header -->

		<main role="main" id="primary" class="roland-section-main">