<?php

$backgroundcolor = $instance['backgroundcolor'];


?>

<div class="bg-dark pt-6 pb-5">
	<?php 
    if (  $instance['title']  ){ ?>
	<div class="heading-block border-bottom-0 text-center" data-animate="zoomIn" >

<h2 class="text-transform-none text-white fw-semibold mb-1 "><?php echo esc_attr( $instance['title'] ); ?></h2>
</div>


<?php }
    if (  $instance['a_repeater']  ){ ?>

<div class="container  pt-5">
 <?php $i = 1;
        foreach( $instance['a_repeater'] as $item ){
            
          
            //visibility
            if ( $item['visibility'] == '' ){ 
			 $image_url = "";
                if ( $item['image'] != '' ){
                  
				  $image_url = wp_get_attachment_image_src( $item['image'], "swap-solutions", false );
				}
				if(($i % 2) != 0){
			
			?>



<div class=" row p-0 align-items-stretch overflow-hidden ">
<div class="col-lg-6  ">
<div class="overflow-hidden">
<img decoding="async" class="fadeInUp border-1-perc animated lazy" data-src="<?php echo esc_url( $image_url[0] ); ?>" src="<?php echo esc_url( $image_url[0] ); ?>" data-animate="fadeInUp" data-delay="100" alt="<?php echo esc_attr( $item['title'] ); ?>">
</div>
</div>
<div class="col-lg-6 col-padding">
<div>
<h2 class="mb-2 text-white"><?php echo esc_attr( $item['title'] ); ?></h2>
<div class="row">
<div class=" p-0 mt-1">
 <?php echo wp_kses_post( $item['content'] ); ?>



</div>
</div>
</div>
</div>
</div>

	
<?php 
				}
else
	{


?>

<div class="row p-0 align-items-stretch overflow-hidden pt-6 pb-5">

<div class="col-lg-6  col-padding">
<div>
<h3 class="mb-2 text-white"><?php echo esc_attr( $item['title'] ); ?></h3>
<div class="row">
<div class=" p-0 mt-1">
 <?php echo wp_kses_post( $item['content'] ); ?>



</div>
</div>
</div>
</div>

<div class="col-lg-6 ">
<div class="overflow-hidden">
<img decoding="async" class=" border-1-perc fadeInUp animated lazy" data-src="<?php echo esc_url( $image_url[0] ); ?>" src="<?php echo esc_url( $image_url[0] ); ?>" data-animate="fadeInUp" data-delay="100" alt="<?php echo esc_attr( $item['title'] ); ?>">
</div>
</div>
</div>
			
			 <?php 
	}
				$i++;
				}
        } ?>
			
			
			

		</div>
	<?php }?>
</div>