<?php $text_section_content = nbfoody_get_options('nbcore_header_text_section'); ?>
<?php
$social_section_content = (nbfoody_get_options('nbcore_header_facebook') || nbfoody_get_options('nbcore_header_twitter') || nbfoody_get_options('nbcore_header_linkedin') || nbfoody_get_options('nbcore_header_instagram') || nbfoody_get_options('nbcore_header_blog') || nbfoody_get_options('nbcore_header_pinterest') || nbfoody_get_options('nbcore_header_ggplus'));
?>
  <div class="top-section-wrap">
        <div class="container">
            <div class="top-section">
                <?php if(is_active_sidebar('header-top-1') || has_nav_menu('header-sub')): ?>
                    <div class="flex-section">
                        <?php dynamic_sidebar('header-top-1');
                        nbfoody_sub_menu(); ?>
                    </div>
                <?php endif;?>
                <div class="flex-section logo-section">
                    <?php nbfoody_get_site_logo(); ?>
                </div>
               
                    <div class="flex-section">
                    <?php if($text_section_content || is_active_sidebar('header-top-2') || $social_section_content) : ?>
                        <?php dynamic_sidebar('header-top-2');
                        echo ($text_section_content ? ('<div class="text-section">' . $text_section_content . '</div>') : '');
                        if($social_section_content): ?>
                            <div class="socials-section">
                                <?php nbfoody_social_section(); ?>
                            </div>
                        <?php endif; ?>
                    <?php endif; ?>
                        <div class="equal-section icon-section flex-end">
                            <?php nbfoody_search_section(true);
                            nbfoody_header_woo_section(false);?>
                        </div>
                    </div>

                
            </div>
        </div>
    </div>
<div class="middle-section-wrap">
    <div class="container">
        <div class="middle-section">

            <div class="flex-section equal-section menu-section">
                <?php nbfoody_main_nav(); ?>
                <?php if ( is_active_sidebar('nb-reversation') ) : ?>
                    <?php dynamic_sidebar('nb-reversation'); ?>
                <?php endif; ?>
            </div>

        </div>
    </div>
</div>