<?php

/**
 * The template for displaying 404 pages (not found)
 *
 * @link https://codex.wordpress.org/Creating_an_Error_404_Page
 *
 * @package ostech
 */

get_header();


?>

<?php if ('yes' == get_theme_mod('error_custom')) : ?>
    <?php echo do_shortcode(\Elementor\Plugin::$instance->frontend->get_builder_content(get_theme_mod('error_custom_post'))); ?>
<?php else : ?>
    <main id="primary" class="site-main">
        <section class="error-404">
            <div class="container">
                <?php if (!empty(get_theme_mod('404_page_title_image'))) : ?>
                    <div class="error-404__img">
                        <div class="error-404__img__item">
                            <img src="<?php echo esc_url(get_theme_mod('404_page_title_image')); ?>" alt="<?php echo esc_attr__('image', 'ostech') ?>">
                        </div>
                    </div>
                <?php endif; ?>
                <h3 class="error-404__sub-title"><?php esc_html_e('Oops! Page Not Found', 'ostech'); ?></h3>
                <p class="error-404__text"><?php esc_html_e('The page you are looking for is not exist.', 'ostech'); ?></p>
                <form method="get" action="<?php echo esc_url(home_url()); ?>" class="error-404__search">
                    <input type="text" name="s" placeholder="<?php esc_attr_e('Search Here...', 'ostech'); ?>">
                    <button type="submit" class="error-404__search__btn" aria-label="search submit">
                        <span><i class="icon-search"></i></span>
                    </button>
                </form>
                <div class="error-404__btns">
                    <a href="<?php echo esc_url(home_url('/')); ?>" class="ostech-btn ostech-btn--base error-404__btn"><span><?php esc_html_e('Back to Home ', 'ostech'); ?></span></a>
                </div>
            </div>
        </section>
    </main><!-- #main -->
<?php endif; ?>

<?php
get_footer();
