/*
Theme Name: Child - Twenty Twenty.
Theme URI:  https://en-gb.wordpress.org/themes/twentytwenty/
Description:  Theme to support tutsplus tutorial. Child theme for the Twenty Twenty theme.
Author:  ytan
Textdomain:  mccollin
Author URI:  https://en-gb.wordpress.org/themes/twentytwenty/
Template:  twentytwenty
Version:  1.0
License:  GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html                 
*/


/* HEADER */
@import "navbar.css";

.header-titles {
	align-items: center;
}

.site-title {
    color: #4fad68;
}

/*above NAVBAR*/
.header-titles-wrapper {
    justify-content: flex-start;
    padding-left: 0;
    text-align: left;
}


/* CONTENT */
.singular .entry-header{
    padding: 15px;
    margin-top: -30px;
    /* use margin top 0px to change the background, the nav hides the elementor controls */
}

.post-inner {
    padding-top: 0rem;
}

/* BODY*/
body {
    background: white;
}

/* ELEMENTOR BUTTONS */
.elementor-element .elementor-button {
    width: 100%;
    font-size: 20px;
    text-align: left;
    height: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 50px 10px;
}

/* ELEMENTOR WIDGETS*/
.elementor-widget:not(:last-child) {
    margin-bottom: 5px!important;
}

/*FOOTER*/
#site-footer {
    background-color:#4fad68;
    color: white;
}

.powered-by-wordpress {
	display: block;
	margin: 0 0 0 1.8rem;
}

@media ( min-width: 660px ) {
    .powered-by-wordpress {
        display: block;
    }
}


/* NAV DROPDOWN MENU*/
.primary-menu ul::after {
	border: none!important;
}

body:not(.overlay-header) .primary-menu > li > .icon{
    color: white!important;
}

.nav-toggle .toggle-inner {
    padding-top: 0rem;
    width: 100%;
}

@media(max-width: 768px) {
    .elementor-background-overlay {
        background-size: cover!important;
    }
}


.modal-menu .menu-item {
    background-color: #4fad68;
}

.modal-menu .menu-item a {
    color: white;
}

/*AS SEEN ON TITLE*/
/* headlines with lines */
.decorated{
    overflow: hidden;
    text-align: center;
}
.decorated > span{
    position: relative;
    display: inline-block;
}
.decorated > span:before, .decorated > span:after{
    content: '';
    position: absolute;
    top: 50%;
    border-bottom: 2px solid;
    width: 100vw;
    margin: 0 20px;
}
.decorated > span:before{
    right: 100%;
}
.decorated > span:after{
    left: 100%;
}

/*contact us links */
.contact-us-links a {
    color: #0E2C53;
}

.contact-us-links a:hover {
    color: #2563ff9f;
    text-decoration: underline;
}

/*footer*/

.normanton {
    margin: -12px 5px 0px 0px;
}

/*testimonial remove faces*/
.style1 div.childDiv_style1 div.bxsliderx.rowcust div div.rowupdate.margin_Quotes div.colupdate-sm-12.setmargin div img.imgupdate-circle.imgupdate-circle-img{
    display: none!important;
}

.comments-wrapper  {
	display: none;
}


/*Custom Post type start*/
function pf_custom_post_type_case_studies() {
	$supports = array(
		'title', // post title
		'editor', // post content
		'author', // post author
		'thumbnail', // featured images
		'excerpt', // post excerpt
		'custom-fields', // custom fields
		'comments', // post comments
		'revisions', // post revisions
		'post-formats', // post formats
	);

	$labels = array(
		'name' => _x('Case Studies', 'plural'),
		'singular_name' => _x('Case Study', 'singular'),
		'menu_name' => _x('Case Study Posts', 'admin menu'),
		'name_admin_bar' => _x('Case Study Posts', 'admin bar'),
		'add_new' => _x('Add New', 'add new'),
		'add_new_item' => __('Add New Case Study'),
		'new_item' => __('New Case Study'),
		'edit_item' => __('Edit Case Study'),
		'view_item' => __('View Case Study'),
		'all_items' => __('All Case Study'),
		'search_items' => __('Search Case Study'),
		'not_found' => __('No Case Studies found.'),
	);
	
	$args = array(
		'supports' => $supports,
		'labels' => $labels,
		'public' => true,
		'query_var' => true,
		'rewrite' => array('slug' => 'case-studies'),
		'has_archive' => true,
		'hierarchical' => false,
		'capability_type' => 'page',
	);
	
	register_post_type('casestudies', $args);
}

function pf_custom_post_type_case_studies_categories() {
	register_taxonomy_for_object_type('category','casestudies');
}

function pf_custom_post_type_case_studies_tags() {
     register_taxonomy_for_object_type('post_tag', 'casestudies');
}

add_action('init', 'pf_custom_post_type_case_studies');
add_action('init', 'pf_custom_post_type_case_studies_categories');
add_action('init', 'pf_custom_post_type_case_studies_tags');

/*Custom Post type end*/

/* SVG Support start */
function add_file_types_to_uploads($file_types){
	$new_filetypes = array();
	$new_filetypes['svg'] = 'image/svg+xml';
	$file_types = array_merge($file_types, $new_filetypes );
	return $file_types;
}

add_filter('upload_mimes', 'add_file_types_to_uploads');
/* SVG Support end */

// Content Views Pro - Add custom class name to the class attribute of the Read More button
add_filter( 'pt_cv_field_content_readmore_class', 'cvp_theme_field_content_readmore_class', 100, 2 );
function cvp_theme_field_content_readmore_class( $class, $fargs ) {
	$class .= ' ' . 'wst-more-btn';
	return $class;
}
