<header class="site-header js-header" data-sticky="<?php echo rt_get_option('header_sticky', true) ?>">

    <?php if (rt_get_option('header_top', true)): ?>
        <div class="site-header__top has-global-padding has-foreground-background-color has-body-color has-x-small-font-size py-20 is-hidden-on-sticky">
            <div class="site-container">
                <div class="wp-block-columns is-layout-flex flex-nowrap">
                    <div class="wp-block-column is-layout-flex flex-1 justify-left gap-20">

                        <?php if (rt_get_option('header_top_phone')): ?>
                            <span class="rt-header-element rt-header-text-phone">
                                <i class="rt-icon mr-10">
                                    <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-telephone" viewBox="0 0 16 16">
                                        <path d="M3.654 1.328a.678.678 0 0 0-1.015-.063L1.605 2.3c-.483.484-.661 1.169-.45 1.77a17.6 17.6 0 0 0 4.168 6.608 17.6 17.6 0 0 0 6.608 4.168c.601.211 1.286.033 1.77-.45l1.034-1.034a.678.678 0 0 0-.063-1.015l-2.307-1.794a.68.68 0 0 0-.58-.122l-2.19.547a1.75 1.75 0 0 1-1.657-.459L5.482 8.062a1.75 1.75 0 0 1-.46-1.657l.548-2.19a.68.68 0 0 0-.122-.58zM1.884.511a1.745 1.745 0 0 1 2.612.163L6.29 2.98c.329.423.445.974.315 1.494l-.547 2.19a.68.68 0 0 0 .178.643l2.457 2.457a.68.68 0 0 0 .644.178l2.189-.547a1.75 1.75 0 0 1 1.494.315l2.306 1.794c.829.645.905 1.87.163 2.611l-1.034 1.034c-.74.74-1.846 1.065-2.877.702a18.6 18.6 0 0 1-7.01-4.42 18.6 18.6 0 0 1-4.42-7.009c-.362-1.03-.037-2.137.703-2.877z" />
                                    </svg>
                                </i>
                                <span><?php echo esc_html(rt_get_option('header_top_phone')); ?></span>
                            </span>
                        <?php endif ?>

                        <?php if (rt_get_option('header_top_phone') && rt_get_option('header_top_text_info')): ?>
                            <span class="rt-header-separator"></span>
                        <?php endif ?>

                        <?php if (rt_get_option('header_top_text_info')): ?>
                            <span class="rt-header-element rt-header-text-info">
                                <?php echo esc_html(rt_get_option('header_top_text_info')); ?>
                            </span>
                        <?php endif ?>

                    </div>
                    <div class="wp-block-column is-layout-flex flex-1 justify-right">
                        <?php echo rt_get_social_media(['type' => 'simple']); ?>
                    </div>
                </div>
            </div>
        </div>
    <?php endif ?>

    <div class="site-header__main has-global-padding has-background-background-color has-body-color has-small-font-size py-40">
        <div class="site-container">

            <div class="wp-block-columns is-layout-flex flex-nowrap">

                <div class="wp-block-column is-layout-flex flex-1 justify-left">
                    <?php echo rt_get_logo('desktop') ?>
                </div>

                <div class="wp-block-column is-layout-flex flex-auto justify-center">
                    <nav id="menu-primary" class="rt-menu is-menu-horizontal is-style-underline js-menu" data-animatein="zoomIn" data-animateout="zoomOut">
                        <?php
                        wp_nav_menu([
                            'container' => '',
                            'theme_location' => 'primary',
                            'fallback_cb' => 'rt_menu_default',
                        ]);
                        ?>
                    </nav>
                </div>

                <div class="wp-block-column is-layout-flex flex-1 justify-right gap-30">
                    <a href="#global_search" class="rt-header-icon rt-header-search js-modal" role="button" aria-label="<?php echo __('open search form', 'alinea-text') ?>">
                        <i class="rt-icon">
                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-search" viewBox="0 0 16 16">
                                <path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z" />
                            </svg>
                        </i>
                    </a>
                </div>
            </div>
        </div>
    </div>

</header>