<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div class="container">
 *
 * @package Classic Dentist Clinic
 */
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
</head>

<body <?php body_class(); ?>>

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

<?php if ( get_theme_mod('classic_dentist_clinic_preloader', false) != "") { ?>
  <div id="preloader">
    <div id="status">&nbsp;</div>
  </div>
<?php }?>

<a class="screen-reader-text skip-link" href="#content"><?php esc_html_e( 'Skip to content', 'classic-dentist-clinic' ); ?></a>

<div id="pageholder" <?php if( get_theme_mod( 'classic_dentist_clinic_box_layout', false) != "" ) { echo 'class="boxlayout"'; } ?>>

<div class="mainhead <?php if( get_theme_mod( 'classic_dentist_clinic_sticky_header', false) == 1 ) { ?> header-sticky"<?php } else { ?>close-sticky <?php } ?>">
  <div class="main-header">
    <div class="container">
      <div class="header-sec px-2">
        <div class="row">
          <div class="col-xxl-2 col-xl-2 col-lg-2 col-md-3 col-sm-12 col-12 align-self-center">
            <div class="classic-dentist-clinic-logo">
              <?php if (get_theme_mod('classic_dentist_clinic_logo_enable', true)) { ?>
                <?php classic_dentist_clinic_the_custom_logo(); ?>
              <?php } ?>
              <div class="site-branding-text">
                <?php if (get_theme_mod('classic_dentist_clinic_title_enable', false)) { ?>
                  <?php if (is_front_page() && is_home()) : ?>
                    <h1 class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a></h1>
                  <?php else : ?>
                    <p class="site-title"><a href="<?php echo esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a></p>
                  <?php endif; ?>
                <?php } ?>
                <?php $classic_dentist_clinic_description = get_bloginfo('description', 'display');
                if ($classic_dentist_clinic_description || is_customize_preview()) : ?>
                  <?php if (get_theme_mod('classic_dentist_clinic_tagline_enable', false)) { ?>
                    <span class="site-description"><?php echo esc_html($classic_dentist_clinic_description); ?></span>
                  <?php } ?>
                <?php endif; ?>
              </div>
            </div>
          </div>
          <div class="col-xxl-8 col-xl-8 col-lg-7 col-md-4 col-sm-6 col-5 align-self-center">
            <div class="toggle-nav text-center">
              <?php if (has_nav_menu('primary')) { ?>
                <button role="tab"><?php esc_html_e('Menu', 'classic-dentist-clinic'); ?></button>
              <?php } ?>
            </div>
            <div id="mySidenav" class="nav sidenav">
              <nav id="site-navigation" class="main-nav" role="navigation" aria-label="<?php esc_attr_e('Top Menu', 'classic-dentist-clinic'); ?>">
                <ul class="mobile_nav">
                  <?php wp_nav_menu(array(
                    'theme_location' => 'primary',
                    'container_class' => 'main-menu',
                    'items_wrap' => '%3$s',
                    'fallback_cb' => 'wp_page_menu',
                  )); ?>
                </ul>
                <a href="javascript:void(0)" class="close-button"><?php esc_html_e('CLOSE', 'classic-dentist-clinic'); ?></a>
              </nav>
            </div>
          </div>
          <div class="col-xxl-2 col-xl-2 col-lg-3 col-md-5 col-sm-6 col-7 d-flex phone justify-content-end py-2">
            <div class="row">
              <div class="col-xl-3 col-lg-3 col-md-3 col-sm-3 col-3 align-self-center phone-icon">
                <?php if (get_theme_mod('classic_dentist_clinic_phone_icon') != "") { ?>
                  <?php $classic_dentist_clinic_icon = get_theme_mod('classic_dentist_clinic_phone_icon', ''); ?><i class="<?php echo esc_attr($classic_dentist_clinic_icon); ?>"></i>
                <?php }?>
              </div>
              <div class="col-xl-9 col-lg-9 col-md-9 col-sm-9 col-9 align-self-center">
                <p class="phone-title text-capitalize mb-0 me-2"><?php echo esc_html(get_theme_mod('classic_dentist_clinic_phone_title')); ?></p><a class="phone-no" href="tel:<?php echo esc_attr( get_theme_mod('classic_dentist_clinic_phone_number','' )); ?>"><?php echo esc_html(get_theme_mod ('classic_dentist_clinic_phone_number','')); ?></a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>