<?php

    $villa_estate_zone_theme_css= "";

    /*--------------------------- Scroll to top positions -------------------*/

    $villa_estate_zone_scroll_position = get_theme_mod( 'villa_estate_zone_scroll_top_position','Right');
    if($villa_estate_zone_scroll_position == 'Right'){
        $villa_estate_zone_theme_css .='#button{';
            $villa_estate_zone_theme_css .='right: 20px;';
        $villa_estate_zone_theme_css .='}';
    }else if($villa_estate_zone_scroll_position == 'Left'){
        $villa_estate_zone_theme_css .='#button{';
            $villa_estate_zone_theme_css .='left: 20px;';
        $villa_estate_zone_theme_css .='}';
    }else if($villa_estate_zone_scroll_position == 'Center'){
        $villa_estate_zone_theme_css .='#button{';
            $villa_estate_zone_theme_css .='right: 50%;left: 50%;';
        $villa_estate_zone_theme_css .='}';
    }

     /*--------------------------- Single Post Page Image Box Shadow -------------------*/

    $villa_estate_zone_single_post_page_image_box_shadow = get_theme_mod('villa_estate_zone_single_post_page_image_box_shadow',0);
    if($villa_estate_zone_single_post_page_image_box_shadow != false){
        $villa_estate_zone_theme_css .='.single-post .entry-header img{';
            $villa_estate_zone_theme_css .='box-shadow: '.esc_attr($villa_estate_zone_single_post_page_image_box_shadow).'px '.esc_attr($villa_estate_zone_single_post_page_image_box_shadow).'px '.esc_attr($villa_estate_zone_single_post_page_image_box_shadow).'px #cccccc;';
        $villa_estate_zone_theme_css .='}';
    }

     /*--------------------------- Single Post Page Image Border Radius -------------------*/

    $villa_estate_zone_single_post_page_image_border_radius = get_theme_mod('villa_estate_zone_single_post_page_image_border_radius', 0);
    if($villa_estate_zone_single_post_page_image_border_radius != false){
        $villa_estate_zone_theme_css .='.single-post .entry-header img{';
            $villa_estate_zone_theme_css .='border-radius: '.esc_attr($villa_estate_zone_single_post_page_image_border_radius).'px;';
        $villa_estate_zone_theme_css .='}';
    }

    /*--------------------------- Footer background image -------------------*/

    $villa_estate_zone_footer_bg_image = get_theme_mod('villa_estate_zone_footer_bg_image');
    if($villa_estate_zone_footer_bg_image != false){
        $villa_estate_zone_theme_css .='#colophon{';
            $villa_estate_zone_theme_css .='background: url('.esc_attr($villa_estate_zone_footer_bg_image).')!important;';
        $villa_estate_zone_theme_css .='}';
    }

    /*--------------------------- Footer Background Image Position -------------------*/

    $villa_estate_zone_footer_bg_image_position = get_theme_mod( 'villa_estate_zone_footer_bg_image_position','scroll');
    if($villa_estate_zone_footer_bg_image_position == 'fixed'){
        $villa_estate_zone_theme_css .='#colophon{';
            $villa_estate_zone_theme_css .='background-attachment: fixed !important; background-position: center !important;';
        $villa_estate_zone_theme_css .='}';
    }elseif ($villa_estate_zone_footer_bg_image_position == 'scroll'){
        $villa_estate_zone_theme_css .='#colophon{';
            $villa_estate_zone_theme_css .='background-attachment: scroll !important; background-position: center !important;';
        $villa_estate_zone_theme_css .='}';
    }

    /*--------------------------- Footer Widget Heading Alignment -------------------*/

    $villa_estate_zone_footer_widget_heading_alignment = get_theme_mod( 'villa_estate_zone_footer_widget_heading_alignment','Left');
    if($villa_estate_zone_footer_widget_heading_alignment == 'Left'){
        $villa_estate_zone_theme_css .='#colophon h5, h5.footer-column-widget-title{';
        $villa_estate_zone_theme_css .='text-align: left;';
        $villa_estate_zone_theme_css .='}';
    }else if($villa_estate_zone_footer_widget_heading_alignment == 'Center'){
        $villa_estate_zone_theme_css .='#colophon h5, h5.footer-column-widget-title{';
            $villa_estate_zone_theme_css .='text-align: center;';
        $villa_estate_zone_theme_css .='}';
    }else if($villa_estate_zone_footer_widget_heading_alignment == 'Right'){
        $villa_estate_zone_theme_css .='#colophon h5, h5.footer-column-widget-title{';
            $villa_estate_zone_theme_css .='text-align: right;';
        $villa_estate_zone_theme_css .='}';
    }

    /*--------------------------- Footer Widget Content Alignment -------------------*/

    $villa_estate_zone_footer_widget_content_alignment = get_theme_mod( 'villa_estate_zone_footer_widget_content_alignment','Left');
    if($villa_estate_zone_footer_widget_content_alignment == 'Left'){
        $villa_estate_zone_theme_css .='#colophon ul, #colophon p, .tagcloud, .widget{';
        $villa_estate_zone_theme_css .='text-align: left;';
        $villa_estate_zone_theme_css .='}';
    }else if($villa_estate_zone_footer_widget_content_alignment == 'Center'){
        $villa_estate_zone_theme_css .='#colophon ul, #colophon p, .tagcloud, .widget{';
            $villa_estate_zone_theme_css .='text-align: center;';
        $villa_estate_zone_theme_css .='}';
    }else if($villa_estate_zone_footer_widget_content_alignment == 'Right'){
        $villa_estate_zone_theme_css .='#colophon ul, #colophon p, .tagcloud, .widget{';
            $villa_estate_zone_theme_css .='text-align: right;';
        $villa_estate_zone_theme_css .='}';
    }

    /*--------------------------- Copyright Content Alignment -------------------*/

    $villa_estate_zone_copyright_content_alignment = get_theme_mod( 'villa_estate_zone_copyright_content_alignment','Right');
    if($villa_estate_zone_copyright_content_alignment == 'Left'){
        $villa_estate_zone_theme_css .='.footer-menu-left{';
        $villa_estate_zone_theme_css .='text-align: left;';
        $villa_estate_zone_theme_css .='}';
    }else if($villa_estate_zone_copyright_content_alignment == 'Center'){
        $villa_estate_zone_theme_css .='.footer-menu-left{';
            $villa_estate_zone_theme_css .='text-align: center;';
        $villa_estate_zone_theme_css .='}';
    }else if($villa_estate_zone_copyright_content_alignment == 'Right'){
        $villa_estate_zone_theme_css .='.footer-menu-left{';
            $villa_estate_zone_theme_css .='text-align: right;';
        $villa_estate_zone_theme_css .='}';
    }

    /*---------------------------Width Layout -------------------*/

    $villa_estate_zone_width_option = get_theme_mod( 'villa_estate_zone_width_option','Full Width');
    if($villa_estate_zone_width_option == 'Boxed Width'){
        $villa_estate_zone_theme_css .='body{';
            $villa_estate_zone_theme_css .='max-width: 1140px; width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto;';
        $villa_estate_zone_theme_css .='}';
        $villa_estate_zone_theme_css .='.scrollup i{';
            $villa_estate_zone_theme_css .='right: 100px;';
        $villa_estate_zone_theme_css .='}';
        $villa_estate_zone_theme_css .='.page-template-custom-home-page .home-page-header{';
            $villa_estate_zone_theme_css .='padding: 0px 40px 0 10px;';
        $villa_estate_zone_theme_css .='}';
    }else if($villa_estate_zone_width_option == 'Wide Width'){
        $villa_estate_zone_theme_css .='body{';
            $villa_estate_zone_theme_css .='width: 100%;padding-right: 15px;padding-left: 15px;margin-right: auto;margin-left: auto;';
        $villa_estate_zone_theme_css .='}';
        $villa_estate_zone_theme_css .='.scrollup i{';
            $villa_estate_zone_theme_css .='right: 30px;';
        $villa_estate_zone_theme_css .='}';
    }else if($villa_estate_zone_width_option == 'Full Width'){
        $villa_estate_zone_theme_css .='body{';
            $villa_estate_zone_theme_css .='max-width: 100%;';
        $villa_estate_zone_theme_css .='}';
    }

    /*------------------ Nav Menus -------------------*/

    $villa_estate_zone_nav_menu = get_theme_mod( 'villa_estate_zone_nav_menu_text_transform','Capitalize');
    if($villa_estate_zone_nav_menu == 'Capitalize'){
        $villa_estate_zone_theme_css .='.main-navigation .menu > li > a{';
            $villa_estate_zone_theme_css .='text-transform:Capitalize;';
        $villa_estate_zone_theme_css .='}';
    }
    if($villa_estate_zone_nav_menu == 'Lowercase'){
        $villa_estate_zone_theme_css .='.main-navigation .menu > li > a{';
            $villa_estate_zone_theme_css .='text-transform:Lowercase;';
        $villa_estate_zone_theme_css .='}';
    }
    if($villa_estate_zone_nav_menu == 'Uppercase'){
        $villa_estate_zone_theme_css .='.main-navigation .menu > li > a{';
            $villa_estate_zone_theme_css .='text-transform:Uppercase;';
        $villa_estate_zone_theme_css .='}';
    }

    /*--------------------------- Global First Color ------------------------*/
    $villa_estate_zone_global_color = get_theme_mod('villa_estate_zone_global_color');

    if ($villa_estate_zone_global_color) {
        $villa_estate_zone_theme_css .= ':root {';
        $villa_estate_zone_theme_css .= '--first-color: ' . esc_attr($villa_estate_zone_global_color) . ' !important;';
        $villa_estate_zone_theme_css .= '} ';
    }

    /*--------------------------- Global Second Color ------------------------*/
    $villa_estate_zone_global_second_color = get_theme_mod('villa_estate_zone_global_second_color');

    if ($villa_estate_zone_global_second_color) {
        $villa_estate_zone_theme_css .= ':root {';
        $villa_estate_zone_theme_css .= '--second-color: ' . esc_attr($villa_estate_zone_global_second_color) . ' !important;';
        $villa_estate_zone_theme_css .= '} ';
    }

    /*-------------------- Heading typography -------------------*/

    $villa_estate_zone_heading_color = get_theme_mod('villa_estate_zone_heading_color');
    $villa_estate_zone_heading_font_family = get_theme_mod('villa_estate_zone_heading_font_family');
    $villa_estate_zone_heading_font_size = get_theme_mod('villa_estate_zone_heading_font_size');
    if($villa_estate_zone_heading_color != false || $villa_estate_zone_heading_font_family != false || $villa_estate_zone_heading_font_size != false){
        $villa_estate_zone_theme_css .='h1, h2, h3, h4, h5, h6, .navbar-brand h1.site-title, h2.entry-title, h1.entry-title, h2.page-title, #latest_post h2, h2.woocommerce-loop-product__title, .slider-inner-box h2, #top-slider .slider-inner-box h2, #top-slider .slider-inner-box h3.short-heading, .about-text-box h3.image-heading, .heading-main h3.image-heading, .about-text-box h4.image-heading, h5.tick-box, .article-box h3.entry-title, .featured h4.main-heading, .ser-content h4 a, #colophon h5, .sidebar h5{';
            $villa_estate_zone_theme_css .='color: '.esc_attr($villa_estate_zone_heading_color).'!important; 
            font-family: '.esc_attr($villa_estate_zone_heading_font_family).'!important;
            font-size: '.esc_attr($villa_estate_zone_heading_font_size).'px !important;';
        $villa_estate_zone_theme_css .='}';
    }

    $villa_estate_zone_paragraph_color = get_theme_mod('villa_estate_zone_paragraph_color');
    $villa_estate_zone_paragraph_font_family = get_theme_mod('villa_estate_zone_paragraph_font_family');
    $villa_estate_zone_paragraph_font_size = get_theme_mod('villa_estate_zone_paragraph_font_size');
    if($villa_estate_zone_paragraph_color != false || $villa_estate_zone_paragraph_font_family != false || $villa_estate_zone_paragraph_font_size != false){
        $villa_estate_zone_theme_css .='p, p.site-title, span, .article-box p, ul, li{';
            $villa_estate_zone_theme_css .='color: '.esc_attr($villa_estate_zone_paragraph_color).'!important; 
            font-family: '.esc_attr($villa_estate_zone_paragraph_font_family).'!important;
            font-size: '.esc_attr($villa_estate_zone_paragraph_font_size).'px !important;';
        $villa_estate_zone_theme_css .='}';
    }

    /*------------------ Footer CSS -------------------*/
    $villa_estate_zone_footer_bg_color = get_theme_mod( 'villa_estate_zone_footer_bg_color');
    if($villa_estate_zone_footer_bg_color != '' ){
        $villa_estate_zone_theme_css .='#colophon {';
            $villa_estate_zone_theme_css .='background-color: '.esc_attr($villa_estate_zone_footer_bg_color).'; ';
        $villa_estate_zone_theme_css .='}';
    }

    $villa_estate_zone_footer_content_color = get_theme_mod( 'villa_estate_zone_footer_content_color');
    if($villa_estate_zone_footer_content_color != ''){
        $villa_estate_zone_theme_css .='#colophon, #colophon a, #colophon h5, #colophon .widget #wp-calendar caption {';
            $villa_estate_zone_theme_css .='color: '.esc_attr($villa_estate_zone_footer_content_color).';';
        $villa_estate_zone_theme_css .='}';
    }

    /*------------------ Copyright CSS -------------------*/
    $villa_estate_zone_copyright_text_color = get_theme_mod( 'villa_estate_zone_copyright_text_color');
    if($villa_estate_zone_copyright_text_color != ''){
        $villa_estate_zone_theme_css .='#colophon .site-info a, #colophon .site-info span {';
            $villa_estate_zone_theme_css .='color: '.esc_attr($villa_estate_zone_copyright_text_color).';';
        $villa_estate_zone_theme_css .='}';
    }

    /*--------------------------- Featured Image Border Radius -------------------*/

    $villa_estate_zone_post_page_image_border_radius = get_theme_mod('villa_estate_zone_post_page_image_border_radius', 0);
    if($villa_estate_zone_post_page_image_border_radius != false){
        $villa_estate_zone_theme_css .='.article-box img{';
            $villa_estate_zone_theme_css .='border-radius: '.esc_attr($villa_estate_zone_post_page_image_border_radius).'px;';
        $villa_estate_zone_theme_css .='}';
    }

    /*--------------------------- Post Page Image Box Shadow -------------------*/

    $villa_estate_zone_post_page_image_box_shadow = get_theme_mod('villa_estate_zone_post_page_image_box_shadow',0);
    if($villa_estate_zone_post_page_image_box_shadow != false){
        $villa_estate_zone_theme_css .='.article-box img{';
            $villa_estate_zone_theme_css .='box-shadow: '.esc_attr($villa_estate_zone_post_page_image_box_shadow).'px '.esc_attr($villa_estate_zone_post_page_image_box_shadow).'px '.esc_attr($villa_estate_zone_post_page_image_box_shadow).'px #cccccc;';
        $villa_estate_zone_theme_css .='}';
    }

    /*---------------- Single post Settings ------------------*/

    $villa_estate_zone_single_post_navigation_show_hide = get_theme_mod('villa_estate_zone_single_post_navigation_show_hide',true);
    if($villa_estate_zone_single_post_navigation_show_hide != true){
        $villa_estate_zone_theme_css .='.nav-links{';
            $villa_estate_zone_theme_css .='display: none;';
        $villa_estate_zone_theme_css .='}';
    }

    /*--------------------------- Single Post Page Image Box Shadow -------------------*/

    $villa_estate_zone_single_post_page_image_box_shadow = get_theme_mod('villa_estate_zone_single_post_page_image_box_shadow',0);
    if($villa_estate_zone_single_post_page_image_box_shadow != false){
        $villa_estate_zone_theme_css .='.single-post .entry-header img{';
            $villa_estate_zone_theme_css .='box-shadow: '.esc_attr($villa_estate_zone_single_post_page_image_box_shadow).'px '.esc_attr($villa_estate_zone_single_post_page_image_box_shadow).'px '.esc_attr($villa_estate_zone_single_post_page_image_box_shadow).'px #cccccc;';
        $villa_estate_zone_theme_css .='}';
    }

     /*--------------------------- Single Post Page Image Border Radius -------------------*/

    $villa_estate_zone_single_post_page_image_border_radius = get_theme_mod('villa_estate_zone_single_post_page_image_border_radius', 0);
    if($villa_estate_zone_single_post_page_image_border_radius != false){
        $villa_estate_zone_theme_css .='.single-post .entry-header img{';
            $villa_estate_zone_theme_css .='border-radius: '.esc_attr($villa_estate_zone_single_post_page_image_border_radius).'px;';
        $villa_estate_zone_theme_css .='}';
    }