<?php
function homeroofingservices_custom_header_setup() {
	add_theme_support( 'custom-header', apply_filters( 'homeroofingservices_custom_header_args', array(
		'default-image'          => '',
		'default-text-color'     => '646464',
		'width'                  => 2000, 
		'height'                 => 200,
		'flex-height'            => true,
		'wp-head-callback'       => 'homeroofingservices_header_style',
	) ) );
}
add_action( 'after_setup_theme', 'homeroofingservices_custom_header_setup' );

if ( ! function_exists( 'homeroofingservices_header_style' ) ) :

function homeroofingservices_header_style() {
	$header_text_color = get_header_textcolor();

	$feature_disable_section = esc_attr(get_theme_mod('feature_disable_section','YES'));
  	$aboutus_disable_section = esc_attr(get_theme_mod('aboutus_disable_section','YES'));
  	$blog_disable_section = esc_attr(get_theme_mod('blog_disable_section','YES'));


	?>
	<style type="text/css">


		<?php 
		
		?>


		header.site-header .site-title {
			color: <?php echo esc_attr(get_theme_mod('topheader_sitetitlecol')); ?>;
		}

		header.site-header .site-logo a {
			text-decoration-color: <?php echo esc_attr(get_theme_mod('topheader_sitetitlecol')); ?> !important;
		}

		p.site-description {
			color: <?php echo esc_attr(get_theme_mod('topheader_taglinecol')); ?>;
		}
		


		
	
		.site-logo:before {
			background: <?php echo esc_attr(get_theme_mod('header_logobgcolor')); ?>;
		}

		header.site-header .site-logo {
			background: <?php echo esc_attr(get_theme_mod('header_logobrdcolor')); ?>;
		}

		header.site-header {
			background: <?php echo esc_attr(get_theme_mod('header_bgcolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li a, .main-header .navbar .navbar-menu ul li.dropdown>a::after {
			color: <?php echo esc_attr(get_theme_mod('header_menuscolor')); ?>;
		}

		.main-header .navbar .navbar-nav > li:hover a, .main-header .navbar .navbar-nav > li.focus a, .main-header .navbar .navbar-nav > li.active a, .main-header .navbar .navbar-nav > li a.active,.main-header .navbar .navbar-menu ul li:hover.dropdown>a::after {
			color: <?php echo esc_attr(get_theme_mod('header_menushovercolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:not(.remove) {
			color: <?php echo esc_attr(get_theme_mod('header_submenutextcolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a {
			background: <?php echo esc_attr(get_theme_mod('header_submenusbgcolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:not(.remove) {
			border-left-color: <?php echo esc_attr(get_theme_mod('header_submenusbordercolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:hover {
			background: <?php echo esc_attr(get_theme_mod('header_submenusbghovercolor')); ?> !important;
		}

		.main-header .navbar .navbar-menu ul li.dropdown .sub-menu a:hover {
			color: <?php echo esc_attr(get_theme_mod('header_submenustxthovercolor')); ?> !important;
		}
	
		
		header a.contactus {
			color: <?php echo esc_attr(get_theme_mod('header_btntxtcolor')); ?>;
		}

		header a.contactus {
			background: <?php echo esc_attr(get_theme_mod('header_btnbgcolor')); ?>;
		}

		header a.contactus:hover {
			background: <?php echo esc_attr(get_theme_mod('header_btnbghrvcolor')); ?>;
		}
		




		.hero-style .slide-title h2 {
			color: <?php echo esc_attr(get_theme_mod('slider_titlecolor')); ?> !important;
		}


		.hero-style .slide-text p {
			color: <?php echo esc_attr(get_theme_mod('slider_descriptioncolor')); ?>;
		}

		.hero-style a.ReadMore {
			color: <?php echo esc_attr(get_theme_mod('slider_btntxt1color')); ?> !important;
		}

		.hero-style a.ReadMore {
			background: <?php echo esc_attr(get_theme_mod('slider_btnbgcolor')); ?> !important;
		}

		.hero-style a.ReadMore:hover {
			background: <?php echo esc_attr(get_theme_mod('slider_btnbghrvcolor')); ?> !important;
		}

		.hero-style svg path {
			fill: <?php echo esc_attr(get_theme_mod('slider_arrowiconcolor')); ?> !important;
		}

		.hero-slider .home_roofing_servicesswiper-button-prev, .hero-slider .home_roofing_servicesswiper-button-next {
			background: <?php echo esc_attr(get_theme_mod('slider_arrowiconbgcolor')); ?> !important;
		}
.hero-style svg:hover path{
fill: <?php echo esc_attr(get_theme_mod('slider_arrowiconHoverColorcolor')); ?> !important;
}


		#feature-section .single-feature h3 {
			color: <?php echo esc_attr(get_theme_mod('feature_boxtitlecolorcolor')); ?>;
		}

		#feature-section .single-feature p, #feature-section .single-feature .description {
			color: <?php echo esc_attr(get_theme_mod('feature_boxdescriptioncolorcolor')); ?>;
		}

		#feature-section .serbtn a i {
			background: <?php echo esc_attr(get_theme_mod('feature_buttonbgcolor')); ?>;
		}

		#feature-section .serbtn a i {
			color: <?php echo esc_attr(get_theme_mod('feature_buttoniconcolor')); ?>;
		}

		#feature-section .box-space:nth-child(2n) .serbtn a:hover i, #feature-section .serbtn a:hover i {
			background: <?php echo esc_attr(get_theme_mod('feature_buttonbghovercolor')); ?>;
		}

		#feature-section .part-2 {
			background: <?php echo esc_attr(get_theme_mod('feature_boxbgcolor')); ?>;
		}

		#feature-section .part-2 {
			border-color: <?php echo esc_attr(get_theme_mod('feature_boxbrdcolor')); ?>;
		}

		#feature-section .box-space:nth-child(2n) .part-2 {
			background: <?php echo esc_attr(get_theme_mod('feature_centerboxbgcolor')); ?>;
		}

		#feature-section .box-space:nth-child(2n) .smallicn i,
		#feature-section .box-space:nth-child(2n) .single-feature h3,
		#feature-section .box-space:nth-child(2n) .single-feature p, #feature-section .box-space:nth-child(2n) .single-feature p{
			color: <?php echo esc_attr(get_theme_mod('feature_centerboxcontentcolor')); ?>;
		}

		#feature-section .box-space:nth-child(2n) .serbtn a i {
			color: <?php echo esc_attr(get_theme_mod('feature_centerboxbtniconcolor')); ?>;
		}

		#feature-section .box-space:nth-child(2n) .serbtn a i {
			background: <?php echo esc_attr(get_theme_mod('feature_centerboxbtniconbgcolor')); ?>;
		}





		/* about us */
		#aboutus-section .abt_subtitle h3 {
			color: <?php echo esc_attr(get_theme_mod('aboutus_headingcolor')); ?>;
		}

		#aboutus-section .abt_subtitle i.fa-minus{
			background: <?php echo esc_attr(get_theme_mod('aboutus_headingbrdcolor1')); ?>;
		}

		#aboutus-section .abt_subtitle i.fa-window-minimize {
			background: <?php echo esc_attr(get_theme_mod('aboutus_headingbrdcolor2')); ?>;
		}

		#aboutus-section .abt-dbx h2 {
			color: <?php echo esc_attr(get_theme_mod('aboutus_subheadingcolor')); ?>;
		}

		#aboutus-section .abt-dbx p {
			color: <?php echo esc_attr(get_theme_mod('aboutus_descriptioncolor')); ?>;
		}

		#aboutus-section .lists h4 {
			color: <?php echo esc_attr(get_theme_mod('aboutus_listcolor')); ?>;
		}

		#aboutus-section .abt-btn a {
			color: <?php echo esc_attr(get_theme_mod('aboutus_btntextcolor')); ?>;
		}

		#aboutus-section .abt-btn a {
			color: <?php echo esc_attr(get_theme_mod('aboutus_btntextcolor')); ?>;
		}

		#aboutus-section .abt-btn a {
			background: <?php echo esc_attr(get_theme_mod('aboutus_btnbgcolor')); ?>;
		}

		#aboutus-section .offernum {
			background: <?php echo esc_attr(get_theme_mod('aboutus_offerphnbgcolor')); ?>;
		}

		#aboutus-section .phnoffertext .about-exp-txt svg path {
			fill: <?php echo esc_attr(get_theme_mod('aboutus_offerphnbgcolor')); ?>;
		}

		#aboutus-section .phtx, #aboutus-section .offernum p,#aboutus-section .phtx i {
			color: <?php echo esc_attr(get_theme_mod('aboutus_offerphntextcolor')); ?>;
		}

		#aboutus-section .phtx i:after {
			background: <?php echo esc_attr(get_theme_mod('aboutus_offerphniconbgcolor')); ?>;
		}




	
		#blog-section h3.section-title {
			color: <?php echo esc_attr(get_theme_mod('blog_headingcolor')); ?>;
		}


		.blogbx .blog-content h6.post-title, .blogbx .blog-content h6.post-title a, .blogbx .blog-content .heding {
			color: <?php echo esc_attr(get_theme_mod('blog_titlecolor')); ?>;
		}

		.blogbx .blog-content p {
			color: <?php echo esc_attr(get_theme_mod('blog_descriptioncolor')); ?>;
		}

		.blog-area .btn_blog a {
			color: <?php echo esc_attr(get_theme_mod('blog_buttontextcolor')); ?>;
		}

		.blogbx .blog-content .box-admin, .blogbx .blog-content .box-admin a, .blogbx .blog-content .box-date, .blogbx .blog-content .box-admin span {
			color: <?php echo esc_attr(get_theme_mod('blog_authorandcategorycolor')); ?>;
		}

		.blogbx .admin-cat-box {
			background: <?php echo esc_attr(get_theme_mod('blog_authorandcategorybgcolor')); ?>;
		}

		.blog-area .blog-content {
			background: <?php echo esc_attr(get_theme_mod('blog_boxbgcolor')); ?>;
		}

		.blog-area .contbx {
			border-right-color: <?php echo esc_attr(get_theme_mod('blog_midlebrdcolor')); ?>;
		}





		.copy-right p,.copy-right p a {
			color: <?php echo esc_attr(get_theme_mod('footer_copyrightcolor')); ?>;
		}

		.copy-right {
			background: <?php echo esc_attr(get_theme_mod('footer_copyrightbgcolor')); ?>;
		}

		.footer-area {
			background: <?php echo esc_attr(get_theme_mod('footer_bgcolor')); ?>;
		}

		.footer-area .footer-widget .w-title {
			color: <?php echo esc_attr(get_theme_mod('footer_widgettilecolor')); ?>;
		}

		.footer-area .widget_text, .footer-area .widget_text p, .wp-block-latest-comments__comment-excerpt p, .wp-block-latest-comments__comment-date, .has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt, .has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta,.footer-area .widget_block h1, .footer-area .widget_block h2, .footer-area .widget_block h3, .footer-area .widget_block h4, .footer-area .widget_block h5, .footer-area .widget_block h6,.footer-area .footer-widget .widget:not(.widget_social_widget):not(.widget_tag_cloud) li a {
			color: <?php echo esc_attr(get_theme_mod('footer_textcolor')); ?>;
		}

		.footer-area li:before, .page-template-home-template .footer-area li:before, .page .footer-area li:before, .single .footer-area li:before {
			color: <?php echo esc_attr(get_theme_mod('footer_iconcolor')); ?>;
		}

		.footer-area .footer-widget .widget:not(.widget_social_widget):not(.widget_tag_cloud) li a:hover {
			color: <?php echo esc_attr(get_theme_mod('footer_listhovercolor')); ?>;
		}

		.scroll-top i {
			color: <?php echo esc_attr(get_theme_mod('footer_scrolltotopiconcolor')); ?>;
		}

		.scroll-top {
			background: <?php echo esc_attr(get_theme_mod('footer_scrolltotopiconbgcolor')); ?>;
		}

		.scroll-top:hover {
			background: <?php echo esc_attr(get_theme_mod('footer_scrolltotopiconbghrvcolor')); ?>;
		}

		
	<?php  ?>


	<?php
		if ( ! display_header_text() ) :
	?>
		.site-title,
		.site-description {
			position: absolute;
			clip: rect(1px, 1px, 1px, 1px);
		}
	<?php
		else :
	?>
		h4.site-title{
			color: #<?php echo esc_attr( $header_text_color ); ?>;
		}
	<?php endif; ?>



	<?php
        if ($feature_disable_section == 1):
	?>
		#feature-section {
			display: none;
		}
	<?php
		else :
	?>
		#feature-section {
			display: block;
		}
	<?php endif; ?>

	<?php
        if ($aboutus_disable_section == 1):
	?>
		#aboutus-section {
			display: none;
		}
	<?php
		else :
	?>
		#aboutus-section {
			display: block;
		}
	<?php endif; ?>

	<?php
        if ($blog_disable_section == 1):
	?>
		#blog-section {
			display: none;
		}
	<?php
		else :
	?>
		#blog-section {
			display: block;
		}
	<?php endif; ?>



	</style>
	<?php
}
endif;
