<?php
$title = get_field('insta_titre', 'option');
$insta_id = get_field('insta_id', 'option');
$insta_url = get_field('insta_url', 'option');
$insta_images = get_field('insta_images', 'option');

?>
<section class="instagram py-10  hidden md:block bg-white">
  <div class="container pb-10">
    <a href="<?php echo $insta_url ?>" target="_blank" class="text-black whitespace-nowrap flex gap-0 flex-col">
      <span class="font-cursive text-[50px] italic  leading-none block">
        <?php echo $title; ?>
      </span>
      <?php echo $insta_id ?>
    </a>
  </div>

  <div class="slick-insta">

    <?php
    foreach ($insta_images as $index => $insta_image) {
      $EvenOrOdd = $index % 2 ? 'odd' : 'even';
    ?>

      <img <?php acf_responsive_image($insta_image['id'], "medium", "500px", true)
            ?> class=" w-full h-full object-cover object-center" alt="" />

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