<style type="text/css">
section {
    background: #f5f4f9!important;
}
.card-header {
    background: #BE1502;
    color: #fff!important;
}
.card-header .card-title
{
   color: #fff;
}
.horizontal-main
{
   background-color: #fff;
       padding: 10px 0;
}
@media only screen and (max-width: 991px)
{
   .horizontal-header .smllogo {
       display: inline-block;
       margin-top: 1px;
   }
   .horizontal-header .smllogo img {
       width: 200px;
   }
   .horizontal-main 
   {
      display: none;
   }
}
.desktoplogo {
    padding: 0.75rem 0;
    margin: auto!important;
    width: 200px;
    float: none!important;
}
.top-bar
{
   display: none!important;
}
@media (min-width: 992px)
{
   .sticky-wrapper.is-sticky .desktoplogo-1 {
       display: block !important;
    padding: 0.75rem 0;
    margin: auto!important;
    width: 200px;
    float: none!important;
   }
}
</style>


<?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');
    }
    ?>
<?php 
   $this->db->select('id,title,rand_id,cook_demo_video, special_whatsapp_group, checkout_plans_title, checkout_plans_description, checkout_heading, checkout_sub_heading, checkout_video_or_image, checkout_iframe, checkout_iframe, checkout_description, checkout_money_sub_heading, checkout_money_heading, checkout_money_description, checkout_money_image, course_adv_payment, checkout_head_code, price, discount_flag, discounted_price, review_video, curriculum_pdf, checkout_plan_title');
   $this->db->where('id', $this->session->userdata('b_course_id'));
   $course = $this->db->get('course')->row();

   $this->db->select('*');
   $this->db->where('batches_id', $this->session->userdata('b_course_batch_id'));
   $batch = $this->db->get('upcomingb_batches')->row(); 

   // $this->db->select('a.*, b.prd_name');
   // $this->db->from('product_bonus a');
   // $this->db->join('products b', 'b.prd_id = a.bonus_prd_id', 'left');
   // $this->db->where('a.bonus_prd_id', $course->prd_id);
   // $all_bonus = $this->db->get()->result();
   $all_lession = $this->course_model->get_all_lession_by_course($course->id);
   if($course->course_adv_payment)
   {
      if($course->discount_flag == 1)
      {
         $amt = $course->discounted_price;
         $amount = $course->course_adv_payment;
         $rest = $course->discounted_price - $course->course_adv_payment;
      }
      else
      {
         $amt = $course->price;
         $amount = $course->course_adv_payment;
         $rest = $course->price - $course->course_adv_payment;
      }
   	
   	
   }
   else
   {
      if($course->discount_flag == 1)
      {
         $amt = $course->discounted_price;
         $amount = $course->discounted_price;
         $rest = 0;
      }
      else
      {
         $amt = $course->price;
         $amount = $course->price;
         $rest = 0;
      }
   }
   ?>
 <?php 
$success_form = $this->session->userdata('success_form');
if (isset($success_form)) {
  ?>
   <script>
      $(window).on('load', function() {
           $('#success_form').modal('show');
      });
  </script>
      
<div class="modal fade" id="success_form" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-body">
        <div>
         <div class="swal2-icon swal2-success swal2-animate-success-icon" style="display: flex;">
            <div class="swal2-success-circular-line-left" style="background-color: rgb(255, 255, 255);"></div>
               <span class="swal2-success-line-tip"></span>
               <span class="swal2-success-line-long"></span>
               <div class="swal2-success-ring"></div> 
               <div class="swal2-success-fix" style="background-color: rgb(255, 255, 255);"></div>
               <div class="swal2-success-circular-line-right" style="background-color: rgb(255, 255, 255);">
            </div>
         </div>
         <h4 class="mb-5 text-center">Your application successfully submited,Join our WhatsApp group to start your demo class.</h4>
         <?php if($course->cook_demo_video): ?>
            <div class="">
               <?php 
                  $video_id_11_i = explode("?v=", $course->cook_demo_video);
                  $video_id_11_i = $video_id_11_i[1];
                  $image_11_i = "http://img.youtube.com/vi/".$video_id_11_i."/maxresdefault.jpg";
               ?>
               <video id="video-player-200" class="video-player" poster="<?php echo $image_11_i; ?>">
                  <source src="<?php echo file_get_contents(base_url().'home/video?url='.$course->cook_demo_video);?>" type="video/mp4">
                    Your browser does not support the video tag.
               </video>
            </div>
         <?php endif;?>
        </div>
        <div class="mt-5">
            <button type="button"  class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
            <a target="_blank" href="<?php echo $course->special_whatsapp_group ?>"><button type="button" style="float:right; background-color:green;border-color:#fff" class="btn btn-success">Join Whatsapp Group</button></a>
         </div>
      </div>
    </div>
  </div>
</div>
<?php
   $this->session->unset_userdata('success_form');
}
 ?> 

<?php if(get_cookie('557529') != 557529): ?>
<script type="text/javascript">
    window.onload = () => {
        setTimeout(function() {
          $('#onload').modal("show");
          $("#mydiv").addClass("mydiv");
      }, 60000);
    }
    function remove_bg() 
    {
      $("#mydiv").removeClass("mydiv");
      setTimeout(function() {
          $('#onload').modal("show");
          $("#mydiv").addClass("mydiv");
      }, 30000);
    }
</script>
<div class="modal show" id="onload" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true" data-bs-backdrop="static" data-bs-keyboard="false">
   <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="remove_bg()" data-bs-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/submit_upciming_batch_data'); ?>
               <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
               <h5 class="text-center">Complete Your Registration To View Details.</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" name="mobile" required="" placeholder="Enter Mobile No *">
                     </div>
                  </div>
                  <input type="hidden" name="course_id" value="<?php echo $course->id ?>">
                  <input type="hidden" name="batch_id" value="<?php echo $batch->batches_id ?>">
                  <div class="col-sm-12 <?php if($batch->batches_category != 3){echo 'd-none';}?>">
                     <div class="form-group">
                        <select type="text" class="form-control effect" name="branch" 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>
                  <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 endif;?>
<head><?php echo $course->checkout_head_code; ?></head>
<section class="sptb bg-white mb-5" style="padding-bottom: 0rem;">
   <div class="mt-lg-5"></div>
   <div class="mt-5">
      <div class="pt-5 pb-5">
         <div class="header-text1 mb-0">
            <div class="container">
               <div class="row">
                  <div class="col-xl-12 col-lg-12 col-md-12 mt-lg-5">
                     <div class="text-center">
                        <h1 class=" display-5 font-weight-semibold text-white"><?php echo $course->checkout_heading; ?></h1>
                        <p class=" lead text-white"><?php echo $course->checkout_sub_heading; ?></p>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
   <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="#F9F9F9"></path>
         </svg>
      </div>
   </div>
   </div>
</section>

