<?php
if (!empty($page_id)) $transparent_header = get_post_meta($page_id, 'transparent_header', true);
$header_margin = stm_option('menu_top_margin');
if (empty($header_margin)) {
	$header_margin = 5;
}
if (!empty($transparent_header) and !$transparent_header) {
	$header_margin += 4;
}
$menu_style = 'style="margin-top:' . $header_margin . 'px;"';
?>

<div class="stm_menu_toggler" data-text="<?php esc_html_e('Menu', 'masterstudy'); ?>"></div>
<div class="header_main_menu_wrapper clearfix" <?php echo $menu_style; ?>>
    <div class="pull-right hidden-xs right_buttons">
        <?php if(defined('STM_LMS_URL')): ?>
		    <?php STM_LMS_Templates::show_lms_template('global/wishlist-button', array('icon' => 'far fa-bookmark', 'class' => 'mtc_h')); ?>
        <?php endif; ?>
        <div class="search-toggler-unit">
            <div class="search-toggler" data-toggle="modal" data-target="#searchModal"><i class="fa fa-search"></i></div>
        </div>
    </div>

    <div class="collapse navbar-collapse pull-right">
        <ul class="header-menu clearfix">
			<?php
			wp_nav_menu(array(
					'theme_location' => 'primary',
					'depth'          => 3,
					'container'      => false,
					'menu_class'     => 'header-menu clearfix',
					'items_wrap'     => '%3$s',
					'fallback_cb'    => false
				)
			);
			?>
        </ul>
    </div>

</div>