<?php 

	$football_academy_custom_style = '';

	// Logo Size
	$football_academy_logo_top_padding = get_theme_mod('football_academy_logo_top_padding');
	$football_academy_logo_bottom_padding = get_theme_mod('football_academy_logo_bottom_padding');
	$football_academy_logo_left_padding = get_theme_mod('football_academy_logo_left_padding');
	$football_academy_logo_right_padding = get_theme_mod('football_academy_logo_right_padding');

	if( $football_academy_logo_top_padding != '' || $football_academy_logo_bottom_padding != '' || $football_academy_logo_left_padding != '' || $football_academy_logo_right_padding != ''){
		$football_academy_custom_style .=' .logo {';
			$football_academy_custom_style .=' padding-top: '.esc_attr($football_academy_logo_top_padding).'px; padding-bottom: '.esc_attr($football_academy_logo_bottom_padding).'px; padding-left: '.esc_attr($football_academy_logo_left_padding).'px; padding-right: '.esc_attr($football_academy_logo_right_padding).'px;';
		$football_academy_custom_style .=' }';
	}

	$football_academy_logo_size = get_theme_mod('football_academy_logo_size');
	if( $football_academy_logo_size != '') {
		if($football_academy_logo_size == 100) {
			// Full size (100% = 350px)
			$football_academy_custom_style .=' .custom-logo-link img {';
			$football_academy_custom_style .=' width: 350px;';
			$football_academy_custom_style .=' }';
		} else if($football_academy_logo_size >= 1 && $football_academy_logo_size <= 100) {
			// Calculate size in pixels based on percentage
			$calculated_width = (350 / 100) * esc_attr($football_academy_logo_size); 
			$football_academy_custom_style .=' .custom-logo-link img {';
			$football_academy_custom_style .=' width: '.$calculated_width.'px;';
			$football_academy_custom_style .=' }';
		}
	}

	// Header Image
	$header_image_url = football_academy_banner_image( $image_url = '' );
	if( $header_image_url != ''){
		$football_academy_custom_style .=' #inner-pages-header {';
			$football_academy_custom_style .=' background-image: url('. esc_url( $header_image_url ).'); background-size: cover; background-repeat: no-repeat; background-attachment: fixed;';
		$football_academy_custom_style .=' }';
	} else {
		$football_academy_custom_style .=' #inner-pages-header {';
			$football_academy_custom_style .=' background: radial-gradient(circle at center, rgba(0,0,0,0) 0%, #000000 100%); ';
		$football_academy_custom_style .=' }';
	}

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

	//site title tagline
	$football_academy_site_title_color = get_theme_mod('football_academy_site_title_color');
	if ( $football_academy_site_title_color != '') {
		$football_academy_custom_style .=' h1.site-title a, p.site-title a{';
			$football_academy_custom_style .=' color:'.esc_attr($football_academy_site_title_color).';';
		$football_academy_custom_style .=' }';
	}

	$football_academy_site_tagline_color = get_theme_mod('football_academy_site_tagline_color');
	if ( $football_academy_site_tagline_color != '') {
		$football_academy_custom_style .=' p.site-description{';
			$football_academy_custom_style .=' color:'.esc_attr($football_academy_site_tagline_color).';';
		$football_academy_custom_style .=' }';
	}

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

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

	//Header color
	$football_academy_hdrbtn_color = get_theme_mod('football_academy_hdrbtn_color');
	$football_academy_hdrbtnbg_color = get_theme_mod('football_academy_hdrbtnbg_color');
	if ( $football_academy_hdrbtn_color != '') {
		$football_academy_custom_style .=' #header .btn-contact a{';
			$football_academy_custom_style .=' color:'.esc_attr($football_academy_hdrbtn_color).'; background-color:'.esc_attr($football_academy_hdrbtnbg_color).';';
		$football_academy_custom_style .=' }';
	}

	//slider color
	$football_academy_slider_font_size = get_theme_mod('football_academy_slider_font_size');
	if ( $football_academy_slider_font_size != '') {
		$football_academy_custom_style .=' #slider .contentinn h2{';
			$football_academy_custom_style .=' font-size:'.esc_attr($football_academy_slider_font_size).'px;';
		$football_academy_custom_style .=' }';
	}

	$football_academy_slider_title_color = get_theme_mod('football_academy_slider_title_color');
	if ( $football_academy_slider_title_color != '') {
		$football_academy_custom_style .=' #slider .contentinn h2{';
			$football_academy_custom_style .=' color:'.esc_attr($football_academy_slider_title_color).';';
		$football_academy_custom_style .=' }';
	}

	$football_academy_slider_titlebg_color = get_theme_mod('football_academy_slider_titlebg_color');
	if ( $football_academy_slider_titlebg_color != '') {
		$football_academy_custom_style .=' #slider .contentinn{';
			$football_academy_custom_style .=' background: transparent linear-gradient(90deg,#00000000 0%,'.esc_attr($football_academy_slider_titlebg_color).' 100%) 0;';
		$football_academy_custom_style .=' }';
	}

	//service color
	$football_academy_serviceheading_font_size = get_theme_mod('football_academy_serviceheading_font_size');
	if ( $football_academy_serviceheading_font_size != '') {
		$football_academy_custom_style .=' .section-Heading h3{';
			$football_academy_custom_style .=' font-size:'.esc_attr($football_academy_serviceheading_font_size).'px;';
		$football_academy_custom_style .=' }';
	}

	$football_academy_service_font_size = get_theme_mod('football_academy_service_font_size');
	if ( $football_academy_service_font_size != '') {
		$football_academy_custom_style .=' #service-section .ser-title h4{';
			$football_academy_custom_style .=' font-size:'.esc_attr($football_academy_service_font_size).'px;';
		$football_academy_custom_style .=' }';
	}

	$football_academy_service_heading_color = get_theme_mod('football_academy_service_heading_color');
	if ( $football_academy_service_heading_color != '') {
		$football_academy_custom_style .=' .section-Heading h3{';
			$football_academy_custom_style .=' color:'.esc_attr($football_academy_service_heading_color).';';
		$football_academy_custom_style .=' }';
	}

	$football_academy_service_title_color = get_theme_mod('football_academy_service_title_color');
	if ( $football_academy_service_title_color != '') {
		$football_academy_custom_style .=' #service-section .ser-title h4{';
			$football_academy_custom_style .=' color:'.esc_attr($football_academy_service_title_color).';';
		$football_academy_custom_style .=' }';
	}

	$football_academy_service_titlebg_color = get_theme_mod('football_academy_service_titlebg_color');
	if ( $football_academy_service_titlebg_color != '') {
		$football_academy_custom_style .=' #service-section .ser-title{';
			$football_academy_custom_style .=' background-color:'.esc_attr($football_academy_service_titlebg_color).';';
		$football_academy_custom_style .=' }';
	}

	$football_academy_service_icon_color = get_theme_mod('football_academy_service_icon_color');
	$football_academy_service_iconbg_color = get_theme_mod('football_academy_service_iconbg_color');
	if ( $football_academy_service_icon_color != '') {
		$football_academy_custom_style .=' #service-section .ser-title i{';
			$football_academy_custom_style .=' color:'.esc_attr($football_academy_service_icon_color).'; background-color:'.esc_attr($football_academy_service_iconbg_color).';';
		$football_academy_custom_style .=' }';
	}