<?php /*Template Name: who */ ?>
<?php get_header();?>
    <!-- About Section -->
    <section id="about" class="py-5 bg-light">
        <div class="container">
            <div class="row align-items-center">
                <?php if (get_field('why', 'option')): ?>
                    <div class="col-lg-6" data-aos="fade-right">
                        <h2 class="display-4 font-weight-bold mb-4">لماذا إفادة؟</h2>
                        <?php while (has_sub_field('why', 'option')): ?>
                            <div class="about-item mb-4">
                                <div class="about-icon">
                                    <i class="fas fa-check-circle text-success"></i>
                                </div>
                                <div class="about-content">
                                    <h5 class="font-weight-bold"><?php the_sub_field('tit-why', 'option') ?></h5>
                                    <p class="text-muted"><?php the_sub_field('cont-why', 'option') ?></p>
                                </div>
                            </div>
                        <?php endwhile; ?>
                    </div>
                <?php endif; ?>
                <?php if (get_field('vision', 'option')): ?>
                    <div class="col-lg-6" data-aos="fade-left">
                        <div class="vision-mission">
                            <?php while (has_sub_field('vision', 'option')): ?>
                                <div class="vm-card mb-4">
                                    <h4 class="font-weight-bold text-primary mb-3">
                                        <i class='<?php the_sub_field('icon-vision', 'option') ?> mr-2' data-fa-i2svg="false"></i>
                                        <?php the_sub_field('tit-vision', 'option') ?>
                                    </h4>
                                    <p class="text-muted">
                                        <?php the_sub_field('cont-vision', 'option') ?>
                                    </p>
                                </div>
                            <?php endwhile; ?>
                        </div>
                    </div>
                <?php endif; ?>
            </div>
            <div class="row align-items-center">
                <?php   if ( has_post_thumbnail() ) { ?>
                    <div class="col-lg-6">

                        <div class="top-side">
                            <?php the_post_thumbnail( 'full', array( 'class' => 'img-fluid' ) ); ?>
                        </div>
                    </div>
                    <div class="col-lg-6">

                        <?php if ('' !== get_post()->post_content) { ?>
                            <div class="bootom-side">
                                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                                    <?php the_content(); ?>
                                <?php endwhile; else : endif; ?>
                            </div>
                        <?php } else { ?>

                        <?php } ?>
                    </div>
                <?php }
                else {?>
                    <div class="col-lg-12">

                        <?php if ('' !== get_post()->post_content) { ?>
                            <div class="bootom-side">
                                <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
                                    <?php the_content(); ?>
                                <?php endwhile; else : endif; ?>
                            </div>
                        <?php } else { ?>

                        <?php } ?>
                    </div>
                <?php }
                ?>

            </div>
            <?php if (have_rows('additional_content')) : ?>
                <div class="additional-content">
                    <?php get_template_part('template-parts/additionalContent'); ?>
                </div>
            <?php endif; ?>
        </div>
    </section>
    <!-- About Section -->





<?php get_footer();?>