<?php
$errors = $this->session->userdata('errors');
if (isset($errors)) {
?>
   <script>
      swal("Oops", "<?php echo $errors ?>", "error")
   </script>
   <?php echo $errors ?>
<?php
   $this->session->unset_userdata('errors');
}
$error = $this->session->userdata('error');
if (isset($error)) {
?>
   <script>
      swal("Oops", "<?php echo $error ?>", "error")
   </script>
<?php
   $this->session->unset_userdata('error');
}
$success = $this->session->userdata('success');
if (isset($success)) {
?>
   <script>
      swal({
         title: "Done!",
         text: "<?php echo $success ?>",
         icon: "success",
      });
   </script>
<?php
   $this->session->unset_userdata('success');
}
?>
<style>
   .header-main {
      /* z-index: 999999; */
      position: relative;
   }
</style>
<!--/Horizontal-main -->

<section class="margin-top-xs-55" style="background: var(--theme-color-1);position: relative;
">
   <div class="header-text mb-0">
      <div class="sl_content">
         <div class="row ">
            <div class="col-lg-12 col-md-12 col-sm-12 text-center">
               <div class="text-body" style="margin-top: 100px;margin-bottom :100px;">
                  <h1 class="mb-1 leading-tight text-white text-white-mobile slider-mobile-text"><?php echo $slider->heading; ?></h1>
                  <p class="pt-lg-5 text-white text-white-mobile"><?php echo $slider->content; ?></p>
                  <div class="d-flex justify-content-center" style="margin-top: 30px;">
                     <a style="width: 20%;" href="<?php echo $slider->button_link; ?>" class="btn btn-xl btn-block btn-primary button-slider"><?php echo $slider->button_title; ?></a>
                  </div>
               </div>
            </div>
            <div class="floating-icons">
               <i class="icon-facebook"></i>
               <i class="icon-adwords"></i>
               <i class="icon-seo"></i>
               <i class="icon-instagram"></i>
               <i class="icon-activecampaign"></i>
               <i class="icon-wordpress"></i>
               <i class="icon-shopify"></i>
               <i class="icon-youtube"></i>
               <i class="icon-analytics"></i>
               <i class="icon-kk"></i>
            </div>
         </div>
      </div>
   </div>
</section>
<?php if ($app_setting->slider == 2) : ?>
   <style type="text/css">
      @media (max-width: 576px) {
         .margin-top-xs-55 {
            margin-top: 0 !important;
         }

         .sl_content {
            /* top: 300px !important; */
            position: inherit;
            width: 100%;
         }

         .videopart video {
            width: 100%;
            height: 300px !important;
         }
      }

      .sl_content {
         top: 130px;
      }

      .videopart video {
         width: 100%;
         height: 450px;
      }

      .slider-center {
         margin-top: 100px !important;
      }

      @media (max-width: 576px) {
         .margin-top-xs-55 {
            margin-top: 45px;
         }

         .horizontal-header {
            background: #fff;
         }

         .slider-center {
            background: none !important;
         }

         .slider-center {
            margin-top: 0px !important;
         }

         .margin-top-xs-55 .header-text h1 {
            font-size: 1.3rem;
         }

         .margin-top-xs-55 .header-text p {
            font-size: 14px;
         }

         .sl_content {
            top: 0px;
         }

         .slider-mobile-text {
            padding-bottom: 15px;
         }

         .button-slider {
            width: 55% !important;
            height: 40px;
            line-height: 2.5;
            font-size: 15px !important;
         }
      }

      @media screen and (max-device-width: 991px) and (orientation: portrait) {
         body .horizontalMenucontainer .header-absolute {
            position: inherit;
            width: 100%;
         }
      }

      @media (max-width: 991px) {
         .sptb.big-padding-in-mobile {
            margin-top: 0px;
            padding-bottom: 0 !important;
         }
      }

      .position-absu {
         position: absolute;
         margin-top: -60px;
         z-index: 999;
         left: 0;
         right: 0;
         margin-left: auto;
         margin-right: auto;
         width: 80%;
      }

      .shape {
         z-index: 99;
      }
   </style>
   <div class="search-background bg-transparent d-lg-none d-none position-absu text-center">
      <div class="form row g-0">
         <div class="form-group  col-xl-9 col-lg-9 col-md-12 col-9 mb-0">
            <input type="text" class="form-control input-xs ps-5 border-white-1" id="mail" placeholder="Enter Your Name" data-min-length="1" list="courses" name="courses">
         </div>
         <div class="col-xl-3 col-lg-3 col-md-12 col-3 mb-0">
            <a href="#" id="submit_now" class="btn btn-xs btn-block btn-primary br-ts-md-0 br-bs-md-0">Started</a>
         </div>
      </div>
      <div class="input-group align-items-center pt-1 mb-3" id="alert"></div>
   </div>
<?php endif; ?>
<!-- Shape Start -->
<div class="relative">
   <div class="shape overflow-hidden text-white">
      <svg viewBox="0 0 2880 48" fill="none" xmsns="http://www.w3.org/2000/svg">
         <path d="M0 48H1437.5H2880V0H2160C1442.5 52 720 0 720 0H0V48Z" fill="#fff"></path>
      </svg>
   </div>
