/* Ecostaff v1.8.45 global frontend QA and header consistency layer. */

.ecostaff-menu-item-hidden,
.ecostaff-legacy-filter-hidden,
.ecostaff-legacy-review-field-hidden {
    display: none !important;
}

@media (min-width: 992px) {
    /*
     * v1.8.45: taxonomy mega menus must use the same layout on hub pages,
     * directory archives and ordinary content templates. ecostaff-directory.css
     * is archive-only, so keep the header-specific rules in this global file.
     */
    #apus-header .ecostaff-taxonomy-menu > .dropdown-menu,
    .apus-header .ecostaff-taxonomy-menu > .dropdown-menu,
    header .ecostaff-taxonomy-menu > .dropdown-menu {
        left: 50%;
        width: min(760px, calc(100vw - 40px));
        max-height: 68vh;
        padding: 16px 18px;
        overflow-y: auto;
        column-count: 3;
        column-gap: 12px;
        transform: translateX(-50%);
    }

    #apus-header .ecostaff-taxonomy-menu-platforms > .dropdown-menu,
    .apus-header .ecostaff-taxonomy-menu-platforms > .dropdown-menu,
    header .ecostaff-taxonomy-menu-platforms > .dropdown-menu {
        width: min(520px, calc(100vw - 40px));
        column-count: 2;
    }

    .ecostaff-taxonomy-menu > .dropdown-menu > li {
        display: block;
        break-inside: avoid;
    }

    .ecostaff-taxonomy-menu > .dropdown-menu > li > a {
        display: block;
        padding: 8px 10px;
        border-radius: 7px;
        white-space: normal;
    }

    .ecostaff-taxonomy-menu-view-all > a {
        color: #5d8d22 !important;
        font-weight: 800 !important;
    }
}

@media (min-width: 1200px) {
    #apus-header .main-menu > nav > div > ul > li > a {
        padding-right: 9px;
        padding-left: 9px;
        font-size: 15px;
        white-space: nowrap;
    }

    #apus-header #primary-menu {
        height: auto;
    }

    .ecostaff-home-hero {
        padding-top: 150px;
    }

    /* Use the header's intended dark surface from the first viewport. */
    body.home #apus-header .main-sticky-header:not(.sticky-header) .elementor-section {
        background-color: #292929 !important;
    }
}

@media (max-width: 1279px) {
    /* v1.9.02: the Ecostaff mobile header starts earlier so utility actions never clip. */
    /* Replace CareerUp's hard-coded mobile image with the configured Ecostaff logo. */
    #apus-header-mobile .logo-theme > a {
        display: inline-flex;
        align-items: center;
        min-height: 40px;
    }

    #apus-header-mobile .logo-theme > a > img {
        display: block;
        width: 165px !important;
        max-width: 100%;
        height: auto !important;
        max-height: 40px;
        object-fit: contain;
        object-position: left center;
        content: url('/wp-content/uploads/2023/05/logo.svg');
    }
}

.ecostaff-home .container::before,
.ecostaff-home .container::after {
    display: none !important;
    content: none !important;
}

.ecostaff-directory-browse {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 0 0 22px;
    padding: 14px;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    background: #f8faf7;
}

.ecostaff-directory-browse > span {
    grid-column: 1 / -1;
    color: #657168;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.ecostaff-directory-browse a {
    display: block;
    padding: 8px 6px;
    border: 1px solid #dce8cf;
    border-radius: 6px;
    background: #fff;
    color: #527c1d;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
}

.ecostaff-directory-browse a:hover,
.ecostaff-directory-browse a:focus {
    border-color: #a9ca7d;
    background: #f2f8eb;
    color: #3f6116;
}

.filter-employer-form .form-group-title input {
    min-width: 0;
    width: 100%;
}

.ecostaff-company-profile .ecostaff-company-header-services,
.ecostaff-company-profile .ecostaff-company-trust-row,
.ecostaff-company-profile .ecostaff-expertise-tags {
    max-width: 100%;
}

@media (max-width: 767px) {
    #back-to-top.add-fix-top {
        display: none !important;
    }

    .ecostaff-directory-browse {
        grid-template-columns: 1fr;
    }

    .ecostaff-directory-browse > span {
        grid-column: auto;
    }

    .ecostaff-company-header .employer-thumbnail {
        display: block;
        width: 150px;
        height: 150px;
        margin: 0 0 18px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .ecostaff-company-header .employer-thumbnail .inner-image {
        box-sizing: border-box;
        width: 150px;
        height: 150px;
    }

    .ecostaff-company-header .employer-thumbnail img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .ecostaff-company-profile .candidate-detail-header,
    .ecostaff-company-profile .candidate-detail-header .flex-middle,
    .ecostaff-company-profile .candidate-detail-header [class*="col-"] {
        min-width: 0;
        max-width: 100%;
    }

    .ecostaff-company-profile .ecostaff-company-header-services span,
    .ecostaff-company-profile .ecostaff-expertise-tags span,
    .ecostaff-company-profile .ecostaff-company-trust-row > * {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}
