<?php
/**
*
* @package luzuk Premium
*/
if(get_theme_mod('service_area_disable') != 'on' ){ ?>
<div class="service-area " id="service" >	
	<div class="oly"> </div>
	<?php
		// width 
		$c_width = get_theme_mod('ser_c_width', 'container');

	    if ($c_width === 'container') {
			    $c_alignment = 'container';
			} elseif ($c_width === 'container-fluid') {
			    $c_alignment = 'container-fluid';
			} else {
			    $text_alignment = 'container'; // Default to 'container' if the setting is invalid
			}

		// Sub Heading Style
    	$sub_heading_case = get_theme_mod('ser_subtitle_case', 'uppercase');

		if ($sub_heading_case === 'uppercase') {
				$text_case = 'uppercase';
			} elseif ($sub_heading_case === 'lowercase') {
			    $text_case = 'lowercase';
			} elseif ($sub_heading_case === 'capitalize') {
			    $text_case = 'capitalize';
			} else {
			    $text_case = 'capitalize'; // Default to 'left' if the setting is invalid
			}

		// Heading Style
    	$heading_case = get_theme_mod('ser_maintitle_case', 'uppercase');

		if ($heading_case === 'uppercase') {
				$text_case = 'uppercase';
			} elseif ($heading_case === 'lowercase') {
			    $text_case = 'lowercase';
			} elseif ($heading_case === 'capitalize') {
			    $text_case = 'capitalize';
			} else {
			    $text_case = 'capitalize'; // Default to 'left' if the setting is invalid
			}
				 
    ?>

	<?php									
		$ser_subtitle = get_theme_mod('ser_subtitle', 'Our Services');
		$ser_title = get_theme_mod('ser_title', 'providing the best service for your home solar');
		$ser_txt = get_theme_mod('ser_txt', 'Looking for more services? With over 31 years of solar experience, we offer the full spectrum of residential and commercial solar solutions.');

		$ser_btn = get_theme_mod('ser_btn', 'See More Services');
		$ser_btnlink = get_theme_mod('serbtnlink', '#');
	?>

		
	<div class="section-title">
		<div class="<?php echo esc_attr($c_width); ?>">
			<div class="titlebx">
				<div class="sub_title" style="text-transform: <?php echo esc_attr($sub_heading_case); ?>; "><?php echo ($ser_subtitle); ?></div>
				<h3 style=" text-transform: <?php echo esc_attr($heading_case); ?>;"><?php echo ($ser_title); ?></h3>
			</div>
		</div>
	</div>
	
	<div class="<?php echo esc_attr($c_width); ?>">
		<div class="service-single-area " > 
			<div class="serbx">
				<div class="row mr-0">
					<?php 
						$showStatic = true;
						$cols = get_theme_mod('service_npp_count', 2);
						$cols++;
						switch($cols){
							case 1:
							$colCls = 'col-lg-12 col-md-12 col-sm-12';
							break;
							case 2:	
							$colCls = 'col-lg-6 col-md-6 col-sm-6';
							break;
							case 3:
							case 5:
							case 6:
							case 9:
							case 11:
							case 13:
							case 15:
							$colCls = 'col-lg-4 col-md-6 col-sm-6';
							break;
							default: 
							$colCls = 'col-lg-4 col-md-6 col-sm-6';
							break;
						}
							
					for( $i = 1; $i <= $cols; $i++ ){
						$services_page_id = get_theme_mod('services_page'.$i); 
						$services_page_icon = get_theme_mod('services_page_icon'.$i);
						$services_page_icon1 = get_theme_mod('services_page_icon1'.$i);
						if($services_page_id){
							$showStatic = false;
							echo serviceShortCode($services_page_id, $isCustomizer=true, $i);
						}
					}
					if($showStatic === true){
					for( $i = 1; $i <= $cols; $i++ ){ ?>
					<div class="<?php echo $colCls;?> single-service-bx "> 
						<div class="single-service ">
							<div class="sertxbx">
								<a href="#">
									<h4 class="post-title inner-area-title ">PANEL TESTING <i class="fa-solid fa-arrow-right"></i></h4> 
								</a>
								<div class="service-icon">
									<a href="#">
										<img class="img-responsive" src="<?php echo esc_url(get_template_directory_uri().'/images/ser2.jpg');?>" alt="services" /> 
									</a>	
								</div>
							</div>							
						</div>
					</div>
					<?php 
						}
					} ?>
				</div>
			</div>
			<?php if(!empty( $ser_txt || $ser_btn)){ ?>
			<div class="lastbx">
				<div class="row mr-0">
					<div class="txtbx">
						<p><?php echo ($ser_txt); ?></p>
					</div>
					<?php if(!empty($ser_btn)){ ?>
					<div class="serbtn">
						<a href="<?php echo $ser_btnlink ?>">
							<div class="txtinn"><?php echo $ser_btn ?></div>
							<div class="ainc"><i class="fa-solid fa-arrow-right"></i></div>
						</a>
					</div>
					<?php }?> 
				</div>
			</div>
			<?php }?> 
		</div>
	</div>
</div>
 

<?php }