<?php
/**
 * Template Name: EasySite Services
 *
 * @package EasySite_Pro
 */

get_header();
?>

<div class="easysite-page-hero easysite-section">
	<div class="easysite-container">
		<h1><?php the_title(); ?></h1>
	</div>
</div>

<div class="easysite-container easysite-content-area">
	<section class="easysite-section">
		<?php while ( have_posts() ) : the_post(); ?>
			<div class="easysite-intro"><?php the_content(); ?></div>
		<?php endwhile; ?>
	</section>

	<section class="easysite-section easysite-services-grid-section">
		<h2><?php esc_html_e( 'What We Offer', 'easysite-pro' ); ?></h2>
		<div class="easysite-services-grid">
			<?php for ( $i = 1; $i <= 6; $i++ ) :
				$title = easysite_get_mod( "easysite_service_{$i}_title" );
				$desc  = easysite_get_mod( "easysite_service_{$i}_desc" );
				$price = easysite_get_mod( "easysite_service_{$i}_price" );
				if ( ! $title ) {
					continue;
				}
				?>
				<div class="easysite-service-card">
					<img src="<?php echo esc_url( easysite_placeholder_image( 'service' ) ); ?>" alt="" loading="lazy" />
					<h3><?php echo esc_html( $title ); ?></h3>
					<p><?php echo esc_html( $desc ); ?></p>
					<?php if ( $price ) : ?>
						<p class="easysite-service-price"><?php echo esc_html( $price ); ?></p>
					<?php endif; ?>
				</div>
			<?php endfor; ?>
		</div>
	</section>

	<?php easysite_section_faq(); ?>

	<?php if ( easysite_is_bundle() ) : ?>
		<section class="easysite-section">
			<h2><?php esc_html_e( 'Request a Quote', 'easysite-pro' ); ?></h2>
			<?php echo do_shortcode( '[easysite_quote_form]' ); ?>
		</section>
	<?php endif; ?>
</div>

<?php get_footer(); ?>
