<style type="text/css">
   .btn {
      border-radius: 0 !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');
}
?>
<style type="text/css">
   .video-icon i {
      color: <?php echo $visual_setting->color_5; ?>;
   }

   .video-icon i:hover {
      background-color: <?php echo $visual_setting->color_5; ?>;
   }

   .course-details .wideget-user-tab.wideget-user-tab3 .tabs-menu1 ul li a {
      background-color: <?php echo $visual_setting->color_5; ?>;
   }

   .active li {
      color: <?php echo $visual_setting->color_4; ?> !important;

   }
</style>

<div>
   <div class="sptb-1 pt-5 pb-5 bg-custom-blue padding-top-xs-70">
      <div class="header-text1 mb-0">
         <div class="container">
            <div class="row">
               <div class="col-xl-8 col-lg-7 col-md-12 d-flex align-items-center">
                  <div>
                     <h1 class=" display-5 font-weight-semibold text-white"><?php echo $branch->slider_title ?></h1>
                     <div class="d-block d-md-flex align-items-center mb-5">
                        <a href="javascript:void(0)" class="text-warning"><i class="fe fe-bookmark  me-2"></i>Bookmark</a>
                        <span class=" ms-3 text-warning"><i class="fe fe-user "></i> 100 Enrolled </span>
                        <span class="ms-4">
                           <i class="fa fa-star text-warning"></i>
                           <i class="fa fa-star text-warning"></i>
                           <i class="fa fa-star text-warning"></i>
                           <i class="fa fa-star text-warning"></i>
                           <i class="fa fa-star text-warning"></i>
                           <span class="text-warning">(190)</span>
                        </span>
                        <span class="ms-3 text-warning"><i class="fe fe-bar-chart "></i> Advanced </span>
                     </div>
                     <p class=" lead text-white"> <?php echo $branch->short_description ?></p>
                     <div class="text-center-2">
                        <a href="javascript:void(0)" onclick="open_model(2)" class="btn-secondary btn btn-lg" style="border-radius: 0;background-color: <?php echo $visual_setting->color_5; ?>!important;border-color: <?php echo $visual_setting->color_5; ?>!important;color:#fff">Get Free Live Video<span class="text-white"><i class="fa fa-video-camera ms-1 text-white"></i></span></a>

                        <a onclick="open_model(3)" style="border-radius: 0;background-color: <?php echo $visual_setting->color_4; ?>!important;border-color:  <?php echo $visual_setting->color_4; ?>!important;;color: #fff!important;" href="javascript:void(0)" class="btn-secondary btn btn-lg padding">Free Demo Class <span class="text-white"><i style="color:#fff!important" class="fa fa-desktop ms-1 text-white"></i></span></a>
                     </div>
                  </div>
               </div>
               <div class="col-xl-4 col-lg-4 col-md-12">
                  <div class="card d-lg-block d-none">
                     <div class="card-body">
                        <?php if ($branch->video_link) : ?>
                           <div class="product-slider">
                              <ul class="list-unstyled video-list-thumbs">
                                 <?php
                                 $link = $branch->video_link;
                                 $video_id = explode("?v=", $link);
                                 $video_id = $video_id[1];
                                 $thumbnail = "http://img.youtube.com/vi/" . $video_id . "/maxresdefault.jpg";
                                 ?>
                                 <li class="mb-0">
                                    <a data-bs-toggle="modal" data-bs-target="#homeVideo" class="class-video p-0">
                                       <img loading="lazy" src="<?php echo $thumbnail; ?>" alt="<?php echo $branch->name ?>" class="img-responsive  border br-7">
                                       <span class="video-icon" href="javascript:void(0)"><i class="fe fe-play"></i></span>
                                    </a>
                                 </li>
                              </ul>
                           </div>
                           <!-- /Video Modal -->

                           <!-- /Video Modal -->
                        <?php endif; ?>
                        <div class="mt-4 text-center">

                           <div style="margin-top:10px;">
                              <h6 style="margin-bottom: -10px;">Have a Queries? Ask out Experts</h6>
                              <div style="display: inline-block;font-size: 55px;"><i class="fa fa-phone-square"></i></div>
                              <div style="display: inline-block;text-align: left;padding-left: 10px;">
                                 <p style="font-size: 22px;margin-bottom: 0;"><b>+91-<?php echo $app_setting->mobile ?></b></p>
                                 <span style="font-size: 12px;padding-left:8px">Available 24x7 for your Queries</span>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
      <!-- /header-text -->
   </div>
