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

$podcast_guru_options = podcast_guru_theme_options();
$facebook = $podcast_guru_options['facebook'];
$twitter = $podcast_guru_options['twitter'];




$site_title_show = $podcast_guru_options['site_title_show'];

?>
<!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">
	<link rel="stylesheet" href="

integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
	<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>
<?php if(get_option('podcast_guru_free_back_top_top_enable') && get_option('podcast_guru_free_back_top_top_enable') == "on" ){ ?>
<!-- Back to top -->
<div id="back-to-top" title="Go to top">
  <i class="fa fa-arrow-up" aria-hidden="true"></i>
</div>
<?php }?>
<?php wp_body_open(); ?>
<div id="page" class="site">
	<a class="skip-link screen-reader-text" href="#primary"><?php esc_html_e( 'Skip to content', 'podcast-guru' ); ?></a>


<div class="main-wrap">
	<header id="masthead" class="site-header">

		<div class="container">
             <div class="row">
				<div class="site-branding">
					<?php
					the_custom_logo(); 

					if($site_title_show == 1) { ?>
					<div class="logo-wrap">

					<?php

					if ( is_front_page() && is_home() ) :
						?>
						<h2 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h2>
						<?php
					else :
						?>
						<h2 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h2>
						<?php
					endif;
					$podcast_guru_description = get_bloginfo( 'description', 'display' );
					if ( $podcast_guru_description || is_customize_preview() ) :
						?>
						<p class="site-description"><?php echo $podcast_guru_description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
					<?php endif; ?>
					</div>
					<?php } ?>

				




				</div><!-- .site-branding -->


				<div class="search-wrap show-mobile">
					<div class="header-social">

						<?php 

						if($facebook) 
						echo '<div class="social-icon ft-facebook"><a href="'.esc_url($facebook).'"><i class="fa-brands fa-facebook-f" aria-hidden="true"></i></a></div>';

						if($twitter) 
						echo '<div class="social-icon ft-twitter"><a href="'.esc_url($twitter).'"><i class="fa-brands fa-x-twitter"></i></a></div>';



?>

					</div>


				</div>

				<div id="mobile-menu-wrap">
				<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
	                        data-target="#navbar-collapse" aria-expanded="false">
	                    <span class="sr-only"><?php echo esc_html__('Toggle navigation','podcast-guru'); ?></span>
	                    <span class="icon-bar"></span>
	                    <span class="icon-bar"></span>
	                    <span class="icon-bar"></span>
	                </button>

            <!-- Collect the nav links, forms, and other content for toggling -->
	            <div class="collapse navbar-collapse" id="navbar-collapse">

	             <?php
	                if (has_nav_menu('primary')) { ?>
	                <?php
	                    wp_nav_menu(array(
	                        'theme_location' => 'primary',
	                        'container' => '',
	                        'menu_class' => 'nav navbar-nav navbar-center',
	                        'menu_id' => 'menu-main',
	                        'walker' => new podcast_guru_nav_walker(),
	                        'fallback_cb' => 'podcast_guru_nav_walker::fallback',
	                    ));
	                ?>
	                <?php } else { ?>
	                    <nav id="site-navigation" class="main-navigation clearfix">
	                        <?php   wp_page_menu(array('menu_class' => 'menu','menu_id' => 'menuid')); ?>
	                    </nav>
	                <?php } ?>

	            </div><!-- End navbar-collapse -->
				</div>
				<div class="search-wrap hide-mobile">
					<div class="header-social">

						<?php 

						if($facebook) 
						echo '<div class="social-icon ft-facebook"><a href="'.esc_url($facebook).'"><i class="fa-brands fa-facebook" aria-hidden="true"></i></a></div>';

						if($twitter) 
						echo '<div class="social-icon ft-twitter"><a href="'.esc_url($twitter).'"><i class="fa-brands fa-x-twitter"></i></a></div>';
		


?>

					</div>


				</div>


				
				


	            
			</div>
		</div>
	</header><!-- #masthead -->

	<div class="container">
<div class="breadcrumbs ">
			<?php if (function_exists('check_breadcrumb')) check_breadcrumb();   ?>
		</div>
</div>
