/* Add this line if WooCommerce is used on this site */
/* @import "woo-style.css"; */

/* Child theme fonts */
:root {
    --font-family--default: 'Urbanist';
    --font-family--h--1: 'poppins';
    --font-family--h--2: var(--font-family--h--1);
    --font-family--h--3: var(--font-family--h--1);
    --font-family--h--4: var(--font-family--h--1);
    --font-family--h--5: var(--font-family--h--1);
    --font-family--h--6: var(--font-family--h--1);
    --font-family--h--2--footer: var(--font-family--h--1);
    --font-family--h--3--footer: var(--font-family--h--1);
    --font-family--h--4--footer: var(--font-family--h--1);
    --font-family--main-navigation: var(--font-family--default);
    --font-family--dropdown: var(--font-family--default);
    --font-family--megamenu--heading: var(--font-family--h--1);
    --font-family--gallery--caption: var(--font-family--default);
    --font-family--collapsible: var(--font-family--default);
    --font-family--tab: var(--font-family--default);
    --font-family--button: var(--font-family--default);
    --font-family--h--sub-heading--0: var(--font-family--h--1);
    --font-family--h--lead-text--0: var(--font-family--default);
}

/* Mobile navigation background */
@media only screen and (max-width: 1280px) {
    nav.imt-main-nav.offcanvas #imt-offcanvas {
        background-color: var(--wp--custom--imt--header--background-color--mobile) !important;

        /* blur background on mobile */
        /* backdrop-filter: blur(5px); */
    }

    /* REMOVE IF NOT USING */
    /* centre align mobile nav items */
    /* nav.imt-main-nav.offcanvas #imt-offcanvas>ul>li a {
        display: flex;
        justify-content: center !important;
        text-align: center;
    }

    nav.imt-main-nav>div ul>li.imt-link-level-2:not(.imt-link-level-3)>a.imt-current-menu-item>span::after {
        left: calc(50%) !important;
        transform: translate(-50%) !important;
    } */

    /* Hide service area full bg image on mobile and tablet */
    .imt-section-bg-image-hide-on-mobile .imt-section__background-image {
        display: none !important;
    }
}

