<?php 
if(get_theme_mod('pricing_area_disable') != 'on' ){ ?>

 <div class="pricing-area" id="pricing" >
    <?php
        // width 
        $c_width = get_theme_mod('pricing_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('pricing_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
        }    
         
        // Alientment
        $heading_alignment = get_theme_mod('pricing_maintitle_align', 'right');

        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
        $pricingsec_maintitle = get_theme_mod('pricingsec_maintitle', 'Pricing Plan');
        $pricimgsec_subtitle = get_theme_mod('pricimgsec_subtitle', 'Pricing Plan');         
    ?>  

    <div class="section-title">
        <!-- <div class="container"> -->
        <div class="<?php echo esc_attr($c_width); ?>">
            <div class="titlebx">
                <h3 style="text-align: <?php echo esc_attr($text_alignment); ?>; text-transform: <?php echo esc_attr($heading_case); ?>;"><?php echo ($pricingsec_maintitle); ?></h3>
                <?php if( $pricimgsec_subtitle ){ ?>
                <h5 style="text-align: <?php echo esc_attr($text_alignment); ?>;"><?php echo ($pricimgsec_subtitle); ?></h5>
                <?php }?>
            </div>
        </div>
    </div>  
    <div class="<?php echo esc_attr($c_width); ?>"> 
        <div class="pricebx"> 
            <div class="row mr-0">  <?php pricingShortcode();?></div>
        </div>
    </div>
</div>
<script type="text/javascript">
    var title = 0;
    jQuery(".pricing-area .single-pricing").each(function(){
      if ($(this).height() > title) { title = $(this).height(); }
    });
    jQuery(".pricing-area .single-pricing").height(title);


    // on Resize change height

    jQuery(window).resize(function(){
      jQuery(".pricing-area .single-pricing").height("");
      var title = 0;
      jQuery(".pricing-area .single-pricing").each(function(){
        if ($(this).height() > title) { title = $(this).height(); }
      });
      jQuery(".pricing-area .single-pricing").height(title);
    });
</script> 

<?php }