<?php

namespace TRANZIXPLUGIN\Element;

use Elementor\Controls_Manager;
use Elementor\Controls_Stack;
use Elementor\Group_Control_Typography;
use Elementor\Scheme_Typography;
use Elementor\Scheme_Color;
use Elementor\Group_Control_Border;
use Elementor\Repeater;
use Elementor\Widget_Base;
use Elementor\Utils;
use Elementor\Group_Control_Text_Shadow;
use Elementor\Plugin;

/**
 * Elementor button widget.
 * Elementor widget that displays a button with the ability to control every
 * aspect of the button design.
 *
 * @since 1.0.0
 */
class Service_Tab4 extends Widget_Base {

	/**
	 * Get widget name.
	 * Retrieve button widget name.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return string Widget name.
	 */
	public function get_name() {
		return 'tranzix_service_tab4';
	}

	/**
	 * Get widget title.
	 * Retrieve button widget title.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return string Widget title.
	 */
	public function get_title() {
		return esc_html__( 'Service Tab 4', 'tranzix' );
	}

	/**
	 * Get widget icon.
	 * Retrieve button widget icon.
	 *
	 * @since  1.0.0
	 * @access public
	 * @return string Widget icon.
	 */
	public function get_icon() {
		return 'fa fa-briefcase';
	}

	/**
	 * Get widget categories.
	 * Retrieve the list of categories the button widget belongs to.
	 * Used to determine where to display the widget in the editor.
	 *
	 * @since  2.0.0
	 * @access public
	 * @return array Widget categories.
	 */
	public function get_categories() {
		return [ 'tranzix' ];
	}
	
