<?php

if(get_theme_mod('faq_section_disable') != 'on' ){	?>

<?php 
	if( get_theme_mod('faq_section_Tpadding',true) ) {
		$faq_section_Tpadding = 'padding-top:'.esc_attr(get_theme_mod('faq_section_Tpadding')).';';
	}
	if( get_theme_mod('faq_section_Bpadding',true) ) {
		$faq_section_Bpadding = 'padding-bottom:'.esc_attr(get_theme_mod('faq_section_Bpadding')).';';
	}

?>		
<section id="faq_section" >
	<?php
		// width 
		$c_width = get_theme_mod('faq_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
		}

		// Heading Style
    	$heading_case = get_theme_mod('faq_maintitle_case', 'capitalize');

	    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
		}
			 
		// Alientment
        $heading_alignment = get_theme_mod('faq_maintitle_align', 'center');

	    if ($heading_alignment === 'left') {
		    $text_alignment = 'left';
		} elseif ($heading_alignment === 'center') {
		    $text_alignment = 'center';
		} elseif ($heading_alignment === 'right') {
		    $text_alignment = 'right';
		} else {
		    $text_alignment = 'left'; // Default to 'left' if the setting is invalid
		}
    ?>
	<?php							
		$faq_subtitle = get_theme_mod('faq_subtitle', 'Repair & Installation');
		$faq_title = get_theme_mod('faq_title', 'Freqently Asked Questions');
	?>
	<?php if( $faq_title || $faq_subtitle ){ ?>	
	<div class="faqsec-heading">
		<div class="<?php echo esc_attr($c_width); ?>">					
			<h5 style="text-align: <?php echo esc_attr($text_alignment); ?>; text-transform: <?php echo esc_attr($heading_case); ?>;"><?php echo ($faq_subtitle); ?></h5>
			<h3 style="text-align: <?php echo esc_attr($text_alignment); ?>;"><?php echo ($faq_title); ?></h3>
		</div>
	</div>
	<?php }?>

	<div class="<?php echo esc_attr($c_width); ?>">
		<div class="faq-single " data-wow-duration="1s">
			<div class="faq-bx">			
				<?php echo faqShortcode(1);?> 
				<div class="clearfix"></div> 
			</div>						
		</div>
	</div>
	<div class="clearfix"></div>
</section>
 

<?php } 