<?php 
$backgroundcolor = $instance['backgroundcolor'];
?>
	
	<section class=" section section--pr"  style="background-color:<?php echo $backgroundcolor; ?> ">
	
			<div class="container">
				<div class="row justify-content-center ">
					<div class="col-12 col-lg-12 col-xl-12 ">
						<div class="section-heading">
						    	<?php if( $instance['title'] ) { ?>
							<div class="description"><i></i><?php echo esc_attr( $instance['title'] ); ?></div>
								<?php } ?>
									<?php if( $instance['subtitle'] ) { ?>
							<h3 class="title"><?php echo esc_attr( $instance['subtitle'] ); ?></h3>
								<?php } ?>
						</div>
						<div class="post__description">
						    <div class="table-responsive ">
								<table class="table-value">
										<tbody>
											<tr>
											    	<th>SNo.</th>
											    		<th>Corporate</th>
												<th>Country</th>
											
													
													<th>Download</th>
											</tr>
										
									
								
								<?php $i = 0;
                foreach( $instance['a_repeater_1'] as $item ){ ?>
    <?php if(esc_attr( $item['title'] )){   ?>
     <tr>
												<td colspan="7" align="center"><b><?php  echo esc_attr( $item['title'] );   ?></b></td>
											
											</tr>
											<?php }  ?>
 
        <?php $j = 0;
                foreach( $item['a_repeater_2'] as $item_sub ){
                    
                       $download_url = "";
                if ( $item_sub['download'] != '' ){
                    $download_url = wp_get_attachment_url( $item_sub['download']);
                }
                    //visibility
                    if ( $item_sub['visibility'] == '' ){ ?>
                    <tr>
                        	<td><?php  echo $i+1 * $j+1;   ?></td>
                        	
												<td><?php  echo esc_attr( $item_sub['corporate'] );   ?></td>
											
														<td><?php  echo esc_attr( $item_sub['country'] );   ?></td>
												<td>
												
												<a class="btn-link-icon" href="<?php  echo esc_url( $download_url);   ?>" target="_blank">
												<i class="btn__icon btn__icon__size02">
													<svg>
														<use xlink:href="#download"></use>
													</svg>
												</i>
											
											</a>
												</td>
											</tr>
  
       <?php
      $j++;
                        
                    }
                } ?>
  
  
   <?php
      $i++;
                        
               
                } ?>
                
                	</tbody>
									</table>
				
							</div>
							</div>
					</div>
					
					
				</div>
			</div>
	
	</section>





