<?php 
function anews_customize_css() {
?>
<style>
<?php if( !empty(get_theme_mod('anews_header_top_bg'))) {
    echo '.header-top-section{background-color:'.esc_attr(get_theme_mod('anews_header_top_bg')).'}';
}

if( !empty(get_theme_mod('anews_header_top_c'))) {
    echo '.header-top-section,.header-top-section ul li a,.header-right-item a,.header-socials ul li a{color:'.esc_attr(get_theme_mod('anews_header_top_c')).'}';
}

if( !empty(get_theme_mod('anews_header_top_hc'))) {
    echo '.header-top-section ul li a:hover,.header-right-item a:hover,.header-socials ul li a:hover{color:'.esc_attr(get_theme_mod('anews_header_top_hc')).'}';
}

if (true==get_theme_mod('anews_home_tranding_post_enalbe', true)) {
    $anews_tranding_c=array(
        'bg'=> '#fb2614',
        'hoverbg'=> '#1d2c38',
        'text'=> '#ffffff',
        'hovertext'=> '#ffffff',
    );
    $anews_trandingc = get_theme_mod('anews_tranding_post_cat_c', $anews_tranding_c);
    echo '.anews-tranding-sections .anews-home-post-meta ul li a{
        background-color: '.esc_attr( $anews_trandingc['bg'] ).';
        color: '.esc_attr( $anews_trandingc['text'] ).'
        }';
    echo '.anews-tranding-sections .anews-home-post-meta ul li a:hover{
        background-color: '.esc_attr( $anews_trandingc['hoverbg'] ).';
        color: '.esc_attr( $anews_trandingc['hovertext'] ).'
    }'; 
    }
?>
</style>
<?php 
}
add_action( 'wp_head', 'anews_customize_css');