<header class="main-header">
  <div class="upper-header-area wow fadeInDown" data-wow-delay="0.5s">
  	<div class="container">
    	<?php    	
			$expert_adventure_guide_topheader_facebook = get_theme_mod( 'expert_adventure_guide_topheader_facebook','#');
    		$expert_adventure_guide_topheader_twitter = get_theme_mod( 'expert_adventure_guide_topheader_twitter','#');
    		$expert_adventure_guide_topheader_pintrest = get_theme_mod( 'expert_adventure_guide_topheader_pintrest','#');
    		$expert_adventure_guide_topheader_linkdin = get_theme_mod( 'expert_adventure_guide_topheader_linkdin','#');
				$expert_adventure_guide_topheader_address = get_theme_mod( 'expert_adventure_guide_topheader_address','777 FRANKLIN ST, SAN FRANCISCO');
				$expert_adventure_guide_topheader_timing = get_theme_mod( 'expert_adventure_guide_topheader_timing', '10.00AM - 06.00PM MONDAY TO FRIDAY');

				$expert_adventure_guide_topheader_email_text = get_theme_mod( 'expert_adventure_guide_topheader_email_text','DROP US A EMAIL:.' );
				$expert_adventure_guide_topheader_email_address = get_theme_mod( 'expert_adventure_guide_topheader_email_address','compayname@example.com' );

				$expert_adventure_guide_topheader_phone_text = get_theme_mod( 'expert_adventure_guide_topheader_phone_text','ANY QUESTIONS? CALL US:' );
				$expert_adventure_guide_topheader_phone_number = get_theme_mod( 'expert_adventure_guide_topheader_phone_number', '+91 123-456-780/+00 987-654-321' );
			?>
			<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_adventure_guide_topheader_address != ''){?>
						<span class="me-3"><i class="fas fa-map-marker-alt me-2"></i><?php echo apply_filters('expert_adventure_guide_topheader', $expert_adventure_guide_topheader_address); ?></span>
					<?php }?>
					<?php if( $expert_adventure_guide_topheader_timing != ''){?>
						<span><i class="fas fa-clock me-2"></i><?php echo apply_filters('expert_adventure_guide_topheader', $expert_adventure_guide_topheader_timing); ?></span>
					<?php }?>
				</div>
				<div class="col-lg-5 col-md-5 contact text-lg-end text-center">
					<?php if( $expert_adventure_guide_topheader_pintrest != '' || $expert_adventure_guide_topheader_facebook != '' || $expert_adventure_guide_topheader_twitter != '' || $expert_adventure_guide_topheader_linkdin != '' ){?>
						<span class="me-3"><?php esc_html_e('Follow Us','expert-adventure-guide'); ?></span>
					<?php }?>
					<?php if( $expert_adventure_guide_topheader_pintrest != ''){?>
						<a href="<?php echo apply_filters('expert_adventure_guide_topheader', $expert_adventure_guide_topheader_pintrest); ?>" class="me-3"><i class="fab fa-pinterest-p"></i></a>
					<?php }?>
					<?php if( $expert_adventure_guide_topheader_facebook != ''){?>
						<a href="<?php echo apply_filters('expert_adventure_guide_topheader', $expert_adventure_guide_topheader_facebook); ?>" class="me-3"><i class="fab fa-facebook-f"></i></a>
					<?php }?>
					<?php if( $expert_adventure_guide_topheader_twitter != ''){?>
						<a href="<?php echo apply_filters('expert_adventure_guide_topheader', $expert_adventure_guide_topheader_twitter); ?>" class="me-3"><i class="fab fa-twitter"></i></a>
					<?php }?>
					<?php if( $expert_adventure_guide_topheader_linkdin != ''){?>
						<a href="<?php echo apply_filters('expert_adventure_guide_topheader', $expert_adventure_guide_topheader_linkdin); ?>" class="me-3"><i class="fab fa-linkedin-in"></i></a>
					<?php }?>
				</div>
			</div>
		</div>
	</div>
	<div class="lower-header-area wow fadeInUp" data-wow-delay="0.5s">	
		<div class="container">      
    	<div class="row">
  			<div class="col-lg-4 col-md-4 align-self-center text-md-start text-center">
  				<?php if( $expert_adventure_guide_topheader_email_text != '' || $expert_adventure_guide_topheader_email_address != ''){?>
    				<div class="row">
    					<div class="col-lg-2 col-md-2 align-self-center">
    						<i class="fas fa-envelope-open"></i>
    					</div>
    					<div class="col-lg-10 col-md-10 align-self-center lower-header-info">
								<p><?php echo apply_filters('expert_adventure_guide_topheader', $expert_adventure_guide_topheader_email_text); ?></p>
								<span><?php echo apply_filters('expert_adventure_guide_topheader', $expert_adventure_guide_topheader_email_address); ?></span>
    					</div>
  					</div>
  				<?php }?>
  			</div>
    		<div class="col-lg-4 col-md-4 px-0 text-center">
					<div class="logo">
						<?php 
						if (has_custom_logo()) {
							the_custom_logo();
						} else {
							// Check if both title and tagline settings are disabled
							$expert_adventure_guide_tagline_enabled = get_theme_mod('expert_adventure_guide_tagline_setting', false);
							$expert_adventure_guide_title_enabled = get_theme_mod('expert_adventure_guide_site_title_setting', false);

							if (!$expert_adventure_guide_tagline_enabled && !$expert_adventure_guide_title_enabled) {
								// Display the default logo
								$expert_adventure_guide_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_adventure_guide_default_logo_url) . '" alt="' . esc_attr(get_bloginfo('name')) . '">';
								echo '</a>';
							}

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

							<?php
							// Display site title if the setting is enabled
							if ($expert_adventure_guide_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-4 col-md-4 align-self-center text-md-end text-center">
					<?php if( $expert_adventure_guide_topheader_phone_text != '' || $expert_adventure_guide_topheader_phone_number != ''){?>
						<div class="row">
    					<div class="col-lg-10 col-md-10 align-self-center lower-header-info">
								<p><?php echo apply_filters('expert_adventure_guide_topheader', $expert_adventure_guide_topheader_phone_text); ?></p>
								<span><?php echo apply_filters('expert_adventure_guide_topheader', $expert_adventure_guide_topheader_phone_number); ?></span>
    					</div>
    					<div class="col-lg-2 col-md-2 align-self-center">
    						<i class="fas fa-phone"></i>
    					</div>
    				</div>
  				<?php }?>
        </div>
    	</div>
    </div>
  </div>
  	<div class="<?php if( get_theme_mod( 'expert_adventure_guide_sticky_header') != '') { ?>sticky-header<?php } else { ?>close-sticky<?php } ?>">
	  	<div class="menu-header-area">
		  	<div class="container">
				<div class="row">
					<div class="col-lg-10 col-md-6 col-6 align-self-center">
				  		<!-- Main menu -->
						  <div class="navbar-menubar responsive-menu navigation_header">
                            <div class="toggle-nav mobile-menu">
                                <button onclick="expert_adventure_guide_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-adventure-guide' ); ?>">

                                    <?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_adventure_guide_closeNav()">
                                        <i class="fa fa-times"></i> <!-- Close icon for the menu -->
                                    </a>
                                </nav>
                            </div>
                        </div>
					</div>
					<div class="col-lg-2 col-md-6 col-6 text-end align-self-center">
						<span class="search-bar me-3">
		              		<button type="button" class="open-search"><i class="fas fa-search"></i></button>
		          		</span>
					</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-adventure-guide'); ?></button>
			        </div>
				</div>
		  	</div>
		</div>
  	</div>
</header>