<?php
/**
 * CSS related hooks
 *
 * This file contains hook functions which are related to CSS.
 *
 * @package Education_Soul
 */

if ( ! function_exists( 'education_soul_add_theme_custom_font_css' ) ) :

	/**
	 * Inject theme custom font CSS.
	 *
	 * @since 1.0.0
	 */
	function education_soul_add_theme_custom_font_css() {

		$custom_css = '';

		$font_settings = education_soul_get_font_family_theme_settings_options();

		$required_fonts = array();

		if ( ! empty( $font_settings ) ) {
			foreach ( $font_settings as $key => $val ) {
				$option_value = education_soul_get_option( $key );
				if ( ! empty( $option_value ) && $val['default'] !== $option_value ) {
					$required_fonts[ $key ] = $option_value;
				}
			}
		}
		if ( empty( $required_fonts ) ) {
			// We do not need extra CSS.
			return;
		}

		foreach ( $required_fonts as $key => $font ) {

			$family = education_soul_get_font_family_from_key( $font );

			if ( ! empty( $family ) ) {

				switch ( $key ) {
					case 'font_site_default':
						$custom_css .= 'body{font-family:' . $family . '}' . "\n";
					break;

					case 'font_site_title':
						$custom_css .= '.site-title{font-family:' . $family . '}' . "\n";
					break;

					case 'font_site_tagline':
						$custom_css .= '.site-description{font-family:' . $family . '}' . "\n";
					break;

					case 'font_heading_tags':
						$custom_css .= 'h1,h2,h3,h4,h5,h6{font-family:' . $family . '}' . "\n";
					break;

					case 'font_content_title':
						$custom_css .= '.entry-header .entry-title{font-family:' . $family . '}' . "\n";
					break;

					case 'font_content_body':
						$custom_css .= '#content{font-family:' . $family . '}' . "\n";
					break;

					case 'font_navigation':
						$custom_css .= '#site-navigation ul li a{font-family:' . $family . '}' . "\n";
					break;

					default:
					break;
				}
			}
		}

		wp_add_inline_style( 'education-soul-style', $custom_css );
	}
endif;
add_action( 'wp_enqueue_scripts', 'education_soul_add_theme_custom_font_css', 25 );


