/*
 * Find Barn Help visual layer.
 *
 * Listivo's structural classes remain intact; this file supplies the project-owned
 * visual system from the previous Find Barn Help theme.
 */
:root {
    --fbh-bg: #f6f3ec;
    --fbh-surface: #fffdf8;
    --fbh-surface-strong: #ffffff;
    --fbh-surface-alt: #ebe4d7;
    --fbh-text: #17211d;
    --fbh-muted: #5f6b65;
    --fbh-primary: #a6421b;
    --fbh-primary-strong: #7f2e10;
    --fbh-accent: #315c43;
    --fbh-accent-strong: #213f2d;
    --fbh-border: #d8d0c2;
    --fbh-shadow: 0 18px 50px rgba(34, 27, 19, .12);
    --fbh-shadow-soft: 0 8px 24px rgba(34, 27, 19, .08);
    --fbh-radius: 18px;

    --e-global-color-lprimary1: var(--fbh-primary);
    --e-global-color-lprimary2: var(--fbh-accent);
    --e-global-color-lcolor1: var(--fbh-text);
    --e-global-color-lcolor2: var(--fbh-muted);
    --e-global-color-lcolor3: var(--fbh-surface-alt);
    --e-global-color-lcolor4: var(--fbh-border);
    --e-global-color-lcolor5: var(--fbh-surface-strong);
    --e-global-color-lsectionbg: var(--fbh-bg);
    --e-global-grid-width: 1180px;
    --e-global-lborder-radius: var(--fbh-radius);
    --e-global-shadow: var(--fbh-shadow);
}

html {
    scroll-behavior: smooth;
}

