/*
 Theme Name:     Divi Child theme
 Template:       Divi
 Description:    Divi Child Theme
 Author:         Jerome Poslednik
 Author URI:     https://washaweb.com
 Version:        1.0.0
*/

/* nav menu 
--------------------------------------- */

body #page-container {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

body #main-header {
    max-width: 1170px;
    left: 50%;
    transform: translateX(-50%);
    margin: 62px 0 0;
}

body #main-header.et-fixed-header {
    max-width: 100%;
    margin: 0;
}

body #main-header .logo_container > a {
    transform: translateY(-8px);
    display: inline-block;
	padding-bottom: 8px; 
}

/* sub-menu links */

#top-menu li ul li > a:before,
#et-secondary-nav li ul li > a:before,
.dtb-menu ul.et-menu li ul li > a:before
{
    position: relative;
    top: 1px;
    left: -6px;
    font-family: ETmodules;
    font-size: 16px;
    font-weight: 800;
    content: "5";
}

/* Mobile & tablets */

#main-header #mobile_menu.et_mobile_menu .sub-menu-toggle, .dtb-menu .et_mobile_menu .sub-menu-toggle {
    width: 45px !important;
    height: 100% !important;
    line-height: 44px !important;
    border-radius: 0 !important;
    top: 0px !important;
    bottom: 0px !important;
    right: 0px !important;
    border-right: 3px solid #e33f27;
}

#main-header #mobile_menu.et_mobile_menu .sub-menu-toggle::before,
.dtb-menu .et_mobile_menu .sub-menu-toggle::before {
    line-height: 44px !important;
}

@media (max-width: 980px) { 
    body.dtb_mobile #main-header {
        margin: 32px 0 0;
    }
    /* logo for mobile */

    body.dtb_mobile #main-header .logo_container > a {
        transform: translateY(0);
        padding: 8px;
    }
    body.dtb_mobile #main-header #logo, .dtb-menu .et_pb_menu__logo-wrap {
        transform: translateY(4px);
        max-height: 42px !important;
        max-width: calc(100% - 30px);
        height: 42px !important;
    }


    /* search & hamburger icons on mobile */

    .dtb_mobile #main-header .mobile_menu_bar {
        margin-right: 40px !important;
        right: 40px !important;
        top: 15px !important;
    }
    .dtb_mobile #et_top_search {
        right: 15px !important;
    }
    .dtb_mobile #main-header .et_search_outer .container {
        margin-right: 15px !important;
    }

    body.dtb_mobile #main-header .et_mobile_menu, .dtb_mobile .dtb-menu .et_mobile_menu {
        left: 5%;
        width: 90%;
    }

    /* sub-menus */

    .et_primary_nav_dropdown_animation_slide #et-top-navigation ul > li > ul,
    .et_secondary_nav_dropdown_animation_slide #et-secondary-nav > li > ul {
        padding: 8px;
        background-color: #fff;
    }
    .dtb_mobile .et_primary_nav_dropdown_animation_slide #et-top-navigation ul > li > ul,
    .dtb_mobile .et_secondary_nav_dropdown_animation_slide #et-secondary-nav > li > ul {
        padding: 0px;
        background-color: inherit;
    }
    #main-header #mobile_menu.et_mobile_menu .sub-menu-toggle~ul.sub-menu,
    .dtb-menu .et_mobile_menu .sub-menu-toggle~ul.sub-menu {
        padding: 0 !important;
    }
}

/* Footer nav 
--------------------------------------- */

.copyright-footer .et_pb_widget_area .widget_nav_menu ul {
	display: flex;
	justify-content: center;
}
.copyright-footer .et_pb_widget_area .widget_nav_menu ul a{
    color: #fff;
}

.copyright-footer .et_pb_widget_area .widget_nav_menu ul a:hover,
.copyright-footer .et_pb_widget_area .widget_nav_menu ul a:focus,
.copyright-footer .et_pb_widget_area .widget_nav_menu ul a:active {
    color: #fff;
    text-decoration: underline;
}

.copyright-footer .et_pb_widget_area .widget_nav_menu ul li + li {
	margin-left: 20px;
}

@media (min-width: 980px) {
	.copyright-footer .et_pb_widget_area .widget_nav_menu ul {
		display: flex;
		justify-content: flex-end;
	}
	
}

/* Title custom styles */

.title-with-underline strong {
    display: inline-block;
    line-height: 2.5rem;
    border-bottom: 6px solid #e33f27;
}

