<?php

$health_care_center_custom_css = "";

        $health_care_center_theme_pagination_options_alignment = get_theme_mod('health_care_center_theme_pagination_options_alignment', 'Center');
		if ($health_care_center_theme_pagination_options_alignment == 'Center') {
		    $health_care_center_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		    $health_care_center_custom_css .= 'justify-content: center;margin: 0 auto;';
		    $health_care_center_custom_css .= '}';
		} else if ($health_care_center_theme_pagination_options_alignment == 'Right') {
		    $health_care_center_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		    $health_care_center_custom_css .= 'justify-content: right;margin: 0 0 0 auto;';
		    $health_care_center_custom_css .= '}';
		} else if ($health_care_center_theme_pagination_options_alignment == 'Left') {
		    $health_care_center_custom_css .= '.navigation.pagination,.navigation.posts-navigation .nav-links{';
		    $health_care_center_custom_css .= 'justify-content: left;margin: 0 auto 0 0;';
		    $health_care_center_custom_css .= '}';
		}

		$health_care_center_theme_breadcrumb_enable = get_theme_mod('health_care_center_theme_breadcrumb_enable',true);
		if($health_care_center_theme_breadcrumb_enable != true){
			$health_care_center_custom_css .='nav.breadcrumb-trail.breadcrumbs,nav.woocommerce-breadcrumb{';
				$health_care_center_custom_css .='display: none;';
			$health_care_center_custom_css .='}';
		}

		$health_care_center_theme_breadcrumb_options_alignment = get_theme_mod('health_care_center_theme_breadcrumb_options_alignment', 'Left');
		if ($health_care_center_theme_breadcrumb_options_alignment == 'Center') {
			$health_care_center_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
			$health_care_center_custom_css .= 'text-align: center !important;';
			$health_care_center_custom_css .= '}';
		} else if ($health_care_center_theme_breadcrumb_options_alignment == 'Right') {
			$health_care_center_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
			$health_care_center_custom_css .= 'text-align: Right !important;';
			$health_care_center_custom_css .= '}';
		} else if ($health_care_center_theme_breadcrumb_options_alignment == 'Left') {
			$health_care_center_custom_css .= '.breadcrumbs ul,nav.woocommerce-breadcrumb{';
			$health_care_center_custom_css .= 'text-align: Left !important;';
			$health_care_center_custom_css .= '}';
		}

		$health_care_center_menu_text_transform =
		get_theme_mod('health_care_center_menu_text_transform', 'capitalize'); if
		($health_care_center_menu_text_transform == 'capitalize') {
		$health_care_center_custom_css .= '.site-navigation .primary-menu > li a{';
		$health_care_center_custom_css .= 'text-transform: capitalize !important;';
		$health_care_center_custom_css .= '}'; } else if
		($health_care_center_menu_text_transform == 'uppercase') {
		$health_care_center_custom_css .= '.site-navigation .primary-menu > li a{';
		$health_care_center_custom_css .= 'text-transform: uppercase !important;';
		$health_care_center_custom_css .= '}'; } else if
		($health_care_center_menu_text_transform == 'lowercase') {
		$health_care_center_custom_css .= '.site-navigation .primary-menu > li a{';
		$health_care_center_custom_css .= 'text-transform: lowercase !important;';
		$health_care_center_custom_css .= '}'; }

		$health_care_center_single_page_content_alignment = get_theme_mod('health_care_center_single_page_content_alignment', 'left');
		if ($health_care_center_single_page_content_alignment == 'left') {
			$health_care_center_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
			$health_care_center_custom_css .= 'text-align: left !important;;justify-content: left;';
			$health_care_center_custom_css .= '}';
		} else if ($health_care_center_single_page_content_alignment == 'center') {
			$health_care_center_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
			$health_care_center_custom_css .= 'text-align: center !important;;justify-content: center;';
			$health_care_center_custom_css .= '}';
		} else if ($health_care_center_single_page_content_alignment == 'right') {
			$health_care_center_custom_css .= '#single-page .type-page,section.theme-custom-block.theme-error-sectiontheme-error-section.error-block-middle,section.theme-custom-block.theme-error-section.error-block-heading .theme-area-header{';
			$health_care_center_custom_css .= 'text-align: right !important;;justify-content: right;';
			$health_care_center_custom_css .= '}';
		}

		$health_care_center_single_post_content_alignment = get_theme_mod('health_care_center_single_post_content_alignment', 'left');
		if ($health_care_center_single_post_content_alignment == 'left') {
			$health_care_center_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
			$health_care_center_custom_css .= 'text-align: left !important;justify-content: left;';
			$health_care_center_custom_css .= '}';
		} else if ($health_care_center_single_post_content_alignment == 'center') {
			$health_care_center_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
			$health_care_center_custom_css .= 'text-align: center !important;justify-content: center;';
			$health_care_center_custom_css .= '}';
		} else if ($health_care_center_single_post_content_alignment == 'right') {
			$health_care_center_custom_css .= '#single-page .type-post,#single-page .type-post .entry-meta,#single-page .type-post .is-layout-flex{';
			$health_care_center_custom_css .= 'text-align: right !important;justify-content: right;';
			$health_care_center_custom_css .= '}';
		}

		$health_care_center_footer_widget_title_alignment = get_theme_mod('health_care_center_footer_widget_title_alignment', 'left');
		if ($health_care_center_footer_widget_title_alignment == 'left') {
			$health_care_center_custom_css .= 'h2.widget-title{';
			$health_care_center_custom_css .= 'text-align: left !important;';
			$health_care_center_custom_css .= '}';
		} else if ($health_care_center_footer_widget_title_alignment == 'center') {
			$health_care_center_custom_css .= 'h2.widget-title{';
			$health_care_center_custom_css .= 'text-align: center !important;';
			$health_care_center_custom_css .= '}';
		} else if ($health_care_center_footer_widget_title_alignment == 'right') {
			$health_care_center_custom_css .= 'h2.widget-title{';
			$health_care_center_custom_css .= 'text-align: right !important;';
			$health_care_center_custom_css .= '}';
		}

		$health_care_center_show_hide_related_product = get_theme_mod('health_care_center_show_hide_related_product',true);
    	if($health_care_center_show_hide_related_product != true){
			$health_care_center_custom_css .='.related.products{';
			$health_care_center_custom_css .='display: none;';
			$health_care_center_custom_css .='}';
    	}

	/*-------------------- Global First Color -------------------*/

	$health_care_center_global_color = get_theme_mod('health_care_center_global_color', '#1B75BB'); // Add a fallback if the color isn't set

	if ($health_care_center_global_color) {
		$health_care_center_custom_css .= ':root {';
		$health_care_center_custom_css .= '--global-color: ' . esc_attr($health_care_center_global_color) . ';';
		$health_care_center_custom_css .= '}';
	}	

	/*-------------------- Content Font -------------------*/

	$health_care_center_content_typography_font = get_theme_mod('health_care_center_content_typography_font', 'Inter'); // Add a fallback if the color isn't set

	if ($health_care_center_content_typography_font) {
		$health_care_center_custom_css .= ':root {';
		$health_care_center_custom_css .= '--font-main: ' . esc_attr($health_care_center_content_typography_font) . ';';
		$health_care_center_custom_css .= '}';
	}

	/*-------------------- Heading Font -------------------*/

	$health_care_center_heading_typography_font = get_theme_mod('health_care_center_heading_typography_font', 'Playfair Display'); // Add a fallback if the color isn't set

	if ($health_care_center_heading_typography_font) {
		$health_care_center_custom_css .= ':root {';
		$health_care_center_custom_css .= '--font-head: ' . esc_attr($health_care_center_heading_typography_font) . ';';
		$health_care_center_custom_css .= '}';
	}
						
	$health_care_center_columns = get_theme_mod('health_care_center_posts_per_columns', 3);
	$health_care_center_columns = absint($health_care_center_columns);
	if ( $health_care_center_columns < 1 || $health_care_center_columns > 6 ) {
		$health_care_center_columns = 3;
	}
	$health_care_center_custom_css .= "
		.site-content .article-wraper-archive {
			grid-template-columns: repeat({$health_care_center_columns}, 1fr);
		}
	";

	$health_care_center_copyright_alignment = get_theme_mod( 'health_care_center_copyright_alignment', 'Default' );
	if ( $health_care_center_copyright_alignment === 'Reverse' ) {
		$health_care_center_custom_css .= '.site-info .column-row { flex-direction: row-reverse; }';
		$health_care_center_custom_css .= '.footer-credits { justify-content: flex-end; }';
		$health_care_center_custom_css .= '.footer-copyright { text-align: right; }';
		$health_care_center_custom_css .= '.site-info .column.column-3 { text-align: left; }';
	} elseif ( $health_care_center_copyright_alignment === 'Center' ) {
		$health_care_center_custom_css .= '.site-info .column-row { flex-direction: column; align-items: center; gap: 15px; }';
		$health_care_center_custom_css .= '.footer-credits { justify-content: center; }';
		$health_care_center_custom_css .= '.footer-copyright { text-align: center; }';
		$health_care_center_custom_css .= '.site-info .column.column-3 { text-align: center; }';
	}

	// FOOTER

	$health_care_center_footer_widget_background_color = get_theme_mod('health_care_center_footer_widget_background_color');
	if ($health_care_center_footer_widget_background_color) {

		$health_care_center_custom_css .= "
			.footer-widgetarea {
				background-color: ". esc_attr($health_care_center_footer_widget_background_color) .";
			}
		";
	}

	$health_care_center_footer_widget_background_image = get_theme_mod('health_care_center_footer_widget_background_image');
	if ($health_care_center_footer_widget_background_image) {
		$health_care_center_custom_css .= "
			.footer-widgetarea {
				background-image: url(" . esc_url($health_care_center_footer_widget_background_image) . ");
			}
		";
	}

	$health_care_center_copyright_font_size = get_theme_mod('health_care_center_copyright_font_size');
	if ($health_care_center_copyright_font_size) {

		$health_care_center_custom_css .= "
			.footer-copyright {
				font-size: ". esc_attr($health_care_center_copyright_font_size) ."px;
			}
		";
	}

	/*-------------------- Menu Color CSS -------------------*/

	$health_care_center_header_menus_color = get_theme_mod('health_care_center_header_menus_color');
	if($health_care_center_header_menus_color != false){
		$health_care_center_custom_css .='.site-navigation .primary-menu a{';
			$health_care_center_custom_css .='color: '.esc_attr($health_care_center_header_menus_color).'!important;';
		$health_care_center_custom_css .='}';
	}

	$health_care_center_header_menus_hover_color = get_theme_mod('health_care_center_header_menus_hover_color');
	if($health_care_center_header_menus_hover_color != false){
		$health_care_center_custom_css .='.site-navigation .primary-menu a:hover{';
			$health_care_center_custom_css .='color: '.esc_attr($health_care_center_header_menus_hover_color).'!important;';
		$health_care_center_custom_css .='}';
	}

	$health_care_center_header_submenus_color = get_theme_mod('health_care_center_header_submenus_color');
	if($health_care_center_header_submenus_color != false){
		$health_care_center_custom_css .='.site-navigation .primary-menu ul.sub-menu li a,.site-navigation .primary-menu li ul li a{';
			$health_care_center_custom_css .='color: '.esc_attr($health_care_center_header_submenus_color).'!important;';
		$health_care_center_custom_css .='}';
	}

	$health_care_center_header_submenus_hover_color = get_theme_mod('health_care_center_header_submenus_hover_color');
	if($health_care_center_header_submenus_hover_color != false){
		$health_care_center_custom_css .='.site-navigation .primary-menu li ul li a:hover{';
			$health_care_center_custom_css .='color: '.esc_attr($health_care_center_header_submenus_hover_color).'!important;';
		$health_care_center_custom_css .='}';
	}