<?php if ( get_header_image() ) : ?>
	<a href="<?php echo esc_url( home_url( '/' ) ); ?>" id="custom-header" rel="home">
		<img src="<?php echo esc_url(get_header_image()); ?>" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="<?php echo esc_attr(get_bloginfo( 'title' )); ?>">
	</a>
<?php endif;  ?>

<header id="header" class="header header-one">
	<!--===// Start: Above
	=================================-->
	<?php do_action('news25_above_header_layouts'); ?>
	<!--===// End:  Above
	=================================-->
	
	 <div class="navigator-wrapper d-lg-block d-none">
		<div class="navigation-middle">
			<div class="main-navigation-area">
				<div class="container">
					<div class="navigation-middle-row">
						<div class="logo">
							<?php logo_content(); ?>
						</div>
						<?php 
							$header_banner_img	= get_theme_mod('header_banner_img', esc_url(get_template_directory_uri() .'/assets/images/ads/adv1.jpg')); 
							$header_banner_url	= get_theme_mod('header_banner_url'); 
						?>
						<div class="adv-area">
						<?php if(!empty($header_banner_img)){ ?>
							<a href="<?php echo esc_url($header_banner_url); ?>" title="<?php echo esc_attr__('Ads','news-25'); ?>"><img src="<?php echo esc_url($header_banner_img); ?>" alt="<?php echo esc_attr__('Ads','news-25'); ?>"></a>
						<?php } ?>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<div class="nav-area">
		<div class="navbar-area <?php echo news25_sticky_menu(); ?>">
			<div class="container">
				<div class="navigation-content">
					<div class="main-menu-left my-auto">
						<div class="d-none d-lg-block">
							<a href="<?php echo esc_url(home_url('/')); ?>" class="btn wave-effect"><i class="fa fa-home flex" aria-hidden="true"></i></a>
						</div>
						<div class="logo d-lg-none">
							<?php logo_content(); ?>
						</div>
					</div>
					<div class="theme-menu w-100">
						<nav class="menubar main-navbar" id="stMenu">
							<div class="logo">
								<?php logo_content(); ?>
							</div>							
								<?php 
									wp_nav_menu( 
										array(  
											'theme_location' => 'primary_menu',
											'container'  => '',
											'menu_class' => 'nav menu-wrap',
											'fallback_cb' => 'WP_Bootstrap_Navwalker::fallback',
											'walker' => new WP_Bootstrap_Navwalker()
											 ) 
										);
									?>      
					   <?php if( function_exists('cleverfox_activate')): ?>
							<div class="d-lg-none">
								<ul class="d-flex align-items-center justify-content-center flex-wrap gap-2 mt-4 color-primary">
									<?php news25_custom_html_text(); ?>
									<li><?php news25_header_widget_area_first(); ?></li>
								</ul>
							</div>
							<?php endif; ?>
						</nav>
					</div>
					<div class="main-menu-right">
						<ul class="menu-right-list">
							<?php $hide_show_search 		= get_theme_mod( 'hide_show_search','1'); ?>
									<?php if($hide_show_search == '1') { ?>
							<li class="search-wrapper">
								<button type="button" id="view-search-btn"  class="header-search-toggle">
									<i class="fa fa-search" aria-hidden="true"></i>
								</button>
								<?php do_action('quick_header_search'); ?>
							</li>
							<?php } ?>
														
							<?php $hide_show_cart 		= get_theme_mod( 'hide_show_cart','1'); ?>
							<?php if($hide_show_cart == '1') { ?>
							
							<?php if ( class_exists( 'WooCommerce' ) ) { ?>
								<li class="cart-wrapper">
								 <button type="button" class="cart-icon-wrap header-cart cart-toggle" data-target="#cart-popup">
									<i class="fa fa-shopping-cart"></i>									
										<?php 
										if ( in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) {
											$count = WC()->cart->cart_contents_count;
											$cart_url = wc_get_cart_url();
											
											if ( $count > 0 ) { ?>
												<span class="count"><?php echo esc_html( $count ); ?></span> 
											<?php 
											}
											else {	?>
												<span class="count"><?php esc_html_e('0','news-25'); ?></span> 
												<?php 
											}
										}
										?>
								</button>
									
									<!-- Shopping Cart Start -->
									<div class="shopping-cart">
										<?php get_template_part('woocommerce/cart/mini','cart');	 ?>
									</div>
									<!-- Shopping Cart End -->
								</li>
							<?php } } ?>
							<li class="hamburger hamburger-menu d-lg-none">
								<button type="button" class="toggle-lines menu-toggle" data-target="#stMenu">
									<span class="top-bun"></span>
									<span class="meat"></span>
									<span class="bottom-bun"></span>
								</button>
								<div class="menu-close fade-overlay"></div>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
</header>

<?php get_template_part('template-parts/sections/section','breakingnews'); ?>
	
<?php
if ( !is_page_template( 'templates/template-homepage.php' ) ) {
	news25_breadcrumbs_style();  
}
?>