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

?>

<?php
    $business_carter_about_us_image                  = business_carter_get_option( 'business_carter_about_us_image' );
    $business_carter_about_us_subtitle               = business_carter_get_option( 'business_carter_about_us_subtitle' );
    $business_carter_about_us_title                  = business_carter_get_option( 'business_carter_about_us_title' );
    $business_carter_about_us_content                = business_carter_get_option( 'business_carter_about_us_content' );
    $business_carter_about_us_btn_label              = business_carter_get_option( 'business_carter_about_us_btn_label' );
    $business_carter_about_us_btn_url                = business_carter_get_option( 'business_carter_about_us_btn_url' );       
?>

<article>
    <?php if( !empty( $business_carter_about_us_image ) ): ?>
        <div class="featured-image">
            <img src="<?php echo esc_url( $business_carter_about_us_image ); ?>" alt="<?php echo esc_html( $business_carter_about_us_title ); ?>">
        </div><!-- .featured-image -->
    <?php endif; ?>
    
    <div class="entry-container">
        <?php if( !empty( $business_carter_about_us_subtitle ) || !empty( $business_carter_about_us_title ) ): ?>
            <div class="section-header">
                <?php if( !empty( $business_carter_about_us_subtitle ) ): ?>
                    <h3 class="section-subtitle"><?php echo esc_html( $business_carter_about_us_subtitle ); ?></h3>
                <?php endif; ?>

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

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

        <?php if( !empty( $business_carter_about_us_btn_label ) ): ?>
            <div class="read-more">
                <a href="<?php echo esc_attr( $business_carter_about_us_btn_url ); ?>" class="btn"><?php echo esc_html( $business_carter_about_us_btn_label ); ?><i class="fas fa-long-arrow-alt-right"></i></a>
            </div><!-- .read-more -->
        <?php endif; ?>
    </div><!-- .entry-container -->
</article>