<?php
	
	$estate_brokerage_services_tp_theme_css = '';

	// 1st color
	$estate_brokerage_services_tp_color_option_first = get_theme_mod('estate_brokerage_services_tp_color_option_first', '#424242');
	if ($estate_brokerage_services_tp_color_option_first) {
		$estate_brokerage_services_tp_theme_css .= ':root {';
		$estate_brokerage_services_tp_theme_css .= '--color-primary1: ' . esc_attr($estate_brokerage_services_tp_color_option_first) . ';';
		$estate_brokerage_services_tp_theme_css .= '}';
	}
	
	// preloader
	$estate_brokerage_services_tp_preloader_color1_option = get_theme_mod('estate_brokerage_services_tp_preloader_color1_option');
	if($estate_brokerage_services_tp_preloader_color1_option != false){
	$estate_brokerage_services_tp_theme_css .='.center1{';
		$estate_brokerage_services_tp_theme_css .='border-color: '.esc_attr($estate_brokerage_services_tp_preloader_color1_option).' !important;';
	$estate_brokerage_services_tp_theme_css .='}';
	}
	if($estate_brokerage_services_tp_preloader_color1_option != false){
	$estate_brokerage_services_tp_theme_css .='.center1 .ring::before{';
		$estate_brokerage_services_tp_theme_css .='background: '.esc_attr($estate_brokerage_services_tp_preloader_color1_option).' !important;';
	$estate_brokerage_services_tp_theme_css .='}';
	}

	$estate_brokerage_services_tp_preloader_color2_option = get_theme_mod('estate_brokerage_services_tp_preloader_color2_option');

	if($estate_brokerage_services_tp_preloader_color2_option != false){
	$estate_brokerage_services_tp_theme_css .='.center2{';
		$estate_brokerage_services_tp_theme_css .='border-color: '.esc_attr($estate_brokerage_services_tp_preloader_color2_option).' !important;';
	$estate_brokerage_services_tp_theme_css .='}';
	}
	if($estate_brokerage_services_tp_preloader_color2_option != false){
	$estate_brokerage_services_tp_theme_css .='.center2 .ring::before{';
		$estate_brokerage_services_tp_theme_css .='background: '.esc_attr($estate_brokerage_services_tp_preloader_color2_option).' !important;';
	$estate_brokerage_services_tp_theme_css .='}';
	}

	$estate_brokerage_services_tp_preloader_bg_color_option = get_theme_mod('estate_brokerage_services_tp_preloader_bg_color_option');

	if($estate_brokerage_services_tp_preloader_bg_color_option != false){
	$estate_brokerage_services_tp_theme_css .='.loader{';
		$estate_brokerage_services_tp_theme_css .='background: '.esc_attr($estate_brokerage_services_tp_preloader_bg_color_option).';';
	$estate_brokerage_services_tp_theme_css .='}';
	}

	$estate_brokerage_services_tp_footer_bg_color_option = get_theme_mod('estate_brokerage_services_tp_footer_bg_color_option');


	if($estate_brokerage_services_tp_footer_bg_color_option != false){
	$estate_brokerage_services_tp_theme_css .='#footer{';
		$estate_brokerage_services_tp_theme_css .='background: '.esc_attr($estate_brokerage_services_tp_footer_bg_color_option).';';
	$estate_brokerage_services_tp_theme_css .='}';
	}

	// logo tagline color
	$estate_brokerage_services_site_tagline_color = get_theme_mod('estate_brokerage_services_site_tagline_color');

	if($estate_brokerage_services_site_tagline_color != false){
	$estate_brokerage_services_tp_theme_css .='.logo h1 a, .logo p a, .logo p.site-title a{';
	$estate_brokerage_services_tp_theme_css .='color: '.esc_attr($estate_brokerage_services_site_tagline_color).';';
	$estate_brokerage_services_tp_theme_css .='}';
	}

	$estate_brokerage_services_logo_tagline_color = get_theme_mod('estate_brokerage_services_logo_tagline_color');
	if($estate_brokerage_services_logo_tagline_color != false){
	$estate_brokerage_services_tp_theme_css .='p.site-description{';
	$estate_brokerage_services_tp_theme_css .='color: '.esc_attr($estate_brokerage_services_logo_tagline_color).';';
	$estate_brokerage_services_tp_theme_css .='}';
	}

	// footer widget title color
	$estate_brokerage_services_footer_widget_title_color = get_theme_mod('estate_brokerage_services_footer_widget_title_color');
	if($estate_brokerage_services_footer_widget_title_color != false){
	$estate_brokerage_services_tp_theme_css .='#footer h3, #footer h2.wp-block-heading{';
	$estate_brokerage_services_tp_theme_css .='color: '.esc_attr($estate_brokerage_services_footer_widget_title_color).';';
	$estate_brokerage_services_tp_theme_css .='}';
	}

	// copyright text color
	$estate_brokerage_services_footer_copyright_text_color = get_theme_mod('estate_brokerage_services_footer_copyright_text_color');
	if($estate_brokerage_services_footer_copyright_text_color != false){
	$estate_brokerage_services_tp_theme_css .='#footer .site-info p, #footer .site-info a {';
	$estate_brokerage_services_tp_theme_css .='color: '.esc_attr($estate_brokerage_services_footer_copyright_text_color).'!important;';
	$estate_brokerage_services_tp_theme_css .='}';
	}

	// header image title color
	$estate_brokerage_services_header_image_title_text_color = get_theme_mod('estate_brokerage_services_header_image_title_text_color');
	if($estate_brokerage_services_header_image_title_text_color != false){
	$estate_brokerage_services_tp_theme_css .='.box-text h2{';
	$estate_brokerage_services_tp_theme_css .='color: '.esc_attr($estate_brokerage_services_header_image_title_text_color).';';
	$estate_brokerage_services_tp_theme_css .='}';
	}

	// menu color
	$estate_brokerage_services_menu_color = get_theme_mod('estate_brokerage_services_menu_color');
	if($estate_brokerage_services_menu_color != false){
	$estate_brokerage_services_tp_theme_css .='.main-navigation a{';
	$estate_brokerage_services_tp_theme_css .='color: '.esc_attr($estate_brokerage_services_menu_color).';';
	$estate_brokerage_services_tp_theme_css .='}';
}


    /*------------------ Slider CSS -------------------*/
    $estate_brokerage_services_slider_opacity_setting = get_theme_mod('estate_brokerage_services_slider_opacity_setting', true);
    $estate_brokerage_services_image_opacity_color    = get_theme_mod('estate_brokerage_services_image_opacity_color', '');
    $estate_brokerage_services_slider_opacity         = get_theme_mod('estate_brokerage_services_slider_opacity', '0.8');

    if ($estate_brokerage_services_slider_opacity_setting) {
        // Apply opacity value to slider image
        if ($estate_brokerage_services_slider_opacity !== '') {
            $estate_brokerage_services_tp_theme_css .= '#slider img {';
            $estate_brokerage_services_tp_theme_css .= 'opacity: ' . esc_attr($estate_brokerage_services_slider_opacity) . ';';
            $estate_brokerage_services_tp_theme_css .= '}';
        }

        // Apply background color to slider if defined
        if ($estate_brokerage_services_image_opacity_color !== '') {
            $estate_brokerage_services_tp_theme_css .= '#slider {';
            $estate_brokerage_services_tp_theme_css .= 'background-color: ' . esc_attr($estate_brokerage_services_image_opacity_color) . ';';
            $estate_brokerage_services_tp_theme_css .= '}';
        }
    } else {
        // If setting is disabled, force full opacity
        $estate_brokerage_services_tp_theme_css .= '#slider img {';
        $estate_brokerage_services_tp_theme_css .= 'opacity: 0.8;';
        $estate_brokerage_services_tp_theme_css .= '}';
    }
