<?php
$wrapper_width = get_sub_field('wrapper_width');
$title = get_sub_field('title');
$content_1 = get_sub_field('content_1');
$content_2 = get_sub_field('content_2');
$border_1 = get_sub_field('border_content_1');
$border_2 = get_sub_field('border_content_2');
$smaller_1 = get_sub_field('smaller_content_1');
$smaller_2 = get_sub_field('smaller_content_2');
$no_pad = get_sub_field('no_pad');
?>

<div class="layout-columns <?php if($no_pad) echo 'no-padding';?>" id="flex-section-<?php echo get_row_index();?>">
  <?php if($wrapper_width != 'full') echo "<div class='container {$wrapper_width}'>"; ?>
    <?php if($title) echo "<h3 class='layout-title'>{$title}</h3>"; ?>
    <div class="row row-padding">
      <div class="col-1-1 col-xs-1-2 block-content left
      <?php if($border_1) echo 'bordered';?>
      <?php if($smaller_1) echo 'smaller';?>
      ">
        <?= $content_1 ?>
      </div><!--col-->
      <div class="col-1-1 col-xs-1-2 block-content right
      <?php if($border_2) echo 'bordered';?>
      <?php if($smaller_2) echo 'smaller';?>
      ">
        <?= $content_2 ?>
      </div><!--col-->
    </div><!--row-->
  <?php if($wrapper_width != 'full') echo "</div>"; ?>
</div>