/* ------- LOGO SLIDER ------- */
.imt-section .imt-logo-slider .imt-slide {
    height: 120px;
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.imt-section .imt-logo-slider .imt-slide .imt-img-max-width-sm img {
    max-width: var(--wp--custom--imt--image--max-width--sm);
    max-height: var(--wp--custom--imt--image--max-width--sm);
    width: auto;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ------- TESTIMONIALS SLIDER HEADING ICON ------- */
h2.imt-custom-testimonial-heading-icon:before {
    position: absolute;
    font-weight: var(--wp--custom--imt--font-weight);
    font-family: var(--font-family--h--1);
    content: "\201D";
    color: rgba(255, 255, 255, 0.25);
    font-size: 150px;
    top: 35px;
    left: 50%;
    transform: translate(-50%);
    z-index: -1;
}

/* ------- FUNCTIONAL IMPROVEMENTS ------- */
@media only screen and (max-width: 800px) {
    /* Testimonial slider */
    .imt-slider-style-2 .slick-slide {
        padding: calc(var(--wp--custom--imt--spacer) * 2) calc(var(--wp--custom--imt--spacer) * 1) !important;
    }

    /* Slider controls */
    .imt-slider .slick-prev {
        top: calc(100% + 22px) !important;
        left: calc(50% - 115px) !important;
    }

    .imt-slider .slick-next {
        top: calc(100% + 22px) !important;
        right: calc(50% - 115px) !important;
    }

    /* Logo slider */
    .imt-logo-slider .slick-slider {
        margin-bottom: 64px;
    }

    .imt-imt-logo-slider .slick-slider .slick-slide {
        min-height: 100px;
    }

    .imt-slider.imt-logo-slider .slick-slide {
        padding: 16px !important;
        margin: 0 !important;
    }

    /* set updated min-width for mobile to stop overflow of icons */
    nav.imt-main-nav>div ul>li .submenu {
        min-width: 120px !important;
    }
    
    /* add overflow: hidden to stop horizontal scrolling of mobile menu */
    ul#main-navigation-ul {
        overflow: hidden;
    }

    /* update gradient for mobile specifically with solid overlay for improved legibility
       split out if using different styles of gradients */
    .imt-bg-color-gradient-1,
    .imt-bg-color-gradient-2,
    .imt-bg-color-gradient-3 {
        background-image: none;
        background-color: rgba(0,0,0,0.5);
    }
}

/* temporary fix for light link handling in heroes */
.imt-hero .imt-content-item a:not(.imt-link-text):hover {
    color: var(--wp--custom--imt--color--link--light-hover) !important;
}

/* temporary fix for lead text in cards to take the default bottom margin for subheading, to separate from any paragraph settings */
.imt-section .imt-card-group .imt-card .imt-content-item.imt-paragraphs.imt-lead-text--0 {
    margin-bottom: var(--wp--custom--imt--card--global--content-item--default--margin-bottom-sub-heading);
}

/* no gap on mobile for multi column lists */
.imt-no-list-gap-mobile {
    margin-bottom: calc(var(--wp--custom--imt--spacer) * 2) !important;
}

@media only screen and (max-width: 600px) {
    .imt-section .imt-card-group.imt-no-list-gap-mobile>.acf-innerblocks-container {
        row-gap: 0;
    }
}

/* ------- 404 PAGE STYLING UPDATES ------- */
/* set 404 page CTA text color */
button.wp-block-search__button.wp-element-button {
    color: var(--wp--custom--imt--color--background--primary--text) !important;
}

button:hover.wp-block-search__button.wp-element-button {
    color: var(--wp--custom--imt--color--background--primary--hover--button--text) !important;
}

/* ------- GRAVITY FORMS FIXES ------- */
/* fix business name font weight in newsletter & confirmation message */
#gform_4 .imt-business-name,
.gform_confirmation_message .imt-business-name {
    font-weight: inherit !important;
    display: inline;
    margin-bottom: 0;
}

/* gravity form drop down carets + field height */
.gform_wrapper.gravity-theme select {
    height: 44px;
    -webkit-appearance: auto;
}

/* clean up file upload layout */
.gform_wrapper.gravity-theme .gform_drop_area {
    background: var(--wp--custom--imt--gravity-forms--input--background) !important;
    border: var(--wp--custom--imt--gravity-forms--input--border--width) dashed var(--wp--custom--imt--gravity-forms--input--border--color) !important;
    border-radius: var(--wp--custom--imt--gravity-forms--input--border--radius) !important;
}

/* add background to checkboxes and radio buttons */
.gform_wrapper input[type=checkbox]+label::after {
    content: '';
    position: absolute;
    left: 0;
    z-index: 1;
    margin-top: .5px;
    background: var(--wp--custom--imt--gravity-forms--input--background);
    line-height: .75;
}

.gform_wrapper input[type=radio]+label::after {
    content: '';
    position: absolute;
    left: 0;
    z-index: 1;
    margin-top: .5px;
    background: var(--wp--custom--imt--gravity-forms--input--background);
    line-height: .75;
    border-radius: 50%;
}

/* fix validation link color for error links in form */
#imt-footer-wrapper a.gform_validation_error_link,
.gform_wrapper.gravity-theme .gform_validation_errors>ol a {
    color: var(--wp--custom--imt--color--palette--text--danger) !important;
}

/* apply correct error colour to checkbox items */
.gform_wrapper.gravity-theme .gfield_error label {
    color: var(--wp--custom--imt--color--palette--background--danger) !important;
}

/* update gravity forms button text transform to match site-wide CTAs */
.button.gform_button,
.button.gform_button_select_files {
    text-transform: var(--wp--custom--imt--button--default--transform) !important;
    font-weight: var(--wp--custom--imt--button--default--font-weight) !important;
}

/* fix line height of the checkbox item to vertically center it, add spacing back in afterwards */
.gform_wrapper.gravity-theme .gfield_checkbox label,
.gform_wrapper.gravity-theme .gfield_radio label {
    line-height: var(--wp--custom--imt--gravity-forms--label--sub-label--line-height) !important;
}

/* update trash icon color */
.gform_wrapper .dashicons {
    color: var(--wp--custom--imt--color--link--dark);
}

.gform_wrapper .dashicons:hover {
    color: var(--wp--custom--imt--color--link--dark-hover);
}

/* ------- BLOG & QUERY LOOP PAGES ------- */
/* mimic non-query loop page image margin settings for images with no padding or all padding set */
.imt-section-query-loop-wrapper.imt-section .imt-card-group .imt-card.imt-global-card-padding-none>.acf-innerblocks-container>.imt-image-link>.imt-img-container,
.imt-section-query-loop-wrapper.imt-section .imt-card-group .imt-card.imt-global-card-padding-all-sm>.acf-innerblocks-container>.imt-image-link>.imt-img-container {
    margin: 0 0 var(--wp--custom--imt--card--global--content-item--default--margin-bottom-image);
}
 
 @media only screen and (max-width: 800px) {
     .imt-section-query-loop-wrapper.imt-section .imt-card-group .imt-card.imt-global-card-padding-none>.acf-innerblocks-container>.imt-image-link>.imt-img-container,
     .imt-section-query-loop-wrapper.imt-section .imt-card-group .imt-card.imt-global-card-padding-all-sm>.acf-innerblocks-container>.imt-image-link>.imt-img-container {
        margin: 0 0 var(--wp--custom--imt--card--global--content-item--mobile--margin-bottom-image);
    }
}

/* set pagination to blog pagination colors to allow for light/dark link handling */
.imt-section .wp-block-query-pagination a {
    color: var(--wp--custom--imt--blog--pagination--link--color);
}

.imt-section .wp-block-query-pagination a:hover {
    color: var(--wp--custom--imt--blog--pagination--link--color-hover);
}

/* decrease heading font size for query loop to keep hierarchy but reduce text wrapping */
.wp-block-post h2.imt-heading {
    font-size: var(--wp--custom--imt--h--3--font-size) !important;
}

/* ------- LINK IN BIO PAGE ------- */
/* social links for link in bio page */
.imt-social-links-bio .imt-social-links {
    justify-content: center;
}

/* hide after accent for mobile cta btn */
.imt-main-nav .imt-btn-1 a span::after {
    display: none;
}

/* vertically align logo in navbar - figure out why it broke */
.imt-logo {
    display: block;
}

.imt-business-details {
    font-weight: 600 !important;
}

/* force spacing between sections with full-width layouts */
.imt-section-margin {
    margin: calc(var(--wp--custom--imt--spacer) * 0.25) 0 calc(var(--wp--custom--imt--spacer) * 0.25);
}

/* ------- FOOTER LOGO ICON REPLACEMENTS ------- */
/* replace Twitter X with BBB */
.imt-social-links>a>i.fa-x-twitter::before {
    margin-left: -2px;
    top: 0;
    content: "";
    mask-image: url("data:image/svg+xml,%3Csvg width='24' height='20' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 29.31 24'%3E%3Ctitle%3Eicon1%3C/title%3E%3Cpath d='M0 9.58 5.09 6.38 5.09 .37 9.39 .37 9.39 3.68 14.65 .37 29.31 9.58 27.02 13.22 24.2 11.45 24.2 23.63 5.11 23.63 5.11 11.45 2.29 13.22 0 9.58' style='fill:gray'%3E%3C/path%3E%3C/svg%3E") !important;
    max-width: 24px;
    display: inline-block;
    width: 24px;
    height: 20px;
    background-color: var(--wp--custom--imt--footer--social--icon--color) !important;
}

.imt-social-links>a>i.fa-x-twitter:hover::before {
    background-color: var(--wp--custom--imt--footer--social--icon--color-hover) !important;
}

/* fix content alignment and overlay on short screen heights when using bottom aligned heroes, and apply overlay fix */
@media screen and (max-height: 675px) {
    .imt-section .imt-content.imt-hero.imt-bottom-align {
        align-self: flex-start;
    }

    .imt-bg-color-gradient-1,
    .imt-bg-color-gradient-2,
    .imt-bg-color-gradient-3 {
        background-image: none;
        background-color: rgba(0,0,0,0.5);
    }
}


