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

/* Child theme fonts */
:root {
    --font-family--default: 'halcom-variable';
    --font-family--h--1: 'trajan-pro-3';
    --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);
    }

    /* position btn 2 for mobile */
    .imt-btn-2 {
        margin-top: calc(var(--wp--custom--imt--spacer) * 1) !important;
    }

    /* center align nav items */
    nav.imt-main-nav.offcanvas #imt-offcanvas>ul>li a {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }
    nav.imt-main-nav.offcanvas #imt-offcanvas>ul>li:not(.imt-btn-1):not(.imt-btn-2) a {
        padding: calc(var(--wp--custom--imt--spacer) * .75) 0 calc(var(--wp--custom--imt--spacer) * 1.5) !important;
    }

    nav.imt-main-nav>div ul a>span::after {
        left: calc(50%) !important;
        transform: translate(-50%) !important;
    }

    nav.imt-main-nav>div ul>li .submenu {
        padding: 0 !important;
    }

    .imt-bg-color-gradient-2 {
        background-image: none;
        background-color: rgba(51,51,51,0.85);
    }
}

/* media row handling for mid screens */
@media only screen and (min-width: 801px) and (max-width: 1280px) {
    .imt-section .imt-media-row.imt-media-row-style-default.imt-media-col-right .imt-content-col-width-50 .imt-content-col__inner .imt-content-col__background {
        border-radius: 0 calc(var(--wp--custom--imt--border-radius) * 10) calc(var(--wp--custom--imt--border-radius) * 10) 0 !important;
    }

    .imt-section .imt-media-row.imt-media-row-style-default.imt-media-col-left .imt-content-col-width-50 .imt-content-col__inner .imt-content-col__background {
        border-radius: calc(var(--wp--custom--imt--border-radius) * 10) 0 0 calc(var(--wp--custom--imt--border-radius) * 10) !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;
}

/* Testimonial slider */
h2.imt-custom-testimonial-heading-icon:before {
    position: absolute;
    font-weight: var(--wp--custom--imt--font-weight);
    font-family: var(--font-family--default);
    content: "\201D";
    color: rgba(198,223,156, 1);
    font-size: 150px;
    top: 35px;
    left: 50%;
    transform: translate(-50%);
    z-index: -1;
}

@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;
    }
}