</div>
<div class="modal fade" id="homeVideo" tabindex="-1" role="dialog">
   <div class="modal-dialog" 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 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>", $branch->video_link); ?>
      </div>
   </div>
</div>

<!--Breadcrumb-->
<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>
<!--Section-->
<!--Section-->
<section class="sptb bg-white" style="padding-bottom: 2px;">
   <div class="container">
      <div class="row">
         <div class="col-xl-12 col-lg-12 col-md-12">
            <div class="card d-lg-none">
               <div class="card-body">
                  <?php if ($branch->video_link) : ?>
                     <div class="product-slider">
                        <ul class="list-unstyled video-list-thumbs">
                           <?php
                           $link = $branch->video_link;
                           $video_id = explode("?v=", $link);
                           $video_id = $video_id[1];
                           $thumbnail = "http://img.youtube.com/vi/" . $video_id . "/maxresdefault.jpg";
                           ?>
                           <li class="mb-0">
                              <a data-bs-toggle="modal" data-bs-target="#homeVideo-1" class="class-video p-0">
                                 <img loading="lazy" src="<?php echo $thumbnail; ?>" class="img-responsive  border br-7">
                                 <span class="video-icon" href="javascript:void(0)"><i class="fe fe-play"></i></span>
                              </a>
                           </li>
                        </ul>
                     </div>
                     <!-- /Video Modal -->
                     <div class="modal fade" id="homeVideo-1" tabindex="-1" role="dialog">
                        <div class="modal-dialog" role="document">
                           <div class="modal-content">
                              <button type="button" class="btn btn-default" data-bs-dismiss="modal"><i class="fa fa-times"></i></button>
                              <video id="video-player-2" class="video-player" poster="<?php echo $thumbnail; ?>">
                                 <source src="<?php echo file_get_contents(base_url() . 'home/video?url=' . $branch->video_link); ?>" type="video/mp4">
                                 Your browser does not support the video tag.
                              </video>
                           </div>
                        </div>
                     </div>
                     <!-- /Video Modal -->
                  <?php endif; ?>
                  <div class="mt-4 text-center">
                     <div class="">
                        <div class="tab-pane active" id="tab-8">
                           <div class="video-section pt-5 pb-4" style="background:<?php echo $visual_setting->color_2; ?>;padding: 20px;">
                              <h2 class="text-center">Request Demo</h2>
                              <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="radio5" value="1" checked name="class">
                                          <label class="label-1" for="radio5"> Class Room</label>
                                          <input class="radio-white" type="radio" id="radio6" value="2" name="class">
                                          <label class="label-1" for="radio6"> 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" id="mobile" class="form-control" name="mobile" required="" pattern="[0-9]{10}" placeholder="Enter Mobile No *" class="request-q">
                                    </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->title; ?></option>
                                          <?php endforeach; ?>
                                       </select>
                                       <input type="hidden" name="branch" required="" value="<?php echo $branch->id ?>">
                                    </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 style="margin-top:10px;">
                        <h6 style="margin-bottom: -10px;">Have a Queries? Ask out Experts</h6>
                        <div style="display: inline-block;font-size: 55px;"><i class="fa fa-phone-square"></i></div>
                        <div style="display: inline-block;text-align: left;padding-left: 10px;">
                           <p style="font-size: 22px;margin-bottom: 0;"><b>+91-<?php echo $app_setting->mobile ?></b></p>
                           <span style="font-size: 12px;padding-left:8px">Available 24x7 for your Queries</span>
                        </div>
                     </div>
                  </div>
               </div>
            </div>

            <div class="border-0 mb-5 course-details">

               <div class="card custom-sadow">
                  <div class="card-header">
                     <h3 class="card-title"><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; About us</h3>
                  </div>
                  <div class="card-body">
                     <div class="mb-0 description">
                        <?php echo $branch->about_us ?>
                     </div>
                  </div>
               </div>

               <div class="card custom-sadow">
                  <div class="card-header">
                     <h3 class="card-title"><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Key Features</h3>
                  </div>
                  <div class="card-body">
                     <div class="mb-0 description">
                        <?php echo $branch->features ?>
                     </div>
                  </div>
               </div>

               <div class="card custom-sadow">
                  <div class="card-header">
                     <h3 class="card-title"><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Ratings</h3>
                  </div>
                  <div class="card-body">
                     <div class="mb-0 description">
                        <?php
                        $total_rate = 0;
                        $result = $this->db->select('sum(rate) as rates')
                           ->from('branch_review')
                           ->where('branch_id', $branch->id)
                           ->where('status', 1)
                           ->get()
                           ->row();
                        $rater = $this->db->select('rate')
                           ->from('branch_review')
                           ->where('branch_id', $branch->id)
                           ->where('status', 1)
                           ->get()
                           ->num_rows();
                        if ($result->rates != null) {
                           $total_rate = $result->rates / $rater;
                        }
                        $this->db->where('branch_id', $branch->id);
                        $this->db->where('rate', 5);
                        $this->db->where('status', 1);
                        $rate5 = $this->db->get('branch_review')->num_rows();
                        $this->db->where('branch_id', $branch->id);
                        $this->db->where('rate', 4);
                        $this->db->where('status', 1);
                        $rate4 = $this->db->get('branch_review')->num_rows();
                        $this->db->where('branch_id', $branch->id);
                        $this->db->where('rate', 3);
                        $this->db->where('status', 1);
                        $rate3 = $this->db->get('branch_review')->num_rows();
                        $this->db->where('branch_id', $branch->id);
                        $this->db->where('rate', 2);
                        $this->db->where('status', 1);
                        $rate2 = $this->db->get('branch_review')->num_rows();
                        $this->db->where('branch_id', $branch->id);
                        $this->db->where('rate', 1);
                        $this->db->where('status', 1);
                        $rate1 = $this->db->get('branch_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="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 "0";
                                                                                          }
                                                                                          ?></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('branch_review')
                                       ->where('branch_id', $branch->id)
                                       ->where('status', 1)
                                       ->get()
                                       ->row();

                                    $rater1 = $this->db->select('rate')
                                       ->from('branch_review')
                                       ->where('branch_id', $branch->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']) ?>%"></div>
                                       </div>
                                    </div>
                                    <div class="col-2">
                                       <span>(<?php echo round($data[5]['ss']) ?>%)</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']) ?>%"></div>
                                       </div>
                                    </div>
                                    <div class="col-2">
                                       <span>(<?php echo round($data[4]['ss']) ?>%)</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']) ?>%"></div>
                                       </div>
                                    </div>
                                    <div class="col-2">
                                       <span>(<?php echo round($data[3]['ss']) ?>%)</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']) ?>%"></div>
                                       </div>
                                    </div>
                                    <div class="col-2">
                                       <span>(<?php echo round($data[2]['ss']) ?>%)</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']) ?>%"></div>
                                       </div>
                                    </div>
                                    <div class="col-2">
                                       <span>(<?php echo round($data[1]['ss']) ?>%)</span>
                                    </div>
                                 </div>
                              </div>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>

               <div class="card custom-sadow">
                  <div class="card-header">
                     <h3 class="card-title"><i class="fa fa-bars" aria-hidden="true"></i> &nbsp;&nbsp; Reviews</h3>
                  </div>
                  <div class="card-body">
                     <div class="mb-0 description">
                        <?php foreach ($all_reviews as $review) : ?>
                           <div class="media mt-0 p-5 border br-7 review-media">
                              <div class="d-flex me-3">
                                 <a href="javascript:void(0)"><img loading="lazy" class="media-object brround avatar-lg" alt="64x64" src="<?php echo base_url() ?>uploads/user_icon.png"> </a>
                              </div>
                              <div class="media-body">
                                 <h4 class="mt-0 mb-1 font-weight-semibold"><?php echo $review->name; ?>
                                    <small class="text-muted fs-14 float-end  ">
                                       <?php echo $this->setting_model->time_elapsed_string($review->date_time); ?>
                                    </small>
                                 </h4>
                                 <span class="fs-14">
                                    <?php if ($review->rate == 1) { ?>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-gray"></i>
                                       <i class="fa fa-star text-gray"></i>
                                       <i class="fa fa-star text-gray"></i>
                                       <i class="fa fa-star text-gray"></i>
                                    <?php } elseif ($review->rate == 2) { ?>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-gray"></i>
                                       <i class="fa fa-star text-gray"></i>
                                       <i class="fa fa-star text-gray"></i>
                                    <?php } elseif ($review->rate == 3) { ?>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-gray"></i>
                                       <i class="fa fa-star text-gray"></i>
                                    <?php } elseif ($review->rate == 4) { ?>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-gray"></i>
                                    <?php } elseif ($review->rate == 5) { ?>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-yellow"></i>
                                       <i class="fa fa-star text-yellow"></i>
                                    <?php } ?>
                                 </span>
                                 <p class="font-13 fs-15 mb-2 mt-2">
                                    <?php
                                    echo $review->comments;
                                    ?>
                                 </p>
                                 <!--<a href="javascript:void(0)" class="me-2 text-primary"><i class="fa fa-thumbs-o-up me-2"></i>Helpful ?</a>
                                 <a href="#" class="me-2 float-end"><span class="text-primary"><i class="fa fa-heart-o me-2"></i><?php //echo $review->like
                                                                                                                                 ?> Likes</span></a>-->
                              </div>
                           </div>
                        <?php endforeach ?>

                        <div class="mt-2 border br-7">
                           <?php if ($this->session->userdata('bcount_sess_logged_in') == true) : ?>
                              <div class="ps-5 pt-5">
                                 <h3 class="card-title">Leave a Review</h3>
                              </div>
                              <?php echo form_open(base_url() . 'home/submit_branch_review'); ?>
                              <div class="card-body pb-0">
                                 <div class="rating-stars d-flex pb-5">
                                    <h4 class="font-weight-semibold fs-14 me-4">Your Rating</h4>
                                    <div class="star-ratings start-ratings-main clearfix">
                                       <div class="stars stars-example-fontawesome stars-example-fontawesome">
                                          <div class="br-wrapper br-theme-fontawesome-stars">
                                             <select class="example-fontawesome" name="rate" autocomplete="off" style="display: none;">
                                                <option value="1">1</option>
                                                <option value="2">2</option>
                                                <option value="3">3</option>
                                                <option value="4" selected="">4</option>
                                                <option value="5">5</option>
                                             </select>
                                          </div>
                                       </div>
                                    </div>
                                 </div>
                              </div>
                              <input type="HIDDEN" name="branch_id" value="<?php echo $branch->id ?>">
                              <div class="card-body border-top-0 pt-2">
                                 <div class="form-group">
                                    <textarea class="form-control" name="comments" rows="6" placeholder="Comment" required></textarea>
                                 </div>
                                 <button type="submit" class="btn btn-primary">Submit</button>
                              </div>
                              <?php echo form_close(); ?>
                           <?php endif; ?>
                        </div>
                     </div>
                  </div>
               </div>


            </div>
            <!--Related Posts-->
            <div class=" mb-lg-0 custom-sadow">
               <div class="">
                  <div class="item2-gl">
                     <div class="mb-0">
                        <div class="">
                           <div class="p-5 bg-white item2-gl-nav d-flex">
                              <div class="d-block">
                                 <h3 class="mt-4">Our Courses</h3>
                              </div>
                              <ul class="nav item2-gl-menu ms-auto" style="margin-top: 10px;">
                                 <li class="border-end"><a href="#tab-11" class="active show" data-bs-toggle="tab" title="List style"><i class="fa fa-list"></i></a></li>
                                 <li><a href="#tab-12" data-bs-toggle="tab" class=" " title="Grid"><i class="fa fa-th"></i></a></li>
                              </ul>
                           </div>
                        </div>
                     </div>

                     <div class="tab-content item-list2">
                        <div class="tab-pane active" id="tab-11">
                           <?php for ($a = 0; $a < count(json_decode($branch->course)); $a++) :
                              $course = $this->course_model->get_course_by_org_id(json_decode($branch->course)[$a]); ?>
                              <div class="card overflow-hidden">
                                 <div class="d-md-flex">
                                    <div class="item-card9-img">
                                       <div class="item-card9-imgs">
                                          <a href="page-details.html"></a>
                                          <img loading="lazy" src="<?php echo base_url() ?><?php echo $course->image ?>" alt="<?php echo $course->title ?>" class="cover-image">
                                       </div>
                                       <div class="item-overly-trans">
                                          <a href="page-details.html" class="bg-primary">Popular</a>
                                       </div>
                                    </div>
                                    <div class="card border-0 mb-0">
                                       <div class="card-body p-0">
                                          <div class="item-card9 ps-5 pt-5">
                                             <a href="<?php echo base_url() ?>course-details/<?php echo $course->slug; ?>/<?php echo $branch->id; ?>" class="text-default-dark">
                                                <h3 class=""><?php echo  mb_strimwidth($course->title, 0, 50, "..."); ?></h3>
                                             </a>
                                             <p class="mb-0 mt-1 lead"><?php echo  mb_strimwidth($course->short_description, 0, 120, "..."); ?> </p>
                                             <div class="mt-2 mb-2">
                                             </div>
                                             <!-- <div>
                                                <div class="rating-stars d-flex">
                                                   <h4 class="font-weight-semibold me-2">4.2</h4>
                                                   <div class="star-ratings start-ratings-main clearfix me-3">
                                                      <div class="stars stars-example-fontawesome stars-example-fontawesome-sm">
                                                         <div class="br-wrapper br-theme-fontawesome-stars">
                                                            <select class="example-fontawesome" name="rating" autocomplete="off" style="display: none;">
                                                               <option value="1">1</option>
                                                               <option value="2">2</option>
                                                               <option value="3">3</option>
                                                               <option value="4" selected="">4</option>
                                                               <option value="5">5</option>
                                                            </select>
                                                         </div>
                                                      </div>
                                                   </div>
                                                   (4,24,525)
                                                </div>
                                             </div> -->
                                          </div>
                                          <div class="border-top ps-5 mt-2">
                                             <?php if ($course->is_free_course == 1) : ?>
                                                <h4 class="font-weight-semibold fs-20 text-dark"><i class="fe fe-tag mt-2 fs-18 me-2"></i>FREE</h4>
                                             <?php else : ?>
                                                <?php if ($course->discount_flag == 1) : ?>
                                                   <h4 class="font-weight-semibold fs-20 text-dark pt-5"><i class="fe fe-tag mt-2  fs-18 me-2"></i>&#x20B9; <?php echo $course->discounted_price; ?></h4>
                                                   <del>&#x20B9; <?php echo $course->price; ?></del>
                                                <?php else : ?>
                                                   <h4 class="font-weight-semibold fs-20 text-dark pt-5"><i class="fe fe-tag mt-2 fs-18 me-2"></i>&#x20B9; <?php echo $course->price; ?></h4>
                                                <?php endif; ?>
                                             <?php endif; ?>
                                          </div>
                                       </div>
                                    </div>
                                 </div>
                              </div>
                           <?php endfor; ?>
                        </div>
                        <div class="tab-pane" id="tab-12">
                           <div class="row">
                              <?php for ($b = 0; $b < count(json_decode($branch->course)); $b++) :
                                 $course = $this->course_model->get_course_by_org_id(json_decode($branch->course)[$b]); ?>
                                 <div class="col-lg-4 col-md-12 col-xl-4">
                                    <div class="card overflow-hidden">
                                       <div class="item-card9-img">
                                          <div class="item-card9-imgs">
                                             <a href="<?php echo base_url() ?>course-details/<?php echo $course->slug; ?>/<?php echo $branch->id; ?>"></a>
                                             <img loading="lazy" src="<?php echo base_url() ?><?php echo  $course->image ?>" alt="<?php echo  $course->title; ?>" class="cover-image">
                                          </div>
                                       </div>
                                       <div class="card-body pb-0">
                                          <div class="item-card9">
                                             <a href="<?php echo base_url() ?>course-details/<?php echo $course->slug; ?>/<?php echo $branch->id; ?>" class="text-dark mt-2">
                                                <h3 class="font-weight-semibold mt-2 mb-2"><?php echo  mb_strimwidth($course->title, 0, 50, "..."); ?></h3>
                                             </a>
                                             <p class="mb-0"><?php echo  mb_strimwidth($course->short_description, 0, 120, "..."); ?></p>
                                          </div>
                                          <div class="mt-2">
                                             <!-- <div class="rating-stars d-flex">
                                                <h4 class="font-weight-semibold me-2">4.2</h4>
                                                <div class="star-ratings start-ratings-main clearfix me-3">
                                                   <div class="stars stars-example-fontawesome stars-example-fontawesome-sm">
                                                      <select class="example-fontawesome" name="rating" autocomplete="off">
                                                         <option value="1">1</option>
                                                         <option value="2">2</option>
                                                         <option value="3">3</option>
                                                         <option value="4" selected>4</option>
                                                         <option value="5">5</option>
                                                      </select>
                                                   </div>
                                                </div>(4,24,525)
                                             </div> -->
                                          </div>
                                       </div>
                                       <div class="border-top ps-5  mt-2">
                                          <div class="border-top ps-5  mt-2">
                                             <?php if ($course->is_free_course == 1) : ?>
                                                <h4 class="font-weight-semibold fs-20 text-dark mt-4 mb-4"><i class="fe fe-tag mt-0 fs-18 me-2"></i>FREE</h4>
                                             <?php else : ?>
                                                <?php if ($course->discount_flag == 1) : ?>
                                                   <h4 class="font-weight-semibold fs-20 text-dark mt-4 mb-4"><i class="fe fe-tag mt-0 fs-18 me-2"></i>&#x20B9; <?php echo $course->discounted_price; ?></h4>
                                                <?php else : ?>
                                                   <h4 class="font-weight-semibold fs-20 text-dark mt-4 mb-4"><i class="fe fe-tag mt-0 fs-18 me-2"></i>&#x20B9; <?php echo $course->price; ?></h4>
                                                <?php endif; ?>
                                             <?php endif; ?>
                                          </div>
                                       </div>
                                    </div>
                                 </div>
                              <?php endfor; ?>
                           </div>
                        </div>
                     </div>
                  </div>

                  <!--<div class="center-block text-center">
                     <ul class="pagination mb-5 mb-lg-0">
                        <li class="page-item page-prev disabled">
                           <a class="page-link" href="javascript:void(0)" tabindex="-1">Prev</a>
                        </li>
                        <li class="page-item active"><a class="page-link" href="javascript:void(0)">1</a></li>
                        <li class="page-item"><a class="page-link" href="javascript:void(0)">2</a></li>
                        <li class="page-item"><a class="page-link" href="javascript:void(0)">3</a></li>
                        <li class="page-item page-next">
                           <a class="page-link" href="javascript:void(0)">Next</a>
                        </li>
                     </ul>
                     </div>-->
               </div>
            </div>
            <style type="text/css">
               .video_heading {
                  padding-top: 50px;
               }
            </style>


         </div>
      </div>
   </div>
</section>
<section class="custom-sadow bg-white" id="stacks">
   <div class="container">
      <div class="row">
         <div class=" mb-lg-0 pb-5">
            <div class="tab-content item-list2">
               <div class="tab-pane active" id="tab-11">
                  <div class="card border-0 mb-0">
                     <div class="card-body p-5 custom-sadow">
                        <div class="row">
                           <div class="col-xl-8 col-lg-7 col-md-6">
                              <div class="video-img">
                                 <img loading="lazy" 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-2"><i class="fa fa-play text-white"></i></a>
                              </div>
                              <div class="modal fade" id="homeVideo-2" 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 = "http://img.youtube.com/vi/" . $video_id_1 . "/maxresdefault.jpg";
                                       ?>
                                       <video id="video-player" class="video-player" 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>
                                    </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 For Free</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" id="mobile" class="form-control" name="mobile" required="" pattern="[0-9]{10}" placeholder="Enter Mobile No *" class="request-q">
                                       </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 => $branchs) : ?>
                                                <option value="<?php echo $branchs->id; ?>"><?php echo $branchs->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>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>

