<?php 
$medo_pixel_has_header_image = has_header_image();
$medo_pixel_header_image_url = $medo_pixel_has_header_image ? esc_url(get_header_image()) : '';
$medo_pixel_header_style = '';
if ($medo_pixel_has_header_image) {
    $medo_pixel_header_style = sprintf(
        'background-image: url(%s); background-position: center; background-attachment: fixed; background-size: cover;',
        $medo_pixel_header_image_url
    );
}
?>
<header id="masthead" class="site-header header-one">
	<div class="bottom-header header-image-wrap fixed-header" <?php if ($medo_pixel_header_style) echo 'style="' . esc_attr($medo_pixel_header_style) . '";'; ?>>
		<?php if( medo_pixel_has_header_media() ){ medo_pixel_header_media(); } ?>
		<div class="container">
			<div class="row align-items-center">
				<div class="col-lg-2 col-md-4">
					<?php get_template_part( 'template-parts/site', 'branding' ); ?>
				</div>
				<div class="col-lg-8 col-md-4">
					<div class="toggle-menu menu text-center text-md-left">
						<button onclick="medo_pixel_mobile_menu_open()" class="toggle p-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', 'medo-pixel' ); ?>">
							<?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="medo_pixel_mobile_menu_close()"><i class="fa-solid fa-xmark"></i></a>
						</nav>
					</div>
				</div>
				<div class="col-lg-2 col-md-4 phone_box text-center text-md-right my-4">
					<?php
						$medo_pixel_button_url = get_theme_mod( 'medo_pixel_button_url', '#' );
                        $medo_pixel_button_text_header = get_theme_mod( 'medo_pixel_button_text_header', 'Appointment' );
					 	if ( ! empty( $medo_pixel_button_url ) ) { ?>
				 		<a href="<?php echo esc_url( $medo_pixel_button_url ); ?>"><i class="fas fa-phone"></i><?php echo esc_html( $medo_pixel_button_text_header ); ?></a>
                    <?php } ?>
				</div>
			</div>
		</div>
	</div>
</header>