<section id="ourservice-section" class="ourservice-area home-ourservice">
  
    <div class="container"> 
        <div class="heading">
            <h4><?php echo esc_html(get_theme_mod('ourservice_subtitle', 'Our Services')); ?></h4>
            <h2><?php echo esc_html(get_theme_mod('ourservice_title', 'Making Your Home Feel New Again')); ?></h2>
            <p><?php echo esc_html(get_theme_mod('ourservice_description', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Ipsum has been the indust specimen book.')); ?></p> 
        </div>
                       
        <div class="ourtbx"> 
            <div class="row sbx">
                <?php for($p=1; $p<7; $p++) { ?>
                <?php if( get_theme_mod('ourservice'.$p,false)) { ?>
                <?php $querycolumns = new WP_query('page_id='.get_theme_mod('ourservice'.$p,true)); ?>
                <?php while( $querycolumns->have_posts() ) : $querycolumns->the_post(); 
                $image = wp_get_attachment_image_src(get_post_thumbnail_id() , true); ?>
                <?php 
                if(has_post_thumbnail()){
                    $img = esc_url($image[0]);
                }
                if(empty($image)){
                    $img = get_template_directory_uri().'/assets/images/default.png';
                }
                ?>

                <div class=" col-lg-3 col-md-6 col-sm-6 box-space ">
                    <div class="threebox box<?php echo esc_attr( $p ) ?> <?php if($p % 4 == 0) { echo "last_column"; } ?>">  
                        <div class="single-ourservice">                    
                            <div class="icon-wrapper">
                                <div class="icon-box">
                                    <a href="<?php echo esc_url( get_permalink() ); ?>">
                                        <img src="<?php echo esc_url($img); ?>" alt="<?php the_title_attribute(); ?>"> 
                                        <i class="fa-regular fa-user"></i>
                                    </a>  

                                </div>
                                <div class="float-badge"></div>
                            </div>
                            <div class="sercontbx">
                                <a href="<?php echo esc_url( get_permalink() ); ?>">
                                    <h3 class="title"><?php the_title_attribute(); ?></h3>
                                </a>
                                <?php the_excerpt(); ?> 
                                <!-- <div class="bttn">
                                    <a href="<?php echo esc_url( get_permalink() ); ?>">
                                        <i class="fa-solid fa-arrow-up"></i>
                                    </a>
                                </div> -->
                                <div class="hover-line" ></div>
                                <div class="clearfix"></div>
                            </div>    		
                        </div>
                        <div class="clear"></div>
                    </div>
                </div>
                <?php endwhile;
            wp_reset_postdata(); ?>
            <?php } } ?>
            <div class="clear"></div> 
            </div>
    
           
        </div>
	</div>
</section>
