<?php if (get_theme_mod('pixel_hair_spa_header_section_on_off_setting', false)) { ?>
	<div class="header-row-area">
		<div class="container">
			<div class="header-info py-2">
				<?php
					$pixel_hair_spa_discount_text = get_theme_mod( 'pixel_hair_spa_discount_text', '' );
					if ( ! empty( $pixel_hair_spa_discount_text ) ) {
					?>
					<p class="mb-0"><?php echo esc_html( $pixel_hair_spa_discount_text ); ?></p>
				<?php } ?>
				<?php
					$pixel_hair_spa_phone_number = get_theme_mod( 'pixel_hair_spa_phone_number', '' );
					if ( ! empty( $pixel_hair_spa_phone_number ) ) {
					?>
					<p class="mb-0"><span class="info-area mr-2"><?php esc_html_e('Call:','pixel-hair-spa'); ?></span> <?php echo esc_html( $pixel_hair_spa_phone_number ); ?> </p>
				<?php } ?>			
				<?php
					$pixel_hair_spa_address = get_theme_mod( 'pixel_hair_spa_address', '' );
					if ( ! empty( $pixel_hair_spa_address ) ) {
					?>
					<p class="mb-0"><span class="info-area mr-2"><?php esc_html_e('Address:','pixel-hair-spa'); ?></span> <?php echo esc_html( $pixel_hair_spa_address ); ?></p>
				<?php } ?>
				<span class="social-inner-box text-center text-md-right">
					<?php
						// Get social media URLs before checking if they are not empty
						$pixel_hair_spa_facebook_url = get_theme_mod( 'pixel_hair_spa_facebook_url', '' );
						$pixel_hair_spa_twitter_url = get_theme_mod( 'pixel_hair_spa_twitter_url', '' );
						$pixel_hair_spa_instagram_url = get_theme_mod( 'pixel_hair_spa_instagram_url', '' );
						$pixel_hair_spa_youtube_url = get_theme_mod( 'pixel_hair_spa_youtube_url', '' );
						$pixel_hair_spa_whatsapp_url = get_theme_mod( 'pixel_hair_spa_whatsapp_url', '' );
					?>
					<?php if ( ! empty( $pixel_hair_spa_facebook_url ) ) { ?>
						<a href="<?php echo esc_url( $pixel_hair_spa_facebook_url ); ?>"><i class="fab fa-facebook-f mr-3"></i></a>
					<?php } ?>

					<?php if ( ! empty( $pixel_hair_spa_twitter_url ) ) { ?>
						<a href="<?php echo esc_url( $pixel_hair_spa_twitter_url ); ?>"><i class="fab fa-twitter mr-3"></i></a>
					<?php } ?>

					<?php if ( ! empty( $pixel_hair_spa_instagram_url ) ) { ?>
						<a href="<?php echo esc_url( $pixel_hair_spa_instagram_url ); ?>"><i class="fab fa-instagram mr-3"></i></a>
					<?php } ?>

					<?php if ( ! empty( $pixel_hair_spa_youtube_url ) ) { ?>
						<a href="<?php echo esc_url( $pixel_hair_spa_youtube_url ); ?>"><i class="fab fa-youtube mr-3"></i></a>
					<?php } ?>

					<?php if ( ! empty( $pixel_hair_spa_whatsapp_url ) ) { ?>
						<a href="<?php echo esc_url( $pixel_hair_spa_whatsapp_url ); ?>"><i class="fab fa-whatsapp"></i></a>
					<?php } ?>
				</span>
			</div>
		</div>
	</div>
<?php } ?>

<?php 
	$pixel_hair_spa_has_header_image = has_header_image();
	$pixel_hair_spa_header_image_url = $pixel_hair_spa_has_header_image ? esc_url(get_header_image()) : '';
	$pixel_hair_spa_header_style = '';
	if ($pixel_hair_spa_has_header_image) {
		$pixel_hair_spa_header_style = sprintf(
			'background-image: url(%s); background-position: center; background-attachment: fixed; background-size: cover;',
			$pixel_hair_spa_header_image_url
		);
	}
?>
<div class="header-main-area py-2" <?php if ($pixel_hair_spa_header_style) echo 'style="' . esc_attr($pixel_hair_spa_header_style) . '";'; ?>>
	<div class="container">		
		<div class="row">
			<div class="col-lg-3 col-md-3 align-self-center">
				<?php get_template_part( 'template-parts/site', 'branding' ); ?>
			</div>
			<div class="col-lg-7 col-md-7 align-self-center">
				<header id="masthead" class="site-header header-one">
					<div class="bottom-header header-image-wrap">
						<div class="toggle-menu menu text-center text-md-right">
							<button onclick="pixel_hair_spa_mobile_menu_open()" class="toggle p-2 mb-2"><i class="fa-solid fa-bars"></i></button>
						</div>
						<div id="responsive" class="nav side_nav">
							<nav id="top_menu" class="nav_menu" role="navigation" aria-label="<?php esc_attr_e( 'Menu', 'pixel-hair-spa' ); ?>">
								<?php
								    wp_nav_menu( array( 
										'theme_location' => 'menu-1',
										'container_class' => 'navigation clearfix' ,
										'menu_class' => 'clearfix',
										'items_wrap' => '<ul id="%1$s" class="%2$s mobile_nav m-0 px-0">%3$s</ul>',
										'fallback_cb' => 'wp_page_menu',
								    ) ); 
								?>
								<a href="javascript:void(0)" class="closebtn menu" onclick="pixel_hair_spa_mobile_menu_close()"><i class="fa-solid fa-xmark"></i></a>
							</nav>
						</div>
					</div>
				</header>
			</div>
			<div class="col-lg-2 col-md-2 align-self-center text-md-right text-center">
				<?php
				    $pixel_hair_spa_btn_url = get_theme_mod( 'pixel_hair_spa_btn_url', '#' );
				?>
			    <?php if ( ! empty( $pixel_hair_spa_btn_url ) ) { ?>
			        <a class="header-btn" href="<?php echo esc_url( $pixel_hair_spa_btn_url ); ?>"><?php esc_html_e('Enquiry','pixel-hair-spa'); ?></a>
			    <?php } ?>
			</div>
		</div>
	</div>
</div>