<section class="custom-sadow bg-white">
   <div class="container">
      <div class="row">
         <div class=" mb-lg-0 pb-5">
            <div class="tab-content item-list2">
               <div class="tab-pane active" id="tab-11">
                  <div class="card border-0 mb-0 custom-sadow">
                     <div class="card-body p-5">
                        <h3><?php echo $testi_schedule->schedule_heading; ?></h3>
                        <div style="margin-top:20px!important;margin-bottom: 20px!important;width: 50%;border: 1px solid #DC3545!important;"></div>
                        <h6><?php echo $testi_schedule->schedule_des; ?></h6>
                        <ul class="thiru_schedule pt-5">
                           <?php $all_branch_shedule = $this->branch->get_all_branch_shedule_by_id($branch->id);
                           foreach ($all_branch_shedule as $key => $shedule) : ?>
                              <li>
                                 <span class="scherow">
                                    <span class="batchdate"><?php echo date('d-m-Y', strtotime($shedule->date)); ?></span>
                                    <span class="batchday"> <?php echo $shedule->days; ?>
                                       <i>Weekdays Batch </i>
                                    </span>
                                    <span class="batchtime"><?php echo $shedule->time; ?>
                                       <i><?php echo $shedule->time_sub; ?></i>
                                    </span>
                                    <a href="javascript:void(0)" class="btn btn-primary leadsTrigger batch_btn" title="Get Course Fees &amp; Discounts" onclick="open_model(5); sche_id(<?php echo $shedule->id; ?>)">Get Fees</a>
                                 </span>
                              </li>
                           <?php endforeach; ?>
                        </ul>
                     </div>
                     <div class="request_batch">
                        <div class="req_left">
                           <img loading="lazy" loading="lazy" src="<?php echo base_url() ?>uploads/request_batch.webp" class="img-fluid" title="?php echo $branch->slider_title?>" alt="?php echo $branch->slider_title?>" width="100px" height="100px">
                        </div>
                        <div class="req_right">
                           <h4>Can’t find a batch you were looking for?</h4>

                        </div>
                        <div class="req_btn">
                           <a class="btn btn-primary" href="javascript:void(0)" role="button" onclick="open_model(4)" title="Request a Batch">Request a Batch</a>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>