<section style="margin-top:50px">
   <div class="container d-flex justify-content-center mt-5">
      <div class="row justify-content-center">
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="text-center">
               <div class="border" style="background-color: #000;padding: 10px;padding-bottom: 5px!important;border-radius: 10px;box-shadow: rgba(0, 0, 0, 0.3) 0px 19px 38px, rgba(0, 0, 0, 0.22) 0px 15px 12px;">
                  <?php 
                     $video_id_11 = explode("?v=", $course->checkout_iframe);
                     $video_id_11 = $video_id_11[1];
                     $image_11 = "http://img.youtube.com/vi/".$video_id_11."/maxresdefault.jpg";
                  ?>
                  <video id="video-player" class="video-player" poster="<?php echo $image_11; ?>">
                     <source src="<?php echo file_get_contents(base_url().'home/video?url='.$course->checkout_iframe);?>" type="video/mp4">
                       Your browser does not support the video tag.
                  </video>
               </div>
            </div>
         </div>
      </div>
   </div>
   <div class="container d-flex justify-content-center mt-5">
      <div class="row">
         <div class="col-sm-12 col-12">
            <p class="text-center" style="font-size:20px"><?php echo $course->checkout_description; ?></p>
         </div>
      </div>
   </div>
   <div class="container mt-5">
      <div class="row">
         <div class="col-xl-12 col-lg-12 col-md-12">
            <div class="card">
               <div class="card-header">
                  <h3 class="card-title"><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; <?php echo $course->title?></h3>
               </div>
               <div class="card-body">
                  <div class="row">
                     <div class="col-xl-7 col-lg-7 col-md-7 col-sm-7 col-12">
                        <div class="text-center">
                           <table>
                              <tr>
                                 <th class="text-center">LAST DATE</th>
                                 <th class="text-center">ADMISSION STATUS </th>
                                 <th class="text-center">COURSE MODE</th>
                              </tr>
                              <?php foreach (json_decode($batch->programme_date) as $key => $programme_date):?>
                                 <tr>
                                    <td><?php echo date('M, d Y', strtotime($programme_date)); ?></td>
                                    <td class="text-center"><?php 
                                          if($programme_date < date('Y-m-d'))
                                          {
                                             echo '<b style="color:red">CLOSED</b>';
                                          }
                                          elseif($programme_date < date('Y-m-d', strtotime('+5 days')))
                                          {
                                             echo '<b style="color:red">CLOSING SOON</b>';
                                          }
                                          else
                                          {
                                             echo '<b style="color:green">OPEN</b>';
                                          }
                                          ?></td>
                                    <td class="text-center"><b><?php echo json_decode($batch->programme_mode)[$key]; ?></b></td>
                                 </tr>
                              <?php endforeach; ?>
                           </table>
                        </div>
                     </div>
                     <div class="col-sm-5 mt-5 mt-md-0">
                        <h2>Pay Now  <i style="font-size:23px" class="fa fa-inr" aria-hidden="true"></i><b><?php echo $amount; ?></b> <small>(Advance)</small></h2>
                        <h4><?php if($rest != 0): ?>
                           <i style="display:block;font-size:15px">Rest of ₹<?php echo $rest; ?> Pay at Institute</i>
                           <?php endif;?></h4>

                        <div class="text-center mt-4">
                           <button class="btn btntn" onclick="open_model_product()" style="width:100%">
                              <span class="title">Pay Now</span>
                           </button>
                           <div class="pt-3" style="background-color: rgba(0, 0, 0, 0); margin: 0px auto; border-color: rgb(170, 170, 170);">
                              <span class="fa fa-lock" style="color: rgb(170, 170, 170);"></span>
                              Your order is safe and secure
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>
<script type="text/javascript">
   document.addEventListener("DOMContentLoaded", function() {
         new Moovie({
         selector: "#video-player",
      });
   });
   document.addEventListener("DOMContentLoaded", function() {
         new Moovie({
         selector: "#video-player-200",
      });
   });
</script>

<!-- <section class="sptb bg-white pb-5">
   <div class="container">
   	<div class="row">
   		<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
   			<?php //echo $course->checkout_description; ?>
   		</div>
   	</div>
   </div>
   </section> -->
<section >
   <div class="container mt-5">
      <div class="row justify-content-center">
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="card">
               <div class="card-header">
                  <h3 class="card-title"><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp;<?php echo $course->checkout_plan_title; ?></h3>
               </div>
               <div class="card-body">
                  <div class="row mt-5">
                     <?php foreach (json_decode($course->checkout_plans_title) as $key => $plans_title):?>
                     <div class="col-sm-4">
                        <div class="kartra_list__item--table">
                           <div class="kartra_icon--large">
                              <span class="kartra_icon__icon fa fa-check" style="color: #BE1502;"></span>
                           </div>
                           <div class="kartra_item_info">
                              <div class="kartra_item_info__headline">
                                 <p><strong><?php echo $plans_title; ?></strong></p>
                              </div>
                              <div>
                                 <p><?php echo json_decode($course->checkout_plans_description)[$key]; ?></p>
                              </div>
                           </div>
                        </div>
                     </div>
                     <?php endforeach; ?>
                  </div>
                  <div class="row justify-content-center">
                     <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="text-center">
                           <button class="btn btntn pay_btn_btn" onclick="open_model_product()">
                           <span class="title">I'm Action taker and very serious about my career in digital  Marketing</span>
                           <b style="display:block;color:#fff;font-size:25px">Yes! Book My slot</b>
                           </button>
                        </div>
                     </div>
                     <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 mt-5">
                        <div class="text-center">
                           <button class="btn btntn btn2" data-bs-toggle="modal" data-bs-target="#demo_model">
                           <span class="title">No,I want attend demo session before joing class</span>
                           <b style="display:block;color:#fff;font-size:25px">Book My Demo</b>
                           </button>
                           <div class="pt-3" style="background-color: rgba(0, 0, 0, 0); margin: 0px auto; border-color: rgb(170, 170, 170);">
                              <span class="fa fa-lock" style="color: rgb(170, 170, 170);"></span>
                              Your order is safe and secure
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>
<!-- <section >
   <div class="container d-flex justify-content-center mt-5">
      <div class="row justify-content-center">
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="text-center">
               <button class="btn btntn pay_btn_btn" onclick="open_model_product()">
               <span class="title">Pay Now  <i style="font-size:23px" class="fa fa-inr" aria-hidden="true"></i><?php echo $amount; ?> (Advance)</span>
               <?php if($rest != 0): ?>
               <i style="display:block;color:#fff;font-size:15px">Rest of ₹<?php echo $rest; ?> Pay at Institute</i>
               <?php endif;?>
               </button>
               <div class="pt-3" style="background-color: rgba(0, 0, 0, 0); margin: 0px auto; border-color: rgb(170, 170, 170);">
                  <span class="fa fa-lock" style="color: rgb(170, 170, 170);"></span>
                  Your order is safe and secure
               </div>
            </div>
         </div>
      </div>
   </div>
</section> -->

