<?php
/*
* Display Logo and nav
*/
?>

<div class="headerbox">
  <div class="container header-main">
    <div class="row">
      <div class="col-lg-3 col-md-4 align-self-center">
        <div class="logo">
          <?php if (has_custom_logo()) : ?>
              <?php amusement_park_the_custom_logo(); ?>
          <?php endif; ?>

          <?php if (get_theme_mod('amusement_park_site_title', true) == 1) : ?>
              <?php if (is_front_page() || is_home()) : ?>
                  <h1 class="text-capitalize">
                      <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a>
                  </h1>
              <?php else : ?>
                  <p class="text-capitalize">
                      <a href="<?php echo esc_url(home_url('/')); ?>" rel="home"><?php bloginfo('name'); ?></a>
                  </p>
              <?php endif; ?>
          <?php endif; ?>

        </div>
        <?php $amusement_park_description = get_bloginfo('description', 'display');
        if ($amusement_park_description || is_customize_preview()) : ?>
          <?php if (get_theme_mod('amusement_park_site_tagline', false)) : ?>
            <p class="site-description my-1 text-capitalize"><?php echo esc_html($amusement_park_description); ?></p>
          <?php endif; ?>
        <?php endif; ?>
      </div>
      <div class="col-lg-6 col-md-4 align-self-center pr-lg-0">
        <?php get_template_part('template-parts/navigation/site', 'nav'); ?>
      </div>
      <div class="col-lg-3 col-md-4 align-self-center pr-lg-0">
        <div class="search-block">
          <?php get_search_form(); ?>
        </div>
      </div>
    </div>
  </div>
</div>
