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

if ( ! function_exists( 'personallawyer_header_style' ) ) :

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

  	$service_disable_section = esc_attr(get_theme_mod('service_disable_section','YES'));
  	$blog_disable_section = esc_attr(get_theme_mod('blog_disable_section','YES'));


	$personallawyer_service_image_height = esc_attr(get_theme_mod('personallawyer_service_image_height','350'));
	$personallawyer_blog_image_height = esc_attr(get_theme_mod('personallawyer_blog_image_height','250'));


	?>
	<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')); ?>;
		}
		


		
	
	
		.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 li:hover a {
			background: <?php echo esc_attr(get_theme_mod('header_submenusbghovercolor')); ?> !important;
		}

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

		.main-header .navbar .navbar-toggler {
			border-color: <?php echo esc_attr(get_theme_mod('header_mobileviewmenutogglecolor')); ?> !important;
			color: <?php echo esc_attr(get_theme_mod('header_mobileviewmenutogglecolor')); ?> !important;
		}

		.main-header .navbar .navbar-toggler:hover {
			background: <?php echo esc_attr(get_theme_mod('header_mobileviewmenutogglehrvcolor')); ?> !important;
		}
	
		@media (max-width: 991px) {
			.main-header .navbar .navbar-menu ul li {
				background: <?php echo esc_attr(get_theme_mod('header_mobileviewmenubgcolor')); ?> !important;
			}
		}


		header .phn i {
			background: <?php echo esc_attr(get_theme_mod('header_phnbgcolor1')); ?>;
		}

		header .call {
			background: <?php echo esc_attr(get_theme_mod('header_phnbgcolor2')); ?>;
		}

		header .call-brd {
			border-color: <?php echo esc_attr(get_theme_mod('header_phnbordercolor')); ?>;
		}
		
		header .phn i {
			color: <?php echo esc_attr(get_theme_mod('header_phniconcolor')); ?>;
		}

		header .contact .phn {
			color: <?php echo esc_attr(get_theme_mod('header_phntxtcolor')); ?>;
		}

		header .contact .phn:hover {
			color: <?php echo esc_attr(get_theme_mod('header_phntxthovercolor')); ?>;
		}

		header .contact .mal {
			color: <?php echo esc_attr(get_theme_mod('header_mailtxtcolor')); ?>;
		}

		header .contact .mal:hover {
			color: <?php echo esc_attr(get_theme_mod('header_mailtxthovercolor')); ?>;
		}

		.main-header {
			border-bottom-color: <?php echo esc_attr(get_theme_mod('header_bordercolor')); ?>;
		}

		.main-header .navbar .navbar-menu ul li a {
			font-size: <?php echo esc_attr(get_theme_mod('personal_lawyer_menufontsize')); ?>px !important;
		}




		.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_btnbg1color')); ?>;
		}
		.hero-style a.ReadMore:hover {
			color:  <?php echo esc_attr(get_theme_mod('slider_btnHovercolor')); ?>!important;
			background:  <?php echo esc_attr(get_theme_mod('slider_btnHoverbgcolor')); ?> !important;
			} 



		#service-section h5.section-subtitle {
			color: <?php echo esc_attr(get_theme_mod('service_subheadingcolor')); ?>;
		}

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


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

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

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

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

		#service-section .serbtn a:hover {
			background: <?php echo esc_attr(get_theme_mod('service_buttonbghovercolor')); ?>;
			color: <?php echo esc_attr(get_theme_mod('service_buttontexthovercolor')); ?>;
		}

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


		#service-section {
			padding-top: <?php echo esc_attr(get_theme_mod('personal_lawyer_service_top_padding')); ?>em !important;
		}

		#service-section {
			padding-bottom: <?php echo esc_attr(get_theme_mod('personal_lawyer_service_bottom_padding')); ?>em !important;
		}

			section#slider-section {
			padding-top: <?php echo esc_attr(get_theme_mod('personal_lawyer_slider_top_padding')); ?>em !important;
		}

		section#slider-section {
			padding-bottom: <?php echo esc_attr(get_theme_mod('personal_lawyer_slider_bottom_padding')); ?>em !important;
		}
		

		#service-section .single-service img {
			height: <?php echo apply_filters('personal_lawyer_blog', $personallawyer_service_image_height); ?>px;
		}



		#blog-section h5.section-subtitle {
			color: <?php echo esc_attr(get_theme_mod('blog_subheadingcolor')); ?>;
		}

		#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')); ?>;
		}

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

		.blogbx .blog-content a.btn_blog {
			border-color: <?php echo esc_attr(get_theme_mod('blog_buttonbgcolor')); ?>;
		}

		.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-section {
			padding-top: <?php echo esc_attr(get_theme_mod('personal_lawyer_blog_top_padding')); ?>em !important;
		}

		#blog-section {
			padding-bottom: <?php echo esc_attr(get_theme_mod('personal_lawyer_blog_bottom_padding')); ?>em !important;
		}

		#blog-section .blog-image {
			height: <?php echo apply_filters('personal_lawyer_blog', $personallawyer_blog_image_height); ?>px;
		}


		.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 .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 {
			color: <?php echo esc_attr(get_theme_mod('footer_scrolltotopcolor')); ?>;
		}

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

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

		
	<?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 ($service_disable_section == 1):
	?>
		#service-section {
			display: none;
		}
	<?php
		else :
	?>
		#service-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;
