<?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-fluid');

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

	//Sub Heading Style
		$subheading_case = get_theme_mod('faq_subtitle_case', 'uppercase');

		if ($subheading_case === 'uppercase') {
				$text_case = 'uppercase';
			} elseif ($subheading_case === 'lowercase') {
			    $text_case = 'lowercase';
			} elseif ($subheading_case === 'capitalize') {
			    $text_case = 'capitalize';
			} else {
			    $text_case = 'capitalize'; // Default to 'left' if the setting is invalid
			}
		 
		//Main 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
			}

    ?>
    <div class="<?php echo esc_attr($c_width); ?> cf-ps">
    	<?php
			$faq_subtitle = get_theme_mod('faq_subtitle', 'Faq’s');
			$faq_heading = get_theme_mod('faq_heading', 'Common Qs ');
			$faq_txt = get_theme_mod('faq_txt', "Get quick answers about working with us and our approach to digital solutions. Can’t find what you’re looking for? Reach out below! ");

			$faqbtn_text = get_theme_mod('faqbtn_text', 'Contact Us');
			$faqbtnlink = get_theme_mod('faqbtnlink', '#');

		?>
	    <div class="row mr-0">
	    	<div class="t_bx">
	    		<div class="section-title">
		            <div class="titlebx" >
		               <h2 style="text-transform: <?php echo esc_attr($subheading_case); ?>;"><?php echo ($faq_subtitle); ?></h2>
		              <h3 style="text-transform: <?php echo esc_attr($heading_case); ?>;"><?php echo ($faq_heading); ?></h3>
		              <p ><?php echo ($faq_txt); ?></p>
		            </div>

		            <?php if( $faqbtn_text  ){ ?>	
					<div class="faq-btn">				
						<a href="<?php echo ($faqbtnlink);  ?>" >
		        			<?php echo($faqbtn_text); ?> <i class="fa-solid fa-arrow-right"></i>
						</a>	
					</div>	
					<?php }?>
		        </div>
	    	</div>
	    	<div class="faqbx">	
				<div class="faq-single " data-wow-duration="1s">
					<div class="faq-bx">			
						<?php echo faqShortcode(1);?> 
						<div class="clearfix"></div> 
					</div>						
				</div>
				
			</div>
		</div>
		<div class="clearfix"></div>
	</div>
</section>


<?php } 