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

if ( ! function_exists( 'watersports_header_style' ) ) :

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

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




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

		header .bottomhead {
			border-color: <?php echo esc_attr(get_theme_mod('header_menusbgbrdcolor')); ?>;
		}

		.primary-menu a {
			color: <?php echo esc_attr(get_theme_mod('header_menuscolor')); ?>;
		}

		.primary-menu > li > .icon {
			color: <?php echo esc_attr(get_theme_mod('header_menuiconcolor')); ?>;
		}

		.primary-menu li ul li a {
			color: <?php echo esc_attr(get_theme_mod('header_submenutextcolor')); ?>;
		}

		.primary-menu ul {
			background: <?php echo esc_attr(get_theme_mod('header_submenusbgcolor')); ?>;
		}

		.primary-menu ul::after {
			border-bottom-color: <?php echo esc_attr(get_theme_mod('header_submenusbgcolor')); ?>;
		}

		.primary-menu a:hover, .primary-menu a:focus, .primary-menu .current_page_ancestor {
			color: <?php echo esc_attr(get_theme_mod('header_submenustxthovercolor')); ?>;
		}

		header .hbtn a {
			color: <?php echo esc_attr(get_theme_mod('header_btntextcolor')); ?> !important;
		}


		header .hbtn a:hover {
			color: <?php echo esc_attr(get_theme_mod('header_btntxthovercolor')); ?> !important;
		}


		header .hbtn a i {
			background: <?php echo esc_attr(get_theme_mod('header_btniconcolor')); ?> !important;
		}

		header .hbtn a i:after {
			background: linear-gradient(to top right, <?php echo esc_attr(get_theme_mod('header_btniconcolor')); ?> 52%, transparent 51%);
		}


		

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

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

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

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

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

		.hero-style .slider-btn a:hover {
			color: <?php echo esc_attr(get_theme_mod('slider_btntexthrvcolor')); ?> !important;
		}

		.slider-area .water_sportsswiper-button-prev, .slider-area .water_sportsswiper-button-next {
			color: <?php echo esc_attr(get_theme_mod('slider_arrowiconbrdcolor')); ?> !important;
			border-color: <?php echo esc_attr(get_theme_mod('slider_arrowiconbrdcolor')); ?> !important;
		}

		.slider-area .water_sportsswiper-button-prev, .slider-area .water_sportsswiper-button-next {
			background: <?php echo esc_attr(get_theme_mod('slider_arrowiconbgcolor')); ?> !important;
		}

		
	
		

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

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

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

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

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

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

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




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

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

		#service-section .conbx {
			border-color: <?php echo esc_attr(get_theme_mod('service_boxbordercolor')); ?>;
		}

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

		#service-section .single-service .conbx p, #service-section .single-service .conbx {
			color: <?php echo esc_attr(get_theme_mod('service_descriptioncolor')); ?>;
		}
		
		#service-section .serv-btn a {
			color: <?php echo esc_attr(get_theme_mod('service_btntextcolor')); ?>;
		}

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

		#service-section .serv-btn a:hover {
			color: <?php echo esc_attr(get_theme_mod('service_btntexthrvcolor')); ?>;
		}


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

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


		

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


		.copy-right {
			border-top-color: <?php echo esc_attr(get_theme_mod('footer_coryrightbrdcolor')); ?>;
		}

		.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,
		.footer-area .footer-widget .widget:not(.widget_social_widget):not(.widget_tag_cloud) li {
			color: <?php echo esc_attr(get_theme_mod('footer_textcolor')); ?>;
		}


		.footer-area .footer-widget .w-title, .footer-area h1,.footer-area h2,
		.footer-area h3, .footer-area h4, .footer-area h5, .footer-area h6 {
			color: <?php echo esc_attr(get_theme_mod('footer_headingcolor')); ?>;
		}

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

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

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

		
	<?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; ?>


	</style>
	<?php
}
endif;