	/**
	 * Register button widget controls.
	 * Adds different input fields to allow the user to change and customize the widget settings.
	 *
	 * @since  1.0.0
	 * @access protected
	 */
	protected function _register_controls() {
		$this->start_controls_section(
			'service_tab4',
			[
				'label' => esc_html__( 'Service Tab 4', 'tranzix' ),
			]
		);
		$this->add_control(
            'style', 
				[
					'label'   => esc_html__( 'Choose Different Style', 'tranzix' ),
					'label_block' => true,
					'type'    => Controls_Manager::SELECT,
					'default' => 'style1',
					'options' => array(
						'style1' => esc_html__( 'Choose Style 1', 'tranzix' ),
						'style2' => esc_html__( 'Choose Style 2', 'tranzix' ),
						'style3' => esc_html__( 'Choose Style 3', 'tranzix' ),
					),
				]
		);
		$this->add_control(
			'bgimg',
			[
				'label' => esc_html__('Background image', 'rashid'),
				'conditions' => array(
					'relation' => 'or',
					'terms'    => array(
						array(
							'name'     => 'style',
							'operator' => '==',
							'value'    => 'style3',
						),
					),
				),
				'type' => Controls_Manager::MEDIA,
				'default' => ['url' => Utils::get_placeholder_image_src(),],
			]
		);
		$this->add_control(
			'bgimg1',
			[
				'label' => esc_html__('Background image', 'rashid'),
				'conditions' => array(
					'relation' => 'or',
					'terms'    => array(
						array(
							'name'     => 'style',
							'operator' => '==',
							'value'    => 'style3',
						),
					),
				),
				'type' => Controls_Manager::MEDIA,
				'default' => ['url' => Utils::get_placeholder_image_src(),],
			]
		);
		$this->add_control(
			'sec_class',
			[
				'label'       => __( 'Section Class', 'rashid' ),
				'type'        => Controls_Manager::TEXTAREA,
				'dynamic'     => [
					'active' => true,
				],
				'placeholder' => __( 'Enter Section Class', 'rashid' ),
			]
		);
		
		
		$this->end_controls_section();

		// New Tab#1

		$this->start_controls_section(
					'content_section',
					[
						'label' => __( 'Tab Block', 'rashid' ),
						'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
					]
				);
				$this->add_control(
				  'repeat', 
					[
						'type' => Controls_Manager::REPEATER,
						'seperator' => 'before',
						'default' => 
							[
								['block_title' => esc_html__('Projects Completed', 'rashid')],
							],
						'fields' => 
							[
								[
									'name' => 'block_active',
									'label' => __( 'Show Active', 'rashid' ),
									'type' => \Elementor\Controls_Manager::SWITCHER,
									'label_on' => __( 'Show', 'rashid' ),
									'label_off' => __( 'Hide', 'rashid' ),
									'return_value' => 'yes',
									'default' => 'yes',
								],
								[
									'name' => 'block_icons',
									'label' => esc_html__('Enter The icons', 'rashid'),
									'type' => Controls_Manager::SELECT,
									'options'  => get_fontawesome_icons(),
								],
								[
									'name' => 'block_tab_button',
									'label'       => __( 'Button', 'rashid' ),
									'type'        => Controls_Manager::TEXT,
									'dynamic'     => [
										'active' => true,
									],
									'placeholder' => __( 'Enter your Button Title', 'rashid' ),
								],
								[
									'name' => 'block_title',
									'label' => esc_html__('Title', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_text',
									'label' => esc_html__('Text', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_feature_str',
									'label'       => __( 'Features List', 'rashid' ),
									'type'        => Controls_Manager::TEXTAREA,
									'dynamic'     => [
										'active' => true,
									],
									'placeholder' => __( 'Enter your Features List', 'rashid' ),
									'default'     => __( '', 'rashid' ),
								],
								[
									'name' => 'block_button',
									'label'       => __( 'Button', 'rashid' ),
									'type'        => Controls_Manager::TEXT,
									'dynamic'     => [
										'active' => true,
									],
									'placeholder' => __( 'Enter your Button Title', 'rashid' ),
								],
								[
									'name' => 'block_btnlink',
									'label' => __( 'Button Url', 'rashid' ),
									'type' => Controls_Manager::URL,
									'placeholder' => __( 'https://your-link.com', 'rashid' ),
									'show_external' => true,
									'default' => [
									'url' => '',
									'is_external' => true,
									'nof
									ollow' => true,
									],
								],
								[
									'name' => 'block_bgimg',
									'label' => esc_html__('Background image', 'rashid'),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_bgimg1',
									'label' => esc_html__('Background image', 'rashid'),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_image',
									'label' => __( 'Image', 'rashid' ),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_alt_text',
									'label' => esc_html__('Alt Text', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_bgimg2',
									'label' => esc_html__('Background image', 'rashid'),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_bgimg3',
									'label' => esc_html__('Background image', 'rashid'),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_image1',
									'label' => __( 'Image', 'rashid' ),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_alt_text1',
									'label' => esc_html__('Alt Text', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_title1',
									'label' => esc_html__('Title', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_text1',
									'label' => esc_html__('Text', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_feature_str1',
									'label'       => __( 'Features List', 'rashid' ),
									'type'        => Controls_Manager::TEXTAREA,
									'dynamic'     => [
										'active' => true,
									],
									'placeholder' => __( 'Enter your Features List', 'rashid' ),
									'default'     => __( '', 'rashid' ),
								],
								[
									'name' => 'block_button1',
									'label'       => __( 'Button', 'rashid' ),
									'type'        => Controls_Manager::TEXT,
									'dynamic'     => [
										'active' => true,
									],
									'placeholder' => __( 'Enter your Button Title', 'rashid' ),
								],
								[
									'name' => 'block_btnlink1',
									'label' => __( 'Button Url', 'rashid' ),
									'type' => Controls_Manager::URL,
									'placeholder' => __( 'https://your-link.com', 'rashid' ),
									'show_external' => true,
									'default' => [
									'url' => '',
									'is_external' => true,
									'nof
									ollow' => true,
									],
								],
								[
									'name' => 'block_title2',
									'label' => esc_html__('Title', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_text2',
									'label' => esc_html__('Text', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_feature_str2',
									'label'       => __( 'Features List', 'rashid' ),
									'type'        => Controls_Manager::TEXTAREA,
									'dynamic'     => [
										'active' => true,
									],
									'placeholder' => __( 'Enter your Features List', 'rashid' ),
									'default'     => __( '', 'rashid' ),
								],
								[
									'name' => 'block_button2',
									'label'       => __( 'Button', 'rashid' ),
									'type'        => Controls_Manager::TEXT,
									'dynamic'     => [
										'active' => true,
									],
									'placeholder' => __( 'Enter your Button Title', 'rashid' ),
								],
								[
									'name' => 'block_btnlink2',
									'label' => __( 'Button Url', 'rashid' ),
									'type' => Controls_Manager::URL,
									'placeholder' => __( 'https://your-link.com', 'rashid' ),
									'show_external' => true,
									'default' => [
									'url' => '',
									'is_external' => true,
									'nof
									ollow' => true,
									],
								],
								[
									'name' => 'block_bgimg3',
									'label' => esc_html__('Background image', 'rashid'),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_bgimg4',
									'label' => esc_html__('Background image', 'rashid'),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_image2',
									'label' => __( 'Image', 'rashid' ),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_alt_text2',
									'label' => esc_html__('Alt Text', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_bgimg5',
									'label' => esc_html__('Background image', 'rashid'),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_bgimg6',
									'label' => esc_html__('Background image', 'rashid'),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_image3',
									'label' => __( 'Image', 'rashid' ),
									'type' => Controls_Manager::MEDIA,
									'default' => ['url' => Utils::get_placeholder_image_src(),],
								],
								[
									'name' => 'block_alt_text3',
									'label' => esc_html__('Alt Text', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_title3',
									'label' => esc_html__('Title', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_text3',
									'label' => esc_html__('Text', 'rashid'),
									'type' => Controls_Manager::TEXTAREA,
									'default' => esc_html__('', 'rashid')
								],
								[
									'name' => 'block_feature_str3',
									'label'       => __( 'Features List', 'rashid' ),
									'type'        => Controls_Manager::TEXTAREA,
									'dynamic'     => [
										'active' => true,
									],
									'placeholder' => __( 'Enter your Features List', 'rashid' ),
									'default'     => __( '', 'rashid' ),
								],
								[
									'name' => 'block_button3',
									'label'       => __( 'Button', 'rashid' ),
									'type'        => Controls_Manager::TEXT,
									'dynamic'     => [
										'active' => true,
									],
									'placeholder' => __( 'Enter your Button Title', 'rashid' ),
								],
								[
									'name' => 'block_btnlink3',
									'label' => __( 'Button Url', 'rashid' ),
									'type' => Controls_Manager::URL,
									'placeholder' => __( 'https://your-link.com', 'rashid' ),
									'show_external' => true,
									'default' => [
									'url' => '',
									'is_external' => true,
									'nof
									ollow' => true,
									],
								],
							],
						'title_field' => '{{block_title}}',
					 ]
			);
				
				
		$this->end_controls_section();	


		}

	/**
	 * Render button widget output on the frontend.
	 * Written in PHP and used to generate the final HTML.
	 *
	 * @since  1.0.0
	 * @access protected
	 */
	protected function render() {
		$settings = $this->get_settings_for_display();
		$allowed_tags = wp_kses_allowed_html('post');
		?>
        
		<?php  if ( 'style1' === $settings['style'] ) : ?>
		
        <section class="service-19 p_relative pb_150 <?php echo esc_attr($settings['sec_class']);?>">
            <div class="tabs-box">
                <div class="tab-btn-box p_relative d_block mb_150">
                    <div class="auto-container">
                        <ul class="tab-btns tab-buttons clearfix">
						
							<?php foreach($settings['repeat'] as $key=>$item):?>
						
                            <li class="tab-btn <?php if($key == 0) echo 'active-btn';?>" data-tab="#tab-<?php echo esc_attr($key);?>">
                                <div class="icon-box p_absolute fs_30 color_black tran_5 t_25 l_50"><i class="<?php echo str_replace("icon ", " ", esc_attr( $item['block_icons']));?>"></i></div>
                                <h6 class="fs_16 tran_5"><?php echo wp_kses($item['block_tab_button'], $allowed_tags);?></h6>
                            </li>
							
							<?php endforeach; ?>
							
                        </ul>
                    </div>
                </div>
                <div class="auto-container">
                    <div class="tabs-content">
					
						<?php foreach($settings['repeat'] as $key=>$item):?>
						<?php  if ( 'yes' === $item['block_active'] ) : ?>
					
                        <div class="tab <?php if($key == 0) echo 'active-tab';?>" id="tab-<?php echo esc_attr($key);?>">
                            <div class="inner-box p_relative mb_150">
                                <div class="row clearfix">
                                    <div class="col-lg-6 col-md-12 col-sm-12 content-column">
                                        <div class="content_block_27">
                                            <div class="content-box p_relative d_block mr_30">
                                                <div class="sec-title-six p_relative d_block mb_25">
                                                    <h2 class="d_block fs_40 lh_50 fw_bold"><?php echo wp_kses($item['block_title'], $allowed_tags);?></h2>
                                                </div>
                                                <div class="text p_relative d_block mb_25">
                                                    <p class="font_family_poppins"><?php echo wp_kses($item['block_text'], $allowed_tags);?></p>
                                                </div>
                                                <ul class="list-style-one clearfix p_relative d_block mb_35">
                                                    <?php $fearures = explode("\n", ($item['block_feature_str']));?>
													<?php foreach($fearures as $feature):?>
													<?php echo wp_kses($feature, true); ?>
													<?php endforeach; ?>
                                                </ul>
												<?php if(wp_kses($item['block_button'], $allowed_tags)): ?>
                                                <div class="btn-box">
                                                    <a href="<?php echo esc_url($item['block_btnlink']['url']);?>" class="theme-btn theme-btn-five"><?php echo wp_kses($item['block_button'], $allowed_tags);?> <i class="icon-4"></i></a>
                                                </div>
												<?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-12 col-sm-12 image-column">
                                        <div class="image_block_24">
                                            <div class="image-box p_relative d_block ml_30">
                                                <div class="shape">
													<?php if(wp_get_attachment_url($item['block_bgimg']['id'])): ?>
                                                    <div class="shape-1 float-bob-x p_absolute w_95 h_95" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
													<?php if(wp_get_attachment_url($item['block_bgimg1']['id'])): ?>
                                                    <div class="shape-2 p_absolute b_20 float-bob-y" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg1']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
													
                                                    <div class="shape-3 p_absolute w_170 h_170 bg-color-1 b_radius_50"></div>
                                                </div> 
                                                <figure class="image p_relative d_block b_radius_10">
													<?php if(wp_get_attachment_url($item['block_image']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="inner-box p_relative mb_150">
                                <div class="row clearfix">
                                    <div class="col-lg-6 col-md-12 col-sm-12 image-column">
                                        <div class="image_block_24">
                                            <div class="image-box p_relative d_block mr_30">
                                                <div class="shape">
													<?php if(wp_get_attachment_url($item['block_bgimg2']['id'])): ?>
                                                    <div class="shape-4 float-bob-x p_absolute w_95 h_95" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg2']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
													<?php if(wp_get_attachment_url($item['block_bgimg3']['id'])): ?>
                                                    <div class="shape-5 p_absolute b_20 float-bob-y" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg3']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
                                                    <div class="shape-6 p_absolute w_170 h_170 bg-color-1 b_radius_50"></div>
                                                </div> 
                                                <figure class="image p_relative d_block b_radius_10">
													<?php if(wp_get_attachment_url($item['block_image1']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image1']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text1'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-12 col-sm-12 content-column">
                                        <div class="content_block_27">
                                            <div class="content-box p_relative d_block ml_30">
                                                <div class="sec-title-six p_relative d_block mb_25">
                                                    <h2 class="d_block fs_40 lh_50 fw_bold"><?php echo wp_kses($item['block_title1'], $allowed_tags);?></h2>
                                                </div>
                                                <div class="text p_relative d_block mb_25">
                                                    <p class="font_family_poppins"><?php echo wp_kses($item['block_text1'], $allowed_tags);?></p>
                                                </div>
                                                <ul class="list-style-one clearfix p_relative d_block mb_35">
                                                    <?php $fearures = explode("\n", ($item['block_feature_str1']));?>
													<?php foreach($fearures as $feature):?>
													<?php echo wp_kses($feature, true); ?>
													<?php endforeach; ?>
                                                </ul>
												<?php if(wp_kses($item['block_button1'], $allowed_tags)): ?>
                                                <div class="btn-box">
                                                    <a href="<?php echo esc_url($item['block_btnlink1']['url']);?>" class="theme-btn theme-btn-five"><?php echo wp_kses($item['block_button1'], $allowed_tags);?> <i class="icon-4"></i></a>
                                                </div>
												<?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="inner-box p_relative mb_150">
                                <div class="row clearfix">
                                    <div class="col-lg-6 col-md-12 col-sm-12 content-column">
                                        <div class="content_block_27">
                                            <div class="content-box p_relative d_block mr_30">
                                                <div class="sec-title-six p_relative d_block mb_25">
                                                    <h2 class="d_block fs_40 lh_50 fw_bold"><?php echo wp_kses($item['block_title2'], $allowed_tags);?></h2>
                                                </div>
                                                <div class="text p_relative d_block mb_25">
                                                    <p class="font_family_poppins"><?php echo wp_kses($item['block_text2'], $allowed_tags);?></p>
                                                </div>
                                                <ul class="list-style-one clearfix p_relative d_block mb_35">
                                                    <?php $fearures = explode("\n", ($item['block_feature_str2']));?>
													<?php foreach($fearures as $feature):?>
													<?php echo wp_kses($feature, true); ?>
													<?php endforeach; ?>
                                                </ul>
												<?php if(wp_kses($item['block_button2'], $allowed_tags)): ?>
                                                <div class="btn-box">
                                                    <a href="<?php echo esc_url($item['block_btnlink2']['url']);?>" class="theme-btn theme-btn-five"><?php echo wp_kses($item['block_button2'], $allowed_tags);?> <i class="icon-4"></i></a>
                                                </div>
												<?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-12 col-sm-12 image-column">
                                        <div class="image_block_24">
                                            <div class="image-box p_relative d_block ml_30">
                                                <div class="shape">
													<?php if(wp_get_attachment_url($item['block_bgimg3']['id'])): ?>
                                                    <div class="float-bob-x shape-1 p_absolute w_95 h_95" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg3']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
													<?php if(wp_get_attachment_url($item['block_bgimg4']['id'])): ?>
                                                    <div class="shape-2 p_absolute b_20 float-bob-y" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg4']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
                                                    <div class="shape-3 p_absolute w_170 h_170 bg-color-1 b_radius_50"></div>
                                                </div> 
                                                <figure class="image p_relative d_block b_radius_10">
													<?php if(wp_get_attachment_url($item['block_image2']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image2']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text2'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="inner-box p_relative">
                                <div class="row clearfix">
                                    <div class="col-lg-6 col-md-12 col-sm-12 image-column">
                                        <div class="image_block_24">
                                            <div class="image-box p_relative d_block mr_30">
                                                <div class="shape">
													<?php if(wp_get_attachment_url($item['block_bgimg5']['id'])): ?>
                                                    <div class="float-bob-x shape-4 p_absolute w_95 h_95" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg5']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
													<?php if(wp_get_attachment_url($item['block_bgimg6']['id'])): ?>
                                                    <div class="shape-5 p_absolute b_20 float-bob-y" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg6']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
                                                    <div class="shape-6 p_absolute w_170 h_170 bg-color-1 b_radius_50"></div>
                                                </div> 
                                                <figure class="image p_relative d_block b_radius_10">
													<?php if(wp_get_attachment_url($item['block_image3']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image3']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text3'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-12 col-sm-12 content-column">
                                        <div class="content_block_27">
                                            <div class="content-box p_relative d_block ml_30">
                                                <div class="sec-title-six p_relative d_block mb_25">
                                                    <h2 class="d_block fs_40 lh_50 fw_bold"><?php echo wp_kses($item['block_title3'], $allowed_tags);?></h2>
                                                </div>
                                                <div class="text p_relative d_block mb_25">
                                                    <p class="font_family_poppins"><?php echo wp_kses($item['block_text3'], $allowed_tags);?></p>
                                                </div>
                                                <ul class="list-style-one clearfix p_relative d_block mb_35">
                                                    <?php $fearures = explode("\n", ($item['block_feature_str3']));?>
													<?php foreach($fearures as $feature):?>
													<?php echo wp_kses($feature, true); ?>
													<?php endforeach; ?>
                                                </ul>
												<?php if(wp_kses($item['block_button3'], $allowed_tags)): ?>
                                                <div class="btn-box">
                                                    <a href="<?php echo esc_url($item['block_btnlink3']['url']);?>" class="theme-btn theme-btn-five"><?php echo wp_kses($item['block_button3'], $allowed_tags);?> <i class="icon-4"></i></a>
                                                </div>
												<?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
						
						<?php else: ?>
						
						<div class="tab <?php if($key == 0) echo 'active-tab';?>" id="tab-<?php echo esc_attr($key);?>">
                            <div class="inner-box p_relative mb_150">
                                <div class="row clearfix">
                                    <div class="col-lg-6 col-md-12 col-sm-12 image-column">
                                        <div class="image_block_24">
                                            <div class="image-box p_relative d_block mr_30">
                                                <div class="shape">
													<?php if(wp_get_attachment_url($item['block_bgimg']['id'])): ?>
                                                    <div class="float-bob-x shape-4 p_absolute w_95 h_95" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
													<?php if(wp_get_attachment_url($item['block_bgimg1']['id'])): ?>
                                                    <div class="shape-5 p_absolute b_20 float-bob-y" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg1']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
                                                    <div class="shape-6 p_absolute w_170 h_170 bg-color-1 b_radius_50"></div>
                                                </div> 
                                                <figure class="image p_relative d_block b_radius_10">
													<?php if(wp_get_attachment_url($item['block_image']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-12 col-sm-12 content-column">
                                        <div class="content_block_27">
                                            <div class="content-box p_relative d_block ml_30">
                                                <div class="sec-title-six p_relative d_block mb_25">
                                                    <h2 class="d_block fs_40 lh_50 fw_bold"><?php echo wp_kses($item['block_title'], $allowed_tags);?></h2>
                                                </div>
                                                <div class="text p_relative d_block mb_25">
                                                    <p class="font_family_poppins"><?php echo wp_kses($item['block_text'], $allowed_tags);?></p>
                                                </div>
                                                <ul class="list-style-one clearfix p_relative d_block mb_35">
                                                    <?php $fearures = explode("\n", ($item['block_feature_str']));?>
													<?php foreach($fearures as $feature):?>
													<?php echo wp_kses($feature, true); ?>
													<?php endforeach; ?>
                                                </ul>
												<?php if(wp_kses($item['block_button'], $allowed_tags)): ?>
                                                <div class="btn-box">
                                                    <a href="<?php echo esc_url($item['block_btnlink']['url']);?>" class="theme-btn theme-btn-five"><?php echo wp_kses($item['block_button'], $allowed_tags);?> <i class="icon-4"></i></a>
                                                </div>
												<?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="inner-box p_relative mb_150">
                                <div class="row clearfix">
                                    <div class="col-lg-6 col-md-12 col-sm-12 content-column">
                                        <div class="content_block_27">
                                            <div class="content-box p_relative d_block mr_30">
                                                <div class="sec-title-six p_relative d_block mb_25">
                                                    <h2 class="d_block fs_40 lh_50 fw_bold"><?php echo wp_kses($item['block_title1'], $allowed_tags);?></h2>
                                                </div>
                                                <div class="text p_relative d_block mb_25">
                                                    <p class="font_family_poppins"><?php echo wp_kses($item['block_text1'], $allowed_tags);?></p>
                                                </div>
                                                <ul class="list-style-one clearfix p_relative d_block mb_35">
                                                    <?php $fearures = explode("\n", ($item['block_feature_str1']));?>
													<?php foreach($fearures as $feature):?>
													<?php echo wp_kses($feature, true); ?>
													<?php endforeach; ?>
                                                </ul>
												<?php if(wp_kses($item['block_button1'], $allowed_tags)): ?>
                                                <div class="btn-box">
                                                    <a href="<?php echo esc_url($item['block_btnlink1']['url']);?>" class="theme-btn theme-btn-five"><?php echo wp_kses($item['block_button1'], $allowed_tags);?> <i class="icon-4"></i></a>
                                                </div>
												<?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-12 col-sm-12 image-column">
                                        <div class="image_block_24">
                                            <div class="image-box p_relative d_block ml_30">
                                                <div class="shape">
													<?php if(wp_get_attachment_url($item['block_bgimg2']['id'])): ?>
                                                    <div class="float-bob-x shape-1 p_absolute w_95 h_95" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg2']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
													<?php if(wp_get_attachment_url($item['block_bgimg3']['id'])): ?>
                                                    <div class="shape-2 p_absolute b_20 float-bob-y" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg3']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
                                                    <div class="shape-3 p_absolute w_170 h_170 bg-color-1 b_radius_50"></div>
                                                </div> 
                                                <figure class="image p_relative d_block b_radius_10">
													<?php if(wp_get_attachment_url($item['block_image1']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image1']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text1'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="inner-box p_relative mb_150">
                                <div class="row clearfix">
                                    <div class="col-lg-6 col-md-12 col-sm-12 image-column">
                                        <div class="image_block_24">
                                            <div class="image-box p_relative d_block mr_30">
                                                <div class="shape">
													<?php if(wp_get_attachment_url($item['block_bgimg3']['id'])): ?>
                                                    <div class="float-bob-x shape-4 p_absolute w_95 h_95" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg3']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
													<?php if(wp_get_attachment_url($item['block_bgimg4']['id'])): ?>
                                                    <div class="shape-5 p_absolute b_20 float-bob-y" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg4']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
                                                    <div class="shape-6 p_absolute w_170 h_170 bg-color-1 b_radius_50"></div>
                                                </div> 
                                                <figure class="image p_relative d_block b_radius_10">
													<?php if(wp_get_attachment_url($item['block_image2']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image2']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text2'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-12 col-sm-12 content-column">
                                        <div class="content_block_27">
                                            <div class="content-box p_relative d_block ml_30">
                                                <div class="sec-title-six p_relative d_block mb_25">
                                                    <h2 class="d_block fs_40 lh_50 fw_bold"><?php echo wp_kses($item['block_title2'], $allowed_tags);?></h2>
                                                </div>
                                                <div class="text p_relative d_block mb_25">
                                                    <p class="font_family_poppins"><?php echo wp_kses($item['block_text2'], $allowed_tags);?></p>
                                                </div>
                                                <ul class="list-style-one clearfix p_relative d_block mb_35">
                                                    <?php $fearures = explode("\n", ($item['block_feature_str2']));?>
													<?php foreach($fearures as $feature):?>
													<?php echo wp_kses($feature, true); ?>
													<?php endforeach; ?>
                                                </ul>
												<?php if(wp_kses($item['block_button2'], $allowed_tags)): ?>
                                                <div class="btn-box">
                                                    <a href="<?php echo esc_url($item['block_btnlink2']['url']);?>" class="theme-btn theme-btn-five"><?php echo wp_kses($item['block_button2'], $allowed_tags);?> <i class="icon-4"></i></a>
                                                </div>
												<?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="inner-box p_relative">
                                <div class="row clearfix">
                                    <div class="col-lg-6 col-md-12 col-sm-12 content-column">
                                        <div class="content_block_27">
                                            <div class="content-box p_relative d_block mr_30">
                                                <div class="sec-title-six p_relative d_block mb_25">
                                                    <h2 class="d_block fs_40 lh_50 fw_bold"><?php echo wp_kses($item['block_title3'], $allowed_tags);?></h2>
                                                </div>
                                                <div class="text p_relative d_block mb_25">
                                                    <p class="font_family_poppins"><?php echo wp_kses($item['block_text3'], $allowed_tags);?></p>
                                                </div>
                                                <ul class="list-style-one clearfix p_relative d_block mb_35">
                                                    <?php $fearures = explode("\n", ($item['block_feature_str3']));?>
													<?php foreach($fearures as $feature):?>
													<?php echo wp_kses($feature, true); ?>
													<?php endforeach; ?>
                                                </ul>
												<?php if(wp_kses($item['block_button3'], $allowed_tags)): ?>
                                                <div class="btn-box">
                                                    <a href="<?php echo esc_url($item['block_btnlink3']['url']);?>" class="theme-btn theme-btn-five"><?php echo wp_kses($item['block_button3'], $allowed_tags);?> <i class="icon-4"></i></a>
                                                </div>
												<?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-12 col-sm-12 image-column">
                                        <div class="image_block_24">
                                            <div class="image-box p_relative d_block ml_30">
                                                <div class="shape">
													<?php if(wp_get_attachment_url($item['block_bgimg5']['id'])): ?>
                                                    <div class="float-bob-x shape-1 p_absolute w_95 h_95" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg5']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
													<?php if(wp_get_attachment_url($item['block_bgimg6']['id'])): ?>
                                                    <div class="shape-2 p_absolute b_20 float-bob-y" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg6']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
                                                    <div class="shape-3 p_absolute w_170 h_170 bg-color-1 b_radius_50"></div>
                                                </div> 
                                                <figure class="image p_relative d_block b_radius_10">
													<?php if(wp_get_attachment_url($item['block_image3']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image3']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text3'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
						
						<?php endif ;?>
						<?php endforeach; ?>
						
                    </div>
                </div>
            </div>
        </section>
		
		<?php endif;?>
		
		<?php  if ( 'style2' === $settings['style'] ) : ?>
		
		<section class="service-20 p_relative sec-pad <?php echo esc_attr($settings['sec_class']);?>">
            <div class="auto-container">
                <div class="tabs-box">
                    <div class="tab-btn-box p_relative d_block mb_120">
                        <ul class="tab-btns tab-buttons clearfix centred">
						
							<?php foreach($settings['repeat'] as $key=>$item):?>
						
                            <li class="tab-btn <?php if($key == 0) echo 'active-btn';?>" data-tab="#tab-<?php echo esc_attr($key);?>">
                                <div class="icon-box p_relative d_block fs_45 color_black tran_5 mb_16 z_1"><i class="<?php echo str_replace("icon ", " ", esc_attr( $item['block_icons']));?>"></i></div>
                                <h6 class="fs_18 fw_medium tran_5 z_1"><?php echo wp_kses($item['block_tab_button'], $allowed_tags);?></h6>
                            </li>
							
							<?php endforeach; ?>
							
                        </ul>
                    </div>
                    <div class="tabs-content">
					
						<?php foreach($settings['repeat'] as $key=>$item):?>
					
                        <div class="tab <?php if($key == 0) echo 'active-tab';?>" id="tab-<?php echo esc_attr($key);?>">
                            <div class="inner-box p_relative">
                                <div class="row clearfix">
                                    <div class="col-lg-6 col-md-12 col-sm-12 content-column">
                                        <div class="content_block_27">
                                            <div class="content-box p_relative d_block mr_30">
                                                <div class="sec-title-six p_relative d_block mb_25">
                                                    <h2 class="d_block fs_40 lh_50 fw_bold"><?php echo wp_kses($item['block_title'], $allowed_tags);?></h2>
                                                </div>
                                                <div class="text p_relative d_block mb_25">
                                                    <p class="font_family_poppins"><?php echo wp_kses($item['block_text'], $allowed_tags);?></p>
                                                </div>
                                                <ul class="list-style-one clearfix p_relative d_block mb_35">
                                                    <?php $fearures = explode("\n", ($item['block_feature_str']));?>
													<?php foreach($fearures as $feature):?>
													<?php echo wp_kses($feature, true); ?>
													<?php endforeach; ?>
                                                </ul>
												<?php if(wp_kses($item['block_button'], $allowed_tags)): ?>
                                                <div class="btn-box">
                                                    <a href="<?php echo esc_url($item['block_btnlink']['url']);?>" class="theme-btn theme-btn-eight"><?php echo wp_kses($item['block_button'], $allowed_tags);?> <i class="icon-4"></i></a>
                                                </div>
												<?php endif; ?>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-12 col-sm-12 image-column">
                                        <div class="image_block_24">
                                            <div class="image-box p_relative d_block ml_30">
                                                <div class="shape">
													<?php if(wp_get_attachment_url($item['block_bgimg']['id'])): ?>
                                                    <div class="float-bob-x shape-1 p_absolute w_95 h_95" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
													<?php if(wp_get_attachment_url($item['block_bgimg1']['id'])): ?>
                                                    <div class="shape-2 p_absolute b_20 float-bob-y" style="background-image: url(<?php echo wp_get_attachment_url($item['block_bgimg1']['id']);?>);">
													<?php else :?>
													<div class="noimage">
													<?php endif;?>
													</div>
                                                    <div class="shape-3 p_absolute w_170 h_170 bg-color-1 b_radius_50"></div>
                                                </div> 
                                                <figure class="image p_relative d_block b_radius_10">
													<?php if(wp_get_attachment_url($item['block_image']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
						
						<?php endforeach; ?>
						
                    </div>
                </div>
            </div>
        </section>
		
		<?php endif;?>
		
		<?php  if ( 'style3' === $settings['style'] ) : ?>
		
		<section class="service-21 p_relative sec-pad bg-color-1 <?php echo esc_attr($settings['sec_class']);?>">
            <div class="auto-container">
                <div class="tabs-box">
                    <div class="row clearfix">
                        <div class="col-lg-4 col-md-12 col-sm-12 btn-column">
                            <div class="tab-btn-box p_relative d_block mr_50">
                                <ul class="tab-btns tab-buttons clearfix">
								
									<?php foreach($settings['repeat'] as $key=>$item):?>
								
                                    <li class="tab-btn <?php if($key == 0) echo 'active-btn';?>" data-tab="#tab-<?php echo esc_attr($key);?>">
                                        <div class="icon-box p_absolute fs_30 color_black tran_5 l_30"><i class="<?php echo str_replace("icon ", " ", esc_attr( $item['block_icons']));?>"></i></div>
                                        <h6 class="fs_16 tran_5 fw_sbold"><?php echo wp_kses($item['block_tab_button'], $allowed_tags);?></h6>
                                    </li>
									
									<?php endforeach; ?>
									
                                </ul>
                            </div>
                        </div>
                        <div class="col-lg-8 col-md-12 col-sm-12 inner-column">
                            <div class="tabs-content p_relative">
                                <div class="shape">
									<?php  if ( esc_url($settings['bgimg']['id']) ) : ?>
                                    <div class="shape-1 float-bob-x p_absolute w_95 h_95" style="background-image: url(<?php echo wp_get_attachment_url($settings['bgimg']['id']);?>);">
									<?php else :?>	
									<div class="noimage">
									<?php endif;?>
									</div>
									<?php  if ( esc_url($settings['bgimg1']['id']) ) : ?>
                                    <div class="shape-2 p_absolute b_15 w_95 h_95 float-bob-y" style="background-image: url(<?php echo wp_get_attachment_url($settings['bgimg']['id']);?>);">
									<?php else :?>	
									<div class="noimage">
									<?php endif;?>
									</div>
                                    <div class="shape-3 p_absolute w_170 h_170 b_radius_50"></div>
                                </div>
								
								<?php foreach($settings['repeat'] as $key=>$item):?>
								
                                <div class="tab <?php if($key == 0) echo 'active-tab';?>" id="tab-<?php echo esc_attr($key);?>">
                                    <div class="content_block_28">
                                        <div class="content-box p_relative d_block pt_50 pl_50 pb_50 b_shadow_6 b_radius_10">
                                            <div class="inner p_relative d_block pt_10">
                                                <h3 class="d_block fs_30 lh_40 fw_bold mb_20"><?php echo wp_kses($item['block_title'], $allowed_tags);?></h3>
                                                <p class="font_family_poppins mb_20"><?php echo wp_kses($item['block_text'], $allowed_tags);?></p>
                                                <ul class="list clearfix p_relative d_block mb_25">
                                                    <?php $fearures = explode("\n", ($item['block_feature_str']));?>
													<?php foreach($fearures as $feature):?>
													<?php echo wp_kses($feature, true); ?>
													<?php endforeach; ?>
                                                </ul>
												<?php if(wp_kses($item['block_button'], $allowed_tags)): ?>
                                                <div class="btn-box">
                                                    <a href="<?php echo esc_url($item['block_btnlink']['url']);?>" class="theme-btn theme-btn-six"><?php echo wp_kses($item['block_button'], $allowed_tags);?> <i class="icon-4"></i></a>
                                                </div>
												<?php endif; ?>
                                            </div>
											
											<div class="image-box p_absolute t_50 r_50 b_radius_10">
                                                <figure class="image p_relative d_block b_radius_10 mb_30 mb_30">
													<?php if(wp_get_attachment_url($item['block_image']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
												
                                                <figure class="image p_relative d_block b_radius_10 mb_30">
													<?php if(wp_get_attachment_url($item['block_image1']['id'])): ?>
													<img src="<?php echo wp_get_attachment_url($item['block_image1']['id']);?>" alt="<?php echo wp_kses($item['block_alt_text1'], $allowed_tags);?>">
													<?php else :?>
													<div class="noimage"></div>
													<?php endif;?>
												</figure>
                                            </div>
                                        </div>
                                    </div>
                                </div>
								
								<?php endforeach; ?>
								
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
		
		<?php endif;?>

             
		<?php 
	}

}