<?php 

	$movers_and_packers_custom_style = '';

	// Logo Size
	$movers_and_packers_logo_top_padding = get_theme_mod('movers_and_packers_logo_top_padding');
	$movers_and_packers_logo_bottom_padding = get_theme_mod('movers_and_packers_logo_bottom_padding');
	$movers_and_packers_logo_left_padding = get_theme_mod('movers_and_packers_logo_left_padding');
	$movers_and_packers_logo_right_padding = get_theme_mod('movers_and_packers_logo_right_padding');

	if( $movers_and_packers_logo_top_padding != '' || $movers_and_packers_logo_bottom_padding != '' || $movers_and_packers_logo_left_padding != '' || $movers_and_packers_logo_right_padding != ''){
		$movers_and_packers_custom_style .=' .logo {';
			$movers_and_packers_custom_style .=' padding-top: '.esc_attr($movers_and_packers_logo_top_padding).'px; padding-bottom: '.esc_attr($movers_and_packers_logo_bottom_padding).'px; padding-left: '.esc_attr($movers_and_packers_logo_left_padding).'px; padding-right: '.esc_attr($movers_and_packers_logo_right_padding).'px;';
		$movers_and_packers_custom_style .=' }';
	}

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


	// Header Image
	$header_image_url = movers_and_packers_banner_image( $image_url = '' );
	if( $header_image_url != ''){
		$movers_and_packers_custom_style .=' #inner-pages-header {';
			$movers_and_packers_custom_style .=' background-image: url('. esc_url( $header_image_url ).'); background-size: cover; background-repeat: no-repeat; background-attachment: fixed;';
		$movers_and_packers_custom_style .=' }';
		$movers_and_packers_custom_style .=' .header-overlay {';
			$movers_and_packers_custom_style .=' position: absolute; 	width: 100%; height: 100%; 	top: 0; left: 0; background: #000; opacity: 0.3;';
		$movers_and_packers_custom_style .=' }';
	} else {
		$movers_and_packers_custom_style .=' #inner-pages-header {';
			$movers_and_packers_custom_style .=' background: linear-gradient(0deg,#ccc,#f4f4f4 80%) no-repeat; ';
		$movers_and_packers_custom_style .=' }';
		$movers_and_packers_custom_style .=' #inner-pages-header h1, #inner-pages-header .theme-breadcrumb a, #inner-pages-header .theme-breadcrumb {';
			$movers_and_packers_custom_style .=' color: #000; ';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_tptext_color = get_theme_mod('movers_and_packers_tptext_color');
	if ( $movers_and_packers_tptext_color != '') {
		$movers_and_packers_custom_style .=' .top-header .contact a, .top-header p.topbar-text {';
			$movers_and_packers_custom_style .=' color:'.esc_attr($movers_and_packers_tptext_color).';';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_tpicon_color = get_theme_mod('movers_and_packers_tpicon_color');
	if ( $movers_and_packers_tpicon_color != '') {
		$movers_and_packers_custom_style .=' .top-header .contact a i{';
			$movers_and_packers_custom_style .=' color:'.esc_attr($movers_and_packers_tpicon_color).';';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_tpbdr_color = get_theme_mod('movers_and_packers_tpbdr_color');
	if ( $movers_and_packers_tpbdr_color != '') {
		$movers_and_packers_custom_style .=' .top-header .contact {';
			$movers_and_packers_custom_style .=' border-color:'.esc_attr($movers_and_packers_tpbdr_color).';';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_social_color = get_theme_mod('movers_and_packers_social_color');
	if ( $movers_and_packers_social_color != '') {
		$movers_and_packers_custom_style .=' .top-header i {';
			$movers_and_packers_custom_style .=' color:'.esc_attr($movers_and_packers_social_color).';';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_topbarbg_color = get_theme_mod('movers_and_packers_topbarbg_color');
	if ( $movers_and_packers_topbarbg_color != '') {
		$movers_and_packers_custom_style .=' .top-header {';
			$movers_and_packers_custom_style .=' background-color:'.esc_attr($movers_and_packers_topbarbg_color).';';
		$movers_and_packers_custom_style .=' }';
	}

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

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

	//layout width
	$movers_and_packers_boxfull_width = get_theme_mod('movers_and_packers_boxfull_width');
	if ($movers_and_packers_boxfull_width !== '') {
		switch ($movers_and_packers_boxfull_width) {
			case 'container':
				$movers_and_packers_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':
				$movers_and_packers_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
	$movers_and_packers_dropdown_anim = get_theme_mod('movers_and_packers_dropdown_anim');

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

	//Service color
	$movers_and_packers_small_title_font_size = get_theme_mod('movers_and_packers_small_title_font_size');
	if( $movers_and_packers_small_title_font_size != ''){
		$movers_and_packers_custom_style .=' #service-section .service-head .small-title {';
			$movers_and_packers_custom_style .=' font-size: '.esc_attr($movers_and_packers_small_title_font_size).'px;';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_section_title_font_size = get_theme_mod('movers_and_packers_section_title_font_size');
	if( $movers_and_packers_section_title_font_size != ''){
		$movers_and_packers_custom_style .=' #service-section h3 {';
			$movers_and_packers_custom_style .=' font-size: '.esc_attr($movers_and_packers_section_title_font_size).'px;';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_img_size = get_theme_mod('movers_and_packers_img_size');
	if( $movers_and_packers_img_size != ''){
		// Calculate the size for the :before pseudo-element, e.g., 10% larger
		$before_size = $movers_and_packers_img_size * 1.1	;

		$movers_and_packers_custom_style .= ' 
		.service-box .img-box img{';
			$movers_and_packers_custom_style .= ' width: '.esc_attr($movers_and_packers_img_size).'px; height: '.esc_attr($movers_and_packers_img_size).'px;';
		$movers_and_packers_custom_style .= ' }';

		$movers_and_packers_custom_style .= '
		.service-box .service-img:before {';
			$movers_and_packers_custom_style .= ' width: '.esc_attr($before_size).'px; height: '.esc_attr($before_size).'px;';
		$movers_and_packers_custom_style .= ' }';
	}

	$movers_and_packers_img_border_radius = get_theme_mod('movers_and_packers_img_border_radius');
	if ( $movers_and_packers_img_border_radius !== '' ) {
		// Ensure numeric and clamp between 0 and 100
		$raw = floatval( $movers_and_packers_img_border_radius );
		$clamped = max( 0, min( 100, $raw ) );
		// Map control range 0-100 to CSS percent 0-50 (so 100 => 50%)
		$css_radius = $clamped * 0.5;

		$movers_and_packers_custom_style .=' .service-box .service-img:before, .service-box .img-box img {';
			$movers_and_packers_custom_style .=' border-radius: '.esc_attr($css_radius).'%;';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_service_font_size = get_theme_mod('movers_and_packers_service_font_size');
	if( $movers_and_packers_service_font_size != ''){
		$movers_and_packers_custom_style .=' .service-box h4 a {';
			$movers_and_packers_custom_style .=' font-size: '.esc_attr($movers_and_packers_service_font_size).'px;';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_service_text_font_size = get_theme_mod('movers_and_packers_service_text_font_size');
	if( $movers_and_packers_service_text_font_size != ''){
		$movers_and_packers_custom_style .=' .service-box p {';
			$movers_and_packers_custom_style .=' font-size: '.esc_attr($movers_and_packers_service_text_font_size).'px;';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_service_smt_color = get_theme_mod('movers_and_packers_service_smt_color');
	if ( $movers_and_packers_service_smt_color != '') {
		$movers_and_packers_custom_style .=' #service-section .service-head .small-title {';
			$movers_and_packers_custom_style .=' color:'.esc_attr($movers_and_packers_service_smt_color).';';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_service_color = get_theme_mod('movers_and_packers_service_color');
	if ( $movers_and_packers_service_color != '') {
		$movers_and_packers_custom_style .=' #service-section h3 {';
			$movers_and_packers_custom_style .=' color:'.esc_attr($movers_and_packers_service_color).';';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_service_color = get_theme_mod('movers_and_packers_service_color');
	if ( $movers_and_packers_service_color != '') {
		$movers_and_packers_custom_style .=' #service-section h3 {';
			$movers_and_packers_custom_style .=' color:'.esc_attr($movers_and_packers_service_color).';';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_service_post_color = get_theme_mod('movers_and_packers_service_post_color');
	if ( $movers_and_packers_service_post_color != '') {
		$movers_and_packers_custom_style .=' .service-box h4 a {';
			$movers_and_packers_custom_style .=' color:'.esc_attr($movers_and_packers_service_post_color).';';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_service_post_text_color = get_theme_mod('movers_and_packers_service_post_text_color');
	if ( $movers_and_packers_service_post_text_color != '') {
		$movers_and_packers_custom_style .=' .service-box p {';
			$movers_and_packers_custom_style .=' color:'.esc_attr($movers_and_packers_service_post_text_color).';';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_service_post_btn_color = get_theme_mod('movers_and_packers_service_post_btn_color');
	if ( $movers_and_packers_service_post_btn_color != '') {
		$movers_and_packers_custom_style .=' .service-content .read-btn a {';
			$movers_and_packers_custom_style .=' color:'.esc_attr($movers_and_packers_service_post_btn_color).';';
		$movers_and_packers_custom_style .=' }';
	}

	$movers_and_packers_service_postbg_color = get_theme_mod('movers_and_packers_service_postbg_color');
	if ( $movers_and_packers_service_postbg_color != '') {
		$movers_and_packers_custom_style .=' #service-section .service-box {';
			$movers_and_packers_custom_style .=' background-color:'.esc_attr($movers_and_packers_service_postbg_color).';';
		$movers_and_packers_custom_style .=' }';
	}

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

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

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

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

	$movers_and_packers_footer_widget_menu_color = get_theme_mod('movers_and_packers_footer_widget_menu_color');
	if ( $movers_and_packers_footer_widget_menu_color != '') {
		$movers_and_packers_custom_style .=' .widget ul li a, .site-footer .widget-area ul li a, .site-footer .widget-area ul li a {';
			$movers_and_packers_custom_style .=' color:'.esc_attr($movers_and_packers_footer_widget_menu_color).';';
		$movers_and_packers_custom_style .=' }';
	}

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

	$movers_and_packers_footer_copy_bdr_color = get_theme_mod('movers_and_packers_footer_copy_bdr_color');
	if ( $movers_and_packers_footer_copy_bdr_color != '') {
		$movers_and_packers_custom_style .=' .copyright {';
			$movers_and_packers_custom_style .=' border-top-color:'.esc_attr($movers_and_packers_footer_copy_bdr_color).';';
		$movers_and_packers_custom_style .=' }';
	}