<?php

  $cultural_festival_color_palette_css = '';

	// Global Color

	$cultural_festival_first_color = cultural_festival_get_option('cultural_festival_first_color');

	if($cultural_festival_first_color != false){
		$cultural_festival_color_palette_css .=':root {';
			$cultural_festival_color_palette_css .='--primary-color: '.esc_attr($cultural_festival_first_color).'!important;';
		$cultural_festival_color_palette_css .='}';
	}
	
	// Copyright Background Color
	$cultural_festival_copyright_background_color = cultural_festival_get_option('cultural_festival_copyright_background_color');
	$cultural_festival_color_palette_css .='#colophon {';
	$cultural_festival_color_palette_css .='background: '.esc_attr($cultural_festival_copyright_background_color);
	$cultural_festival_color_palette_css .='}';

	// Copyright Text Color
	$cultural_festival_copyright_text_color = cultural_festival_get_option('cultural_festival_copyright_text_color');
	$cultural_festival_color_palette_css .='#colophon a , #colophon{';
	$cultural_festival_color_palette_css .='color: '.esc_attr($cultural_festival_copyright_text_color);
	$cultural_festival_color_palette_css .='}';


	// Site title And tagline Option
	$cultural_festival_site_title_font_size = cultural_festival_get_option('cultural_festival_site_title_font_size');
	$cultural_festival_site_title_color = cultural_festival_get_option('cultural_festival_site_title_color');
	$cultural_festival_color_palette_css .='.site-title>a , .site-title {';
		$cultural_festival_color_palette_css .='font-size: '.esc_attr($cultural_festival_site_title_font_size).'px;';
		$cultural_festival_color_palette_css .='color: '.esc_attr($cultural_festival_site_title_color).';';
	$cultural_festival_color_palette_css .='}';
	
	$cultural_festival_site_tagline_font_size = cultural_festival_get_option('cultural_festival_site_tagline_font_size');
	if($cultural_festival_site_tagline_font_size != false){
		$cultural_festival_color_palette_css .='.site-description {';
			$cultural_festival_color_palette_css .='font-size: '.esc_attr($cultural_festival_site_tagline_font_size).'px;';
		$cultural_festival_color_palette_css .='}';
	}

	/* Featured Image Hover Effect */
	$cultural_festival_hover_effect = cultural_festival_get_option( 'cultural_festival_featured_image_hover', 'none' );

	if ( $cultural_festival_hover_effect !== 'none' ) {

		$cultural_festival_color_palette_css .= '.blog-post-img{';
		$cultural_festival_color_palette_css .= 'transition: all 0.4s ease-in-out;';
		$cultural_festival_color_palette_css .= '}';

		switch ( $cultural_festival_hover_effect ) {

			case 'zoom-in':
				$cultural_festival_color_palette_css .= '.blog-post-img:hover{transform:scale(1.2);}';
			break;

			case 'zoom-out':
				$cultural_festival_color_palette_css .= '.blog-post-img{transform:scale(1.2);}';
				$cultural_festival_color_palette_css .= '.blog-post-img:hover{transform:scale(1);}';
			break;

			case 'scale':
				$cultural_festival_color_palette_css .= '.blog-post-img:hover{transform:scale(1.1);}';
			break;

			case 'grayscale':
				$cultural_festival_color_palette_css .= '.blog-post-img{filter:grayscale(100%);}';
				$cultural_festival_color_palette_css .= '.blog-post-img:hover{filter:grayscale(0);}';
			break;

			case 'sepia':
				$cultural_festival_color_palette_css .= '.blog-post-img:hover{filter:sepia(100%);}';
			break;

			case 'blur':
				$cultural_festival_color_palette_css .= '.blog-post-img:hover{filter:blur(3px);}';
			break;

			case 'bright':
				$cultural_festival_color_palette_css .= '.blog-post-img:hover{filter:brightness(1.3);}';
			break;

			case 'translate':
				$cultural_festival_color_palette_css .= '.blog-post-img:hover{transform:translateY(-10px);}';
			break;
		}
	}

	/* Product Featured Image Hover Effect */
	$cultural_festival_hover_effect = cultural_festival_get_option( 'cultural_festival_product_featured_image_hover', 'none' );

	if ( $cultural_festival_hover_effect !== 'none' ) {

		$cultural_festival_color_palette_css .= '.product-img{';
		$cultural_festival_color_palette_css .= 'transition: all 0.4s ease-in-out;';
		$cultural_festival_color_palette_css .= '}';

		switch ( $cultural_festival_hover_effect ) {

			case 'zoom-in':
				$cultural_festival_color_palette_css .= '.product-img:hover{transform:scale(1.2);}';
			break;

			case 'zoom-out':
				$cultural_festival_color_palette_css .= '.product-img{transform:scale(1.2);}';
				$cultural_festival_color_palette_css .= '.product-img:hover{transform:scale(1);}';
			break;

			case 'scale':
				$cultural_festival_color_palette_css .= '.product-img:hover{transform:scale(1.1);}';
			break;

			case 'grayscale':
				$cultural_festival_color_palette_css .= '.product-img{filter:grayscale(100%);}';
				$cultural_festival_color_palette_css .= '.product-img:hover{filter:grayscale(0);}';
			break;

			case 'sepia':
				$cultural_festival_color_palette_css .= '.product-img:hover{filter:sepia(100%);}';
			break;

			case 'blur':
				$cultural_festival_color_palette_css .= '.product-img:hover{filter:blur(3px);}';
			break;

			case 'bright':
				$cultural_festival_color_palette_css .= '.product-img:hover{filter:brightness(1.3);}';
			break;

			case 'translate':
				$cultural_festival_color_palette_css .= '.product-img:hover{transform:translateY(-10px);}';
			break;
		}
	}