</div>
<!--Shape End-->
<?php if ($section_on_off->sec_flag_course == 1) : ?>
   <!--Section-->
   <section class="sptb bg-white big-padding-in-mobile" style="position: relative;z-index: 9;">
      <div class="container">
         <div class="section-title d-md-flex">
            <div>
               <h2><?php echo $heading->flag_course ?></h2>
               <p class="fs-18 lead"><?php echo $heading->flag_course_desc ?></p>
            </div>
            <div class="ms-auto d-inline-flex">
               <div class="w-150 mt-3 me-4">
               </div>
            </div>
         </div>
         <div id="myCarousel1" class="owl-carousel owl-carousel-icons2">
            <?php foreach ($all_flag_course as $key => $flag_course) : ?>
               <div class="item">
                  <div class="card overflow-hidden">
                     <div class="item-card7-img pt-5 px-5">
                        <div class="item-card7-imgs">
                           <a href="<?php echo base_url() ?>/course/<?php echo $flag_course->course_slug ?>"></a>
                           <img src="<?php echo base_url() ?><?php echo $flag_course->course_image ?>" alt="<?php echo $flag_course->course_heading ?>" class="cover-image br-7 border">
                        </div>
                     </div>
                     <div class="card-body text-center">
                        <div class="item-card7-desc">
                           <div class="item-card7-text">
                              <a href="<?php echo base_url() ?>/course/<?php echo $flag_course->course_slug ?>" class="text-dark">
                                 <h4 class="font-weight-semibold mb-1"><?php echo mb_strimwidth($flag_course->course_heading, 0, 50, "...") ?></h4>
                              </a>
                           </div>
                           <div class="d-flex mb-0 justify-content-center course-price-details text-center">
                              <?php if ($flag_course->course_in_class_dicount_price > 0): ?>
                                 <?php
                                 // Calculate the discount percentage
                                 $discountPercentage = round((($flag_course->course_in_class_main_price - $flag_course->course_in_class_dicount_price) / $flag_course->course_in_class_main_price) * 100);
                                 ?>
                                 <h4>
                                    <b>₹<?php echo $flag_course->course_in_class_dicount_price; ?></b>
                                    <del class="fs-14 me-1 ms-1">₹<?php echo $flag_course->course_in_class_main_price; ?></del>
                                    <span class="badge"><?php echo $discountPercentage; ?>% OFF</span>
                                 </h4>
                              <?php else: ?>
                                 <h4>
                                    <b>₹<?php echo $flag_course->course_in_class_main_price; ?></b>
                                 </h4>
                              <?php endif; ?>

                           </div>
                           <div class="mt-2">
                              <button class="btn w-full text-white" style="width: 100%;font-size:16px;font-weight:700" onclick="openDownloadBrochureModal('<?php echo $flag_course->course_id; ?>', '<?php echo base_url(); ?><?php echo $flag_course->course_pdf_browser; ?>')"> Download Brochure</button>
                           </div>
                           <div class="mt-3">
                              <a href="<?php echo base_url() ?>/course/<?php echo $flag_course->course_slug ?>" style="font-size:16px">View Course</a>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            <?php endforeach ?>
         </div>
      </div>
   </section>

   <div class="modal fade" id="browchureModel" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body" style="padding: 40px;">
                <h3 class="modal_heading">Please enter your Details to get the Course Brochure</h3>
                <form id="download_bowchure" method="post">
                    <div class="mb-3">
                        <label class="col-form-label">Your Full Name <span class="text-danger">*</span></label>
                        <input type="text" id="name" class="form-control form-field" required placeholder="Enter Your Full Name" name="lead_name">
                    </div>
                    <div class="mb-3">
                        <label class="col-form-label">Your Email ID <span class="text-danger">*</span></label>
                        <input type="email" id="email" class="form-control form-field" required placeholder="Enter Your Email ID" name="lead_email">
                    </div>
                    <div class="mb-3">
                        <label class="col-form-label">Your Mobile No. <span class="text-danger">*</span></label>
                        <input type="text" id="phone" class="form-control form-field" required placeholder="Enter Your Mobile No." name="lead_mobile">
                    </div>

                    <!-- Occupation Field -->
                    <div class="mb-3">
                        <label class="col-form-label">Occupation <span class="text-danger">*</span></label>
                        <select id="occupation" class="form-control form-field" name="lead_occupation" required>
                            <option value="" disabled selected>Select Your Occupation</option>
                            <option value="Student">Student</option>
                            <option value="Working Professional">Working Professional</option>
                            <option value="House Wife">House Wife</option>
                            <option value="Business Owner">Business Owner</option>
                        </select>
                    </div>

                    <!-- Education Field -->
                    <div class="mb-3">
                        <label class="col-form-label">Education <span class="text-danger">*</span></label>
                        <select id="education" class="form-control form-field" name="lead_education" required>
                            <option value="" disabled selected>Select Your Education</option>
                            <option value="Below 10th">Below 10th</option>
                            <option value="Below 12th">Below 12th</option>
                            <option value="12th Pass">12th Pass</option>
                            <option value="BA">BA</option>
                            <option value="BCA">BCA</option>
                            <option value="B.com">B.com</option>
                            <option value="BAF">BAF</option>
                            <option value="BMS">BMS</option>
                            <option value="BBA">BBA</option>
                            <option value="MBA">MBA</option>
                            <option value="M.com">M.com</option>
                            <option value="Mass communication">Mass communication</option>
                            <option value="Other">Other</option>
                        </select>
                    </div>

                    <div class="mb-4">
                        <div id="recaptcha-container"></div>
                    </div>

                    <input type="hidden" class="form-control" required name="lead_course" id="leadCourse">
                    <input type="hidden" class="form-control" value="Download Brochure" required name="lead_mode">

                    <!-- WhatsApp Updates Checkbox -->
                    <div class="mb-3 form-check">
                        <input type="checkbox" class="form-check-input" id="whatsapp_updates" name="whatsapp_updates" checked>
                        <label class="form-check-label" for="whatsapp_updates">Send me updates on WhatsApp</label>
                    </div>

                    <div class="mt-5">
                        <button disabled id="sendOtpButton" type="button" class="btn w-full text-white" style="font-size: 15px;font-weight: 700;">
                            <span class="loginButtonText">Submit Now</span>
                            <span class="loginButtonLoaderMain">Process....</span>
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>


   <div class="modal fade" id="otpModel" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
      <div class="modal-dialog modal-sm">
         <div class="modal-content">
            <div class="modal-header">
               <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
               <div class="d-flex justify-content-center align-items-center container">
                  <div class="py-3 px-3" style="margin-top: -60px;">
                     <h5 class="m-0">Mobile phone verification</h5>
                     <span class="mobile-text">Enter the code we just send on your mobile phone
                        <b class="text-danger" id="otp_mobile">+91 86684833</b>
                     </span>
                     <div class="otp-inputs">
                        <div class="d-flex flex-row ">
                           <input type="text" class="form-control otp-input" maxlength="1" autofocus="">
                           <input type="text" class="form-control otp-input" maxlength="1">
                           <input type="text" class="form-control otp-input" maxlength="1">
                           <input type="text" class="form-control otp-input" maxlength="1">
                           <input type="text" class="form-control otp-input" maxlength="1">
                           <input type="text" class="form-control otp-input" maxlength="1">
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
   <script>
      var coursePdfURL;

      function openDownloadBrochureModal(e, url) {
         $('#browchureModel').modal('show');
         $('#leadCourse').val(e);
         coursePdfURL = url;
      }

      $(document).ready(function() {

         var confirmationResult;
         const firebaseConfig = {
            apiKey: "AIzaSyAlfb-Z0KUHo66Z5de-Dm9HEtJE6Oq8H30",
            authDomain: "dotcom-vidya-f38f2.firebaseapp.com",
            projectId: "dotcom-vidya-f38f2",
            storageBucket: "dotcom-vidya-f38f2.appspot.com",
            messagingSenderId: "839557496405",
            appId: "1:839557496405:web:4bc23c520256c6340ededc"
         };

         // Run validation on field changes
         $('.form-field').on('input', function() {
            validateForm();
         });

         function validateForm() {
            var phone = $('#phone').val().trim();
            var name = $('#name').val().trim();
            var email = $('#email').val().trim();

            var nameValid = name.split(' ').length > 1;
            var phoneValid = /^\d{10}$/.test(phone);
            var emailValid = validateEmail(email);

            if (phoneValid && nameValid && emailValid) {
               $('#sendOtpButton').prop('disabled', false);
               $('.loginButtonText').text('Send Verification Code');
            } else {
               $('#sendOtpButton').prop('disabled', true);
               $('.loginButtonText').text('Submit Now');
            }
         }

         function validateEmail(email) {
            return email.match(
               /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
            );
         }

         document.getElementById('sendOtpButton').addEventListener('click', function() {
            $('.loginButtonLoaderMain').show();
            $('.loginButtonText').hide();
            $('#sendOtpButton').prop('disabled', true);

            var phoneNumber = $('#phone').val();
            firebase.initializeApp(firebaseConfig);

            // Initialize reCAPTCHA verifier
            var appVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container', {
               size: 'invisible',
               callback: function(response) {
                  // reCAPTCHA solved
               },
               'expired-callback': function() {
                  $('.loginButtonLoaderMain').hide();
                  $('.loginButtonText').show();
                  $('#sendOtpButton').prop('disabled', false);
               }
            });

            appVerifier.render().then(function(widgetId) {
               window.recaptchaWidgetId = widgetId;
            });

            firebase.auth().signInWithPhoneNumber('+91' + phoneNumber, appVerifier)
               .then(function(result) {
                  confirmationResult = result; // Set the global confirmationResult
                  $('#otp_mobile').html(phoneNumber);
                  $('#browchureModel').modal('hide');
                  $('#otpModel').modal('show');
                  // swal({
                  //    title: "Done!",
                  //    text: "OTP Send To Your Mobile No.",
                  //    icon: "success",
                  // });
               })
               .catch(function(error) {
                  console.error('Error during signInWithPhoneNumber', error);
                  $('.loginButtonLoaderMain').hide();
                  $('.loginButtonText').show();
                  $('#sendOtpButton').prop('disabled', false);
                  swal({
                     title: "Oops!",
                     text: "OTP Sending Failed. Please try Again.",
                     icon: "error",
                  });
               });
         });

         // Function to validate OTP
         function validateOTP() {
            var otp = '';
            $('.otp-input').each(function() {
               otp += $(this).val();
            });

            if (otp.length === 6) {
               if (!confirmationResult) {
                  swal({
                     title: "Oops!",
                     text: "OTP verification is not initialized. Please try again.",
                     icon: "error",
                  });
                  return;
               }

               $("#ajax-preloader").show();
               confirmationResult.confirm(otp).then(function(result) {
                  var user = result.user;
                  $('#otpMessage').html(''); // Clear any existing message
                  $.ajax({
                     beforeSend: function() {
                        $("#ajax-preloader").show();
                     },
                     url: '<?php echo base_url(); ?>/home/submit_lead',
                     method: 'POST',
                     data: $('form#download_bowchure').serialize(),
                     success: function(response) {
                        if (response) {
                           swal({
                              title: "Wow!",
                              text: "Brochure Download Successfully",
                              icon: "success",
                           });
                           window.open(coursePdfURL, '_blank');
                           setTimeout(
                              function() {
                                 location.reload();
                              }, 2000);
                        } else {
                           swal({
                              title: "Oops!",
                              text: "Please Try Again ",
                              icon: "error",
                           });
                        }
                        $("#ajax-preloader").hide();
                     },
                     error: function(xhr, status, error) {
                        console.error('Error:', error);
                        $("#ajax-preloader").hide();
                     }
                  });
               }).catch(function(error) {
                  $("#ajax-preloader").hide();
                  console.error('Error during confirmationResult.confirm', error);
                  swal({
                     title: "Oops!",
                     text: "Invalid OTP. Please Enter Correct OTP",
                     icon: "error",
                  });
               });
            }
         }

         // Handle OTP input focus and backspace
         $('.otp-input').on('input', function() {
            if (this.value.length === this.maxLength) {
               $(this).next('.otp-input').focus();
            }
            validateOTP();
         }).on('keydown', function(e) {
            if (e.key === 'Backspace' && this.value.length === 0) {
               $(this).prev('.otp-input').focus().val('').trigger('input');
            }
         });
      });
   </script>
   <style>
      .course-price-details .badge {
         background: #c83b2b;
         color: #fff !important;
         font-weight: 700;
      }

      .otp-inputs {
         display: flex;
         justify-content: center;
         gap: 10px;
         margin: 20px 0;
      }

      .otp-input {
         width: 40px;
         height: 40px;
         text-align: center;
         font-size: 18px;
         border-color: #959090;
      }

      .loginButtonLoaderMain {
         display: none;
      }


      #browchureModel .modal-header,
      #otpModel .modal-header {
         border-bottom: 0;
      }

      #browchureModel .modal-content {
         background-color: #ddd;
      }

      #browchureModel .modal_heading {
         margin-top: -50px;
         text-align: center;
         font-size: 20px;
         margin-right: 30px;
         font-weight: 700;
      }

      #browchureModel .form-control {
         border: 1px solid #ada9a9;
         /* border-radius: 0; */
         height: 45px;
      }

      #browchureModel,
      #otpModel {
         /* z-index: 9999999; */
      }

      #browchureModel .modal-content {
         border-radius: 20px;
      }

      .modal-backdrop.show {
         opacity: .5;
         /* z-index: 999999; */
      }

      .w-full {
         width: 100%;
      }

      @media (min-width: 992px) {

         .sticky-wrapper.is-sticky .horizontal-main,
         .bg-background-1 .sticky-wrapper.is-sticky .header-style.horizontal-main {
            background: #fff;
            padding: 0!important;
         }
      }
   </style>