<?php if($all_lession): ?>
<script type="text/javascript">
   $(document).on('click', '.clickable', function(e){
       var $this = $(this);
      if(!$this.hasClass('panel-collapsed')) {
         $this.parents('.panel').find('.panel-body').slideUp();
         $this.addClass('panel-collapsed');
         $this.find('i').removeClass('glyphicon-chevron-up').addClass('glyphicon-chevron-down');
      } else {
         $this.parents('.panel').find('.panel-body').slideDown();
         $this.removeClass('panel-collapsed');
         $this.find('i').removeClass('glyphicon-chevron-down').addClass('glyphicon-chevron-up');
      }
   })
   </script>
<style type="text/css">
.clickable{
    cursor: pointer;   
}
.card-header .card-tools {
    float: right;
    margin-right: -0.625rem;
}
.btn-success:hover
{
   background-color: #102349;
    border-color: #102349;
}
.btn-success
{
   border-color: #c83828;
}
</style>
<section >
   <div class="container  justify-content-center mt-5">
      <div class="row ">
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="card " id="Curriculum">
               <div class="card-header">
                  <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Curriculum</h3>
                     <?php if($course->curriculum_pdf): ?>
                        <a href="javascript:void(0)" onclick="open_model_10()" style="margin-left:20px"  class="btn btn-success btn-sm pull-right pl-5 ml-5"><i class="fa fa-download"></i></a>
                     <?php endif;?>
               </div>

               <div class="card-body">
                  <?php
                  $lession_d = 0;
                  foreach ($all_lession as $key => $lession) {
                     $lession_d += count(json_decode($lession->content));
                  }
                  $a = 1;
                  foreach ($all_lession as $key => $lession) : ?>
                     <div class="mb-4 panel le--sss">
                        <h4 class="clickable card-title mb-1">
                           <div class="row">
                              <div class="col-sm-6">
                                 Module <?php echo $a; ?>. <?php echo $lession->l_title; ?> 
                              </div>
                              <?php 
                              $lesst = 0;
                              for ($g = 0; $g < count(json_decode($lession->content)); $g++) :
                                 $lessio_co = json_decode($lession->content)[$g]; 
                                 $myArray = explode(',', $lessio_co);
                                 foreach ($myArray as $keyy => $value):
                                    $lesst += count($value);
                                 endforeach; 
                              endfor; ?>
                              <div class="col-sm-5">
                                 <?php $ass_pdf = $this->course_model->get_ass_pdf_by_c_id_and_lession_id($lession->course, $lession->l_id); ?>
                                    <?php $mini_pdf = $this->course_model->get_mini_pdf_by_c_id_and_lession_id($lession->course, $lession->l_id); ?>
                                 <span style="font-size:13px"><i class="fa fa-paperclip"></i> <?php echo count($ass_pdf); ?> Assignment | <i class="fa fa-file"></i> <?php echo count($mini_pdf); ?> Practical | <i class="fa fa-book"></i> <?php echo $lesst; ?> Lession</span> 
                              </div>
                              <div class="col-sm-1">
                                 <span class="pull-right"><i class="glyphicon glyphicon-chevron-down"></i></span>
                              </div>
                           </div>
                        </h4>
                        <div class="panel-body pt-1" style="display: none;">
                           <p class="mb-0"><?php echo $lession->l_description; ?></p>
                           <?php $r=1; for ($c = 0; $c < count(json_decode($lession->content)); $c++) :
                              $lessio_co = json_decode($lession->content)[$c]; 
                              $myArray = explode(',', $lessio_co);
                              ?>
                              
                              <?php 
                                 $rty = json_decode($lession->section)[$c]; 
                                 if($rty)
                                 {
                                    echo '<p class="pt-3 pb-0 mb-1"><b>Lession '.$r. ' - '. $rty.'</b></p>';
                                 }
                                  ;?>
                              <?php
                              foreach ($myArray as $keyy => $value):?>
                                 <p class="mb-0" style="padding-left: 30px;"><i class="fa fa-check"></i> <?php echo $value; ?> </p>
                           <?php endforeach; 
                           $r++;
                           endfor; ?>
                        </div>
                     </div>
                  <?php $a++;
                  endforeach; ?>
                  <div class="row justify-content-center">
                     <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="text-center">
                           <button class="btn btntn pay_btn_btn" onclick="open_model_product()">
                           <span class="title">I'm Action taker and very serious about my career in digital  Marketing</span>
                           <b style="display:block;color:#fff;font-size:25px">Yes! Book My slot</b>
                           </button>
                        </div>
                     </div>
                     <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 mt-5">
                        <div class="text-center">
                           <button class="btn btntn btn2" data-bs-toggle="modal" data-bs-target="#demo_model">
                           <span class="title">No,I want attend demo session before joing class</span>
                           <b style="display:block;color:#fff;font-size:25px">Book My Demo</b>
                           </button>
                           <div class="pt-3" style="background-color: rgba(0, 0, 0, 0); margin: 0px auto; border-color: rgb(170, 170, 170);">
                              <span class="fa fa-lock" style="color: rgb(170, 170, 170);"></span>
                              Your order is safe and secure
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
               
            </div>
         </div>
      </div>
   </div>
</section>
<?php endif;?>
<section >
   <div class="container  justify-content-center mt-5">
      <div class="row ">
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="card " id="Curriculum">
               <div class="card-header">
                  <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp;Review Videos</h3>
               </div>
               <div class="card-body">
                  <div class="row mt-5">
                     <?php $p = 1; foreach (json_decode($course->review_video) as $review_video):?>
                        <div class="col-sm-4">
                           <div class="border containers">
                              <?php 
                                 $video_id_1 = explode("?v=", $review_video);
                                 $video_id_1 = $video_id_1[1];
                                 $image_1 = "http://img.youtube.com/vi/".$video_id_1."/maxresdefault.jpg";
                              ?>
                              <video id="video-player-<?php echo $p; ?>" class="video-player" poster="<?php echo $image_1; ?>">
                                    <source src="<?php echo file_get_contents(base_url().'home/video?url='.$review_video);?>" type="video/mp4">
                                   Your browser does not support the video tag.
                                 </video>
                           </div>
                        </div>
                        <script type="text/javascript">
                           document.addEventListener("DOMContentLoaded", function() {
                                 new Moovie({
                                 selector: "#video-player-<?php echo $p; ?>",
                              });
                           });
                        </script>
                     <?php $p++; endforeach; ?>
                  </div>
                  <div class="row justify-content-center mt-4">
                     <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="text-center">
                           <button class="btn btntn pay_btn_btn" onclick="open_model_product()">
                           <span class="title">I'm Action taker and very serious about my career in digital  Marketing</span>
                           <b style="display:block;color:#fff;font-size:25px">Yes! Book My slot</b>
                           </button>
                        </div>
                     </div>
                     <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 mt-5">
                        <div class="text-center">
                           <button class="btn btntn btn2" data-bs-toggle="modal" data-bs-target="#demo_model">
                           <span class="title">No,I want attend demo session before joing class</span>
                           <b style="display:block;color:#fff;font-size:25px">Book My Demo</b>
                           </button>
                           <div class="pt-3" style="background-color: rgba(0, 0, 0, 0); margin: 0px auto; border-color: rgb(170, 170, 170);">
                              <span class="fa fa-lock" style="color: rgb(170, 170, 170);"></span>
                              Your order is safe and secure
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>