@media only screen and (max-width: 800px) {
    /* 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 {
        background-image: none;
        background-color: rgba(0,0,0,0.5);
    }
}

/* 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;
}

/* 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;
}

/* update font weight and text transformation for mobile menu + dropdowns */
/* li.menu-item {
    font-weight: var(--wp--custom--imt--main-navigation--font--weight);
    text-transform: var(--wp--custom--imt--main-navigation--font--transform);
} */

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

/* 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--color--palette--background--primary--active) !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: 2px;
    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: 2px;
    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);
}

/* 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;
}

/* 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 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);
}

/* 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);
}

/* link in bio page styles */
/* 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,
.imt-main-nav .imt-btn-2 a span::after {
    display: none;
}

/* add stars via css to avoid them being erased in the editor over time */
/* use this snippet for stars BEFORE the quote */
.imt-stars p:first-of-type::before {
    display: block;
    font-weight: 900;
    font-family: "Font Awesome 6 Pro";
    content: "\f005 \f005 \f005 \f005 \f005";
    color: var(--wp--custom--imt--color--palette--background--secondary--active);
    margin-bottom: var(--wp--custom--imt--spacer);
}

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

/* automatically swap media row bg colour, reduce user requirement */
.imt-media-col-left.imt-media-row-style-default .imt-content-col__background {
    background: var(--wp--custom--imt--color--palette--background--primary--100) !important;
}

.imt-section .imt-media-row.imt-media-row-style-default.imt-media-col-left .imt-content-col {
    color: var(--wp--custom--imt--color--text--dark) !important;
}

.imt-section .imt-media-row.imt-media-row-style-default.imt-media-col-right .imt-content-col .imt-heading {
    color: var(--wp--custom--imt--color--palette--background--primary--300) !important;
}

/* add custom spacing for non-existent 40/60 ratio option, apply to 50/50 media row */
.imt-section .imt-media-row.imt-media-row-style-default .imt-media-col-width-50 {
    flex-basis: calc(60% - var(--wp--custom--imt--media-row--style--default--gutter--default--column) / 2);
    max-width: calc(60% - var(--wp--custom--imt--media-row--style--default--gutter--default--column) / 2);
}

.imt-section .imt-media-row.imt-media-row-style-default .imt-content-col-width-50 {
    flex-basis: calc(40% - var(--wp--custom--imt--media-row--style--default--gutter--default--column) / 2);
    max-width: calc(40% - var(--wp--custom--imt--media-row--style--default--gutter--default--column) / 2);
}

/* add dark text color for primary outline button */
.imt-btn-primary-outline .imt-link-text {
    color: var(--wp--custom--imt--color--text--dark) !important;
}

/* 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;
    }
}

/* custom accordion styling for bio shortening */
/* add imt-text-collapsible to IMT Collapsible */
/* add imt-text-collapsible-card to card the collapsible is in */
/* .imt-text-collapsible-card h3,
.imt-text-collapsible-card .imt-lead-text--0 {
    padding-left: calc(var(--wp--custom--imt--spacer) * 2) !important;
}

.imt-text-collapsible > button {
    font-size: var(--wp--custom--imt--font-size) !important;
    font-weight: var(--wp--custom--imt--font-weight) !important;
    line-height: var(--wp--custom--imt--line-height) !important; 
    text-transform: none !important;
    padding: calc(var(--wp--custom--imt--spacer) * 1) calc(var(--wp--custom--imt--spacer) * 2) calc(var(--wp--custom--imt--spacer) * 1) !important;
}

.imt-text-collapsible .collapsible > div {
    padding-top: 0 !important;
} */

/* ------- Megamenu Styling - WITH ICONS - Green Collar ------- */
@media only screen and (min-width: 1281px) {
    /* position btn 2 styles for desktop */
    .imt-btn-2 {
        margin-left: calc(var(--wp--custom--imt--spacer) * 1) !important;
    }

    /* add blur to header on scroll */
    #imt-header.imt-header-sm .imt-section__background {
        backdrop-filter: blur(5px);
    }

    /* force megamenu headnig to take expected styles on desktop */
    li.menu-item.megamenu-heading {
        font-weight: var(--wp--custom--imt--main-navigation--megamenu--heading--font--weight);
        text-transform: var(--wp--custom--imt--main-navigation--megamenu--heading--font--transform);
    }

    /* position and split columns */
    #main-navigation-ul>li.menu-item.imt-link-level-1.imt-pointer-events-none.megamenu.has-children>ul>div>li:nth-child(2)>ul {
        display: flex !important;
        flex-wrap: wrap;
    }

    #main-navigation-ul>li.menu-item.imt-link-level-1.imt-pointer-events-none.megamenu.has-children>ul>div>li:nth-child(2)>ul>li {
        flex: 50%;
    }

    #main-navigation-ul>li.menu-item.imt-link-level-1.imt-pointer-events-none.megamenu.has-children>ul>div>li:nth-child(2) {
        flex-grow: 2;
        flex-basis: 50%;
    }

    #main-navigation-ul>li.menu-item.imt-link-level-1.imt-pointer-events-none.megamenu.has-children>ul>div>li:nth-child(1) {
        flex-grow: 1;
        flex-basis: 25%;
    }

    /* position and display icons, add .imt-mm-icon and your assigned unique icon to each main navigation link in the site backend */
    .imt-mm-icon a {
        position: relative;
        padding: 16px 0 24px 16px !important;
    }

    /* Commercial - Landscape Construction */
    .imt-mm-icon-com-con a::before {
        background: url('/wp-content/uploads/2025/08/Com-Construction.png');
    }

    /* Commercial - Landscape Maintenance */
    .imt-mm-icon-com-mai a::before {
        background: url('/wp-content/uploads/2025/08/Com-Maintenance.png');
    }

    /* Commercial - Irrigation Supply */
    .imt-mm-icon-com-sup a::before {
        background: url('/wp-content/uploads/2025/08/Res-Supply.png');
    }

    /* Residential - Landscape Design */
    .imt-mm-icon-res-des a::before {
        background: url('/wp-content/uploads/2025/08/Res-Design.png');
    }

    /* Residential - Landscape Construction */
    .imt-mm-icon-res-con a::before {
        background: url('/wp-content/uploads/2025/08/Res-Hardscape.png');
    }

    /* Residential - Landscape Lighting */
    .imt-mm-icon-res-lig a::before {
        background: url('/wp-content/uploads/2025/08/Res-Lighting.png');
    }
    
    /* Residential - Landscape Irrigation */
    .imt-mm-icon-res-irr a::before {
        background: url('/wp-content/uploads/2025/08/Res-Irrigation.png');
    }

    /* Residential - Irrigation Supply */
    .imt-mm-icon-res-sup a::before {
        background: url('/wp-content/uploads/2025/08/Res-Supply.png');
    }

    /* Residential - Garden & Property Maintenance */
    .imt-mm-icon-res-gar a::before {
        background: url('/wp-content/uploads/2025/08/Res-Garden.png');
    }

    /* Residential - Artificial Turf */
    .imt-mm-icon-res-tur a::before {
        background: url('/wp-content/uploads/2025/08/Res-Turf.png');
    }

    /* Residential - Tree Service */
    .imt-mm-icon-res-tre a::before {
        background: url('/wp-content/uploads/2025/08/Res-Tree.png');
    }

    .imt-mm-icon a::before {
        content: '';
        position: absolute;
        top: 0px;
        left: -48px;
        background-position: center;
        background-repeat: no-repeat;
        background-size: 48px 48px;
        width: 60px;
        height: 48px;
    }
}