<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="content-vw">
 *
 * @package Plastic Surgery Clinic
 */

?><!DOCTYPE html>

<html <?php language_attributes(); ?>>

  <head>
      <meta charset="<?php bloginfo( 'charset' ); ?>">
      <meta name="viewport" content="width=device-width">
      <?php wp_head(); ?>
  </head>

  <body <?php body_class(); ?>>
  <?php if ( function_exists( 'wp_body_open' ) ) {
    wp_body_open();
  }else{
    do_action('wp_body_open');
  } ?>

  <header role="banner">
    <a class="screen-reader-text skip-link" href="#maincontent" ><?php esc_html_e( 'Skip to content', 'plastic-surgery-clinic' ); ?><span class="screen-reader-text"><?php esc_html_e( 'Skip to content', 'plastic-surgery-clinic' ); ?></span></a>
    <div class="home-page-header">
      <?php get_template_part('template-parts/header/top-header'); ?>
      <?php get_template_part('template-parts/header/middle-header'); ?>
    </div>
  </header>

  <?php if(get_theme_mod('vw_healthcare_loader_enable',false)  || get_theme_mod('vw_healthcare_responsive_preloader_hide',false)) { ?>
    <div id="preloader">
      <div class="loader-inner">
        <div class="loader-line-wrap">
          <div class="loader-line"></div>
        </div>
        <div class="loader-line-wrap">
          <div class="loader-line"></div>
        </div>
        <div class="loader-line-wrap">
          <div class="loader-line"></div>
        </div>
        <div class="loader-line-wrap">
          <div class="loader-line"></div>
        </div>
        <div class="loader-line-wrap">
          <div class="loader-line"></div>
        </div>
      </div>
    </div>
  <?php } ?>

  <?php if (get_theme_mod('plastic_surgery_clinic_notice_section_text') != '' || get_theme_mod('plastic_surgery_clinic_notice_section_btn_text') != '' || get_theme_mod('vw_healthcare_notice_section_btn_link') != '' || has_nav_menu('departments')) {?>
    <div class="container position-relative">
      <div class="notice-section">
        <div class="row">
          <div class="col-lg-9 col-md-8 align-self-center">
            <?php if(get_theme_mod('plastic_surgery_clinic_notice_section_text') != '' || get_theme_mod('plastic_surgery_clinic_notice_section_btn_text') != '' || get_theme_mod('vw_healthcare_notice_section_btn_link') != '') {?>
              <p class="mb-0"><span><?php echo esc_html('Notice: ', 'plastic-surgery-clinic'); ?></span><?php echo esc_html(get_theme_mod('plastic_surgery_clinic_notice_section_text')); ?><a href="<?php echo esc_url(get_theme_mod('vw_healthcare_notice_section_btn_link')); ?>"> <?php echo esc_html(get_theme_mod('plastic_surgery_clinic_notice_section_btn_text')); ?><span class="screen-reader-text"><?php echo esc_html(get_theme_mod('plastic_surgery_clinic_notice_section_btn_text')); ?></span></a></p>
            <?php }?>
          </div>
          <div class="col-lg-3 col-md-4 align-self-lg-center text-md-end">
            <?php if(has_nav_menu('departments')) {?>
              <div class="dept-box">
                <button class="department-btn"><?php echo esc_html_e('DEPARTMENTS','plastic-surgery-clinic'); ?><i class="fas fa-bars ms-2"></i></button>
                <div class="department-list">
                  <?php wp_nav_menu( array( 
                    'theme_location' => 'departments',
                    'container_class' => 'department-menu clearfix' ,
                    'menu_class' => 'clearfix',
                    'items_wrap' => '<ul id="%1$s" class="%2$s">%3$s</ul>',
                    'fallback_cb' => 'wp_page_menu',
                  ) ); ?>
                </div>
              </div>
            <?php }?>
          </div>
        </div>
      </div>
    </div>
  <?php }?>