<?php 

	$roofing_services_custom_style = '';

	// Logo Size
	$roofing_services_logo_top_padding = get_theme_mod('roofing_services_logo_top_padding');
	$roofing_services_logo_bottom_padding = get_theme_mod('roofing_services_logo_bottom_padding');
	$roofing_services_logo_left_padding = get_theme_mod('roofing_services_logo_left_padding');
	$roofing_services_logo_right_padding = get_theme_mod('roofing_services_logo_right_padding');

	if( $roofing_services_logo_top_padding != '' || $roofing_services_logo_bottom_padding != '' || $roofing_services_logo_left_padding != '' || $roofing_services_logo_right_padding != ''){
		$roofing_services_custom_style .=' .logo {';
			$roofing_services_custom_style .=' padding-top: '.esc_attr($roofing_services_logo_top_padding).'px ;
			padding-bottom: '.esc_attr($roofing_services_logo_bottom_padding).'px ;
			padding-left: '.esc_attr($roofing_services_logo_left_padding).'px ;
			padding-right: '.esc_attr($roofing_services_logo_right_padding).'px ;';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_logo_size = get_theme_mod('roofing_services_logo_size');
	if( $roofing_services_logo_size != '' ) {
		if($roofing_services_logo_size >= 0 && $roofing_services_logo_size <= 100) {
			$calculated_width = $roofing_services_logo_size * 3.5;
			$roofing_services_custom_style .= ' .custom-logo-link img {';
			$roofing_services_custom_style .= ' width: ' . esc_attr($calculated_width) . 'px;';
			$roofing_services_custom_style .= ' }';
		}
	}

	$roofing_services_slider_hide_show = get_theme_mod('roofing_services_slider_hide_show',false);
	if( $roofing_services_slider_hide_show == true){
		$roofing_services_custom_style .=' .page-template-custom-home-page #inner-pages-header {';
			$roofing_services_custom_style .=' display:none;';
		$roofing_services_custom_style .=' }';
	}

	// Site Title Font Size
	$roofing_services_site_title_font_size = get_theme_mod('roofing_services_site_title_font_size');
	if( $roofing_services_site_title_font_size != ''){
		$roofing_services_custom_style .=' .logo h1.site-title, .logo p.site-title {';
			$roofing_services_custom_style .=' font-size: '.esc_attr($roofing_services_site_title_font_size).'px;';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_site_title_color = get_theme_mod('roofing_services_site_title_color');
	if ( $roofing_services_site_title_color != '') {
		$roofing_services_custom_style .=' .logo h1.site-title a, .logo p.site-title a{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_site_title_color).';';
		$roofing_services_custom_style .=' }';
	}

	// Site Tagline Font Size
	$roofing_services_site_tagline_font_size = get_theme_mod('roofing_services_site_tagline_font_size');
	if( $roofing_services_site_tagline_font_size != ''){
		$roofing_services_custom_style .=' .logo p.site-description {';
			$roofing_services_custom_style .=' font-size: '.esc_attr($roofing_services_site_tagline_font_size).'px;';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_site_tagline_color = get_theme_mod('roofing_services_site_tagline_color');
	if ( $roofing_services_site_tagline_color != '') {
		$roofing_services_custom_style .=' .logo p.site-description{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_site_tagline_color).';';
		$roofing_services_custom_style .=' }';
	}

	//layout width
	$roofing_services_boxfull_width = get_theme_mod('roofing_services_boxfull_width');
	if ($roofing_services_boxfull_width !== '') {
		switch ($roofing_services_boxfull_width) {
			case 'container':
				$roofing_services_custom_style .= ' body, #header, .bottom-header {
					max-width: 1140px;
					width: 100%;
					padding-right: 15px;
					padding-left: 15px;
					margin-right: auto;
					margin-left: auto;
					}';
				break;
			case 'container-fluid':
				$roofing_services_custom_style .= ' body, #header, .bottom-header { 
					width: 100%;
					padding-right: 15px;
					padding-left: 15px;
					margin-right: auto;
					margin-left: auto;
					}';
				break;
			case 'none':
				// No specific width specified, so no additional style needed.
				break;
			default:
				// Handle unexpected values.
				break;
		}
	}

	//Menu animation
	$roofing_services_dropdown_anim = get_theme_mod('roofing_services_dropdown_anim');

	if ( $roofing_services_dropdown_anim != '') {
		$roofing_services_custom_style .=' .nav-menu ul ul {';
			$roofing_services_custom_style .=' animation:'.esc_attr($roofing_services_dropdown_anim).' 1s ease;';
		$roofing_services_custom_style .=' }';
	}

	//header color
	$roofing_services_phonemail_color = get_theme_mod('roofing_services_phonemail_color');
	if ( $roofing_services_phonemail_color != '') {
		$roofing_services_custom_style .=' .topbar .contact a{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_phonemail_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_social_color = get_theme_mod('roofing_services_social_color');
	$roofing_services_socialbg_color = get_theme_mod('roofing_services_socialbg_color');
	if ( $roofing_services_social_color != '') {
		$roofing_services_custom_style .=' .social-icons i{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_social_color).'; background-color:'.esc_attr($roofing_services_socialbg_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_menu_color = get_theme_mod('roofing_services_menu_color');
	if ( $roofing_services_menu_color != '') {
		$roofing_services_custom_style .=' .nav-menu ul li a{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_menu_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_menuhvr_color = get_theme_mod('roofing_services_menuhvr_color');
	if ( $roofing_services_menuhvr_color != '') {
		$roofing_services_custom_style .=' .nav-menu ul li a:hover{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_menuhvr_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_search_color = get_theme_mod('roofing_services_search_color');
	$roofing_services_searchbg_color = get_theme_mod('roofing_services_searchbg_color');
	if ( $roofing_services_search_color != '') {
		$roofing_services_custom_style .=' .search-box i{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_search_color).'; background-color:'.esc_attr($roofing_services_searchbg_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_hdrbg_color = get_theme_mod('roofing_services_hdrbg_color');
	if ( $roofing_services_hdrbg_color != '') {
		$roofing_services_custom_style .=' .menu-section{';
			$roofing_services_custom_style .=' background-color:'.esc_attr($roofing_services_hdrbg_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_logobg_color = get_theme_mod('roofing_services_logobg_color');
	if ( $roofing_services_logobg_color != '') {
		$roofing_services_custom_style .=' .logo{';
			$roofing_services_custom_style .=' background-color:'.esc_attr($roofing_services_logobg_color).';';
		$roofing_services_custom_style .=' }';
	}

	//slider color	
	$roofing_services_slider_title_font_size = get_theme_mod('roofing_services_slider_title_font_size');
	if( $roofing_services_slider_title_font_size != '') {
		$roofing_services_custom_style .= '#slider h2 a {';
		$roofing_services_custom_style .= ' font-size: ' . esc_attr($roofing_services_slider_title_font_size) . 'px;';
		$roofing_services_custom_style .= '}';
		$border_width_percentage = (esc_attr($roofing_services_slider_title_font_size) / 50) * 70;
		$roofing_services_custom_style .= '#slider .carousel-caption hr {';
		$roofing_services_custom_style .= ' width: ' . $border_width_percentage . '%;';
		$roofing_services_custom_style .= '}';
	}


	$roofing_services_slider_text_font_size = get_theme_mod('roofing_services_slider_text_font_size');
	if( $roofing_services_slider_text_font_size != ''){
		$roofing_services_custom_style .=' #slider p{';
			$roofing_services_custom_style .=' font-size: '.esc_attr($roofing_services_slider_text_font_size).'px;';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_slider_opacity = get_theme_mod('roofing_services_slider_opacity');
	if ( $roofing_services_slider_opacity != '') {
		$roofing_services_custom_style .=' #slider img{';
			$roofing_services_custom_style .=' opacity:'.esc_attr($roofing_services_slider_opacity).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_slidertitle_color = get_theme_mod('roofing_services_slidertitle_color');
	if ( $roofing_services_slidertitle_color != '') {
		$roofing_services_custom_style .=' #slider h2 a{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_slidertitle_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_sliderbdr_color1 = get_theme_mod('roofing_services_sliderbdr_color1');
	if ( $roofing_services_sliderbdr_color1 != '') {
		$roofing_services_custom_style .=' #slider .carousel-caption hr{';
			$roofing_services_custom_style .=' background-color:'.esc_attr($roofing_services_sliderbdr_color1).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_sliderbdr_color2 = get_theme_mod('roofing_services_sliderbdr_color2');
	if ( $roofing_services_sliderbdr_color2 != '') {
		$roofing_services_custom_style .=' #slider .carousel-caption hr:after{';
			$roofing_services_custom_style .=' background-color:'.esc_attr($roofing_services_sliderbdr_color2).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_slidertext_color = get_theme_mod('roofing_services_slidertext_color');
	if ( $roofing_services_slidertext_color != '') {
		$roofing_services_custom_style .=' #slider p{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_slidertext_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_sliderbtn_color = get_theme_mod('roofing_services_sliderbtn_color');
	$roofing_services_sliderbtnbg_color = get_theme_mod('roofing_services_sliderbtnbg_color');
	if ( $roofing_services_sliderbtn_color != '') {
		$roofing_services_custom_style .=' #slider a.read-btn{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_sliderbtn_color).';background-color:'.esc_attr($roofing_services_sliderbtnbg_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_slidernp_color = get_theme_mod('roofing_services_slidernp_color');
	$roofing_services_slidernpbg_color = get_theme_mod('roofing_services_slidernpbg_color');
	if ( $roofing_services_slidernp_color != '') {
		$roofing_services_custom_style .=' #slider .carousel-control-prev-icon i, #slider .carousel-control-next-icon i{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_slidernp_color).';background-color:'.esc_attr($roofing_services_slidernpbg_color).';';
		$roofing_services_custom_style .=' }';
	}

	//about us color
	$roofing_services_section_title_font_size = get_theme_mod('roofing_services_section_title_font_size');
	if( $roofing_services_section_title_font_size != ''){
		$roofing_services_custom_style .=' #about-section .about-head h3{';
			$roofing_services_custom_style .=' font-size: '.esc_attr($roofing_services_section_title_font_size).'px;';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_about_img_size = get_theme_mod('roofing_services_about_img_size');
	if ( $roofing_services_about_img_size != '') {
		$roofing_services_custom_style .=' #about-section img{';
			$roofing_services_custom_style .=' height:'.esc_attr($roofing_services_about_img_size).'px;';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_about_title_color = get_theme_mod('roofing_services_about_title_color');
	$roofing_services_about_titlebg_color = get_theme_mod('roofing_services_about_titlebg_color');
	if ( $roofing_services_about_title_color != '') {
		$roofing_services_custom_style .=' #about-section .about-head h3{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_about_title_color).'; background-color:'.esc_attr($roofing_services_about_titlebg_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_about_heading_color = get_theme_mod('roofing_services_about_heading_color');
	if ( $roofing_services_about_heading_color != '') {
		$roofing_services_custom_style .=' #about-section .about-content h4{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_about_heading_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_about_text_color = get_theme_mod('roofing_services_about_text_color');
	if ( $roofing_services_about_text_color != '') {
		$roofing_services_custom_style .=' #about-section .about-content p{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_about_text_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_about_btn_color = get_theme_mod('roofing_services_about_btn_color');
	$roofing_services_about_btnbg_color = get_theme_mod('roofing_services_about_btnbg_color');
	if ( $roofing_services_about_btn_color != '') {
		$roofing_services_custom_style .=' #about-section .about-btn a{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_about_btn_color).'; background-color:'.esc_attr($roofing_services_about_btnbg_color).';';
		$roofing_services_custom_style .=' }';
	}

	//footer css
	$roofing_services_footer_copy_font_size = get_theme_mod('roofing_services_footer_copy_font_size');
	if( $roofing_services_footer_copy_font_size != ''){
		$roofing_services_custom_style .=' .site-info p, .site-info a{';
			$roofing_services_custom_style .=' font-size: '.esc_attr($roofing_services_footer_copy_font_size).'px;';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_wedgets_color = get_theme_mod('roofing_services_wedgets_color');
	if ( $roofing_services_wedgets_color != '') {
		$roofing_services_custom_style .=' .site-footer h2.widget-title{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_wedgets_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_wedgets_menus_color = get_theme_mod('roofing_services_wedgets_menus_color');
	if ( $roofing_services_wedgets_menus_color != '') {
		$roofing_services_custom_style .=' .site-footer a, .site-footer p, #colophon caption{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_wedgets_menus_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_footer_copy_color = get_theme_mod('roofing_services_footer_copy_color');
	if ( $roofing_services_footer_copy_color != '') {
		$roofing_services_custom_style .=' .site-info p, .site-info a{';
			$roofing_services_custom_style .=' color:'.esc_attr($roofing_services_footer_copy_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_footer_copybg_color = get_theme_mod('roofing_services_footer_copybg_color');
	if ( $roofing_services_footer_copybg_color != '') {
		$roofing_services_custom_style .=' .copyright{';
			$roofing_services_custom_style .=' background-color:'.esc_attr($roofing_services_footer_copybg_color).';';
		$roofing_services_custom_style .=' }';
	}

	$roofing_services_footerbg_color = get_theme_mod('roofing_services_footerbg_color');
	if ( $roofing_services_footerbg_color != '') {
		$roofing_services_custom_style .=' #colophon{';
			$roofing_services_custom_style .=' background-color:'.esc_attr($roofing_services_footerbg_color).';';
		$roofing_services_custom_style .=' }';
	}