.title-with-underline strong.arrow {
    position: relative;
}

.title-with-underline strong.arrow:after {
    content: ' ';
    position: absolute;
    width: 30px;
    height: 46px;
    top: 2.4rem;
    right: .6rem;
    background: url('images/mouse-pointer.png') no-repeat 0 0/cover;
}
@media (max-width: 767px) {

    .title-with-underline strong {
        line-height: 1.6rem;
        border-bottom: 4px solid #e33f27;
    }
    
    .title-with-underline strong.arrow:after {
        content: ' ';
        position: absolute;
        width: 20px;
        height: 36px;
        top: 1.5rem;
        right: .3rem;
    }
}

/* Category and page header */

#global-pre-header {
    background: linear-gradient(27deg,rgba(36,40,46,0.85) 20%,rgba(108,111,115,0.4) 80%),
    url('/wp-content/uploads/2019/12/welcome-header-numericall.jpg') no-repeat center/cover !important;
    min-height: 360px;
    padding-top: 216px;
    padding-bottom: 20px;
    margin-bottom: 40px;
}

#global-pre-header h1 {
    text-align: center;
    color: #fff;
    font-size: 36px;
    line-height: 1.4em;
    text-transform: uppercase;
}
#global-pre-header h2 {
    font-size: 16px;
    line-height: 1.2em;
    text-align: center;
    color: #fff;
    font-weight: 400;
}

@media (max-width: 980px) {
    #global-pre-header {
        min-height: 260px;
        padding-top: 140px;
    }
    #global-pre-header h1 {
        font-size: 25px;
    }
    #global-pre-header h2 {
        font-size: 14px;
    }
}

/* New button style */
body.et_pb_button_helper_class .et_pb_button.button-underline,
body.et_pb_button_helper_class .et_pb_button.button-underline:hover,
body.et_pb_button_helper_class .et_pb_button.button-underline:active,
body.et_pb_button_helper_class .et_pb_button.button-underline:focus {
    position: relative;
    font-weight: bold;
    font-size: 18px;
    background: transparent !important;
}

body.et_pb_button_helper_class .et_pb_button.button-underline:before {
    content:'';
    display: block !important;
    border-bottom: 3px solid #e33f27;
    position: absolute;
    left: 50%;
    right: 50%;
    bottom: -3px;
    margin: 0;
    opacity: 1;
}
body.et_pb_button_helper_class .et_pb_button.button-underline:hover:before,
body.et_pb_button_helper_class .et_pb_button.button-underline:focus:before,
body.et_pb_button_helper_class .et_pb_button.button-underline:active:before {
    left: 0;
    right: 0;
    opacity: 1;
    margin: 0;
}

/* Fix 1px gap on 1_3 column */

@media (min-width: 981px) {
    .et_pb_gutters1 .et_pb_column_1_3,
    .et_pb_gutters1.et_pb_row .et_pb_column_1_3 {
        width: 33.333333334%;
    }
}

/**
 * WP Blocks
 */

 .wp-block-gallery .blocks-gallery-grid{
    margin: 2rem 0;
    max-width: 1080px;
	padding: 0 !important;
}

/**
 * home post special layout
 */

.home-posts .et_pb_post {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    min-height: 480px;
    margin-bottom: 30px!important;
}

.home-posts .et_pb_post .entry-featured-image-url{
    display: block;
    position: absolute;
    margin-bottom: 30px;
    align-self: flex-start;
    height: 100%;
    order: 1;
}

.home-posts .et_pb_post a img {
    height: 100%;
    object-fit: cover;
}

.home-posts .et_pb_post .entry-title,
.home-posts .et_pb_post .post-meta,
.home-posts .et_pb_post .post-content {
    background-color: #383838;
    color: #fff !important;
    position: relative;
    z-index: 2;
    width: 280px;
    padding: 0 40px;
    margin-top: 0px !important;
    margin-left: 20px !important;
    margin-bottom: 0px !important;
}

.home-posts .et_pb_post .entry-title {
    color: #fff;
    order: 3;
    padding-top: 10px;
}

.home-posts .et_pb_post .post-meta {
    color: #e33f27;
    padding-top: 40px;
    padding-bottom: 5px;
    order: 2;
}

.home-posts .et_pb_post .post-content {
    padding-bottom: 40px;
    margin-bottom: 30px !important;
    order: 4;
}

.home-posts .et_pb_post .post-content a.more-link {
    text-align: right;
    margin-top: 15px;
}