<?php endif; ?>
<?php if ($section_on_off->sec_short_about == 1) : ?>
   <section class="sptb position-relative bg-color-2" style="padding-bottom: 3rem;;">
      <div class="container">
         <div class="row">
            <div class="col-lg-7 col-md-7 col-sm-7 text-center ">
               <h1 class="mb-4 font-weight-bold text-white"><?php echo $about_us->heading ?></h1>
               <div class="text-white aboutus-description">
                  <?php echo preg_replace('/(<[^>]+) style=".*?"/i', '$1', $about_us->content);  ?>
               </div>
               <div class="row text-center">
                  <?php foreach ($get_all_counting as $key => $counting) : ?>
                     <div class="col-lg-3 col-md-6 col-6">
                        <div class="counter-status md-mb-0">
                           <div class="counter-icon ">
                              <i style="padding-top: 15px;" class="fa <?php echo $counting->fafa_icon ?> text-dark"></i>
                           </div>
                           <h5><?php echo $counting->title ?></h5>
                           <h2 class="counter mb-0"><?php echo $counting->number ?></h2>
                        </div>
                     </div>
                  <?php endforeach; ?>
               </div>
               <div class="mt-5">
                  <!-- <a href="javascript:void(0)" onclick="open_registration_model()" class="btn btn-lg button-class btn-secondary">Join Free Master Class</a> -->
                  <a href="<?php echo base_url(); ?>mc/master-class" class="btn btn-lg button-class btn-secondary">Join Free Master Class</a>
               </div>
            </div>
            <div class="col-sm-5">
               <img src="<?php echo base_url() ?><?php echo $about_us->image ?>">
            </div>
            <div class="aboutlink">
               <a href="#stacks" class="">
                  <i class="fa fa-angle-double-down"></i>
               </a>
            </div>
         </div>
      </div>
   </section>
