<header class="main-header">
  	<div class="upper-header-area">
  		<div class="container">
    		<?php
			$expert_gamer_topheader_facebook = get_theme_mod( 'expert_gamer_topheader_facebook','#' );
    		$expert_gamer_topheader_twitter = get_theme_mod( 'expert_gamer_topheader_twitter','#' );
    		$expert_gamer_topheader_pintrest = get_theme_mod( 'expert_gamer_topheader_pintrest','#' );
    		$expert_gamer_topheader_linkdin = get_theme_mod( 'expert_gamer_topheader_linkdin','#' );

    		$expert_gamer_topheader_book_btn_text = get_theme_mod( 'expert_gamer_topheader_book_btn_text','Book Tickets' );
				$expert_gamer_topheader_book_btn_link = get_theme_mod( 'expert_gamer_topheader_book_btn_link','#' );
				
				$expert_gamer_topheader_phone_number = get_theme_mod( 'expert_gamer_topheader_phone_number','+81 (12456-45784)' );
			?>
			<div class="row">
				<div class="col-lg-7 col-md-7 text-lg-start text-center mt-lg-0 mt-md-0 mt-2">
					<?php if( $expert_gamer_topheader_phone_number != ''){?>
						<span><?php esc_html_e('CALL - ','expert-gamer'); ?></span> <span><?php echo apply_filters('expert_gamer_topheader', $expert_gamer_topheader_phone_number); ?></span>
					<?php }?>
				</div>
				<div class="col-lg-5 col-md-5 contact text-lg-end text-center">
					<?php if( $expert_gamer_topheader_pintrest != '' || $expert_gamer_topheader_facebook != '' || $expert_gamer_topheader_twitter != '' || $expert_gamer_topheader_linkdin != '' ){?>
						<span class="me-3"><?php esc_html_e('CONNECT WITH US - ','expert-gamer'); ?></span>
					<?php }?>
					<?php if( $expert_gamer_topheader_pintrest != ''){?>
						<a href="<?php echo apply_filters('expert_gamer_topheader', $expert_gamer_topheader_pintrest); ?>" class="me-3"><i class="fab fa-pinterest-p"></i></a>
					<?php }?>
					<?php if( $expert_gamer_topheader_facebook != ''){?>
						<a href="<?php echo apply_filters('expert_gamer_topheader', $expert_gamer_topheader_facebook); ?>" class="me-3"><i class="fab fa-facebook-f"></i></a>
					<?php }?>
					<?php if( $expert_gamer_topheader_twitter != ''){?>
						<a href="<?php echo apply_filters('expert_gamer_topheader', $expert_gamer_topheader_twitter); ?>" class="me-3"><i class="fab fa-twitter"></i></a>
					<?php }?>
					<?php if( $expert_gamer_topheader_linkdin != ''){?>
						<a href="<?php echo apply_filters('expert_gamer_topheader', $expert_gamer_topheader_linkdin); ?>" class="me-3"><i class="fab fa-linkedin-in"></i></a>
					<?php }?>
				</div>
			</div>
		</div>
	</div>
	<div class="<?php if( get_theme_mod( 'expert_gamer_sticky_header', '0')) { ?>sticky-header<?php } else { ?>close-sticky<?php } ?>">
		<div class="lower-header-area">	
			<div class="container">
	    	<div class="row">
	    		<div class="col-lg-3 col-md-3 align-self-center text-lg-start text-center">
						<div class="logo">
						<?php 
								if (has_custom_logo()) {
									the_custom_logo();
								} else {
									// Check if both title and tagline settings are disabled
									$expert_gamer_tagline_enabled = get_theme_mod('expert_gamer_tagline_setting', false);
									$expert_gamer_title_enabled = get_theme_mod('expert_gamer_site_title_setting', false);

									if (!$expert_gamer_tagline_enabled && !$expert_gamer_title_enabled) {
										// Display the default logo
										$expert_gamer_default_logo_url = get_template_directory_uri() . '/assets/images/logo.png'; // Replace with your default logo path
										echo '<a href="' . esc_url(home_url('/')) . '">';
										echo '<img src="' . esc_url($expert_gamer_default_logo_url) . '" alt="' . esc_attr(get_bloginfo('name')) . '">';
										echo '</a>';
									}

									// Display tagline if the setting is enabled
									if ($expert_gamer_tagline_enabled) :
										$expert_gamer_site_desc = get_bloginfo('description'); ?>
										<p class="site-description"><?php echo esc_html($expert_gamer_site_desc); ?></p>
									<?php endif; ?>

									<?php
									// Display site title if the setting is enabled
									if ($expert_gamer_title_enabled) : ?>
										<p class="site-title">
											<a href="<?php echo esc_url(home_url('/')); ?>">
												<?php echo esc_html(get_bloginfo('name')); ?>
											</a>
										</p>
									<?php endif; ?>
								<?php } ?>
						</div>
					</div>
	  			<div class="col-lg-6 col-md-3 col-3 align-self-center">
	  				<!-- Main menu -->
					<div class="navbar-menubar responsive-menu navigation_header">
						<div class="toggle-nav mobile-menu">
							<button onclick="expert_gamer_openNav()">
								<i class="fa fa-bars"></i> <!-- Initial hamburger icon -->
							</button>
						</div>
						<div id="mySidenav" class="nav sidenav">
							<nav id="site-navigation" class="main-navigation navbar navbar-expand-xl" aria-label="<?php esc_attr_e( 'Top Menu', 'expert-gamer' ); ?>">

								<?php 
									wp_nav_menu(
										array(
											'theme_location' => 'primary',
											'container_class' => 'main-menu clearfix',
											'menu_class' => 'clearfix menu',
											'items_wrap' => '<ul id="%1$s" class="%2$s mobile_nav">%3$s</ul>',
											'fallback_cb' => 'wp_page_menu',
										)
									);
								?>
								<a href="javascript:void(0)" class="closebtn mobile-menu" onclick="expert_gamer_closeNav()">
									<i class="fa fa-times"></i> <!-- Close icon for the menu -->
								</a>
							</nav>
						</div>
					</div>
	  			</div>
	  			<div class="col-lg-1 col-md-3 col-3 align-self-center text-center">
	  				<span class="search-bar text-center me-3">
	              		<button type="button" class="open-search"><i class="fas fa-search"></i></button>
		          	</span>
	  			</div>
				<div class="col-lg-2 col-md-3 col-6 align-self-center text-lg-end text-center">
					<?php

					$expert_gamer_topheader_book_btn_text = get_theme_mod( 'expert_gamer_topheader_book_btn_text','Book Tickets' );
					$expert_gamer_topheader_book_btn_link = get_theme_mod( 'expert_gamer_topheader_book_btn_link','#' ); ?>
					<?php if( $expert_gamer_topheader_book_btn_text != '' || $expert_gamer_topheader_book_btn_link != '' ){?>
						<div class="upper-header-btn">
							<a href="<?php echo apply_filters('expert_gamer_topheader', $expert_gamer_topheader_book_btn_link); ?>"><?php echo apply_filters('expert_gamer_topheader', $expert_gamer_topheader_book_btn_text); ?></a>
						</div>
					<?php }?>
        		</div>
        		<div class="search-outer">
					<div class="inner_searchbox w-100 h-100">
						<?php get_search_form(); ?>
					</div>
					<button type="button" class="search-close"><?php esc_html_e('CLOSE', 'expert-gamer'); ?></button>
		        </div>
	    	</div>
	    </div>
	</div>
  </div> 
</header>