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

if ( ! function_exists( 'astronomy_store_header_style' ) ) :
/**
 * Styles the header image and text displayed on the blog
 *
 * @see astronomy_store_custom_header_setup().
 */
function astronomy_store_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; ?>	

	.page-template-template-home-page .site-title a, .page-template-template-home-page p.site-title a, h1.site-title a, p.site-title a{
		color: <?php echo esc_attr(get_theme_mod('astronomy_store_sitetitle_color')); ?> !important;
	}

	.page-template-template-home-page .site-tagline, .site-tagline{
		color: <?php echo esc_attr(get_theme_mod('astronomy_store_sitetagline_color')); ?> !important;
	}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	#service .text-center h3.section-title {
		color: <?php echo esc_attr(get_theme_mod('astronomy_store_servicesubheading_color')); ?> !important;
	}

	#service .services-box h4 a{
		color: <?php echo esc_attr(get_theme_mod('astronomy_store_servicetitle_color')); ?>;
	}

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

	#footer h3 {
		color: <?php echo esc_attr(get_theme_mod('astronomy_store_footertitle_color')); ?> !important;

	}

	#footer p {
		color: <?php echo esc_attr(get_theme_mod('astronomy_store_footerdescription_color')); ?>;

	}

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

	}

	.footer-content {
		background-color: <?php echo esc_attr(get_theme_mod('astronomy_store_footerbg_color')); ?>;
	}
	
	</style>
	<?php 
}
endif;