<?php endif;
$all_upcoming_batches = $this->frontend_model->get_all_upcoming_batches();
?>
<section class="sptb position-relative bg-white" style="padding-bottom: 3rem;;">
   <div class="container">
      <div class="section-title pb-0">
         <div>
            <h2><?php echo $heading->upcoming_batches_heading ?></h2>
            <p class="fs-18 lead"><?php echo $heading->upcoming_batches_description ?></p>
         </div>
      </div>
      <div class="row">
         <?php foreach ($all_upcoming_batches as $upcoming_batches) : ?>
            <div class="col-lg-12 col-md-12 col-12 mt-5">
               <div class="card-d">
                  <div class="d-card">
                     <div class="row">
                        <div class="col-sm-9">
                           <div class="mobile-inline">
                              <?php if ($upcoming_batches->batches_category == 1) : ?>
                                 <span class="tag-tag"><i class="fa fa-play-circle-o" aria-hidden="true"></i> Recorded</span>
                              <?php elseif ($upcoming_batches->batches_category == 2) : ?>
                                 <span class="tag-tag"><i style="color:red" class="fa fa-circle blink_me" aria-hidden="true"></i> Live Virtual</span>
                              <?php else : ?>
                                 <span class="tag-tag"><img src="<?php echo base_url() ?>assets/online-learning.png" width="20"> Face2Face Class</span>
                              <?php endif; ?>
                              <span class="tag-tag"><i class="fa fa-clock-o" aria-hidden="true"></i> <?php echo $upcoming_batches->duration ?></span>
                              <span class="tag-tag"><i class="fa fa-calendar" aria-hidden="true"></i> Batch start on <?php echo date("d-m-Y", strtotime($upcoming_batches->batches_start_date)); ?></span>
                           </div>
                           <h5 class="mt-5 mobile-padding"><b><a href="<?php echo base_url() ?>course-details/<?php echo $upcoming_batches->slug; ?>/<?php echo $upcoming_batches->rand_id ?>"><?php echo mb_strimwidth($upcoming_batches->title, 0, 50, "...") ?> <i class="fa fa-long-arrow-right" aria-hidden="true"></i></a></b>
                              <?php if ($upcoming_batches->batches_tag) : ?>
                                 <span class="COI-preferred"><?php echo $upcoming_batches->batches_tag ?></span>
                              <?php endif; ?>
                           </h5>
                           <p class="mt-3"><?php echo $upcoming_batches->batches_description; ?></p>
                           <div class="chech-display">
                              <?php foreach (json_decode($upcoming_batches->batches_options) as $batches_options) : ?>
                                 <a class="new-a"><i aria-hidden="true" class="fa fa-check"></i> <?php echo $batches_options; ?></a>
                              <?php endforeach; ?>
                           </div>
                           <?php if ($upcoming_batches->batches_category == 3) : ?>
                              <div class=" mt-3"><i class="fa fa-map-marker" aria-hidden="true"></i> Locations:
                                 <?php $branch_address = $this->branch_model->get_all_barnch_address_for_face_course();
                                 $rrt = '';
                                 foreach (array_slice($branch_address, 0, 3) as $keyy => $address) {

                                    $rrt .= '| <b><a href="' . base_url() . '/branch/' . $address->slug . '">' . ucwords(strtolower($address->name)) . '</a></b>&nbsp;';

                                    if ($keyy == 3) {
                                       $rrt .= '<a href="#" class="btn btn-sm text-white">View All </a>';
                                    }
                                 }
                                 echo substr($rrt, 1);;
                                 ?>
                              </div>
                           <?php endif; ?>
                        </div>
                        <div class="col-sm-3 ">
                           <div class="price-display" style="text-align:center">
                              <span class="price-set">
                                 <b>
                                    <?php if ($upcoming_batches->discount_flag == 1) : ?>
                                       <b style="font-size:22px">₹<?php echo $upcoming_batches->discounted_price; ?>/-</b>
                                       <span class="badge badge-success" style="margin-top:-10px">
                                          <?php $per_data =  (($upcoming_batches->price - $upcoming_batches->discounted_price) * 100) / $upcoming_batches->price;
                                          echo round($per_data);
                                          ?>% off</span>
                                    <?php else : ?>
                                       <b style="font-size:22px">₹<?php echo $upcoming_batches->price; ?>/-</b>
                                    <?php endif; ?>
                                 </b>
                              </span>
                              <?php if ($upcoming_batches->discount_flag == 1) : ?>
                                 <span class="price-set" style="display:block;text-align: center;">
                                    <b><del style="font-size:17px">₹<?php echo $upcoming_batches->price; ?>/-</del>
                                    </b>
                                 </span>
                              <?php endif; ?>
                              <div class="jumbotron countdown show" data-Date='<?php echo date("Y/m/d", strtotime($upcoming_batches->batches_start_date)); ?> 23:59:59'>
                                 <span class="price-set hurry" style="display:block;text-align: center;">
                                    <a href="<?php echo base_url() ?>home/up_batch_payment/<?php echo $upcoming_batches->rand_id; ?>/<?php echo $upcoming_batches->batches_id ?>" class="btn text-white btn7 new-btn mt-3 query-modal-button btn-sm">Book Your Slot</a>
                                 </span>
                                 <span style="display:block;text-align: center;" class="text-center mt-3 hurry">Hurry Up !!</span>
                                 <div class="running">
                                    <timer>
                                       <span class="days"></span>:<span class="hours"></span>:<span class="minutes"></span>:<span class="seconds"></span>
                                    </timer>
                                 </div>
                                 <span style="display:block;text-align: center;" class="text-center hurry">Time Left.</span>
                                 <div class="ended">
                                    <div class="text"> <button disabled class="btn text-white btn7 new-btn mt-3 query-modal-button btn-sm">Booking Close</button></div>
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         <?php endforeach; ?>
      </div>
   </div>
</section>
<script src="<?php echo base_url() ?>assets/front/js/multi-countdown.js" defer></script>
<style type="text/css">
   .blink_me {
      animation: blinker 3s linear infinite;
   }

   @keyframes blinker {
      50% {
         opacity: 0;
      }
   }

   .tag-tag {
      padding: 6px 8px;
      border: 1px solid #1d3675;
      border-radius: 20px;
   }

   .chech-display {
      /* display: flex; */
   }

   @media only screen and (max-width: 600px) {
      .chech-display {
         display: grid;
         margin-bottom: 20px;
      }

      .mobile-padding {
         margin-top: 30px !important;
         font-size: 20px;
      }

      .tag-tag {
         font-size: 12px;
      }

      .mobile-inline {
         display: inline-flex;
         text-align: center;
      }
   }

  

   .card-d {
      position: relative;
      display: -ms-flexbox;
      display: flex;
      -ms-flex-direction: column;
      flex-direction: column;
      min-width: 0;
      word-wrap: break-word;
      background-color: #fff;
      background-clip: border-box;
      border: 1px solid rgba(0, 0, 0, .125);
      border-radius: 0.25rem;
   }

   .d-card {
      padding: 1rem;
   }

 
</style>
<?php $all_training_batches = $this->frontend_model->get_all_batch_training(); ?>
<section class="sptb position-relative bg-white pt-0" style="padding-bottom: 3rem;">
   <div class="container">
      <div class="section-title pb-0">
         <div>
            <h2><?php echo $heading->training_title ?></h2>
            <p class="fs-18 lead"><?php echo $heading->training_description ?></p>
         </div>
      </div>
      <div class="row">
         <?php foreach ($all_training_batches as $training) : ?>
            <div class="col-lg-12 col-md-12 col-12 mt-5">
               <div class="card-d">
                  <div class="d-card">
                     <div class="row">
                        <div class="col-sm-9">
                           <h5 class="mobile-padding"><b><?php echo $training->training_title; ?> </b>
                           </h5>
                           <div class="chech-display mt-3">
                              <?php foreach (json_decode($training->training_options) as $training_options) : ?>
                                 <a class="new-a"><i aria-hidden="true" class="fa fa-check"></i> <?php echo $training_options; ?></a>
                              <?php endforeach; ?>
                           </div>
                        </div>
                        <div class="col-sm-3 ">
                           <div class="price-display" style="text-align:center">
                              <span class="price-set" style="display:block;text-align: center;">
                                 <a href="javascript:void(0)" onclick="training_contact('<?php echo $training->training_id; ?>')" class="btn text-white btn7 new-btn mt-3 query-modal-button">Contact Us</a>

                              </span>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         <?php endforeach; ?>
      </div>
   </div>
