<?php if ('layout_two' === $settings['layout_type']) : ?>
    <!-- testimonial-two section start -->
    <section class="testimonial-two">
        <div class="container">
            <?php if (!empty($settings['layout_two_sec_sub_title'] || $settings['layout_two_sec_title'])) : ?>
                <div class="sec-title text-center wow fadeInUp" data-wow-duration='1500ms' data-wow-delay='000ms'>
                    <div class="d-flex align-items-center justify-content-center">
                        <?php ostech_elementor_rendered_image($settings, 'layout_two_title_image', 'sec-title__img'); ?>
                        <?php
                        if (!empty($settings['layout_two_sec_sub_title'])) :
                            $this->add_inline_editing_attributes('layout_two_sec_sub_title', 'none');
                            ostech_elementor_rendered_content($this, 'layout_two_sec_sub_title', 'sec-title__tagline', $settings['section_sub_title_tag_layout_two']);
                        endif; ?>
                    </div>
                    <?php
                    if (!empty($settings['layout_two_sec_title'])) :
                        $this->add_inline_editing_attributes('layout_two_sec_title', 'none');
                        ostech_elementor_rendered_content($this, 'layout_two_sec_title', 'sec-title__title', $settings['section_title_tag_layout_two']);
                    endif;
                    ?>
                </div>
            <?php endif; ?>
            <div class="testimonial-two__carousel ostech-owl__carousel owl-theme owl-carousel" data-owl-options='<?php echo esc_attr(ostech_get_owl_options($settings)); ?>'>
                <?php foreach ($settings['layout_two_testimonials'] as $index => $item) :  ?>
                    <div class="item">
                        <div class="testimonial-two__item">
                            <div class="testimonial-two__item__star">
                                <?php for ($i = 0; $i < $item['rating']['size']; $i++) : ?>
                                    <i class="icon-star"></i>
                                <?php endfor; ?>
                            </div>
                            <p class="testimonial-two__item__text"><?php echo wp_kses($item['testimonial'], 'ostech_allowed_tags'); ?></p>
                            <div class="testimonial-two__item__author">
                                <div class="testimonial-two__item__author__thumb">
                                    <?php ostech_elementor_rendered_image($item, 'image'); ?>
                                </div>
                                <div class="testimonial-two__item__author__content">
                                    <<?php echo esc_attr($item['testimonial_name_tag_layout_two']); ?> class="testimonial-two__item__author__title">
                                        <?php echo wp_kses($item['name'], 'ostech_allowed_tags'); ?>
                                    </<?php echo esc_attr($item['testimonial_name_tag_layout_two']); ?>>
                                    <span class="testimonial-two__item__author__deg"><?php echo wp_kses($item['designation'], 'ostech_allowed_tags'); ?></span>
                                </div>
                            </div>
                            <div class="testimonial-two__item__quite">
                                <i class="icon-quite"></i>
                            </div>
                            <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 61 38">
                                <path d="M61 37.6621C43.331 20.1523 12.9713 5.69967 0 0.662109H61V37.6621Z" />
                            </svg>
                        </div>
                    </div>
                <?php endforeach; ?>
            </div>

            <div class="testimonial-two__author">
                <div class="testimonial-two__author__image testimonial-two__author__image--one">
                    <?php ostech_elementor_rendered_image($settings, 'layout_two_img_one'); ?>
                </div>
                <div class="testimonial-two__author__image testimonial-two__author__image--two">
                    <?php ostech_elementor_rendered_image($settings, 'layout_two_img_two'); ?>
                </div>
                <div class="testimonial-two__author__image testimonial-two__author__image--three">
                    <?php ostech_elementor_rendered_image($settings, 'layout_two_img_three'); ?>
                </div>
                <div class="testimonial-two__author__image testimonial-two__author__image--fore">
                    <?php ostech_elementor_rendered_image($settings, 'layout_two_img_four'); ?>
                </div>
            </div>
        </div>
    </section>
    <!-- testimonial-two section End -->
<?php endif; ?>