<?php

	$elearning_education_tp_theme_css = "";

$elearning_education_tp_color_option = get_theme_mod('elearning_education_tp_color_option');

// 1st color
$elearning_education_tp_color_option = get_theme_mod('elearning_education_tp_color_option', '#f6520a');
if ($elearning_education_tp_color_option) {
    $elearning_education_tp_theme_css .= ':root {';
    $elearning_education_tp_theme_css .= '--color-primary1: ' . esc_attr($elearning_education_tp_color_option) . ';';
    $elearning_education_tp_theme_css .= '}';
}

//======================= slider Content layout ===================== //

$online_courses_hub_slider_content_layout = get_theme_mod('online_courses_hub_slider_content_layout', ''); 
$elearning_education_tp_theme_css .= '#slider .carousel-caption{';
switch ($online_courses_hub_slider_content_layout) {
    case 'LEFT-ALIGN':
        $elearning_education_tp_theme_css .= 'text-align:left; right: 40%; left: 15%';
        break;
    case 'CENTER-ALIGN':
        $elearning_education_tp_theme_css .= 'text-align:center; left: 25%; right: 25%';
        break;
    case 'RIGHT-ALIGN':
        $elearning_education_tp_theme_css .= 'text-align:right; left: 40%; right: 15%';
        break;
    default:
        $elearning_education_tp_theme_css .= 'text-align:left; right: 40%; left: 15%';
        break;
}
$elearning_education_tp_theme_css .= '}';

/*------------------ Slider CSS -------------------*/
    $elearning_education_slider_opacity_setting = get_theme_mod('elearning_education_slider_opacity_setting', true);
    $elearning_education_image_opacity_color    = get_theme_mod('elearning_education_image_opacity_color', '');
    $elearning_education_slider_opacity         = get_theme_mod('elearning_education_slider_opacity', '1');

    if ($elearning_education_slider_opacity_setting) {
        // Apply opacity value to slider image
        if ($elearning_education_slider_opacity !== '') {
            $elearning_education_tp_theme_css .= '#slider img {';
            $elearning_education_tp_theme_css .= 'opacity: ' . esc_attr($elearning_education_slider_opacity) . ';';
            $elearning_education_tp_theme_css .= '}';
        }

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