body.wp-theme-barnhelp {
    background: var(--fbh-bg);
    color: var(--fbh-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 17px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}

body.wp-theme-barnhelp :where(h1, h2, .listivo-heading-v2__text, .listivo-hero-search-v6__heading) {
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: -.045em;
}

body.wp-theme-barnhelp a:focus-visible,
body.wp-theme-barnhelp button:focus-visible,
body.wp-theme-barnhelp input:focus-visible,
body.wp-theme-barnhelp [tabindex]:focus-visible {
    outline: 3px solid rgba(166, 66, 27, .42);
    outline-offset: 3px;
}

/* Header and brand */
.listivo-menu-v2 {
    background: rgba(255, 253, 248, .96);
    border-bottom: 1px solid var(--fbh-border);
    box-shadow: 0 4px 18px rgba(34, 27, 19, .04);
    color: var(--fbh-text);
    min-height: 76px;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.listivo-menu-v2__container {
    min-height: 76px;
}

@media (min-width: 1025px) {
    .listivo-menu-v2__container,
    .listivo-menu-v2__left,
    .listivo-menu-v2__right {
        flex-wrap: nowrap;
    }

    .listivo-menu-v2__left {
        min-width: 0;
    }

    .listivo-menu-v2__items {
        margin-left: 26px;
        white-space: nowrap;
    }

    .listivo-menu-v2__items > .listivo-menu-v2__item {
        margin-left: 20px;
    }

    .listivo-menu-v2__account {
        gap: 10px;
    }

}

.listivo-menu-v2__logo {
    background: url("../images/findbarnhelp-horizontal-logo-v1.png") center left / contain no-repeat;
    height: 82px;
    width: 250px;
}

.listivo-menu-v2__logo img {
    height: 82px;
    opacity: 0;
    width: 250px;
}

@media (min-width: 1025px) {
    body.wp-theme-barnhelp .listivo-menu-v2__logo {
        height: 70px !important;
    }
}

.listivo-menu-v2__item,
.listivo-menu-v2--light .listivo-menu-v2__item,
.listivo-menu-v2--light .listivo-menu-v2__account-link,
.listivo-menu-v2__account-link {
    color: var(--fbh-text);
    font-weight: 700 !important;
}

.listivo-menu-v2__items > .listivo-menu-v2__item::before {
    content: none !important;
    display: none !important;
}

.listivo-menu-v2__avatar,
.listivo-menu-v2__mobile-button {
    background: var(--fbh-surface-strong);
    border-color: var(--fbh-border);
    border-radius: 11px;
}

.listivo-menu-v2--light .listivo-menu-v2__avatar svg path,
.listivo-menu-v2--light .listivo-menu-v2__mobile-button svg path {
    fill: var(--fbh-text);
}

.listivo-menu-v2__button .listivo-button,
.listivo-menu-v2__right > .listivo-button,
.listivo-button--primary-1 {
    background: var(--fbh-primary);
}

.listivo-button {
    border-radius: 999px;
    font-weight: 800;
}

.listivo-button--primary-1:hover,
.listivo-button--primary-1:focus-visible {
    background: var(--fbh-primary-strong);
    color: #fff;
}

/* Hero */
.home .elementor-element-127aa0d5,
.home .elementor-element-154915f5 {
    background:
        radial-gradient(circle at 84% 14%, rgba(166, 66, 27, .18), transparent 32%),
        linear-gradient(145deg, var(--fbh-surface), var(--fbh-surface-alt));
    border-bottom: 1px solid var(--fbh-border);
    overflow: hidden;
}

.home .listivo-hero-search-v6 {
    min-height: 660px;
}

.home .listivo-hero-search-v6__content {
    min-height: 660px;
}

.home .listivo-hero-search-v6__heading {
    color: var(--fbh-text) !important;
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: .98;
    max-width: 600px;
    position: relative;
    text-shadow:
        0 1px 0 var(--fbh-surface),
        0 0 12px rgba(255, 253, 248, .92),
        0 0 24px rgba(255, 253, 248, .72);
    z-index: 2;
}

.home .listivo-hero-search-v6__heading span {
    color: var(--fbh-primary);
}

.home .listivo-hero-search-v6__arrow svg path {
    stroke: var(--fbh-primary);
}

.home .listivo-hero-search-v6__image {
    border: 8px solid rgba(255, 253, 248, .8);
    border-radius: 28px;
    box-shadow: var(--fbh-shadow);
    height: 540px;
    overflow: hidden;
    transform: rotate(1.5deg);
    width: 330px;
}

.home .listivo-hero-search-v6__image:last-child {
    transform: translateY(22px) rotate(-1.5deg);
}

.home .listivo-search-form-v2__inner {
    background: rgba(255, 253, 248, .98);
    border: 1px solid var(--fbh-border);
    border-radius: 18px;
    box-shadow: var(--fbh-shadow);
}

.home .listivo-search-form-v2 {
    max-width: 635px;
    position: relative;
    z-index: 3;
}

@media (min-width: 1025px) and (max-width: 1339px) {
    .home .listivo-search-form-v2 {
        max-width: 520px;
    }
}

.home .listivo-search-form-v2__button,
.home .listivo-search-form-v2__mobile-button {
    background: var(--fbh-primary);
}

.home .listivo-hero-search-v6__popular-terms {
    display: none;
}

/* Homepage rhythm */
.home .elementor-element-2fed6d1c,
.home .elementor-element-20b2cd4,
.home .elementor-element-1f1e8d17,
.home .elementor-element-127c5335 {
    padding-inline: clamp(18px, 3vw, 42px);
}

.home .elementor-element-2fed6d1c,
.home .elementor-element-127c5335 {
    background: var(--fbh-surface);
}

.home .elementor-element-20b2cd4,
.home .elementor-element-1f1e8d17 {
    background: var(--fbh-bg);
}

.listivo-heading-v2__small-text {
    background: transparent;
    color: var(--fbh-accent);
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .13em;
    padding: 7px 16px;
    text-transform: uppercase;
}

.listivo-heading-v2__text {
    color: var(--fbh-text);
    font-size: clamp(2.25rem, 4.6vw, 4rem);
    line-height: 1.04;
}

.listivo-category-v2,
.listivo-category-v1,
.listivo-listing-card-v4__inner,
.listivo-testimonial-v3,
.listivo-blog-post-card-v5 {
    background: var(--fbh-surface-strong);
    border-color: var(--fbh-border);
    border-radius: var(--fbh-radius);
    box-shadow: var(--fbh-shadow-soft);
}

.listivo-category-v2 {
    height: 118px;
}

.listivo-category-v2__image,
.listivo-category-v2__arrow-wrapper {
    background: var(--fbh-surface-strong);
}

.listivo-category-v2__image {
    border-radius: 12px;
    height: 64px;
    overflow: hidden;
    padding: 0;
    width: 88px;
}

.listivo-category-v2__image img {
    height: 64px;
    object-fit: cover;
    width: 88px;
}

.listivo-category-v2__arrow,
.listivo-box-arrow {
    background: var(--fbh-surface-alt);
    border-radius: 11px;
}

.listivo-category-v2:hover .listivo-category-v2__arrow,
.listivo-box-arrow:not(.listivo-box-arrow--disabled):hover {
    background: var(--fbh-primary);
}

.listivo-category-v1__image,
.listivo-listing-card-v4__gallery,
.listivo-blog-post-card-v5__image {
    border-radius: var(--fbh-radius) var(--fbh-radius) 0 0;
}

.listivo-listing-card-v4__name,
.listivo-listing-card-v4__value,
.listivo-category-v1__name,
.listivo-category-v2__label,
.listivo-testimonial-v3__name {
    color: var(--fbh-text);
}

.listivo-listing-card-v4__address,
.listivo-listing-card-v4__views,
.listivo-testimonial-v3__job-title,
.listivo-testimonial-v3__text {
    color: var(--fbh-muted);
}

.listivo-listing-card-v4__value,
.listivo-listing-card-v4__star--active,
.listivo-testimonial-v3__star {
    color: var(--fbh-primary);
}

/* Homepage service categories: image-led tiles with overlaid labels. */
.home .listivo-categories-v2__list {
    gap: 24px;
}

.home .listivo-category-v2 {
    align-items: stretch;
    background: #17211d;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(20, 31, 25, .16);
    display: block;
    height: 168px;
    isolation: isolate;
    margin: 0;
    overflow: hidden;
    padding: 0;
    position: relative;
    width: 204px;
}

.home .listivo-category-v2::after {
    background: linear-gradient(180deg, rgba(13, 22, 17, .02) 25%, rgba(13, 22, 17, .84) 100%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
    z-index: 1;
}

.home .listivo-category-v2__image {
    background: #17211d;
    border-radius: inherit;
    height: 100%;
    inset: 0;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 100%;
}

.home .listivo-category-v2__image img {
    display: block;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
    width: 100%;
}

.home .listivo-category-v2__label {
    bottom: 17px;
    color: #fffdf8 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: 700;
    left: 17px;
    line-height: 1.15;
    max-width: calc(100% - 76px);
    position: absolute;
    text-align: left;
    text-shadow: 0 2px 5px rgba(10, 18, 14, .72);
    top: auto;
    z-index: 2;
}

.home .listivo-category-v2__arrow-wrapper {
    background: transparent;
    bottom: 13px;
    padding: 0;
    position: absolute;
    right: 13px;
    z-index: 3;
}

.home .listivo-category-v2__arrow {
    background: var(--fbh-primary);
    border: 1px solid rgba(255, 253, 248, .5);
    border-radius: 50%;
    box-shadow: 0 4px 14px rgba(12, 20, 16, .26);
    height: 40px;
    width: 40px;
}

.home .listivo-category-v2__arrow path {
    fill: #fffdf8 !important;
}

.home .listivo-category-v2:hover .listivo-category-v2__image img,
.home .listivo-category-v2:focus-visible .listivo-category-v2__image img {
    transform: scale(1.045);
}

.home .listivo-category-v2:hover .listivo-category-v2__arrow,
.home .listivo-category-v2:focus-visible .listivo-category-v2__arrow {
    background: var(--fbh-accent-strong);
}

.home .listivo-category-v2:focus-visible {
    outline: 3px solid var(--fbh-primary);
    outline-offset: 4px;
}

.listivo-services-v5 {
    gap: 22px;
}

.listivo-service-v5 {
    background: var(--fbh-surface-strong);
    border: 1px solid var(--fbh-border);
    border-radius: var(--fbh-radius);
    box-shadow: var(--fbh-shadow-soft);
    min-width: 0;
    padding: 34px 26px;
}

.listivo-service-v5__arrow,
.listivo-service-v5__decoration {
    display: none;
}

.listivo-service-v5__label {
    color: var(--fbh-text);
    font-family: Georgia, "Times New Roman", serif;
}

.listivo-service-v5__text {
    color: var(--fbh-muted);
}

/* Barn-life CTA */
.home .elementor-element-23e02f9f {
    background: var(--fbh-bg);
    padding: clamp(28px, 5vw, 70px) clamp(18px, 4vw, 48px);
}

.home .listivo-call-to-action-section-v3 {
    border-radius: 28px;
    box-shadow: var(--fbh-shadow);
    margin-left: auto !important;
    margin-right: auto !important;
    max-width: 1180px;
    min-height: 430px;
    width: 100%;
}

.home .listivo-call-to-action-section-v3::before {
    background: var(--fbh-accent-strong);
    opacity: .92;
}

.home .listivo-call-to-action-section-v3 .listivo-heading-v2__small-text,
.home .listivo-call-to-action-section-v3 .listivo-heading-v2__text {
    color: #fffdf8;
}

.home .listivo-call-to-action-section-v3 .listivo-button {
    background: #fffdf8;
    color: var(--fbh-accent-strong);
}

.home .listivo-call-to-action-section-v3__container,
.home .listivo-call-to-action-section-v3__heading,
.home .listivo-call-to-action-section-v3__button {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* The imported news and newsletter blocks are generic demo content. */
.home .elementor-element-cf826de,
.home .elementor-element-1fbc599d {
    display: none;
}

/* Do not leave demo-carousel gaps before the marketplace has real listings. */
.home.barnhelp-no-listings .elementor-element-20b2cd4,
.barnhelp-no-listings .elementor-element-7e949703 {
    display: none;
}

@media (min-width: 1025px) {
    .barnhelp-no-listings .elementor-element-46c91e6f > .elementor-container > .elementor-top-column:not(.elementor-element-7e949703) {
        width: 33.333%;
    }
}

/* Footer */
.home .elementor-element-46c91e6f,
.elementor-location-footer {
    background: #152019;
    color: #e8eee9;
}

.elementor-element-46c91e6f .elementor-element-492ea69f .listivo-image {
    background: rgba(255, 253, 248, .97) url("../images/findbarnhelp-horizontal-logo-v1.png") center / calc(100% - 28px) auto no-repeat;
    border: 1px solid rgba(216, 208, 194, .65);
    border-radius: 14px;
    display: block;
    height: 78px;
    width: 270px;
}

.elementor-element-46c91e6f .elementor-element-492ea69f .listivo-image img {
    opacity: 0;
}

.home .elementor-element-46c91e6f :where(a, div, span, h2, h3) {
    color: #e8eee9;
}

.home .elementor-element-302eb9ee {
    background: #101713;
}

.listivo-copyrights,
.listivo-copyrights a {
    color: #d5ddd7;
}

.site-footer__credit {
    margin-inline: auto;
    text-align: center;
}

.site-footer__agency {
    display: inline-block;
    max-width: 100%;
}

/* Listing detail: persistent seller rail, authenticated contact, and map preview. */
.single-listivo_listing:not(.logged-in) .listivo-listing-user-v2__bottom {
    display: none;
}

.barnhelp-login-to-contact {
    align-items: center;
    background: var(--fbh-primary);
    border-radius: 999px;
    color: #fffdf8 !important;
    display: flex;
    font-size: 16px;
    font-weight: 800;
    justify-content: space-between;
    margin: 24px 30px 30px;
    min-height: 56px;
    padding: 14px 22px;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}

.barnhelp-login-to-contact:hover,
.barnhelp-login-to-contact:focus-visible {
    background: var(--fbh-primary-strong);
    color: #fffdf8;
    transform: translateY(-1px);
}

.listivo-listing-section--mock-map {
    margin: 0;
    padding: 30px 30px 0;
}

.barnhelp-map-preview {
    border: 1px solid var(--fbh-border);
    border-radius: 16px;
    box-shadow: var(--fbh-shadow-soft);
    isolation: isolate;
    margin-top: 16px;
    min-height: 300px;
    overflow: hidden;
    position: relative;
}

.barnhelp-map-preview img {
    display: block;
    height: 300px;
    object-fit: cover;
    width: 100%;
}

.barnhelp-map-preview__caption {
    background: rgba(255, 253, 248, .96);
    border: 1px solid rgba(216, 208, 194, .9);
    border-radius: 12px;
    bottom: 16px;
    box-shadow: 0 8px 22px rgba(34, 27, 19, .14);
    display: flex;
    flex-direction: column;
    left: 16px;
    max-width: calc(100% - 32px);
    padding: 10px 14px;
    position: absolute;
}

.barnhelp-map-preview__caption span {
    color: var(--fbh-muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.barnhelp-map-preview__caption strong {
    color: var(--fbh-text);
    font-size: 15px;
}

@media (min-width: 1025px) {
    .single-listivo_listing .elementor-element-70849277 {
        align-self: flex-start;
        position: sticky !important;
        top: 96px !important;
    }

    .single-listivo_listing .elementor-element-70849277 .listivo-sticky-element {
        position: static !important;
        transform: none !important;
    }
}

@media (max-width: 1024px) {
    .listivo-menu-v2__logo,
    .listivo-menu-v2__logo img {
        height: 62px;
        width: 188px;
    }

    .home .listivo-hero-search-v6__content::before {
        display: none;
        opacity: 0;
    }

    .home .listivo-hero-search-v6__heading {
        color: #fffdf8 !important;
        font-size: clamp(3rem, 7vw, 4rem);
        margin-left: auto;
        margin-right: auto;
        max-width: 640px;
        text-align: center;
        text-shadow:
            0 2px 5px rgba(12, 20, 16, .88),
            0 0 18px rgba(12, 20, 16, .6);
    }

    .home .listivo-hero-search-v6__image {
        border: 0;
        border-radius: 0;
        height: 100%;
        inset: 0;
        transform: none;
        width: 100%;
    }

    .home .listivo-hero-search-v6__image img {
        height: 100%;
        object-fit: cover;
        width: 100%;
    }

    .home .listivo-search-form-v2 {
        margin-left: auto;
        margin-right: auto;
        max-width: 520px;
        width: 100% !important;
    }

    .home .listivo-search-form-v2__inner {
        max-width: none;
        width: 100%;
    }

    .listivo-service-v5 {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .listivo-menu-v2__container {
        min-height: 68px;
    }

    .listivo-menu-v2__logo,
    .listivo-menu-v2__logo img {
        height: 56px;
        width: 170px;
    }

    .home .listivo-hero-search-v6,
    .home .listivo-hero-search-v6__content {
        min-height: 650px;
    }

    .home .listivo-hero-search-v6__heading {
        font-size: clamp(2.65rem, 11vw, 3.25rem);
    }

    .home .listivo-search-form-v2__inner {
        border-radius: 16px;
    }

    .listivo-heading-v2__text {
        font-size: clamp(2.1rem, 11vw, 3.3rem);
    }

    .home .listivo-categories-v2__list {
        gap: 18px;
    }

    .home .listivo-category-v2 {
        height: 200px;
        width: 100%;
    }

    .home .listivo-category-v2__label {
        bottom: 20px;
        font-size: 1.1rem;
        left: 20px;
    }

    .home .listivo-category-v2__arrow-wrapper {
        bottom: 16px;
        right: 16px;
    }

    .home .listivo-call-to-action-section-v3 {
        border-radius: 20px;
        min-height: 390px;
    }

    .barnhelp-login-to-contact {
        margin-left: 20px;
        margin-right: 20px;
    }

    .listivo-listing-section--mock-map {
        padding-left: 20px;
        padding-right: 20px;
    }

    .barnhelp-map-preview,
    .barnhelp-map-preview img {
        height: 230px;
        min-height: 230px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