<?php $all_branch_testi = $this->branch_model->get_all_students_testimonial_by_id($branch_id);
if ($all_branch_testi) : ?>
   <section class="custom-sadow bg-white" id="stacks">
      <div class="container">
         <div class="row">
            <div class=" mb-lg-0 pb-5">
               <div class="tab-content item-list2">
                  <div class="tab-pane active" id="tab-11">
                     <div class="card border-0 mb-0 custom-sadow">
                        <div class="card-body p-5">
                           <h3><?php echo $testi_schedule->testi_heading; ?></h3>
                           <div style="margin-top:20px!important;margin-bottom: 20px!important;width: 50%;border: 1px solid #DC3545!important;"></div>
                           <h6><?php echo $testi_schedule->testi_des; ?></h6>
                           <div class="row pt-5">
                              <?php foreach ($all_branch_testi as $key => $testi) : ?>
                                 <div class="col-sm-4">

                                    <?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=\"250px\" src=\"//www.youtube.com/embed/$1\" frameborder=\"0\" allowfullscreen></iframe>", $testi->link); ?>
                                 </div>
                              <?php endforeach ?>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </section>
<?php endif; ?>

<section class="custom-sadow bg-white">
   <div class="container">
      <div class="row">
         <div class=" mb-lg-0 pb-5">
            <div class="tab-content item-list2">
               <div class="tab-pane active" id="tab-11">
                  <div class="card border-0 mb-0 custom-sadow">
                     <div class="card-body p-5">
                        <div class="row">
                           <div class="col-xl-6 col-lg-6 col-md-6">
                              <h2><b><?php echo $branch->name ?></b></h2>
                              <?php echo $branch->address ?>
                              <h4 style="padding-top:10px"><i class="fa fa-map-marker"></i> Landmark</h4>
                              <?php echo $branch->landmark ?>
                              <h4 style="padding-top:10px"><i class="fa fa-phone"></i> Contact Details</h4>
                              <h6 style="padding-top:10px;font-weight:300;">Branch Manager : <i class="fa fa-user"></i> <?php echo $branch->brn_manager ?></h6>
                              <h6 style="padding-top:10px;font-weight:300;">Enquiry Contact No : <a href="tel:+91<?php echo $branch->enq_contact ?>"><i class="fa fa-phone"></i> <?php echo $branch->enq_contact ?></a></h6>


                              <h6 style="padding-top:10px;font-weight:300;">Enquiry Email : <a href="mailto:<?php echo $branch->enq_email ?>"><i class="fa fa-envelope "></i> <?php echo $branch->enq_email ?></a></h6>
                              <h4 style="padding-top:20px"><i class="fa fa-calendar"></i> Office Hours</h4>
                              <h6 style="padding-top:10px;font-weight:300;"> <?php echo $branch->time ?></h6>
                              <h4 style="padding-top:20px"><a style="width:50%;font-size: 12px;border-radius: 10px;background-color:#25d366 !important;color:#fff" class="btn btn-lg button-class" href='https://wa.me/<?php echo $app_setting->mobile ?>' target='_blank'><i class="fa fa-whatsapp"></i> Connect on whatsApp </a></h4>
                           </div>
                           <div class="col-xl-6 col-lg-6 col-md-6">
                              <?php echo $branch->google_map ?>
                           </div>
                        </div>
                     </div>
                  </div>
               </div>
            </div>
         </div>
      </div>
   </div>
</section>

<!--/Section-->
<style type="text/css">
   p {
      color: #2c3e50;
   }

   .card-header {
      background: <?php echo $visual_setting->color_5; ?>;
      color: #fff !important;
   }

   .card-header .card-title {
      color: #fff;
   }
</style>
<script type="text/javascript">
   document.addEventListener("DOMContentLoaded", function() {
      new Moovie({
         selector: "#video-player",
      });
      new Moovie({
         selector: "#video-player-2",
      });
      new Moovie({
         selector: "#video-player-3",
      });
   });
</script>