<div class="front_page_section front_page_section_googlemap<?php
	$tourimo_scheme = tourimo_get_theme_option( 'front_page_googlemap_scheme' );
	if ( ! empty( $tourimo_scheme ) && ! tourimo_is_inherit( $tourimo_scheme ) ) {
		echo ' scheme_' . esc_attr( $tourimo_scheme );
	}
	echo ' front_page_section_paddings_' . esc_attr( tourimo_get_theme_option( 'front_page_googlemap_paddings' ) );
	if ( tourimo_get_theme_option( 'front_page_googlemap_stack' ) ) {
		echo ' sc_stack_section_on';
	}
?>"
		<?php
		$tourimo_css      = '';
		$tourimo_bg_image = tourimo_get_theme_option( 'front_page_googlemap_bg_image' );
		if ( ! empty( $tourimo_bg_image ) ) {
			$tourimo_css .= 'background-image: url(' . esc_url( tourimo_get_attachment_url( $tourimo_bg_image ) ) . ');';
		}
		if ( ! empty( $tourimo_css ) ) {
			echo ' style="' . esc_attr( $tourimo_css ) . '"';
		}
		?>
>
<?php
	// Add anchor
	$tourimo_anchor_icon = tourimo_get_theme_option( 'front_page_googlemap_anchor_icon' );
	$tourimo_anchor_text = tourimo_get_theme_option( 'front_page_googlemap_anchor_text' );
if ( ( ! empty( $tourimo_anchor_icon ) || ! empty( $tourimo_anchor_text ) ) && shortcode_exists( 'trx_sc_anchor' ) ) {
	echo do_shortcode(
		'[trx_sc_anchor id="front_page_section_googlemap"'
									. ( ! empty( $tourimo_anchor_icon ) ? ' icon="' . esc_attr( $tourimo_anchor_icon ) . '"' : '' )
									. ( ! empty( $tourimo_anchor_text ) ? ' title="' . esc_attr( $tourimo_anchor_text ) . '"' : '' )
									. ']'
	);
}
?>
	<div class="front_page_section_inner front_page_section_googlemap_inner
		<?php
		$tourimo_layout = tourimo_get_theme_option( 'front_page_googlemap_layout' );
		echo ' front_page_section_layout_' . esc_attr( $tourimo_layout );
		if ( tourimo_get_theme_option( 'front_page_googlemap_fullheight' ) ) {
			echo ' tourimo-full-height sc_layouts_flex sc_layouts_columns_middle';
		}
		?>
		"
			<?php
			$tourimo_css      = '';
			$tourimo_bg_mask  = tourimo_get_theme_option( 'front_page_googlemap_bg_mask' );
			$tourimo_bg_color_type = tourimo_get_theme_option( 'front_page_googlemap_bg_color_type' );
			if ( 'custom' == $tourimo_bg_color_type ) {
				$tourimo_bg_color = tourimo_get_theme_option( 'front_page_googlemap_bg_color' );
			} elseif ( 'scheme_bg_color' == $tourimo_bg_color_type ) {
				$tourimo_bg_color = tourimo_get_scheme_color( 'bg_color', $tourimo_scheme );
			} else {
				$tourimo_bg_color = '';
			}
			if ( ! empty( $tourimo_bg_color ) && $tourimo_bg_mask > 0 ) {
				$tourimo_css .= 'background-color: ' . esc_attr(
					1 == $tourimo_bg_mask ? $tourimo_bg_color : tourimo_hex2rgba( $tourimo_bg_color, $tourimo_bg_mask )
				) . ';';
			}
			if ( ! empty( $tourimo_css ) ) {
				echo ' style="' . esc_attr( $tourimo_css ) . '"';
			}
			?>
	>
		<div class="front_page_section_content_wrap front_page_section_googlemap_content_wrap
		<?php
		if ( 'fullwidth' != $tourimo_layout ) {
			echo ' content_wrap';
		}
		?>
		">
			<?php
			// Content wrap with title and description
			$tourimo_caption     = tourimo_get_theme_option( 'front_page_googlemap_caption' );
			$tourimo_description = tourimo_get_theme_option( 'front_page_googlemap_description' );
			if ( ! empty( $tourimo_caption ) || ! empty( $tourimo_description ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) {
				if ( 'fullwidth' == $tourimo_layout ) {
					?>
					<div class="content_wrap">
					<?php
				}
					// Caption
				if ( ! empty( $tourimo_caption ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) {
					?>
					<h2 class="front_page_section_caption front_page_section_googlemap_caption front_page_block_<?php echo ! empty( $tourimo_caption ) ? 'filled' : 'empty'; ?>">
					<?php
					echo wp_kses( $tourimo_caption, 'tourimo_kses_content' );
					?>
					</h2>
					<?php
				}

					// Description (text)
				if ( ! empty( $tourimo_description ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) {
					?>
					<div class="front_page_section_description front_page_section_googlemap_description front_page_block_<?php echo ! empty( $tourimo_description ) ? 'filled' : 'empty'; ?>">
					<?php
					echo wp_kses( wpautop( $tourimo_description ), 'tourimo_kses_content' );
					?>
					</div>
					<?php
				}
				if ( 'fullwidth' == $tourimo_layout ) {
					?>
					</div>
					<?php
				}
			}

			// Content (text)
			$tourimo_content = tourimo_get_theme_option( 'front_page_googlemap_content' );
			if ( ! empty( $tourimo_content ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) {
				if ( 'columns' == $tourimo_layout ) {
					?>
					<div class="front_page_section_columns front_page_section_googlemap_columns columns_wrap">
						<div class="column-1_3">
					<?php
				} elseif ( 'fullwidth' == $tourimo_layout ) {
					?>
					<div class="content_wrap">
					<?php
				}

				?>
				<div class="front_page_section_content front_page_section_googlemap_content front_page_block_<?php echo ! empty( $tourimo_content ) ? 'filled' : 'empty'; ?>">
				<?php
					echo wp_kses( $tourimo_content, 'tourimo_kses_content' );
				?>
				</div>
				<?php

				if ( 'columns' == $tourimo_layout ) {
					?>
					</div><div class="column-2_3">
					<?php
				} elseif ( 'fullwidth' == $tourimo_layout ) {
					?>
					</div>
					<?php
				}
			}

			// Widgets output
			?>
			<div class="front_page_section_output front_page_section_googlemap_output">
				<?php
				if ( is_active_sidebar( 'front_page_googlemap_widgets' ) ) {
					dynamic_sidebar( 'front_page_googlemap_widgets' );
				} elseif ( current_user_can( 'edit_theme_options' ) ) {
					if ( ! tourimo_exists_trx_addons() ) {
						tourimo_customizer_need_trx_addons_message();
					} else {
						tourimo_customizer_need_widgets_message( 'front_page_googlemap_caption', 'ThemeREX Addons - Google map' );
					}
				}
				?>
			</div>
			<?php

			if ( 'columns' == $tourimo_layout && ( ! empty( $tourimo_content ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) ) {
				?>
				</div></div>
				<?php
			}
			?>
		</div>
	</div>
</div>