<section >
   <div class="container  justify-content-center mt-5">
      <div class="row ">
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="card " id="Curriculum">
               <div class="card-header">
                  <h3 class="card-title "><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp;Reviews
                  </h3>
               </div>
               <?php
                  $total_rate = 0;
                  $result = $this->db->select('sum(rate) as rates')
                      ->from('course_review')
                      ->where('course_id', $course->rand_id)
                      ->where('status', 1)
                      ->get()
                      ->row();
                  $rater = $this->db->select('rate')
                      ->from('course_review')
                      ->where('course_id', $course->rand_id)
                      ->where('status', 1)
                      ->get()
                      ->num_rows();
                  if ($result->rates != null) {
                      $total_rate = $result->rates / $rater;
                  }
                  $this->db->where('course_id', $course->rand_id);
                  $this->db->where('rate', 5);
                  $this->db->where('status', 1);
                  $rate5 = $this->db->get('course_review')->num_rows();
                  $this->db->where('course_id', $course->rand_id);
                  $this->db->where('rate', 4);
                  $this->db->where('status', 1);
                  $rate4 = $this->db->get('course_review')->num_rows();
                  $this->db->where('course_id', $course->rand_id);
                  $this->db->where('rate', 3);
                  $this->db->where('status', 1);
                  $rate3 = $this->db->get('course_review')->num_rows();
                  $this->db->where('course_id', $course->rand_id);
                  $this->db->where('rate', 2);
                  $this->db->where('status', 1);
                  $rate2 = $this->db->get('course_review')->num_rows();
                  $this->db->where('course_id', $course->rand_id);
                  $this->db->where('rate', 1);
                  $this->db->where('status', 1);
                  $rate1 = $this->db->get('course_review')->num_rows();
                  // Example data
                        $star1 = $rate1;
                        $star2 = $rate2;
                        $star3 = $rate3;
                        $star4 = $rate4;
                        $star5 = $rate5;
                  
                        $tot_starss = $star1 + $star2 + $star3 + $star4 + $star5;
                        if($tot_starss)
                        {
                           $tot_stars = $tot_starss;
                        }
                        else
                        {
                           $tot_stars = 1;
                        }
                        for ($i=1;$i<=5;++$i) {
                            $var = "star$i";
                            $count = $$var;
                            $percent = $count * 100 / $tot_stars;
                            $data[$i] = array('ss' => $percent );
                        }
                  ?>
               <div class="card-body">
                  <div class="row">
                     <div class="col-xl-4 text-center my-auto  border-end">
                        <div class="ratings-view">
                           <h1 class="text-view mb-0 font-weight-semibold fs-60"> <?php
                              if ($total_rate) {
                                  echo number_format("$total_rate", 1, ".", ".");
                              } else {
                                  echo "4.5";
                              }
                              ?></h1>
                           <p class="mb-0 font-weight-bold">Out Of 5.0</p>
                           <p class="text-warning mb-0">
                              <?php
                                 $result1 = $this->db->select('sum(rate) as rates')
                                     ->from('course_review')
                                     ->where('course_id', $course->rand_id)
                                     ->where('status', 1)
                                     ->get()
                                     ->row();
                                 
                                 $rater1 = $this->db->select('rate')
                                     ->from('course_review')
                                     ->where('course_id', $course->rand_id)
                                     ->where('status', 1)
                                     ->get()
                                     ->num_rows();
                                 if ($result1->rates != null) {
                                     $total_rate1 = $result1->rates / $rater1;
                                     if (gettype($total_rate1) == 'integer') {
                                         for ($t1 = 1; $t1 <= $total_rate1; $t1++) {
                                             echo "<i class=\"fa fa-star\"></i>";
                                         }
                                         for ($tt1 = $total_rate1; $tt1 < 5; $tt1++) {
                                             echo "<i class=\"fa fa-star-o\"></i>";
                                         }
                                     } elseif (gettype($total_rate1) == 'double') {
                                         $pieces1 = explode(".", $total_rate1);
                                         for ($q1 = 1; $q1 <= $pieces1[0]; $q1++) {
                                             echo "<i class=\"fa fa-star\"></i>";
                                             if ($pieces1[0] == $q1) {
                                                 echo "<i class=\"fa fa-star-half-o\"></i>";
                                                 for ($qq1 = $pieces1[0]; $qq1 < 4; $qq1++) {
                                                     echo "<i class=\"fa fa-star-o\"></i>";
                                                 }
                                             }
                                         }
                                 
                                     } else {
                                         for ($w1 = 0; $w1 <= 4; $w1++) {
                                             echo "<i class=\"fa fa-star-o\"></i>";
                                         }
                                     }
                                 } else {
                                     for ($o1 = 0; $o1 <= 4; $o1++) {
                                         echo "<i class=\"fa fa-star-o\"></i>";
                                     }
                                 }
                                 ?>
                           </p>
                        </div>
                     </div>
                     <div class="col-xl-8 my-auto">
                        <div class="ps-0 ps-md-5">
                           <div class="row">
                              <div class="col-2">
                                 <span class="font-weight-semibold">5stars</span>
                              </div>
                              <div class="col-8">
                                 <div class="progress mb-2 mt-2 h-2">
                                    <div class="progress-bar bg-primary" style="width:<?php //echo round($data[5]['ss']) ?>80%"></div>
                                 </div>
                              </div>
                              <div class="col-2">
                                 <span>(<?php //echo round($data[5]['ss']) ?>80%)</span>
                              </div>
                           </div>
                           <div class="row">
                              <div class="col-2">
                                 <span class="font-weight-semibold">4stars</span>
                              </div>
                              <div class="col-8">
                                 <div class="progress mb-2 mt-2 h-2">
                                    <div class="progress-bar bg-primary" style="width:<?php //echo round($data[4]['ss']) ?>70%"></div>
                                 </div>
                              </div>
                              <div class="col-2">
                                 <span>(<?php //echo round($data[4]['ss']) ?>70%)</span>
                              </div>
                           </div>
                           <div class="row">
                              <div class="col-2">
                                 <span class="font-weight-semibold">3stars</span>
                              </div>
                              <div class="col-8">
                                 <div class="progress mb-2 mt-2 h-2">
                                    <div class="progress-bar bg-primary" style="width:<?php //echo round($data[3]['ss']) ?>0%"></div>
                                 </div>
                              </div>
                              <div class="col-2">
                                 <span>(<?php //echo round($data[3]['ss']) ?>0%)</span>
                              </div>
                           </div>
                           <div class="row">
                              <div class="col-2">
                                 <span class="font-weight-semibold">2stars</span>
                              </div>
                              <div class="col-8">
                                 <div class="progress mb-2 mt-2 h-2">
                                    <div class="progress-bar bg-primary" style="width:<?php //echo round($data[2]['ss']) ?>0%"></div>
                                 </div>
                              </div>
                              <div class="col-2">
                                 <span>(<?php //echo round($data[2]['ss']) ?>0%)</span>
                              </div>
                           </div>
                           <div class="row">
                              <div class="col-2">
                                 <span class="font-weight-semibold">1stars</span>
                              </div>
                              <div class="col-8">
                                 <div class="progress mb-2 mt-2 h-2">
                                    <div class="progress-bar bg-primary" style="width:<?php //echo round($data[1]['ss']) ?>0%"></div>
                                 </div>
                              </div>
                              <div class="col-2">
                                 <span>(<?php //echo round($data[1]['ss']) ?>0%)</span>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
                  <div class="row justify-content-center mt-5">
                     <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
                        <div class="text-center">
                           <button class="btn btntn pay_btn_btn" onclick="open_model_product()">
                           <span class="title">I'm Action taker and very serious about my career in digital  Marketing</span>
                           <b style="display:block;color:#fff;font-size:25px">Yes! Book My slot</b>
                           </button>
                        </div>
                     </div>
                     <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 mt-5">
                        <div class="text-center">
                           <button class="btn btntn btn2" data-bs-toggle="modal" data-bs-target="#demo_model">
                           <span class="title">No,I want attend demo session before joing class</span>
                           <b style="display:block;color:#fff;font-size:25px">Book My Demo</b>
                           </button>
                           <div class="pt-3" style="background-color: rgba(0, 0, 0, 0); margin: 0px auto; border-color: rgb(170, 170, 170);">
                              <span class="fa fa-lock" style="color: rgb(170, 170, 170);"></span>
                              Your order is safe and secure
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>

<?php $all_faq = $this->course_model->get_all_faq_by_course($course->id);
 if($all_faq): ?>
<section >
   <div class="container  justify-content-center mt-5">
      <div class="row ">
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="">
               <h1 class="text-center pb-5">Curriculum</h1>
               <div class="row mt-5">
                  <div class="col-sm-12">
                      <?php
                        $faq_d = 0;
                        foreach ($all_faq as $key => $faq) {
                           $faq_d += count(json_decode($faq->f_content));
                        }
                        $a = 1;
                        foreach ($all_faq as $key => $faq) : ?>
                     <div class="mb-4">
                        <h5 class=""><?php echo $a; ?>. <?php echo $faq->f_title; ?></h5>
                        <?php for ($c = 0; $c < count(json_decode($faq->f_content)); $c++) :
                           $faq_co = json_decode($faq->f_content)[$c]; ?>
                        <p class="mb-0"><?php echo $faq_co; ?> </p>
                        <?php endfor; ?>
                     </div>
                     <?php $a++;
                        endforeach; ?>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
   <div class="container d-flex justify-content-center mt-5">
      <div class="row justify-content-center">
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="text-center">
               <button class="btn btntn pay_btn_btn" onclick="open_model_product()">
               <span class="title">I'm Action taker and very serious about my career in digital  Marketing</span>
               <b style="display:block;color:#fff;font-size:25px">Yes! Book My slot</b>
               </button>
            </div>
         </div>
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 mt-5">
            <div class="text-center">
               <button class="btn btntn btn2" data-bs-toggle="modal" data-bs-target="#demo_model">
               <span class="title">No,I want attend demo session before joing class</span>
               <b style="display:block;color:#fff;font-size:25px">Book My Demo</b>
               </button>
               <div class="pt-3" style="background-color: rgba(0, 0, 0, 0); margin: 0px auto; border-color: rgb(170, 170, 170);">
                  <span class="fa fa-lock" style="color: rgb(170, 170, 170);"></span>
                  Your order is safe and secure
               </div>
            </div>
         </div>
      </div>
   </div>
</section>
<?php endif;?>

<?php //if($all_bonus): ?>
<!--    <section >
      <div class="container d-flex justify-content-center mt-5 pb-5">
         <div class="row justify-content-center">
            <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
               <div class="">
                  <h1 class="text-center pb-5">Bonus Section</h1>
                  <div class="row mt-5">
                     <?php foreach ($all_bonus as $key => $bonus):?>
                     <div class="col-sm-6">
                        <div class="kartra_list__item--table">
                           <div class="kartra_icon--large" style="width:130px">
                              <img loading="lazy" src="<?php echo base_url() ?><?php echo $bonus->bonus_image ?>" alt="" >
                           </div>
                           <div class="kartra_item_info ps-5">
                              <div>
                                 <p><?php echo $bonus->bonus_description; ?></p>
                              </div>
                           </div>
                        </div>
                     </div>
                     <?php endforeach; ?>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </section>
   <section >
      <div class="container d-flex justify-content-center mt-5">
         <div class="row justify-content-center">
            <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
               <div class="text-center">
                  <button class="btn btntn pay_btn_btn" onclick="open_model_product()">
                  <span class="title">Pay Now  <i style="font-size:23px" class="fa fa-inr" aria-hidden="true"></i><?php echo $amount; ?> (Advance)</span>
                  <?php if($rest != 0): ?>
                  <i style="display:block;color:#fff;font-size:15px">Rest of ₹<?php echo $rest; ?> Pay at Institute</i>
                  <?php endif;?>
                  </button>
                  <div class="pt-3" style="background-color: rgba(0, 0, 0, 0); margin: 0px auto; border-color: rgb(170, 170, 170);">
                     <span class="fa fa-lock" style="color: rgb(170, 170, 170);"></span>
                     Your order is safe and secure
                  </div>
               </div>
            </div>
         </div>
      </div>
   </section> -->
<?php //endif;?>
<section class="mb-5">
   <div class="container  mt-5">
      <div class="row justify-content-center">
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="">
               <h3 class="text-center"><?php echo $course->checkout_money_sub_heading; ?></h3>
               <h1 class="text-center pb-5"><b><?php echo $course->checkout_money_heading; ?></b></h1>
               <div class="row ">
                  <div class="col-sm-5 d-xs-flex justify-content-sm-center image-center">
                     <img loading="lazy" class="float-lg-end" src="<?php echo base_url() ?><?php echo $course->checkout_money_image ?>" width="200px">
                  </div>
                  <div class="col-sm-5">
                     <p style="font-size:20px"><?php echo $course->checkout_money_description; ?></p>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
   <div class="container d-flex justify-content-center mt-5">
      <div class="row justify-content-center">
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12">
            <div class="text-center">
               <button class="btn btntn pay_btn_btn" onclick="open_model_product()">
               <span class="title">I'm Action taker and very serious about my career in digital  Marketing</span>
               <b style="display:block;color:#fff;font-size:25px">Yes! Book My slot</b>
               </button>
            </div>
         </div>
         <div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 mt-5">
            <div class="text-center">
               <button class="btn btntn btn2" data-bs-toggle="modal" data-bs-target="#demo_model">
               <span class="title">No,I want attend demo session before joing class</span>
               <b style="display:block;color:#fff;font-size:25px">Book My Demo</b>
               </button>
               <div class="pt-3" style="background-color: rgba(0, 0, 0, 0); margin: 0px auto; border-color: rgb(170, 170, 170);">
                  <span class="fa fa-lock" style="color: rgb(170, 170, 170);"></span>
                  Your order is safe and secure
               </div>
            </div>
         </div>
      </div>
   </div>
</section>

<div class="modal show" id="open_model" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
   <div class="modal-dialog" role="document">
      <div class="modal-content">
         <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:0px;padding-top: 0!important;padding-bottom:0!important">
               <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
               <h5 class="text-center">You are 50% Completed</h5>
               <div class="row" style="padding-top:20px">
                  <div class="col-md-12">
                     <div class="progress" style="margin-left:15px; margin-right:15px">
                        <div class="progress-bar progress-bar-striped" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
                     </div>
                  </div>
               </div>
               <div class="row" style="padding-top:20px">
                  <div class="col-md-12 mx-0">
                     <?php echo form_open(base_url() . 'home/request_for_course', ['id' => 'msform']); ?>
                     <!-- progressbar -->
                     <ul id="progressbar">
                        <li class="active" id="personal"><strong>Personal</strong></li>
                        <li id="account"><strong>Address</strong></li>
                        <li id="extra"><strong>Extra Details</strong></li>
                        <li id="payment"><strong>Payment</strong></li>
                     </ul>
                     <!-- fieldsets -->
                     <fieldset>
                        <div class="form-card">
                           <h2 class="fs-title">Personal Information</h2>
                           <input type="text" id="f_name" required name="f_name" placeholder="First Name *" class="mt-5" />
                           <input type="text" id="l_name" required name="l_name" placeholder="Last Name *"/>
                           <input type="email" id="email" required name="email" placeholder="Email Id *"/>
                           <input type="text" id="mobile" required name="mobile" placeholder="Contact No. *"/>
                        </div>
                        <input type="button" onclick="data_saved()" name="next" class="btn next action-button" value="Next Step"/>
                     </fieldset>
                     <fieldset>
                        <div class="form-card">
                           <h2 class="fs-title">Billing Address</h2>
                           <input type="number" required name="pin_code" id="billing_pin_code" placeholder="Pin Code *" class="mt-5" onchange="check_address(this)" />
                           <input name="address" placeholder="Enter Address *" required >
                           <select name="area" required class="list-dt" id="area">
                              <option value="">Select A Area</option>
                           </select>
                           <input name="city" placeholder="Enter City *" required readonly="" class="mt-5" id="city">
                           <input id="state" name="state" placeholder="Enter State *" required readonly="">
                        </div>
                        <input type="button" name="previous" class="btn btn-secondary  previous action-button-previous" value="Previous"/>
                        <input type="button" name="next" class="btn next action-button" value="Next Step"/>
                     </fieldset>
                     <fieldset>
                        <div class="form-card">
                           <h2 class="fs-title">Extra Details</h2>
                           <select type="text" class="list-dt" name="batch_slot" required="" >
                              <option value="">Select Batch Slot * </option>
                              <option value="">Eraly Morning</option>
                              <option value="">Morning</option>
                              <option value="">Afternoon</option>
                              <option value="">Evening</option>
                           </select>
                           <input type="text" class="mt-5" name="batch_time" required="" placeholder="Enter Preferd Batch time *">
                           <select type="text" class="list-dt" name="batch_slot" required="" >
                              <option value="">Do you have own laptop * </option>
                              <option value="1">Yes</option>
                              <option value="2">No</option>
                           </select>
                           <select type="text" class="mt-5 list-dt" name="branch" 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>
                        <input type="button" name="previous" class="btn btn-secondary  previous action-button-previous" value="Previous"/>
                        <input type="button" name="next" class="btn next action-button" value="Next Step"/>
                     </fieldset>
                     <fieldset>
                        <div class="form-card">
                           <h2 class="fs-title">Order summery</h2>
                           <div class="row">
                              <div class="col-12">
                                 <table>
                                    <tr>
                                       <td>Course Name</td>
                                       <th><?php echo $course->title; ?></th>
                                    </tr>
                                    <tr>
                                       <td>Price</td>
                                       <th>₹ <?php echo $amt; ?></th>
                                    </tr>
                                    <tr>
                                       <td>Adv. Payment</td>
                                       <th>₹ <?php echo $amount ?></th>
                                    </tr>
                                    <tr>
                                       <td>Due Payment</td>
                                       <th>₹ <?php echo $amt - $amount ?></th>
                                    </tr>
                                 </table>
                              </div>
                           </div>
                           <label class="container-check mt-5">Accept <a href="<?php echo base_url() ?>/p/terms-conditions">Terms & Conditions</a>
							  <input type="checkbox" checked="checked" required>
							  <span class="checkmark"></span>
							</label>
                           <input name="course_id" type="hidden" required="" value="<?php echo $course->id ?>">
                           <input name="price" type="hidden" id="price" >
                           <!-- <input name="prd_inq_id" type="hidden" id="data_insert_id" > -->
                        </div>
                        <input type="button" name="previous" class="btn btn-secondary previous action-button-previous" value="Previous"/>
                        <input type="submit" name="make_payment" class="btn action-button" value="Confirm Order"/>
                     </fieldset>
                     <?php echo form_close(); ?>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</div>
<style type="text/css">
	.container-check {
  display: block;
  position: relative;
  padding-left: 25px;
  margin-bottom: 12px;
  cursor: pointer;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Hide the browser's default checkbox */
.container-check input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

/* Create a custom checkbox */
.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
}

/* On mouse-over, add a grey background color */
.container-check:hover input ~ .checkmark {
  background-color: #ccc;
}

/* When the checkbox is checked, add a blue background */
.container-check input:checked ~ .checkmark {
  background-color: #2196F3;
}

/* Create the checkmark/indicator (hidden when not checked) */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

/* Show the checkmark when checked */
.container-check input:checked ~ .checkmark:after {
  display: block;
}

/* Style the checkmark/indicator */
.container-check .checkmark:after {
  left: 7px;
  top: 5px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}
	.next:hover
	{
		color: #fff!important;
	}
   table, td, th {  
   border: 1px solid #ddd;
   text-align: left;
   }
   table {
   border-collapse: collapse;
   width: 100%;
   }
   th, td {
   padding: 15px;
   }	
   #expected_domain
   {
   display: none;
   }
   #msform {
   text-align: center;
   position: relative;
   margin-top: 20px;
   }
   #msform fieldset .form-card {
   background: white;
   border: 0 none;
   border-radius: 0px;
   box-shadow: none;
   padding: 5px;
   box-sizing: border-box;
   width: 94%;
   margin: 0px 3% 0px 3%;
   /*stacking fieldsets above each other*/
   position: relative;
   }
   #msform fieldset {
   background: white;
   border: 0 none;
   border-radius: 0.5rem;
   box-sizing: border-box;
   width: 100%;
   margin: 0;
   padding-bottom: 0px;
   /*stacking fieldsets above each other*/
   position: relative;
   }
   /*Hide all except first fieldset*/
   #msform fieldset:not(:first-of-type) {
   display: none;
   }
   #msform fieldset .form-card {
   text-align: left;
   color: #9E9E9E;
   }
   #msform input, #msform textarea {
   padding: 0px 8px 4px 8px;
   border: none;
   border-bottom: 1px solid #ccc;
   border-radius: 0px;
   margin-bottom: 25px;
   margin-top: 2px;
   width: 100%;
   box-sizing: border-box;
   font-family: montserrat;
   color: #2C3E50;
   font-size: 16px;
   letter-spacing: 1px;
   }
   #msform input:focus, #msform textarea:focus {
   -moz-box-shadow: none !important;
   -webkit-box-shadow: none !important;
   box-shadow: none !important;
   border: none;
   font-weight: bold;
  
   outline-width: 0;
   }
   /*Blue Buttons*/
   #msform .action-button {
   width: 50%;
   /* background: skyblue; */
   font-weight: bold;
   color: white;
   border: 0 none;
   border-radius: 0px;
   cursor: pointer;
   padding: 10px 5px;
   margin: 10px 5px;
   }
   /* #msform .action-button:hover, #msform .action-button:focus {
   box-shadow: 0 0 0 2px white, 0 0 0 3px skyblue;
   } */
   /*Previous Buttons*/
   #msform .action-button-previous {
   width: 100px;
   /* background: #616161; */
   font-weight: bold;
   color: white;
   border: 0 none;
   border-radius: 0px;
   cursor: pointer;
   padding: 10px 5px;
   margin: 10px 5px;
   }
   #msform .action-button-previous:hover, #msform .action-button-previous:focus {
   box-shadow: 0 0 0 2px white, 0 0 0 3px #616161;
   }
   /*Dropdown List Exp Date*/
   select.list-dt {
   border: none;
   outline: 0;
   border-bottom: 1px solid #ccc;
   padding: 2px 5px 3px 5px;
   margin: 2px;
   width: 100%;
   }
   select.list-dt:focus {
   /* border-bottom: 2px solid skyblue; */
   }
   /*The background card*/
   .card {
   z-index: 0;
   border: none;
   border-radius: 0.5rem;
   position: relative;
   }
   /*FieldSet headings*/
   .fs-title {
   font-size: 25px;
   color: #2C3E50;
   margin-bottom: 10px;
   font-weight: bold;
   text-align: left;
   }
   /*progressbar*/
   #progressbar {
   margin-bottom: 30px;
   overflow: hidden;
   color: lightgrey;
   }
   #progressbar .active {
   color: #000000;
   }
   #progressbar li {
   list-style-type: none;
   font-size: 12px;
   width: 25%;
   float: left;
   position: relative;
   display:inline-block;
   }
   /*Icons in the ProgressBar*/
   #progressbar #account:before {
   font-family: FontAwesome;
   content: "\f2bb";
   }
   #progressbar #extra:before {
   font-family: FontAwesome;
   content: "\f02d";
   }
   #progressbar #personal:before {
   font-family: FontAwesome;
   content: "\f007";
   }
   #progressbar #confirm:before {
   font-family: FontAwesome;
   content: "\f0b1";
   }
   #progressbar #payment:before {
   font-family: FontAwesome;
   content: "\f09d";
   }
   /*ProgressBar before any progress*/
   #progressbar li:before {
   width: 50px;
   height: 50px;
   line-height: 45px;
   display: block;
   font-size: 18px;
   color: #ffffff;
   background: lightgray;
   border-radius: 50%;
   margin: 0 auto 10px auto;
   padding: 2px;
   }
   /*ProgressBar connectors*/
   #progressbar li:after {
   content: '';
   width: 100%;
   height: 2px;
   background: lightgray;
   position: absolute;
   left: 0;
   top: 25px;
   z-index: -1;
   }
   /*Color number of the step and the connector before it*/
   #progressbar li.active:before, #progressbar li.active:after {
   background: <?php echo $visual_setting->color_1; ?>!important;
   }
   .kartra_item_info__headline {
   font-size: 1rem;
   font-weight: 400;
   margin-top: 0px;
   margin-bottom: 6px;
   line-height: 1.2em;
   }
   .kartra_item_info {
   display: table-cell;
   vertical-align: top;
   }
   .kartra_icon--large {
   width: 60px;
   height: 60px;
   font-size: 36px;
   top: 4px;
   }
   .kartra_list__item--table {
   display: table;
   }
   .btntn
   {
   padding-left: 50px;
   padding-right: 50px;
   }
   .btn .title
   {
   /* font-size: 25px; */
   font-size: 18px;
   color: #fff;
   font-weight: 700;
   }
   .btn .sub
   {
   display: block;
   font-size: 20px;
   color: #fff;
   }
   iframe {
   width: 640px;
   height: 360px;
   }
   .border
   {
   border: 40px solid #000;
   }
   @media only screen and (max-device-width: 480px) {
   iframe {
   width:100%;
   height: 100%;
   }
   }
   .sst, #back-to-top, #horizontal-navtoggle, .newsletter-new, .footer-main, .horizontalMenu
   {
   display: none!important;
   }
   .horizontal-main
   {
   background-color: #fff;
   padding: 10px 0;
   }
   @media only screen and (max-width: 991px)
   {
      .horizontal-header .smllogo {
      display: inline-block;
      margin-top: 1px;
   }
   .horizontal-header .smllogo img {
   width: 200px;
   }
   .horizontal-main 
   {
   display: none;
   }
   .horizontal-header .smllogo {
   display: inline-block;
   margin-top: 9px;
   margin-left: 0!important;
   }
   .btntn
   {
   padding-left: 15px;
   padding-right: 15px;
   width: 100%;
   white-space: inherit;
   }
   .btn .title
   {
   font-size: 15px;
   }
   .image-center
   {
   text-align: center;
   }
   }
   .desktoplogo {
   padding: 0.75rem 0;
   margin: auto!important;
   /* float: center; */
   width: 200px;
   }
   .btn2
   {
      background-color: #102349!important;
   }
   .le--sss
   {
       display: block;
       width: 100%;
       cursor: pointer;
       text-align: left;
       text-decoration: none;
       font-size: 15px;
       font-weight: 400;
       padding: 10px 10px 10px 40px;
       position: relative;
       margin-bottom: 5px;
       border-radius: 6px;
       background-color: #f9f9f9;
       border: solid 1px #E8E9EB;
       -webkit-transition: all 0.5s ease;
       -ms-transition: all 0.5s ease;
       -o-transition: all 0.5s ease;
       -moz-transition: all 0.5s ease;
       transition: all 0.5s ease;
   }
   @media only screen and (max-width: 768px)
   {
     
   }
   .pay_btn_btn
   {
      animation-duration: 2s;
        animation-iteration-count: infinite;
      animation-name: bounce-1;
      animation-timing-function: linear;
   }
  @keyframes bounce-1 {
        0%   { transform: translateY(0); }
        50%  { transform: translateY(-10px); }
        100% { transform: translateY(0); }
    }