</section>
<script type="text/javascript">
   function training_contact(e) {
      $('#training_contact').modal('show');
      $('#training_id').val(e);
   }
</script>
<div class="modal show" id="training_contact" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
   <div class="modal-dialog" role="document">
      <div class="modal-content" style="background-color:#e0e3e3">
         <div class="modal-header" style="border-bottom: none;padding-bottom: 0!important;">
            <button type="button" class="close" onclick="close_model()" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
            </button>
         </div>
         <div class="modal-body" style="padding-top: 0!important;">
            <div style="padding:25px;padding-top: 0!important;">
               <?php echo form_open(base_url() . 'home/apply_customize_training'); ?>
               <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
               <h5 class="text-center">Complete Your Registration To Join Customize Training.</h5>
               <div class="row" style="padding-top:20px">
                  <div class="col-sm-6">
                     <div class="form-group">
                        <input type="text" class="form-control effect" name="f_name" required="" placeholder="Enter First Name *">
                     </div>
                  </div>
                  <div class="col-sm-6">
                     <div class="form-group">
                        <input type="text" class="form-control effect" name="l_name" required="" placeholder="Enter Last Name *">
                     </div>
                  </div>
                  <div class="col-sm-6">
                     <div class="form-group">
                        <input type="email" class="form-control effect" name="email" required="" id="email_new" placeholder="Enter Email ID *">
                     </div>
                  </div>
                  <div class="col-sm-6">
                     <div class="form-group">
                        <input type="tel" pattern="[0-9]{10}" class="form-control effect" name="mobile" required="" placeholder="Enter Mobile No *">
                        <input type="hidden" name="training_id" required="" id="training_id">
                     </div>
                  </div>
                  <div class="col-sm-12">
                     <div class="form-group">
                        <div class="g-recaptcha" data-sitekey="<?php echo $app_setting->captcha_site_key; ?>"></div>
                     </div>
                  </div>
                  <div class="col-sm-12">
                     <button type="submit" class="block">Submit</button>
                  </div>
               </div>
            </div>
         </div>
         <?php echo form_close(); ?>
      </div>
   </div>
</div>
<?php if ($section_on_off->sec_stacts == 1) : ?>
   <!--Section-->
   <section class="sptb ">
      <div class="container">
         <div class="section-title d-md-flex">
         </div>
         <div class="item-all-cat education-categories">
            <div class="row">
               <?php foreach ($get_all_stacks as $key => $stacks) : ?>
                  <div class="col-lg-3 col-md-4 col-sm-6">
                     <div class="item-all-card text-dark item-hover-card p-6">
                        <a href="#" class="absolute-link"></a>
                        <div class="iteam-all-icon">
                           <i class="fa <?php echo $stacks->fafa_icon ?>"></i>
                        </div>
                        <div class="item-all-text mt-3">
                           <h5 class="mb-0"><?php echo $stacks->title ?></h5>
                           <p class="mt-3"><?php echo $stacks->content ?></p>
                        </div>
                     </div>
                  </div>
               <?php endforeach; ?>
            </div>
         </div>
      </div>
   </section>
<?php endif; ?>
<?php if ($section_on_off->sec_video == 1) : ?>
   <!--/Section-->
   <style type="text/css">
      .video_heading {
         padding-top: 50px;
      }
   </style>
   <!--Section-->
   <section class="sptb" style="background:#fff" id="stacks">
      <div class="container">
         <div class="row">
            <div class="col-xl-8 col-lg-7 col-md-6">
               <div class="video-img">
                  <img src="<?php echo base_url() ?><?php echo $video_image->background_image ?>" alt="img" class="cover-image br-7">
                  <a class="mt-6 d-block video-btn mx-auto " href="javascript:void(0)" data-bs-toggle="modal" data-bs-target="#homeVideo"><i class="fa fa-play text-white"></i></a>
               </div>
               <div class="modal fade" id="homeVideo" tabindex="-1" role="dialog">
                  <div class="modal-dialog modal-lg" role="document">
                     <div class="modal-content">
                        <button type="button" class="btn btn-default" data-bs-dismiss="modal"><i class="fa fa-times"></i></button>
                        <?php
                        $video_id_1 = explode("?v=", $video_image->url);
                        $video_id_1 = $video_id_1[1];
                        $image_1 = "https://img.youtube.com/vi/" . $video_id_1 . "/maxresdefault.jpg";
                        ?>
                        <!-- <video id="video-player" class="video-player lazy" poster="<?php echo $image_1; ?>">
                           <source src="<?php //echo file_get_contents(base_url() . 'home/video?url=' . $video_image->url); 
                                          ?>" type="video/mp4">
                           Your browser does not support the video tag.
                        </video> -->
                        <?php echo preg_replace("/\s*[a-zA-Z\/\/:\.]*youtube.com\/watch\?v=([a-zA-Z0-9\-_]+)([a-zA-Z0-9\/\*\-\_\?\&\;\%\=\.]*)/i", "<iframe width=\"100%\" height=\"415\" src=\"//www.youtube.com/embed/$1\" frameborder=\"0\" allowfullscreen></iframe>", $video_image->url); ?>
                     </div>
                  </div>
               </div>
               <div class="video_heading">
                  <div class="container">
                     <div class="text-center text-white ">
                        <h2 class="mb-2 font-weight-400"><?php echo $video_image->heading ?></h2>
                        <p class="lead" style="color:#000"><?php echo $video_image->description ?></< /p>
                        <div class="mt-5">
                           <a href="<?php echo base_url(); ?>mc/master-class" class="btn btn-lg button-class btn-secondary">Join Free Master Class</a>
                           <!-- <a href="javascript:void(0)" onclick="open_registration_model()" class="btn btn-lg button-class btn-secondary">Book a Free Trail </a> -->
                        </div>
                     </div>
                  </div>
               </div>
            </div>
            <div class="col-xl-4 col-lg-5 col-md-6" style="">
               <div class="video-section ms-lg-5 pt-5 pb-4" style="background:<?php echo $visual_setting->color_2; ?>;padding: 25px;">
                  <h3 class="text-center"><?php echo $heading->form_heading ?></h3>
                  <ul class="">
                     <?php echo form_open(base_url() . 'home/request_demo_1',  array('id' => 'quots_form_1'));  ?>
                     <li data-aos="fade-up" data-aos-delay="100">
                        <p style="font-style: italic;text-align:center;"><?php echo $heading->form_sub_heading ?></p>
                        <div style="background-color: #000;border-radius: 25px;padding: 5px 2px!important;" class="request-q">
                           <div class="radio-toolbar" style="width: 100%">
                              <input class="radio-white" type="radio" id="radio1" value="1" checked name="class">
                              <label class="label-1" for="radio1"> Class Room</label>
                              <input class="radio-white" type="radio" id="radio2" value="2" name="class">
                              <label class="label-1" for="radio2"> Online</label>
                           </div>
                        </div>
                        <div>
                           <input type="text" id="name" name="name" placeholder="Enter Your Full Name" class="request-q" required="">
                        </div>
                        <div>
                           <input type="text" id="email" name="email" placeholder="Enter Your Email ID" class="request-q" required="">
                        </div>
                        <div>
                           <input type="tel" pattern="[0-9]{10}" id="mobile" name="mobile" placeholder="Enter Your Mobile No" class="request-q" required="">
                        </div>
                        <div>
                           <select name="course" id="course" placeholder="Enter Your Mobile No" class="request-q">
                              <option value="">Select Course</option>
                              <?php
                              $all_course = $this->course_model->get_all_course();
                              foreach ($all_course as $key => $course) : ?>
                                 <option value="<?php echo $course->id; ?>"><?php echo $course->course_short_name; ?></option>
                              <?php endforeach; ?>
                           </select>
                        </div>
                        <div>
                           <select name="branch" class="request-q" required="">
                              <option value="">Select Branch</option>
                              <?php
                              $all_branch = $this->branch_model->get_all_branch();
                              foreach ($all_branch as $key => $branch) : ?>
                                 <option value="<?php echo $branch->id; ?>"><?php echo $branch->name; ?></option>
                              <?php endforeach; ?>
                           </select>
                        </div>
                        <div class="col-sm-12">
                           <div class="form-group">
                              <div class="g-recaptcha" data-sitekey="<?php echo $app_setting->captcha_site_key; ?>"></div>
                           </div>
                        </div>
                        <div>
                           <button type="submit" class="request-q btn " style="background-color: <?php echo $visual_setting->color_5; ?>!important;color: #fff;">Submit</button>
                        </div>
                        <div>
                           <span id="form_1_alert"></span>
                        </div>
                     </li>
                     <?php echo form_close(); ?>
                  </ul>
               </div>
            </div>
         </div>
      </div>
   </section>
