<?php
/**
 * Template part for displaying Call To Action Section
 *
 * @package Spiral_Lite_One_Page
 */

$call_to_action_section_title      = get_theme_mod( 'spiral_lite_one_page_cta_section_title' );
$call_to_action_section_content    = get_theme_mod( 'spiral_lite_one_page_cta_section_content', __("This is call To Action <span>Buttons</span>!", 'spiral-lite-one-page') );
$call_to_action_section_button     = get_theme_mod( 'spiral_lite_one_page_cta_section_button', __("View Features", 'spiral-lite-one-page') );
$call_to_action_section_button_url = get_theme_mod( 'spiral_lite_one_page_cta_section_button_url', __("#services", 'spiral-lite-one-page') );

$call_to_action_section_button_2     = get_theme_mod( 'spiral_lite_one_page_cta_section_button_2', __("Buy Theme Now", 'spiral-lite-one-page') );
$call_to_action_section_button_2_url = get_theme_mod( 'spiral_lite_one_page_cta_section_button_2_url', __("#", 'spiral-lite-one-page') );

if( $call_to_action_section_title || $call_to_action_section_content ) {
    echo '<div class="col-lg-6">';
    echo '<h2>' . wp_kses_post( $call_to_action_section_content ) . '</h2>';        
    //echo wpautop( wp_kses_post( $call_to_action_section_content ) );
    echo '</div>';

    if( $call_to_action_section_button && $call_to_action_section_button_url ) {
        echo '<div class="col-lg-6"><p>';
        echo '<a href="' . esc_url( $call_to_action_section_button_url ) . '" class="btn btn-contour btn-big">' . esc_html( $call_to_action_section_button ) . '</a>';

        if( $call_to_action_section_button_2 && $call_to_action_section_button_2_url ) {
            echo '<a href="' . esc_url( $call_to_action_section_button_2_url ) . '" class="btn btn-outline-light btn-big left-margin">' . esc_html( $call_to_action_section_button_2 ) . '</a>';
        }

        echo '</p></div>';
    }
}
?>
