<?php
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
/**
 * Template Name: About Page
 * 
 * The template for displaying the about page.
 * Content should be added via the WordPress editor.
 */

get_header(); ?>

<main id="primary-content" class="pawfect-about-page" tabindex="-1">
    
    <?php while (have_posts()):
    the_post(); ?>
        
        <!-- Page Header -->
        <?php get_template_part('template-parts/page-header'); ?>

        <!-- About Content Section -->
        <section class="pawfect-about-content pawfect-py-20">
            <div class="pawfect-container-narrow">
                
                <?php if (has_post_thumbnail()): ?>
                    <div class="pawfect-grid pawfect-grid-cols-1 md:pawfect-grid-cols-2 pawfect-gap-14 pawfect-items-center pawfect-mb-20">
                        <!-- Featured Image -->
                        <div class="pawfect-rounded-2xl pawfect-overflow-hidden pawfect-shadow-lg">
                            <?php the_post_thumbnail('large', array('class' => 'pawfect-w-full pawfect-object-cover')); ?>
                        </div>
                        <!-- Content -->
                        <div class="pawfect-text-pawfect-text pawfect-space-y-4 pawfect-text-lg pawfect-leading-relaxed pawfect-text-gray-600">
                            <?php the_content(); ?>
                        </div>
                    </div>
                <?php else: ?>
                    <div class="pawfect-text-pawfect-text pawfect-space-y-4 pawfect-text-lg pawfect-leading-relaxed pawfect-text-gray-600">
                        <?php the_content(); ?>
                    </div>
                <?php endif; ?>

            </div>
        </section>

    <?php endwhile; ?>

    <!-- Include Why Choose Section if enabled -->
    <?php if (get_theme_mod('pawfect_about_why_choose_enable', true)): ?>
        <?php get_template_part('template-parts/front-page/why-choose'); ?>
    <?php endif; ?>

    <!-- Include Mission Section if enabled -->
    <?php if (get_theme_mod('pawfect_about_mission_enable', false)): ?>
        <?php get_template_part('template-parts/front-page/index-mission'); ?>
    <?php endif; ?>

    <!-- Include Testimonial Section if enabled -->
    <?php if (get_theme_mod('pawfect_about_testimonial_enable', true)): ?>
        <?php get_template_part('template-parts/front-page/index-testimonial'); ?>
    <?php endif; ?>

    <!-- Include Promo Banner Section if enabled -->
    <?php if (get_theme_mod('pawfect_about_promo_banner_enable', true)): ?>
        <?php get_template_part('template-parts/front-page/index-promo-banner'); ?>
    <?php endif; ?>

</main>

<?php get_footer(); ?>