</style>
<script type="text/javascript">
   function check_address(e) {
       let pin_code = e.value;
       $.ajax({
         beforeSend: function() {
           $(".preloader-ajax").show();
           $(".preloader-ajax-bg").show();
         },
         type: "GET",
         dataType:"JSON",
         async: true,
         url: '<?php echo base_url(); ?>home/get_pin_code_details/'+pin_code,
         success: function (data) 
         {
             $('#area').html(data.area);
             $('#city').val(data.city);
             $('#state').val(data.state);
             $(".preloader-ajax").hide();
             $(".preloader-ajax-bg").hide();
         },
         error: function () {
           $(".preloader-ajax").hide();
           $(".preloader-ajax-bg").hide();
         }
       });
   }
   
    function domain_statuss(e) 
   {
       var data = e.value;
       if(data == 1)
       {
           $('#domain_name').show();
           $('#expected_domain').hide();
       }
       else
       {
           $('#domain_name').hide();
           $('#expected_domain').show();
       }
   }
   	function open_model_product() {
      	$('#price').val(<?php echo $amount; ?>)
      	$('#open_model').modal('show');
    }
    function data_saved() 
    {
    	var current_fs, next_fs, previous_fs; //fieldsets

    	var f_name 	= $('#f_name').val();
    	var l_name 	= $('#l_name').val();
    	var email 	= $('#email').val();
    	var mobile 	= $('#mobile').val();
    	var prd_id 	= "<?php echo $course->id; ?>";
    	if(f_name == '')
    	{
    		swal('error', "Please Enter First Name", 'error');
    		return false;
    	}
    	if(l_name == '')
    	{
    		swal('error', "Please Enter Last Name", 'error');
    		return false;
    	}
    	if(email == '')
    	{
    		swal('error', "Please Enter Email ID", 'error');
    		return false;
    	}
    	if(mobile == '')
    	{
    		swal('error', "Please Enter Mobile No", 'error');
    		return false;
    	}
      if(mobile.length != 10)
      {
         swal('error', "Please Enter Valid Mobile No", 'error');
         return false;
      }
    	$.ajax({
	        type: "POST",
	        data:{
	         	f_name:f_name, l_name:l_name, email:email, mobile:mobile, prd_id:prd_id
	        },
	        url: '<?php echo base_url(); ?>home/data_saved_for_first_pay',
	        success: function (data) 
	        {
	        	$('#data_insert_id').val(data);
	        },
       });
    }

   $(document).ready(function(){
       
   var current_fs, next_fs, previous_fs; //fieldsets
   var opacity;
   
   $(".next").click(function(){
       
       current_fs = $(this).parent();
       next_fs = $(this).parent().next();
       
       //Add Class Active
       $("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
       
       //show the next fieldset
       next_fs.show(); 
       //hide the current fieldset with style
       current_fs.animate({opacity: 0}, {
           step: function(now) {
               // for making fielset appear animation
               opacity = 1 - now;
   
               current_fs.css({
                   'display': 'none',
                   'position': 'relative'
               });
               next_fs.css({'opacity': opacity});
           }, 
           duration: 600
       });
   });
   
   $(".previous").click(function(){
       
       current_fs = $(this).parent();
       previous_fs = $(this).parent().prev();
       
       //Remove class active
       $("#progressbar li").eq($("fieldset").index(current_fs)).removeClass("active");
       
       //show the previous fieldset
       previous_fs.show();
   
       //hide the current fieldset with style
       current_fs.animate({opacity: 0}, {
           step: function(now) {
               // for making fielset appear animation
               opacity = 1 - now;
   
               current_fs.css({
                   'display': 'none',
                   'position': 'relative'
               });
               previous_fs.css({'opacity': opacity});
           }, 
           duration: 600
       });
   });
   
       
   });
</script>
<div class="modal show" id="demo_model" 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" data-bs-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/submit_upciming_batch_demo_class'); ?>
               <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
               <h5 class="text-center">Complete Your Registration To Attend Demo Class.</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" name="mobile" required="" placeholder="Enter Mobile No *">
                     </div>
                  </div>
                  <input type="hidden" name="course_id" value="<?php echo $course->id ?>">
                  <input type="hidden" name="batch_id" value="<?php echo $batch->batches_id ?>">
                  <div class="col-sm-12 <?php if($batch->batches_category != 3){echo 'd-none';}?>">
                     <div class="form-group">
                        <select type="text" class="form-control effect" name="branch" 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>
                  <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>
<div class="modal show" id="download_cur_pdf" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
   <div class="modal-dialog" role="document">
      <div class="modal-content">
         <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;">
               <form>
                  <h6 class="text-center" style="font-weight: 500;">CONGRATS, YOU'RE IN!</h6>
                  <h5 class="text-center" id="text_info70"></h5>
                  <div class="row" style="padding-top:20px">
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="text" class="form-control" id="f_name" required="" placeholder="Enter First Name *">
                        </div>
                     </div>
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="text" class="form-control" id="l_name" required="" placeholder="Enter Last Name *">
                        </div>
                     </div>
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="email" class="form-control" required="" id="email_new" placeholder="Enter Email ID *">
                        </div>
                     </div>
                     <input class="form-control" type="hidden" id="course" value="<?php echo $course->rand_id ?>">
                     <input class="form-control" id="class_1" type="hidden">
                     <div class="col-sm-6">
                        <div class="form-group">
                           <input type="tel" pattern="[0-9]{10}" class="form-control" id="mobile" required="" placeholder="Enter Mobile No *">
                        </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="button" onclick="form_submit_2()" class="block">Download Syllabus !</button>
                     </div>
                  </div>
            </div>
         </div>
         </form>
      </div>
   </div>
</div>

 <style>
.s-footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: #BE1502;
  color: white;
  text-align: center;
  z-index: 9;
}
.btn-pay_now
{
   width: 100%;
   color: #fff!important;
   line-height: 1;
}
.pay_only
{
   font-size: 20px;
   text-align: right;
}
.pay_price
{
   font-size: 12px;
   margin-bottom: 0;
   margin-top: 12px;
   text-align: right;
}
.btn-pay_now div
{
   font-size: 15px;
}
.advance
{
   font-size: 10px;
   background-color: #000;
   position: absolute;
   float: right;
   right: 10px;
   padding: 0;
   padding-left: 5px;
   padding-right: 5px;
   top: 28px;
}
</style>

<div class="s-footer p-1 p-2 pb-0 d-lg-none ">
   <div class="container">
      <div class="row">
         <div class="col-7">
            <div class="pay_only">Pay Now <i class="fa fa-inr" style="font-size: 17px;" aria-hidden="true"></i><b><?php echo $amount; ?></b></div>
            <?php if($rest != 0): ?>
               <div class="advance">Advance</div>
              <div class="pay_price"><small><i>Rest of ₹<?php echo $rest; ?> Pay at Institute</i></small></div>
            <?php endif; ?>
         </div>
         <div class="col-5">
            <button onclick="open_model_product()" class="text-center btn-pay_now mt-1 btn btntn btn2 p-3">
               <div class="pb-0 mb-0">Book</div>
               <div class="pt-0 mt-0">My Slot</div>
            </button>
         </div>
      </div>
   </div>
</div> 
