<div class="front_page_section front_page_section_contacts<?php
	$tourimo_scheme = tourimo_get_theme_option( 'front_page_contacts_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_contacts_paddings' ) );
	if ( tourimo_get_theme_option( 'front_page_contacts_stack' ) ) {
		echo ' sc_stack_section_on';
	}
?>"
		<?php
		$tourimo_css      = '';
		$tourimo_bg_image = tourimo_get_theme_option( 'front_page_contacts_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_contacts_anchor_icon' );
	$tourimo_anchor_text = tourimo_get_theme_option( 'front_page_contacts_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_contacts"'
									. ( ! 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_contacts_inner
	<?php
	if ( tourimo_get_theme_option( 'front_page_contacts_fullheight' ) ) {
		echo ' tourimo-full-height sc_layouts_flex sc_layouts_columns_middle';
	}
	?>
			"
			<?php
			$tourimo_css      = '';
			$tourimo_bg_mask  = tourimo_get_theme_option( 'front_page_contacts_bg_mask' );
			$tourimo_bg_color_type = tourimo_get_theme_option( 'front_page_contacts_bg_color_type' );
			if ( 'custom' == $tourimo_bg_color_type ) {
				$tourimo_bg_color = tourimo_get_theme_option( 'front_page_contacts_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_contacts_content_wrap content_wrap">
			<?php

			// Title and description
			$tourimo_caption     = tourimo_get_theme_option( 'front_page_contacts_caption' );
			$tourimo_description = tourimo_get_theme_option( 'front_page_contacts_description' );
			if ( ! empty( $tourimo_caption ) || ! empty( $tourimo_description ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) {
				// Caption
				if ( ! empty( $tourimo_caption ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) {
					?>
					<h2 class="front_page_section_caption front_page_section_contacts_caption front_page_block_<?php echo ! empty( $tourimo_caption ) ? 'filled' : 'empty'; ?>">
					<?php
						echo wp_kses( $tourimo_caption, 'tourimo_kses_content' );
					?>
					</h2>
					<?php
				}

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

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

			if ( ( ! empty( $tourimo_content ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) ) {
				?>
				<div class="front_page_section_content front_page_section_contacts_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 && ( ! empty( $tourimo_content ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) ) {
				?>
				</div><div class="column-2_3">
				<?php
			}

			// Shortcode output
			$tourimo_sc = tourimo_get_theme_option( 'front_page_contacts_shortcode' );
			if ( ! empty( $tourimo_sc ) || ( current_user_can( 'edit_theme_options' ) && is_customize_preview() ) ) {
				?>
				<div class="front_page_section_output front_page_section_contacts_output front_page_block_<?php echo ! empty( $tourimo_sc ) ? 'filled' : 'empty'; ?>">
					<?php
					tourimo_show_layout( do_shortcode( $tourimo_sc ) );
					?>
				</div>
				<?php
			}

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

		</div>
	</div>
</div>
