<?php
/**
 * @package Cooking Classes
 * Setup the WordPress core custom header feature.
 *
 * @uses cooking_classes_header_style()
 */
function cooking_classes_custom_header_setup() {
	add_theme_support( 'custom-header', apply_filters( 'cooking_classes_custom_header_args', array(
		'default-text-color'     => 'fff',
		'width'                  => 2500,
		'height'                 => 400,
		'wp-head-callback'       => 'cooking_classes_header_style',
	) ) );
}
add_action( 'after_setup_theme', 'cooking_classes_custom_header_setup' );

if ( ! function_exists( 'cooking_classes_header_style' ) ) :
/**
 * Styles the header image and text displayed on the blog
 *
 * @see cooking_classes_custom_header_setup().
 */
function cooking_classes_header_style() {
	$header_text_color = get_header_textcolor();

	?>
	<style type="text/css">
	<?php
		//Check if user has defined any header image.
		if ( get_header_image() || get_header_textcolor() ) :
	?>
		#header{
			background: url(<?php echo esc_url( get_header_image() ); ?>) no-repeat;
			background-position: center top;
			background-size: cover;
		}

	<?php endif; ?>	

	#header .text-white h1 a {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_sitetitle_color')); ?> !important;
	}

	#header .logo-bg2 {
		background: <?php echo esc_attr(get_theme_mod('cooking_classes_logobg_color')); ?>;
	}

	#header .logo-bg1 {
		background: <?php echo esc_attr(get_theme_mod('cooking_classes_logoborder_color')); ?>;
	}

	#header .menubox {
		background: <?php echo esc_attr(get_theme_mod('cooking_classes_headerbg_color')); ?>;
	}

	#header .fa-facebook {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_fb_color')); ?>;
	}

	#header .fa-twitter { 
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_twitt_color')); ?>;
	}

	#header .fa-instagram  {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_insta_color')); ?>;
	}

	.socialicon {
		background: <?php echo esc_attr(get_theme_mod('cooking_classes_bg_color')); ?>;
	}


	.main-nav ul li a {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_menu_color')); ?>;
	}

	.main-nav a:hover, .current_page_item a {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_menuhrv_color')); ?>;
	}

	.main-nav ul ul a{
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_submenu_color')); ?>;
	}

	.main-nav ul ul {
		background: <?php echo esc_attr(get_theme_mod('cooking_classes_submenubg_color')); ?>;
	}

	.main-nav ul ul a:hover {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_submenuhrv_color')); ?>;
	}

	#slider h1.title-slider {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_slidertitle_color')); ?> !important;
	}

	#slider p.text-slider {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_sliderdescription_color')); ?> !important;
	}

	#slider .redmor {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_sliderbutton1text_color')); ?> !important;
	}

	#slider .redmor {
		background-color: <?php echo esc_attr(get_theme_mod('cooking_classes_sliderbutton1_color')); ?> !important;
	}

	#slider .cont-us {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_sliderbutton2text_color')); ?> !important;
	}

	#slider .cont-us {
		background-color: <?php echo esc_attr(get_theme_mod('cooking_classes_sliderbutton2_color')); ?> !important;
	}

	#service .text-center h2 {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_serviceheading_color')); ?> !important;
	}

	#service .heading-border, #service .heading-border:before,#service .heading-border:after {
		border-color: <?php echo esc_attr(get_theme_mod('cooking_classes_serviceheadingborder_color')); ?>;
	}

	#service .content h3 {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_servicetitle_color')); ?> !important;
	}

	#service .content p {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_servicedescription_color')); ?> !important;
	}

	#service .button-service {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_servicebuttontext_color')); ?> !important;
	}

	#service .button-service {
		background: <?php echo esc_attr(get_theme_mod('cooking_classes_servicebutton_color')); ?> !important;
	}

	#blog h5 {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_blogheading_color')); ?> !important;
	}

	#blog h1 {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_blogsubheading_color')); ?> !important;
	}

	#blog .blog-title {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_blogtitle_color')); ?> !important;
	}

	#blog .blog-content .blog-description {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_blogdescription_color')); ?> !important;
	}

	#blog .blog-content a {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_blogbutton_color')); ?> !important;
	}

	#blog .blog-content i {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_blogdatecommicon_color')); ?> !important;
	}

	#blog .blog-content p {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_blogdatecomm_color')); ?> !important;
	}

	.copywrap:hover, .copywrap p:hover, .copywrap p a:hover, #footer .copywrap p:hover {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_footercoyprighthrv_color')); ?> !important;
	}

	#footer h2, #footer h1, #footer h3, #footer h4 {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_footertitle_color')); ?>;

	}

	#footer ul li a {
		color: <?php echo esc_attr(get_theme_mod('cooking_classes_footerlist_color')); ?> !important;

	}

	.footer-widget {
		background-color: <?php echo esc_attr(get_theme_mod('cooking_classes_footerbg_color')); ?> !important;
	}
	

	</style>
	<?php 
}
endif;