<?php
/**
 * Service Section
 * 
 * @package Wellness_Coach_Lite
 */

$service_title 			= get_theme_mod( 'service_title', __( 'Health Coach\'s Benefits', 'wellness-coach-lite' ) );
$service_content 		= get_theme_mod( 'service_content' );
$benefits_viewall_btn	= get_theme_mod( 'benefits_view_all_btn_label', __( 'View All Benefits', 'wellness-coach-lite' ) );
$benefits_btn_url  		= get_theme_mod( 'benefits_view_all_url' );

if( is_active_sidebar( 'service' ) || is_active_sidebar( 'service-cta' ) ){ ?>
<section id="service_section" class="service-section">
	<?php if( $service_title || $service_content ) : ?>
		<header class="section-header">
			<div class="container">
				<?php if( $service_title ) echo '<h2 class="section-title">' . esc_html( $service_title ) . '</h2>'; ?>
				<?php if( $service_content ) echo '<div class="section-desc">' . esc_html( $service_content ) . '</div>'; ?>
			</div>
    	</header>
    <?php endif; ?>
    <div class="service-sec__content-wrapper">
		<div class="container">
			<div class="section-grid layout-one">
				<div class="grid-item grid__main-content">
                    <div class="section-inner-grid">
	    				<?php dynamic_sidebar( 'service' ); ?>
					</div>
					<?php if( $benefits_viewall_btn && $benefits_btn_url ) : ?>
						<div class="section-button-wrapper">
							<a href="<?php echo esc_url( $benefits_btn_url ); ?>" class="wc-btn wc-btn-two"><?php echo esc_html( $benefits_viewall_btn ); ?></a>
						</div>
					<?php endif; ?>
	    		</div>
				<div class="grid-item grid__side-content">
					<?php dynamic_sidebar( 'service-cta' ); ?>
				</div>
	    	</div>			
    	</div>
    </div>
</section> <!-- .service-section -->
<?php
}