<?php endif; ?>
<?php if ($section_on_off->sec_course == 1 && $all_api_course) : ?>
   <!--Section-->
   <section class="sptb ">
      <div class="container">
         <div class="section-title d-md-flex">
            <div>
               <h2><?php echo $heading->api_course ?></h2>
               <p class="fs-18 lead"><?php echo $heading->api_course_desc ?></p>
            </div>
            <div class="ms-auto d-inline-flex">
               <div class="w-150 mt-3 me-4">
               </div>
            </div>
         </div>
         <div id="myCarousel1" class="owl-carousel owl-carousel-icons2">
            <?php foreach ($all_api_course as $key => $course) : ?>
               <div class="item">
                  <div class="card overflow-hidden">
                     <?php if ($course->is_free_course == 1) { ?>
                        <div class="ribbon ribbon-top-left text-danger"><span class="bg-danger">Free</span></div>
                     <?php } ?>
                     <div class="item-card7-img pt-5 px-5">
                        <div class="item-card7-imgs">
                           <a href="<?php echo $course->url; ?>"></a>
                           <img src="<?php echo $course->image ?>" alt="<?php echo $course->title ?>" class="cover-image br-7 border">
                        </div>
                     </div>
                     <div class="card-body">
                        <div class="item-card7-desc">
                           <div class="item-card7-text">
                              <a href="<?php echo $course->url; ?>" class="text-dark">
                                 <h4 class="font-weight-semibold mb-1"><?php echo $course->title ?></h4>
                              </a>
                           </div>
                           <p class="mb-0"><?php echo $course->short_description ?></p>
                        </div>
                     </div>
                  </div>
               </div>
            <?php endforeach ?>
         </div>
      </div>
   </section>
<?php endif; ?>
<?php if ($section_on_off->sec_event == 1 && count($all_latest_event) > 0) : ?>
   <section class="sptb bg-white">
      <div class="container">
         <div class="section-title d-md-flex">
            <div>
               <h2><?php echo $heading->event_heading ?></h2>
               <p class="fs-18 lead"><?php echo $heading->event_desc ?></p>
            </div>
         </div>
         <div id="myCarousel1" class="owl-carousel owl-carousel-icons2">
            <?php foreach ($all_latest_event as $key => $event) : ?>
               <div class="item">
                  <div class="card overflow-hidden">
                     <?php if ($event->event_mode == 1) { ?>
                        <div class="ribbon ribbon-top-left text-danger"><span class="bg-danger">Free</span></div>
                     <?php } ?>
                     <div class="item-card7-img pt-5 px-5">
                        <div class="item-card7-imgs">
                           <a href="<?php echo base_url() ?>event-details/<?php echo $event->link; ?>"></a>
                           <img src="<?php echo base_url() ?><?php echo $event->image ?>" alt="<?php echo $event->title ?>" class="cover-image br-7 border">
                        </div>
                     </div>
                     <div class="card-body">
                        <div class="item-card7-desc">
                           <div class=" mb-3">
                              <a href="<?php echo base_url() ?>event-details/<?php echo $event->link; ?>" class="btn btn-sm" style="color: #fff"><i class="fa fa-tag"></i>&nbsp;<?php if ($event->event_type == 1) {
                                                                                                                                                                                    echo 'Workshop';
                                                                                                                                                                                 } elseif ($event->event_type == 2) {
                                                                                                                                                                                    echo 'Webinar';
                                                                                                                                                                                 } elseif ($event->event_type == 3) {
                                                                                                                                                                                    echo 'Facebook Live';
                                                                                                                                                                                 } elseif ($event->event_type == 4) {
                                                                                                                                                                                    echo 'Instagram Live';
                                                                                                                                                                                 } elseif ($event->event_type == 5) {
                                                                                                                                                                                    echo 'YouTube Live';
                                                                                                                                                                                 } ?></a>
                              <?php if ($event->event_type == 1 && $event->event_location) : ?>
                                 <a class="me-4 float-end"><span class="font-weight-bold"><i class="fa fa-map-marker" aria-hidden="true"></i></span><span class="text-muted"> <?php echo $event->event_location ?></span></a>
                              <?php endif; ?>
                           </div>
                           <div class="item-card7-text">
                              <a href="<?php echo base_url() ?>event-details/<?php echo $event->link; ?>" class="text-dark">
                                 <h4 class="font-weight-semibold mb-1"><?php echo $event->title ?></h4>
                              </a>
                           </div>
                           <div class="pt-2 mb-3">
                              <a class="me-4"><span class="font-weight-bold red"><i class="fa fa-calendar" aria-hidden="true"></i> </span> <span class="text-muted red"> <?php echo date('Y-m-d', strtotime($event->date_time)) ?></span></a>
                              <a class="me-4 float-end"><span class="font-weight-bold red"><i class="fa fa-clock-o" aria-hidden="true"></i></span><span class="text-muted red"> <?php echo date('h:i A', strtotime($event->date_time)) ?> </span></a>
                           </div>
                           <p class="mb-0"><?php echo $event->description ?></p>
                           <?php if ($event->event_mode == 1) { ?>
                              <h4 class="mt-3 fs-25 text-center" style="color:green">FREE</h4>
                           <?php } else { ?>
                              <?php if ($event->discount_price == 0) : ?>
                                 <h4 class="mt-3 fs-25 text-center">&#x20B9;<?php echo $event->main_price ?></h4>
                              <?php else : ?>
                                 <h4 class="mt-3 fs-25 text-center">&#x20B9;<?php echo $event->discount_price ?>
                                    <del class="fs-16 text-muted">&#x20B9;<?php echo $event->main_price ?></del>
                                 </h4>
                              <?php endif; ?>
                           <?php } ?>
                        </div>
                     </div>
                  </div>
               </div>
            <?php endforeach ?>
         </div>
      </div>
   </section>
