  <?php
/**
 * This file is responsible for the capablities section on front page.
 * @version:1.0
 */
?>

    <?php if ( true == get_theme_mod( 'capablitiessectiononoff', true ) ) : ?>
       <!-- #OUR CAPABILTIES Area start -->
      <?php if(!empty(get_theme_mod('homepage_capablities_title')) || !empty(get_theme_mod('homepage_capablities_section')) || !empty(get_theme_mod('homepage_capablities_bgimage'))) {?>
      <div  id="capablities"  class=" py-70 bg_blue_img" style="background-image: url(<?php echo get_theme_mod('homepage_capablities_bgimage', get_template_directory_uri() . ''); ?>);">
         <div class="container">
            <div class="row  ">
               <!--#CAPABILTIES-text start -->

               <div class="title text-left   who_we_area col-md-7 col-sm-6 col-4pad wow fadeInUp">
               
                  <h1 class="c_f pt-0"><?php  _e(get_theme_mod('homepage_capablities_title', __('' , 'star-law-firm-lite'))); ?>  </h1>

                  <p class="about-bottom-s c_f wow fadeInUp" style="visibility: visible; animation-name: fadeInUp;"><?php  _e(get_theme_mod('homepage_capablities_text', __(' ' , 'star-law-firm-lite'))); ?></p>
                  <ul class="right_icone">

                    <?php
                    $capablities = get_theme_mod( 'homepage_capablities_section');
                    if(isset($capablities) && !empty($capablities)){
                    foreach ( $capablities as $item ) : ?>
                       <?php if ( ! wp_attachment_is_image( $item['capablities_image'] ) ){

                        $img_ur = esc_url_raw($item['capablities_image']);

                    } else {
                        $img_ur = wp_get_attachment_url($item['capablities_image']);
                    } ?>

                     <div class="my_20">
                      <img src="<?php echo ( $img_ur); ?>">
                   </div>
                     <li> <?php echo ($item['capablities_text']); ?>  </li>
                    <?php endforeach; ?>
                    <?php }?>

                  </ul>
               
               </div>
                
               <div class="who_we_area col-md-5 col-sm-6 col-4pad wow fadeInUp">
               </div>
            </div>
         </div>
      </div>
      <?php } ?>
      <!-- #OUR CAPABILTIES Area End -->
        <?php endif; ?>