<?php 

	$steps_dance_academy_custom_style = '';

	// Logo Size
	$steps_dance_academy_logo_top_margin = get_theme_mod('steps_dance_academy_logo_top_margin');
	$steps_dance_academy_logo_bottom_margin = get_theme_mod('steps_dance_academy_logo_bottom_margin');
	$steps_dance_academy_logo_left_margin = get_theme_mod('steps_dance_academy_logo_left_margin');
	$steps_dance_academy_logo_right_margin = get_theme_mod('steps_dance_academy_logo_right_margin');

	if( $steps_dance_academy_logo_top_margin != '' || $steps_dance_academy_logo_bottom_margin != '' || $steps_dance_academy_logo_left_margin != '' || $steps_dance_academy_logo_right_margin != ''){
		$steps_dance_academy_custom_style .=' .logo {';
			$steps_dance_academy_custom_style .=' margin-top: '.esc_attr($steps_dance_academy_logo_top_margin).'px;
			margin-bottom: '.esc_attr($steps_dance_academy_logo_bottom_margin).'px;
			margin-left: '.esc_attr($steps_dance_academy_logo_left_margin).'px;
			margin-right: '.esc_attr($steps_dance_academy_logo_right_margin).'px;';
		$steps_dance_academy_custom_style .=' }';
	}

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

	// Section padding
	$steps_dance_academy_service_section_padding = get_theme_mod('steps_dance_academy_service_section_padding');

	if( $steps_dance_academy_service_section_padding != ''){
		$steps_dance_academy_custom_style .=' #services-section {';
			$steps_dance_academy_custom_style .=' padding-top: '.esc_attr($steps_dance_academy_service_section_padding).'px;
			padding-bottom: '.esc_attr($steps_dance_academy_service_section_padding).'px;';
		$steps_dance_academy_custom_style .=' }';
	}

	// Slider
	if( get_theme_mod('steps_dance_academy_slider_hide_show',false) == false){
		$steps_dance_academy_custom_style .=' #services-section {';
			$steps_dance_academy_custom_style .=' margin-top: 20px;';
		$steps_dance_academy_custom_style .=' }';
	}

	$steps_dance_academy_slider_font_size = get_theme_mod('steps_dance_academy_slider_font_size');
	if( $steps_dance_academy_slider_font_size != ''){
		$steps_dance_academy_custom_style .=' #slider h2 a {';
			$steps_dance_academy_custom_style .=' font-size: '.esc_attr($steps_dance_academy_slider_font_size).'px;';
		$steps_dance_academy_custom_style .=' }';
	}

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

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

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

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

	$steps_dance_academy_slider_btn_color = get_theme_mod('steps_dance_academy_slider_btn_color');
	$steps_dance_academy_slider_btnbdr_color = get_theme_mod('steps_dance_academy_slider_btnbdr_color');
	if( $steps_dance_academy_slider_btn_color != ''){
		$steps_dance_academy_custom_style .=' #slider a.read-btn{';
			$steps_dance_academy_custom_style .=' color: '.esc_attr($steps_dance_academy_slider_btn_color).'; border-color: '.esc_attr($steps_dance_academy_slider_btnbdr_color).';';
		$steps_dance_academy_custom_style .=' }';
	}

	// logo font size
	$steps_dance_academy_site_title_fontsize = get_theme_mod('steps_dance_academy_site_title_fontsize');
	$steps_dance_academy_custom_style .=' .logo h1.site-title, .logo p.site-title {';
		$steps_dance_academy_custom_style .=' font-size: '.esc_attr($steps_dance_academy_site_title_fontsize).'px;';
	$steps_dance_academy_custom_style .=' }';

	$steps_dance_academy_site_tagline_fontsize = get_theme_mod('steps_dance_academy_site_tagline_fontsize');
	$steps_dance_academy_custom_style .=' .logo p.site-description {';
		$steps_dance_academy_custom_style .=' font-size: '.esc_attr($steps_dance_academy_site_tagline_fontsize).'px;';
	$steps_dance_academy_custom_style .=' }';

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

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

	// Copyright padding
	$steps_dance_academy_copyright_padding = get_theme_mod('steps_dance_academy_copyright_padding');

	if( $steps_dance_academy_copyright_padding != ''){
		$steps_dance_academy_custom_style .=' .site-info {';
			$steps_dance_academy_custom_style .=' padding-top: '.esc_attr($steps_dance_academy_copyright_padding).'px; padding-bottom: '.esc_attr($steps_dance_academy_copyright_padding).'px;';
		$steps_dance_academy_custom_style .=' }';
	}

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

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

	$steps_dance_academy_topheader_epicon_color = get_theme_mod('steps_dance_academy_topheader_epicon_color');
	if( $steps_dance_academy_topheader_epicon_color != ''){
		$steps_dance_academy_custom_style .=' .page-template-custom-home-page p.callno i, .single p.callno i, .page-template-default p.callno i {';
			$steps_dance_academy_custom_style .=' color: '.esc_attr($steps_dance_academy_topheader_epicon_color).';';
		$steps_dance_academy_custom_style .=' }';
	}

	$steps_dance_academy_topheader_eptext_color = get_theme_mod('steps_dance_academy_topheader_eptext_color');
	if( $steps_dance_academy_topheader_eptext_color != ''){
		$steps_dance_academy_custom_style .=' p.callno {';
			$steps_dance_academy_custom_style .=' color: '.esc_attr($steps_dance_academy_topheader_eptext_color).';';
		$steps_dance_academy_custom_style .=' }';
	}

	$steps_dance_academy_topheader_social_color = get_theme_mod('steps_dance_academy_topheader_social_color');
	if( $steps_dance_academy_topheader_social_color != ''){
		$steps_dance_academy_custom_style .=' #slider .social-icons a i {';
			$steps_dance_academy_custom_style .=' color: '.esc_attr($steps_dance_academy_topheader_social_color).';';
		$steps_dance_academy_custom_style .=' }';
	}

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

	$steps_dance_academy_topheader_search_color = get_theme_mod('steps_dance_academy_topheader_search_color');
	if( $steps_dance_academy_topheader_search_color != ''){
		$steps_dance_academy_custom_style .=' .search-box i {';
			$steps_dance_academy_custom_style .=' color: '.esc_attr($steps_dance_academy_topheader_search_color).';';
		$steps_dance_academy_custom_style .=' }';
	}

	//service css
	$steps_dance_academy_service_img_size = get_theme_mod('steps_dance_academy_service_img_size');
	if( $steps_dance_academy_service_img_size != ''){
		$steps_dance_academy_custom_style .=' #services-section .services-box, #services-section .services-box img {';
			$steps_dance_academy_custom_style .=' width: '.esc_attr($steps_dance_academy_service_img_size).'px; height: '.esc_attr($steps_dance_academy_service_img_size).'px;';
		$steps_dance_academy_custom_style .=' }';
	}

	$steps_dance_academy_service_icon_color = get_theme_mod('steps_dance_academy_service_icon_color');
	if( $steps_dance_academy_service_icon_color != ''){
		$steps_dance_academy_custom_style .=' #services-section .service-content i {';
			$steps_dance_academy_custom_style .=' color: '.esc_attr($steps_dance_academy_service_icon_color).';';
		$steps_dance_academy_custom_style .=' }';
	}

	$steps_dance_academy_service_text_color = get_theme_mod('steps_dance_academy_service_text_color');
	if( $steps_dance_academy_service_text_color != ''){
		$steps_dance_academy_custom_style .=' #services-section .service-content h3 a {';
			$steps_dance_academy_custom_style .=' color: '.esc_attr($steps_dance_academy_service_text_color).';';
		$steps_dance_academy_custom_style .=' }';
	}

	$steps_dance_academy_service_textbg_color = get_theme_mod('steps_dance_academy_service_textbg_color');
	if( $steps_dance_academy_service_textbg_color != ''){
		$steps_dance_academy_custom_style .=' #services-section .services-box {';
			$steps_dance_academy_custom_style .=' background-color: '.esc_attr($steps_dance_academy_service_textbg_color).';';
		$steps_dance_academy_custom_style .=' }';
	}

	//footer css
	$steps_dance_academy_footer_widget_color = get_theme_mod('steps_dance_academy_footer_widget_color');
	if( $steps_dance_academy_footer_widget_color != ''){
		$steps_dance_academy_custom_style .=' .site-footer h2.widget-title {';
			$steps_dance_academy_custom_style .=' color: '.esc_attr($steps_dance_academy_footer_widget_color).';';
		$steps_dance_academy_custom_style .=' }';
	}

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

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

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

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