<?php endif; ?>
<?php if ($section_on_off->sec_course_2 == 1) : ?>
   <style type="text/css">
      .red i,
      span.red {
         color: red !important;
      }
   </style>
   <!--Section-->
   <section class="sptb ">
      <div class="container">
         <div class="section-title d-md-flex">
            <div>
               <h2><?php echo $heading->tranding_course ?></h2>
               <p class="fs-18 lead"><?php echo $heading->tranding_course_desc ?></p>
            </div>
            <div class="ms-auto d-inline-flex">
               <div class="w-150 mt-3 me-4">
               </div>
            </div>
         </div>
         <div id="myCarousel1" class="owl-carousel owl-carousel-icons2">
            <?php foreach ($all_course_with_out_flag as $key => $with_out_flag_course) : ?>
               <div class="item">
                  <div class="card overflow-hidden">
                     <?php if ($with_out_flag_course->is_free_course == 1) { ?>
                        <div class="ribbon ribbon-top-left text-danger"><span class="bg-danger">Free</span></div>
                     <?php } ?>
                     <div class="item-card7-img pt-5 px-5">
                        <div class="item-card7-imgs">
                           <a href="<?php echo base_url() ?>course-details/<?php echo $with_out_flag_course->slug; ?>/<?php echo $with_out_flag_course->rand_id; ?>"></a>
                           <img src="<?php echo base_url() ?><?php echo $with_out_flag_course->thumbnail ?>" alt="<?php echo $with_out_flag_course->title ?>" class="cover-image br-7 border">
                        </div>
                     </div>
                     <div class="card-body">
                        <div class="item-card7-desc">
                           <div class="item-card7-text">
                              <a href="<?php echo base_url() ?>course-details/<?php echo $with_out_flag_course->slug; ?>/<?php echo $with_out_flag_course->rand_id; ?>" class="text-dark">
                                 <h4 class="font-weight-semibold mb-1"><?php echo mb_strimwidth($with_out_flag_course->title, 0, 60, "...") ?></h4>
                              </a>
                           </div>
                           <div class="d-flex mb-0">
                           </div>
                           <div class="pt-2 mb-3">
                              <a class="me-4"><span class="font-weight-bold">Duration :</span> <span class="text-muted"><?php echo $with_out_flag_course->duration ?></span></a>
                              <a class="me-4 float-end"><span class="font-weight-bold"><?php if ($with_out_flag_course->couse_time == 1) {
                                                                                          echo 'Daily';
                                                                                       } else {
                                                                                          echo 'Monthly';
                                                                                       } ?> :</span><span class="text-muted"> <?php echo $with_out_flag_course->time ?> </span></a>
                           </div>
                           <p class="mb-0"><?php echo mb_strimwidth($with_out_flag_course->short_description, 0, 70, "...") ?></p>
                        </div>
                     </div>
                  </div>
               </div>
            <?php endforeach ?>
         </div>
      </div>
   </section>
<?php endif; ?>
<?php if ($section_on_off->sec_ebook == 1) : ?>
   <!--Section-->
   <section class="sptb bg-white">
      <div class="container">
         <div class="section-title d-md-flex">
            <div>
               <h2><?php echo $heading->exclusive_ebook ?></h2>
               <p class="fs-18 lead"><?php echo $heading->exclusive_ebook_desc ?></p>
            </div>
         </div>
         <div id="myCarousel1" class="owl-carousel owl-carousel-icons2">
            <?php foreach ($get_all_latest_ebook as $key => $ebook) : ?>
               <div class="item">
                  <div class="card mb-0 overflow-hidden">
                     <div class="card-body">
                        <!-- <div class="power-ribbon power-ribbon-top-left text-warning"><span class="bg-warning"><img  src="../../assets/images/png/power.png" class=""></span></div> -->
                        <img src="<?php echo base_url() ?>uploads/editor/<?php echo $ebook->image ?>" alt="img" class="br-7 mb-4" style="width:100%; height:200px">
                        <div class="">
                           <div class="item-card2">
                              <div class="item-card2-desc">
                                 <div class="d-inline-flex">
                                 </div>
                                 <div class="item-card2-text mb-1">
                                    <a href="<?php echo base_url() ?>ebook-details/<?php echo $ebook->link ?>" class="text-dark">
                                       <h4 class="mb-2"><?php echo mb_strimwidth($ebook->title, 0, 40, "...") ?></h4>
                                    </a>
                                 </div>
                                 <a href="<?php echo base_url() ?>ebook-details/<?php echo $ebook->link ?>" class="">Online Classes</a>
                                 <?php if ($ebook->event_mode == 2) : ?>
                                    <?php if ($ebook->discount_price > 0) : ?>
                                       <h4 class="mt-3 fs-25">&#x20B9; <?php echo $ebook->discount_price ?>
                                          <del class="fs-16 text-muted">&#x20B9; <?php echo $ebook->main_price ?></del>
                                       </h4>
                                    <?php else : ?>
                                       <h4 class="mt-3 fs-25">&#x20B9; <?php echo $ebook->main_price ?> </h4>
                                    <?php endif; ?>
                                 <?php else : ?>
                                    <h4 class="mt-3 fs-25">FREE</h4>
                                 <?php endif; ?>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            <?php endforeach ?>
         </div>
      </div>
   </section>
   <!--Section-->
<?php endif; ?>
<?php if ($section_on_off->sec_content == 1) : ?>
   <!--Section-->
   <section>
      <div class="cover-image sptb bg-background-color text-white">
         <div class="content-text mb-0">
            <div class="container">
               <div class="row">
                  <div class="col-lg-8">
                     <div class="section-title pb-4">
                        <h2><?php echo $feature->title; ?></h2>
                        <p class="text-white-80 fs-18 mt-6"><?php echo $feature->description; ?></p>
                     </div>
                     <ul class="list-style fs-18 text-white student-feature-icons">
                        <?php
                        $filesCount = count(json_decode($feature->content));
                        for ($i = 0; $i < $filesCount; $i++) {
                           $content = json_decode($feature->content)[$i];
                        ?>
                           <li class="py-2"><i class="fe fe-check me-3"></i><?php echo $content; ?></li>
                        <?php }; ?>
                     </ul>
                  </div>
                  <div class="col-lg-4 met-sm-2">
                     <div class="student-img ">
                        <img style="position: inherit;" src="<?php echo base_url() ?><?php echo $feature->image; ?>" class="" alt="<?php echo $feature->title; ?>">
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </section>
   <!--/Section-->
<?php endif; ?>
<?php if ($section_on_off->sec_logo == 1) : ?>
   <!--Section-->
   <section class="sptb bg-white">
      <div class="container">
         <div class="section-title">
            <h2><?php echo $heading->company_logo  ?></h2>
         </div>
         <div id="small-categories" class="owl-carousel client-carousel">
            <?php foreach ($get_all_company_logo as $key => $company_logo) : ?>
               <div class="item">
                  <div class="client-img">
                     <img src="<?php echo base_url() ?><?php echo $company_logo->image ?>" alt="<?php echo $company_logo->name ?>">
                  </div>
               </div>
            <?php endforeach; ?>
         </div>
      </div>
   </section>
   <!--/Section-->
