<?php if ( true == get_theme_mod( 'party_rental_why_join_us_on_off', 'on' ) ) : ?>
<?php

$party_rental_courses_count = get_theme_mod('party_rental_courses_count');
$party_rental_why_join_us_short_heading = get_theme_mod('party_rental_why_join_us_short_heading');
$party_rental_industry_why_join_us_heading = get_theme_mod('party_rental_industry_why_join_us_heading');

?>
<section id="home_our_cases" class="py-5">
  <div class="container">
    <div class="course-heading text-center pb-4 wow fadeInDown" data-wow-duration="2s">
      <?php if ( ! empty( $party_rental_why_join_us_short_heading ) ) : ?>
          <h5 class="mb-0"><?php echo esc_html( $party_rental_why_join_us_short_heading ); ?></h5>
        <?php endif; ?>
        <?php if ( ! empty( $party_rental_industry_why_join_us_heading ) ): ?>
          <h4 class="text-left mb-2"><?php echo esc_html( $party_rental_industry_why_join_us_heading ); ?></h4>
        <?php endif; ?>
    </div>
    <div class="row wow fadeInUp" data-wow-duration="2s">
      <?php for ($i=1; $i <= $party_rental_courses_count; $i++) {
        $party_rental_show_image = get_theme_mod('party_rental_show_image'.$i);
        $party_rental_couses_heading = get_theme_mod('party_rental_couses_heading'.$i);
        $party_rental_couses_heading_url = get_theme_mod('party_rental_couses_heading_url'.$i);
        ?>
        <?php if ( ! empty( $party_rental_show_image) ) : ?>
          <div class="col-lg-3 col-md-4 col-sm-6 courses_main_box my-3 px-5">
            <div class="heading-box">
              <?php if ( ! empty( $party_rental_show_image) ) : ?>
                <img class="course-image" src="<?php echo esc_url( $party_rental_show_image ); ?>">
              <?php endif; ?>
              <?php if (! empty( $party_rental_couses_heading ) ): ?>
                <h2 class="mb-1"><a href="<?php echo esc_url( $party_rental_couses_heading_url ); ?>"><?php echo esc_html( $party_rental_couses_heading ); ?></a></h2>
              <?php endif; ?>
            </div>
          </div>
        <?php endif; ?>
      <?php } ?>
    </div>
  </div>
</section>
<?php endif; ?>