if ( ! function_exists( 'education_soul_add_theme_custom_color_css' ) ) :

	/**
	 * Inject theme custom color CSS.
	 *
	 * @since 1.0.0
	 */
	function education_soul_add_theme_custom_color_css() {

		$custom_css = '';

		$color_settings = education_soul_get_color_theme_settings_options();

		$default = education_soul_get_default_colors();

		$required_colors = array();

		if ( ! empty( $color_settings ) ) {
		  foreach ($color_settings as $key => $val ) {
		    $option_value = education_soul_get_option( $key );
		    if ( ! empty( $option_value ) && $default[$key] != $option_value ) {
		      $required_colors[ $key ] = $option_value;
		    }
		  }
		}
		if ( empty( $required_colors ) ) {
		  // We do not need extra CSS.
		  return;
		}

		foreach ( $required_colors as $key => $color ) {

			switch ( $key ) {

				// Basic.
				case 'color_basic_text':
				  $custom_css .= 'body,#content p{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_basic_link':
				  $custom_css .= 'a,a:visited{color:' . esc_attr( $color ) . '}' . "\n";
				  $custom_css .= '#mobile-trigger i,#mobile-trigger2 i{background-color:' . esc_attr( $color ) . '}' . "\n";
				   $custom_css .= '#front-page-home-sections .section-title, #education-soul-front-page-widgets .widget-title{border-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_basic_link_hover':
				  $custom_css .= 'a:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_basic_heading':
				  $custom_css .= 'h1,h2,h3,h4,h5,h6{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_basic_page_title':
				  $custom_css .= '.page-title,#custom-header .page-title{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_basic_button_text':
				$custom_css .= '#primary #infinite-handle span button, a.custom-button, a.custom-button:visited, button, a.button, input[type="button"], input[type="reset"], input[type="submit"],.header-search-box > a, .header-search-box > a:visited{color:' . esc_attr( $color ) . '}' . "\n";
				break;
				case 'color_basic_button_text_hover':
				  $custom_css .= '#primary #infinite-handle span button:hover, a.custom-button:hover, button:hover, a.button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, #primary #infinite-handle span button:focus, button:focus, a.button:focus, a.custom-button:focus, input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus, #primary #infinite-handle span button:active, button:active, a.custom-button:active, input[type="button"]:active, input[type="reset"]:active, input[type="submit"]:active,.header-search-box > a:hover, .header-search-box > a:focus, .header-search-box > a:active{color:' . esc_attr( $color ) . '}' . "\n";
				break;
				case 'color_basic_button_background':
				  $custom_css .= '#primary #infinite-handle span button, a.custom-button, a.custom-button:visited, button, a.button, input[type="button"], input[type="reset"], input[type="submit"],.header-search-box > a, .header-search-box > a:visited{background-color:' . esc_attr( $color ) . '}' . "\n";
				break;
				case 'color_basic_button_background_hover':
				  $custom_css .= '#primary #infinite-handle span button:hover, a.custom-button:hover, button:hover, a.button:hover, input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover, #primary #infinite-handle span button:focus, button:focus, a.button:focus, a.custom-button:focus, input[type="button"]:focus, input[type="reset"]:focus, input[type="submit"]:focus, #primary #infinite-handle span button:active, button:active, a.custom-button:active, input[type="button"]:active, input[type="reset"]:active, input[type="submit"]:active,.header-search-box > a:hover, .header-search-box > a:focus, .header-search-box > a:active{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_basic_button_secondary_text':
				$custom_css .= '.custom-button.button-secondary, .custom-button.button-secondary:visited{color:' . esc_attr( $color ) . '}' . "\n";
				break;
				case 'color_basic_button_secondary_text_hover':
				  $custom_css .= '.custom-button.button-secondary:hover,.custom-button.button-secondary:active,.custom-button.button-secondary:focus{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_basic_button_secondary_background':
				  $custom_css .= '.custom-button.button-secondary, .custom-button.button-secondary:visited{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_basic_button_secondary_background_hover':
				  $custom_css .= '.custom-button.button-secondary:hover,.custom-button.button-secondary:active,.custom-button.button-secondary:focus{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				 // Top Header.
				case 'color_top_header_background':
				  $custom_css .= '#tophead{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_top_header_news_title_background':
				  $custom_css .= '.top-news .top-news-title{background-color:' . esc_attr( $color ) . '}' . "\n";
		        break;
				case 'color_top_header_news_title':
				  $custom_css .= '.top-news .top-news-title{color:' . esc_attr( $color ) . '}' . "\n";
		        break;
		        case 'color_top_header_news_text':
				  $custom_css .= '#quick-contact li:before, #quick-contact, #quick-contact li{color:' . esc_attr( $color ) . '}' . "\n";
		        break;
				case 'color_top_header_link':
				  $custom_css .= '#tophead a,#top-nav ul li a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_top_header_link_hover':
				  $custom_css .= '#tophead a:hover,#top-nav ul li a:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;


				// Header.
				case 'color_header_background':
				  $custom_css .= '#masthead{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_header_title':
				  $custom_css .= '#site-identity .site-title > a,#site-identity .site-title > a:visited{color:' . esc_attr( $color ) . '}' . "\n";
		          break;
				case 'color_header_title_hover':
				  $custom_css .= '#site-identity .site-title > a:hover,#site-identity .site-title > a:focus,#site-identity .site-title > a:active{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_header_tagline':
				  $custom_css .= '.site-description{color:' . esc_attr( $color ) . '}' . "\n";
				  break;


			   // Primary Menu.

				case 'color_primary_menu_link':
				  $custom_css .= '#main-nav ul li a,.dropdown-toggle::after{color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				case 'color_primary_menu_link_hover':
				  $custom_css .= '#main-nav ul li a:hover,#main-nav li.current-menu-item > a,
				  #main-nav li.current_page_item > a,#main-nav ul li:hover > a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				case 'color_primary_menu_submenu_background':
				    $custom_css .= '#main-nav ul ul{background-color:' . esc_attr( $color ) . '}' . "\n";
				    $custom_css .= '.main-navigation ul ul:before{border-bottom-color:' . esc_attr( $color ) . '}' . "\n";

					break;
				case 'color_primary_submenu_link':
				  $custom_css .= '#main-nav ul ul li a{color:' . esc_attr( $color ) . '}' . "\n";
					break;

				case 'color_primary_submenu_link_hover':
				  $custom_css .= '#main-nav ul ul li a:hover,#main-nav ul ul li.current-menu-item > a,
				  #main-nav ul ul li.current_page_item > a{color:' . esc_attr( $color ) . '}' . "\n";
				 	break;


				// Slider.

				case 'color_slider_caption_text':
				  $custom_css .= '#main-slider p, #custom-header p {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_caption_link':
				  $custom_css .= '#main-slider h3 a, #custom-header h3, #custom-header h3 a {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_caption_link_hover':
				  $custom_css .= '#main-slider h3 a:hover, #custom-header h3 a:hover {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_icon':
				  $custom_css .= '#main-slider .cycle-prev, #main-slider .cycle-next{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_icon_hover':
				  $custom_css .= '#main-slider .cycle-prev:hover, #main-slider .cycle-next:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_icon_background':
				  $custom_css .= '#main-slider .cycle-prev, #main-slider .cycle-next{background-color:' . esc_attr( $color ) . '}' . "\n";
				   $custom_css .= '#main-slider .cycle-prev, #main-slider .cycle-next{border-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_icon_background_hover':
				  $custom_css .= '#main-slider .cycle-prev:hover, #main-slider .cycle-next:hover{background-color:' . esc_attr( $color ) . '}' . "\n";
				   $custom_css .= '#main-slider .cycle-prev:hover, #main-slider .cycle-next:hover{border-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_pager':
				  $custom_css .= '#main-slider .pager-box{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_pager_active':
				  $custom_css .= '#main-slider .pager-box:hover,#main-slider .pager-box.cycle-pager-active{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_primary_button':
				  $custom_css .= '#main-slider .slider-buttons .button-primary, #custom-header .header-image-buttons .button-primary {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_secondary_button':
				  $custom_css .= '#main-slider .slider-buttons .button-secondary, #custom-header .header-image-buttons .button-secondary {color:' . esc_attr( $color ) . '}' . "\n";
				break;
				case 'color_slider_primary_button_background':
				  $custom_css .= '#main-slider .slider-buttons .button-primary, #custom-header .header-image-buttons .button-primary {background-color:' . esc_attr( $color ) . '}' . "\n";
				break;
				case 'color_slider_secondary_button_background':
				  $custom_css .= '#main-slider .slider-buttons .button-secondary, #custom-header .header-image-buttons .button-secondary {background-color:' . esc_attr( $color ) . '}' . "\n";
				break;
				case 'color_slider_primary_button_hover':
				  $custom_css .= '#main-slider .slider-buttons .button-primary:hover, #custom-header .header-image-buttons .button-primary:hover {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_slider_secondary_button_hover':
				  $custom_css .= '#main-slider .slider-buttons .button-secondary:hover, #custom-header .header-image-buttons .button-secondary:hover {color:' . esc_attr( $color ) . '}' . "\n";
				break;
				case 'color_slider_primary_button_background_hover':
				  $custom_css .= '#main-slider .slider-buttons .button-primary:hover, #custom-header .header-image-buttons .button-primary:hover {background-color:' . esc_attr( $color ) . '}' . "\n";
				break;
				case 'color_slider_secondary_button_background_hover':
				  $custom_css .= '#main-slider .slider-buttons .button-secondary:hover, #custom-header .header-image-buttons .button-secondary:hover{background-color:' . esc_attr( $color ) . '}' . "\n";
				break;

				// Content.
				case 'color_content_background':
				  $custom_css .= '#content{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_primary_content_background':
				  $custom_css .= '#primary article.hentry,nav.navigation.pagination,.page-header{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_content_title':
				  $custom_css .= '#primary .entry-title,#primary .entry-title a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_content_text':
				  $custom_css .= '#primary , #primary  p {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_content_link':
				  $custom_css .= '#primary article a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_content_link_hover':
				  $custom_css .= '#primary article a:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_content_meta_link':
				  $custom_css .= '#primary .entry-meta > span a,#primary .entry-footer > span a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_content_meta_link_hover':
				  $custom_css .= '#primary .entry-meta > span a:hover,#primary  .entry-footer > span a:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_content_meta_icon':
				  $custom_css .= '#primary .entry-meta > span::before,#primary  .entry-footer > span::before{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_content_meta_date':
				  $custom_css .= '#primary .custom-entry-date span.entry-month,#primary .custom-entry-date span.entry-day{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_content_meta_date_month_background':
				  $custom_css .= '#primary .custom-entry-date span.entry-month{background-color:' . esc_attr( $color ) . '}' . "\n";

				break;
				case 'color_content_meta_date_day_background':
				  $custom_css .= '#primary .custom-entry-date span.entry-day{background-color:' . esc_attr( $color ) . '}' . "\n";
				break;

				// Sidebar.
				 case 'color_sidebar_widget_background':
				  $custom_css .= '.sidebar .widget{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_sidebar_title':
				  $custom_css .= '.sidebar .widget-title{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_sidebar_text':
				  $custom_css .= '.sidebar{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_sidebar_link':
				  $custom_css .= '.sidebar .widget a, .sidebar .widget a:visited{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_sidebar_link_hover':
				  $custom_css .= '.sidebar .widget a:hover,.sidebar .widget a:focus,.sidebar .widget a:active{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_sidebar_list_icon':
				  $custom_css .= '.sidebar ul li::before{color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				// Footer area.
				case 'color_footer_area_background':
				  $custom_css .= '#colophon{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				 case 'color_footer_area_copyright_background':
				  $custom_css .= '#colophon .colophon-bottom{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_footer_area_text':
				  $custom_css .= '#colophon{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_footer_area_link':
				  $custom_css .= '#colophon a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_footer_area_link_hover':
				  $custom_css .= '#colophon a:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				// Go To Top.
			    case 'color_goto_top_icon':
				  $custom_css .= '#btn-scrollup i.fa{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_goto_top_icon_hover':
				  $custom_css .= '#btn-scrollup i.fa:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_goto_top_background':
				  $custom_css .= '#btn-scrollup{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_goto_top_background_hover':
				  $custom_css .= '#btn-scrollup:hover{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;


				// Pagination.
				case 'color_pagination_link':
				  $custom_css .= '.pagination .nav-links .page-numbers,.pagination .nav-links .page-numbers:visited,#infinite-handle span{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_pagination_link_hover':
				  $custom_css .= '.navigation .nav-links .page-numbers.current,  .navigation .nav-links a:hover,#infinite-handle span:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_pagination_link_background':
				  $custom_css .= '.pagination .nav-links .page-numbers,.pagination .nav-links .page-numbers:visited,#infinite-handle span{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_pagination_link_background_hover':
				  $custom_css .= '.navigation .nav-links .page-numbers.current,  .navigation .nav-links a:hover,#infinite-handle span:hover{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				// Breadcrumb.
				 case 'color_breadcrumb_background':
				  $custom_css .= '#breadcrumb{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_breadcrumb_link':
				  $custom_css .= '#crumbs a,#breadcrumb a,#breadcrumb .breadcrumb-trail li::after{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_breadcrumb_link_hover':
				  $custom_css .= '#crumbs a:hover,#breadcrumb a:hover,#breadcrumb .breadcrumb-trail li:hover::after{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_breadcrumb_text':
				  $custom_css .= '#breadcrumb{color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				// Footer Widgets.
				case 'color_footer_widgets_background':
				  $custom_css .= '#footer-widgets{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_footer_widgets_title':
				  $custom_css .= '#footer-widgets .widget-title{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_footer_widgets_title_border':
				  $custom_css .= '#footer-widgets .widget-title:after{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_footer_widgets_text':
				  $custom_css .= '#footer-widgets p {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_footer_widgets_link':
				  $custom_css .= '#footer-widgets a,#footer-widgets ul li::before{color:' . esc_attr( $color ) . '}' . "\n";
				break;

				case 'color_footer_widgets_link_hover':
				  $custom_css .= '#footer-widgets a:hover,#footer-widgets ul li:hover::before{color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				// Home Page widget.
				case 'color_home_widgets_background':
				  $custom_css .= '#education-soul-front-page-widgets .widget{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_home_widgets_title':
				  $custom_css .= '#education-soul-front-page-widgets .widget-title{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_home_widgets_text':
				  $custom_css .= '#education-soul-front-page-widgets,#education-soul-front-page-widgets p{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_home_widgets_link':
				  $custom_css .= '#education-soul-front-page-widgets a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_home_widgets_link_hover':
				  $custom_css .= '#education-soul-front-page-widgets a:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;


				// Specific section CTA.
				case 'color_cta_section_background':
				  $custom_css .= '#front-page-home-sections .home-section-call-to-action{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				 case 'color_cta_section_overlay':
				  $custom_css .= '#front-page-home-sections .home-section-call-to-action::before{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_cta_main_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-call-to-action .section-title{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_cta_section_text':
				  $custom_css .= '#front-page-home-sections .home-section-call-to-action .cta-content-text p{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_cta_section_button':
				  $custom_css .= '#front-page-home-sections .home-section-call-to-action .cta-buttons a,#front-page-home-sections .home-section-call-to-action .cta-buttons a.custom-button.button-secondary.cta-btn:hover, #front-page-home-sections .home-section-call-to-action .cta-buttons a.custom-button.button-secondary.cta-btn:active, #front-page-home-sections .home-section-call-to-action .cta-buttons a.custom-button.button-secondary.cta-btn:focus{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_cta_section_button_hover':
				  $custom_css .= '#front-page-home-sections .home-section-call-to-action .cta-buttons a:hover,#front-page-home-sections .home-section-call-to-action .cta-buttons a.custom-button.button-secondary,#front-page-home-sections .home-section-call-to-action .cta-buttons a.custom-button.button-secondary:visited{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_cta_section_button_background':
				  $custom_css .= '#front-page-home-sections .home-section-call-to-action .cta-buttons a,#front-page-home-sections .home-section-call-to-action .cta-buttons a.custom-button.button-secondary.cta-btn:hover, #front-page-home-sections .home-section-call-to-action .cta-buttons a.custom-button.button-secondary.cta-btn:active, #front-page-home-sections .home-section-call-to-action .cta-buttons a.custom-button.button-secondary.cta-btn:focus{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_cta_section_button_background_hover':
				  $custom_css .= '#front-page-home-sections .home-section-call-to-action .cta-buttons a:hover,#front-page-home-sections .home-section-call-to-action .cta-buttons a.custom-button.button-secondary,#front-page-home-sections .home-section-call-to-action .cta-buttons a.custom-button.button-secondary:visited{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				// Specific Section News and Events.
				case 'color_news_events_section_background':
				  $custom_css .= '#front-page-home-sections .home-section-news-and-events{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_news_events_main_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-news-and-events h2 {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_news_events_main_section_title_border':
				  $custom_css .= '#front-page-home-sections .home-section-news-and-events .section-title:after {background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_news_events_section_text':
				  $custom_css .= '#front-page-home-sections .home-section-news-and-events p,.home-section-news-and-events  .entry-meta span:before  {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_news_events_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-news-and-events h3 a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_news_events_section_title_hover':
				  $custom_css .= '#front-page-home-sections  .home-section-news-and-events h3 a:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_news_events_section_link':
				  $custom_css .= '.home-section-news-and-events  a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_news_events_section_link_hover':
				  $custom_css .= ' .home-section-news-and-events  a:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				case 'color_news_events_section_content_background':
				  $custom_css .= '#front-page-home-sections .home-section-news-and-events .news-content,#front-page-home-sections .home-section-news-and-events .event-post{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;


				// Specific Section Latest News.
				case 'color_latest_news_section_background':
				  $custom_css .= '#front-page-home-sections .home-section-latest-news{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_main_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-latest-news .section-title {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_main_section_title_border':
				  $custom_css .= '#front-page-home-sections .home-section-latest-news .section-title:after {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_section_text':
				  $custom_css .= '#front-page-home-sections .home-section-latest-news p {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-latest-news .latest-news-text-wrap .latest-news-title a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_section_title_hover':
				  $custom_css .= '#front-page-home-sections  .home-section-latest-news .latest-news-text-wrap .latest-news-title a:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_section_content_background':
				  $custom_css .= '#front-page-home-sections  .home-section-latest-news .latest-news-text-wrap,.home-section-latest-news .latest-news-inner-wrapper{background-color:' . esc_attr( $color ) . '}' . "\n";
				  $custom_css .= '.home-section-latest-news .latest-news-layout-2 .latest-news-thumb:before{border-right-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_section_link':
				  $custom_css .= '#front-page-home-sections  .home-section-latest-news a {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				 case 'color_latest_news_section_link_hover':
				  $custom_css .= '#front-page-home-sections  .home-section-latest-news a:hover {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_section_button':
				  $custom_css .= '#front-page-home-sections .home-section-latest-news a.custom-button{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				  	case 'color_latest_news_section_button_hover':
				  $custom_css .= '#front-page-home-sections .home-section-latest-news a.custom-button:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_section_button_background':
				  $custom_css .= '#front-page-home-sections .home-section-latest-news a.custom-button{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_section_button_background_hover':
				  $custom_css .= '#front-page-home-sections .home-section-latest-news a.custom-button:hover{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_latest_news_section_overlay':
				  $custom_css .= '#front-page-home-sections  .home-section-latest-news .read-more-button::after{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				// Specific Section Featured Blocks.
				case 'color_featured_blocks_section_background':
				  $custom_css .= '#front-page-home-sections .home-section-featured-blocks{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_featured_blocks_section_text':
				  $custom_css .= '#front-page-home-sections .home-section-featured-blocks p {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_featured_blocks_main_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-featured-blocks h2.section-title{color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				case 'color_featured_blocks_main_section_title_border':
				  $custom_css .= '#front-page-home-sections  .home-section-featured-blocks .section-title:after{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_featured_blocks_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-featured-blocks .block-title a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_featured_blocks_section_title_hover':
				  $custom_css .= '#front-page-home-sections  .home-section-featured-blocks .block-title a:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_featured_blocks_section_button':
				  $custom_css .= '#front-page-home-sections  .home-section-featured-blocks .custom-button{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				  	case 'color_featured_blocks_section_button_hover':
				  $custom_css .= '#front-page-home-sections  .home-section-featured-blocks .custom-button:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_featured_blocks_section_button_background':
				  $custom_css .= '#front-page-home-sections  .home-section-featured-blocks .custom-button{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_featured_blocks_section_button_background_hover':
				  $custom_css .= '#front-page-home-sections  .home-section-featured-blocks .custom-button:hover{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;


				// Specific section Testimonial.
				case 'color_testimonial_section_background':
				  $custom_css .= '#front-page-home-sections  .home-section-testimonials{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_testimonial_main_section_title':
				  $custom_css .= '#front-page-home-sections  .home-section-testimonials .section-title{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				 case 'color_testimonial_main_section_title_border':
				  $custom_css .= '#front-page-home-sections  .home-section-testimonials .section-title:after{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_testimonial_section_title':
				  $custom_css .= '.home-section-testimonials::before{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				  case 'color_testimonial_section_overlay':
				  $custom_css .= '.home-section-testimonials h3 a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				case 'color_testimonial_section_content':
				  $custom_css .= '.home-section-testimonials .testimonials-content-area p,.home-section-testimonials .testimonials-content-area p::before{color:' . esc_attr( $color ) . '}' . "\n";
				   $custom_css .= '.home-section-testimonials .testimonials-thumb img{border-color:' . esc_attr( $color ) . '}' . "\n";

				  break;
				case 'color_testimonial_pager':
				  $custom_css .= '.home-section-testimonials .cycle-pager span {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_testimonial_section_pager_active':
				  $custom_css .= '.home-section-testimonials .cycle-pager span.cycle-pager-active,.home-section-testimonials .cycle-pager span:hover{color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				// Specific section Team.
				case 'color_team_section_background':
				  $custom_css .= '#front-page-home-sections .home-section-team {background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_team_main_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-team  .section-title {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_team_main_section_title_border':
				  $custom_css .= '#front-page-home-sections  .home-section-testimonials .section-title:after{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_team_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-team .team-title a{color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_team_section_title_background':
				  $custom_css .= '#front-page-home-sections .home-section-team .team-text-wrap{background-color:' . esc_attr( $color ) . '}' . "\n";
				  $custom_css .= '.home-section-team .team-title:before{border-bottom-color:' . esc_attr( $color ) . '}' . "\n";

				  break;

				case 'color_team_section_title_background':
				  $custom_css .= '#front-page-home-sections .home-section-team .team-text-wrap{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;

				// Specific  Service Section.
				case 'color_service_section_background':
				  $custom_css .= '#front-page-home-sections .home-section-services { background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_service_main_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-services .section-title {color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_service_main_section_title_border':
				  $custom_css .= '#front-page-home-sections  .home-section-services .section-title:after{background-color:' . esc_attr( $color ) . '}' . "\n";
				  break;
				case 'color_service_section_title':
				  $custom_css .= '#front-page-home-sections .home-section-services .services-item-inner h3 a{color:' . esc_attr( $color ) . '}' . "\n";

				  case 'color_service_section_title_hover':
				  $custom_css .= '#front-page-home-sections .home-section-services .services-item-inner h3 a:hover {color:' . esc_attr( $color ) . '}' . "\n";
				  break;


			  default:
			    break;

			}

		}

		wp_add_inline_style( 'education-soul-style', $custom_css );
	}
endif;
add_action( 'wp_enqueue_scripts', 'education_soul_add_theme_custom_color_css', 25 );