<?php endif; ?>
<?php if ($section_on_off->sec_placed_student == 1) : ?>
   <!--Section-->
   <section class="sptb position-relative cover-image bg-background">
      <div class="container">
         <div class="section-title">
            <h2 class="position-relative text-white"><?php echo $heading->place_student ?></h2>
         </div>
         <div class="row">
            <div class="col-md-12">
               <div id="myCarousel2" class="owl-carousel owl-carousel-icons7">
                  <?php foreach ($all_current_op as $key => $current_op) : ?>
                     <div class="item">
                        <div class="card mb-xl-5">
                           <div class="card-body sst">
                              <div class="team-section text-center">
                                 <div class="team-img">
                                    <img src="<?php echo base_url(); ?><?php echo $current_op->placements_image ?>" alt="<?php echo $current_op->placements_name ?>" width="100px">
                                 </div>
                                 <h4 class="dark-grey-text mt-4"><?php echo $current_op->placements_name ?></h4>
                                 <hr />
                                 <h5 class="dark-grey-text ">Batch : <?php echo $current_op->placements_batch ?></h5>
                                 <h5 class=" dark-grey-text mt-2"><?php echo $current_op->placements_position ?></h5>
                                 <div class="mt-3 company-img text-center">
                                    <img src="<?php echo base_url(); ?><?php echo $current_op->placements_company_img ?>" alt="<?php echo $current_op->placements_name ?>" width="150px">
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                  <?php endforeach; ?>
               </div>
            </div>
         </div>
      </div>
   </section>
   <style>
      .sst .team-section .team-img img {
         box-shadow: 0 0 0 1px #dce3ec, 0 8px 16px 0 #dce3ec;
         display: inline;
         height: 150px;
         width: auto;
      }

      .company-img img {
         display: inline !important;
         height: 75px;
         width: auto;
      }
   </style>
   <!--/Section-->
<?php endif; ?>
<?php if ($section_on_off->sec_blog == 1) : ?>
   <!--Section-->
   <section class="bg-white blog-section pt-5 pb-5">
      <div class="container">
         <div class="section-title">
            <h2><?php echo $heading->latest_blog_heading  ?></h2>
         </div>
         <div id="defaultCarousel" class="owl-carousel Card-owlcarousel owl-carousel-icons">
            <?php
            foreach ($get_all_blog as $post) :
               $blog_comment_count = $this->blog_model->get_all_blog_comment_by_id($post->id);
               $category = $this->blog_model->get_all_category_by_blog_id($post->category);
            ?>
               <div class="item">
                  <div class="card mb-0">
                     <div class="card-body p-4">
                        <div class="item7-card-img">
                           <a href="<?php echo base_url() ?>b/<?php echo $post->title_slug ?>"></a>
                           <img src="<?php echo base_url() ?><?php echo $post->thumb ?>" alt="<?php echo $post->title ?>" class="cover-image br-7 mb-4 border">
                        </div>
                        <div class="item7-card-desc d-flex mb-2">
                           <a href="<?php echo base_url() ?>b/<?php echo $post->title_slug ?>"><i class="fe fe-calendar me-2"></i><?php echo date("d-M-Y", strtotime($post->date)); ?></a>
                           <div class="ms-auto">
                              <a href="javascript:void(0)"><i class="fe fe-message-circle me-2"></i><?php echo $blog_comment_count ?> Comments</a>
                           </div>
                        </div>
                        <a href="<?php echo base_url() ?>b/<?php echo $post->title_slug ?>">
                           <h4 class="font-weight-semibold mb-2 mt-3"><?php echo mb_strimwidth($post->title, 0, 50, "...") ?></h4>
                        </a>
                        <p class="mb-4"><?php echo mb_strimwidth($post->short_description, 0, 70, "...") ?></p>
                        <a class="btn btn-primary" href="<?php echo base_url() ?>b/<?php echo $post->title_slug ?>">Read More <i class="fe fe-chevron-right"></i></a>
                     </div>
                  </div>
               </div>
            <?php endforeach; ?>
         </div>
      </div>
   </section>
<?php endif; ?>
<?php if ($section_on_off->sec_download_app == 1) : ?>
   <section class="sptb pt-5">
      <div class="container">
         <div class="row">
            <div class="col-md-12 col-lg-4">
               <img src="<?php echo base_url() ?><?php echo $app->image; ?>" alt="<?php echo $app->title; ?>" class="absolute-student">
            </div>
            <div class="col-md-12 col-lg-8">
               <div class="section-title">
                  <h2><?php echo $app->title; ?></h2>
                  <p class="fs-18 lead"><?php echo $app->des; ?></p>
               </div>
               <div class="text-wrap">
                  <div class="btn-list">
                     <a href="<?php echo $app->app_store; ?>" class="btn btn-primary btn-lg mb-5 mb-lg-0"><i class="fa fa-apple fa-1x me-2"></i> App Store</a>
                     <a href="<?php echo $app->play_store; ?>" class="btn btn-secondary btn-lg mb-5 mb-lg-0"><i class="fa fa-android fa-1x me-2"></i> Google Play</a>
                     <a href="<?php echo $app->windows; ?>" class="btn text-white btn-lg mb-5 mb-lg-0"><i class="fa fa-windows fa-1x me-2"></i> Windows</a>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </section>
<?php endif; ?>
<script type="text/javascript">
   document.addEventListener("DOMContentLoaded", function() {
      new Moovie({
         selector: "#video-player",
      });
   });
   $(document).ready(function() {
      setTimeout(function() {
         $("video.connect-bg source").each(function() {
            var sourceFile = $(this).attr("src");
            $(this).attr("src", sourceFile);
            var video = this.parentElement;
            video.load();
            video.play();
         });
      }, 1000);
      setTimeout(function() {
         $('img').each(function() {
            var sourceFile = $(this).attr("src");
            $(this).attr("src", sourceFile);
         });
      }, 1000);
      // ______________Client-carousel
      var owl = $('.client-carousel');
      owl.owlCarousel({
         loop: true,
         rewind: false,
         margin: 25,
         animateIn: 'fadeInDowm',
         animateOut: 'fadeOutDown',
         autoplay: true,
         autoplayTimeout: 5000, // set value to change speed
         autoplayHoverPause: true,
         dots: false,
         nav: false,
         responsiveClass: true,
         responsive: {
            0: {
               items: 2,
               nav: false
            },
            600: {
               items: 3,
               nav: false
            },
            1300: {
               items: 5,
               nav: false
            }
         }
      })
      // ______________Owl-carousel-icons2
      var owl = $('.owl-carousel-icons2');
      owl.owlCarousel({
         loop: true,
         rewind: false,
         margin: 0,
         animateIn: 'fadeInDowm',
         animateOut: 'fadeOutDown',
         autoplay: false,
         autoplayTimeout: 5000, // set value to change speed
         autoplayHoverPause: true,
         dots: false,
         nav: true,
         autoplay: true,
         responsiveClass: true,
         responsive: {
            0: {
               items: 1,
               nav: true
            },
            600: {
               items: 2,
               nav: true
            },
            1300: {
               items: 3,
               nav: true
            }
         }
      })
      // ______________Owl-carousel-icons7
      var owl = $('.owl-carousel-icons7');
      owl.owlCarousel({
         margin: 25,
         loop: true,
         nav: false,
         dots: false,
         autoplay: true,
         responsive: {
            0: {
               items: 1
            },
            600: {
               items: 2
            },
            1000: {
               items: 3
            }
         }
      })
      // ______________Owl-carousel-icons
      var owl = $('.owl-carousel-icons');
      owl.owlCarousel({
         margin: 0,
         padding: 15,
         loop: true,
         nav: true,
         autoplay: true,
         dots: false,
         responsive: {
            0: {
               items: 1
            },
            600: {
               items: 2
            },
            1300: {
               items: 3
            }
         }
      })
   });
</script>