<?php if (!is_404() && !is_500()) : ?>
<? if (!is_page('search') && !is_search()) : ?>
    <div class="content-right">
        <?php get_sidebar('right-en'); ?>
    </div>
<? endif; ?>
</div>
</div>
<? endif; ?>
</main>
<footer class="footer">
    <meta itemprop="copyrightYear" content="<?=date('Y');?>">
    <meta itemprop="copyrightHolder" content="Agroexpert">
    <div class="footer-top">
        <div class="container footer__conatiner">
            <div class="footer-top__inner">
                <?php $site_logo = get_field('site_logo', 'option'); ?>
                <a href="<?php echo home_url(); ?>" class="logo footer__logo">
                <img src="https://agroexpert.press/wp-content/uploads/2024/05/agroexpert_horizontally.svg" alt="agroexpert.press" width="145" />
                </a>
                <nav class="nav footer__nav">
                    <?php get_template_part('en/mainmenu-en'); ?>
                </nav>
                <div class="footer-top__right">
                    <a href="#" class="to-top">
                        <span>Up</span>
                        <svg width="9" height="6" viewBox="0 0 9 6" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <rect x="3.69409" y="1.05029" width="1" height="5.22423" transform="rotate(45 3.69409 1.05029)" fill="black" />
                            <rect width="1" height="6" transform="matrix(-0.707107 0.707107 0.707107 0.707107 4.1333 0.525146)" fill="black" />
                        </svg>
                    </a>
                </div>
            </div>
        </div>
    </div>
    <div class="footer-bottom">
        <div class="container">
            <div class="footer-bottom__inner">
                <div class="footer-bottom__text desktop">
                    <?= sprintf('© %d %s', date('Y'), 'Agroexpert'); ?>
                    <!--Rating::top.agroserver.ru counter-->


                </div>
                <?php 
                $menu_items = wp_get_nav_menu_items(774);
                
                foreach ($menu_items as $item) {
                    echo '<a href="'.esc_url($item->url).'" class="footer-bottom__text footer-bottom__link" traget="_blank">'.esc_html($item->title).'</a>';
                }
                
                ?>
                <div class="socials footer__socials">
                    <?php get_template_part('partials/menu-socials'); ?>
                </div>

                <div class="footer-bottom__text mobile">
                    <?= sprintf('© %d %s', date('Y'), $copyright); ?>
                </div>
            </div>
        </div>
    </div>
   
    <div class="footer-bottom">
        <div class="container">
            <div class="footer-bottom__inner">
                <div class="rating"><svg width="50" height="50" xmlns="http://www.w3.org/2000/svg">
  <circle cx="25" cy="25" r="20" fill="green" />
  <text x="50%" y="50%" text-anchor="middle" fill="white" font-size="15px" font-weight="bold" dy=".3em">16+</text>
</svg>

</div>
                <div>
                    <p>When reproducing or utilizing content from the AgroExpert website, providing a valid link to the original material is required. For printed media use, AgroExpert should be credited as the source.</p>
                </div>

                <div id="counter-container"></div>

            </div>
        </div>        
    </div>    
    
    <div class="modal-overlay" id="modal-thank" style="display: none">
        <div class="modal modal-thank">
            <div class="modal__close modal-thank__close">
                <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <rect y="16.9423" width="23.9584" height="1.4974" rx="0.748701" transform="rotate(-45 0 16.9423)" fill="black" />
                    <rect x="1.0625" width="23.9584" height="1.4974" rx="0.748701" transform="rotate(45 1.0625 0)" fill="black" />
                </svg>
            </div>
            <div class="modal-thank__title">Благодарим за интерес!</div>
            <div class="modal-thank__text">
                На Вашу почту отправлено письмо для <br />
                подтверждения подписки
            </div>
            <div class="modal-thank__footer modal__close">Закрыть</div>
        </div>
    </div>
</footer>
</div>
<?php wp_footer(); ?>

<?php // get_template_part('partials/rtb-floor.php'); ?>

</body>

</html>