<?php
/**
 * The template for displaying 404 pages (not found)
 *
 * @link https://codex.wordpress.org/Creating_an_Error_404_Page
 *
 * @package Prime Charity Trust
 */

get_header(); ?>
	<div id="primary" class="content-area <?php echo ( get_theme_mod( 'prime_charity_trust_sidebar_position', 'right' ) === 'no-sidebar' ) ? 'full-width' : ''; ?>">
		<main id="main" class="site-main" role="main">
		    <div class="error-404 not-found">
		        <?php 
		        // Check if custom 404 image is set
		        $prime_charity_trust_image_url = get_theme_mod('404_page_image', '');
		        if ($prime_charity_trust_image_url) : ?>
		            <img src="<?php echo esc_url($prime_charity_trust_image_url); ?>" alt="404 Image">
		        <?php endif; ?>
		        	<h1 class="page-header"><?php echo esc_html(get_theme_mod('404_pagefirst_header', __('404', 'prime-charity-trust'))); ?></h1>
					<h2 class="page-content"><?php echo esc_html(get_theme_mod('404_page_header', __('Sorry, that page can\'t be found!', 'prime-charity-trust'))); ?></h2>

		      		<div class="btn-page-not">
		      			<a href="<?php echo esc_url(home_url('/')); ?>"><?php esc_html_e('Homepage', 'prime-charity-trust'); ?></a>
		      		</div>
		            
		        
		    </div>
		</main><!-- #main -->
	</div><!-- #primary -->

<?php
get_footer();
