<?php 
/**
 * Template part for displaying About Us Section
 *
 *@package Super Business
 */

?>

<?php
    $about_us_image                  = super_business_get_option( 'about_us_image' );
    $about_us_subtitle               = super_business_get_option( 'about_us_subtitle' );
    $about_us_title                  = super_business_get_option( 'about_us_title' );
    $about_us_content                = super_business_get_option( 'about_us_content' );
    $about_us_btn_label              = super_business_get_option( 'about_us_btn_label' );
    $about_us_btn_url                = super_business_get_option( 'about_us_btn_url' );       
?>

<article>
    <div class="entry-container">
        <?php if( !empty( $about_us_subtitle ) || !empty( $about_us_title ) ): ?>
            <div class="section-header">
                <?php if( !empty( $about_us_subtitle ) ): ?>
                    <h3 class="section-subtitle"><?php echo esc_html( $about_us_subtitle ); ?></h3>
                <?php endif; ?>

                <?php if( !empty( $about_us_title ) ): ?>
                    <h2 class="section-title"><?php echo esc_html( $about_us_title ); ?></h2>
                <?php endif; ?>
            </div><!-- .section-header -->
        <?php endif; ?>

        <?php if( !empty( $about_us_content ) ): ?>
            <div class="entry-content">
                <p><?php echo esc_html( $about_us_content ); ?></p>
            </div><!-- .entry-content -->
        <?php endif; ?>

        <?php if( !empty( $about_us_btn_label ) ): ?>
            <div class="read-more">
                <a href="<?php echo esc_attr( $about_us_btn_url ); ?>" class="btn"><?php echo esc_html( $about_us_btn_label ); ?></a>
            </div><!-- .read-more -->
        <?php endif; ?>
    </div><!-- .entry-container -->

    <?php if( !empty( $about_us_image ) ): ?>
        <div class="featured-image">
            <img src="<?php echo esc_url( $about_us_image ); ?>" alt="<?php echo esc_html( $about_us_title ); ?>">
        </div><!-- .featured-image -->
    <?php endif; ?>
</article>