<!DOCTYPE HTML>
<html <?php language_attributes(); ?>>
<head>
    <meta charset="<?php bloginfo( 'charset' ); ?>"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	<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' );
    }
    
    $custom_menu_class = kayla_has_social_links() ? 'primary-menu-wrapper has-social' : 'primary-menu-wrapper';
    ?>
    <a class="screen-reader-text skip-link" href="#content"><?php echo esc_html__( 'Skip to content', 'kayla' ); ?></a>
    <div id="wrapper">
        <header class="site-header">
            <nav class="site-navigation">
                <div class="container">
                    <div class="<?php echo esc_attr( trim($custom_menu_class) ); ?>">
                    <?php
                        if ( has_nav_menu( 'primary' ) ) {
                            ?>
                            <a href="javaScript:void(0)" class="toggle-menu">
                                <span class="line line-1"></span>
                                <span class="line line-2"></span>
                                <span class="line line-3"></span>
                            </a>
                            <?php
                            wp_nav_menu( array (
                                'container'         => false,
                                'theme_location'    => 'primary',
                                'depth'             => 3,
                                'menu_class'        => 'primary-menu',
                                'menu_id'           => 'primary-menu'
                            ) );
                        } elseif ( current_user_can( 'manage_options' ) ) { ?>
                            <a class="add-menu" href="<?php echo esc_url( admin_url( 'nav-menus.php' ) ); ?>"><?php _e('Add a menu', 'kayla'); ?></a><?php
                        }

                        get_template_part( 'template-parts/social-links' );
                    ?>
                    </div>
                </div>
            </nav>
            <div class="container">
                <?php
                    $blog_info = get_bloginfo( 'name' );
                    $description = get_bloginfo( 'description', 'display' );
                ?>
                <div class="site-branding">
                    <?php if ( has_custom_logo() ) { ?>
                        <div class="site-logo"><?php the_custom_logo(); ?></div>
                    <?php } else { ?>
                        <?php if ( $blog_info ) { ?>
                            <?php if ( is_front_page() && ! is_paged() ) { ?>
                    			<h1 class="site-title"><?php echo esc_html( $blog_info ); ?></h1>
                    		<?php } elseif ( is_front_page() || is_home() ) { ?>
                    			<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html( $blog_info ); ?></a></h1>
                    		<?php } else { ?>
                    			<p class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php echo esc_html( $blog_info ); ?></a></p>
                    		<?php } ?>
                            <?php if ( $description ) { ?>
                        		<p class="site-description"><?php echo wp_kses_post( $description ); ?></p>
                        	<?php } ?>
                        <?php } ?>
                    <?php } ?>
                </div>
            </div>
        </header>
        <div id="content" class="container">
            <div class="site-content">
