/* JFB shared navigation and hero artwork. The Elementor header stays in normal page flow. */
.elementor-location-header .jfb-site-header {
    position: relative;
    overflow: visible;
}

:is(.page-id-4711, .page-id-4712) .elementor-location-header .jfb-site-header {
    background-color: #ffd6c3 !important;
}

:is(.page-id-4494, .page-id-4495, .page-id-4664, .page-id-4665) .elementor-location-header .jfb-site-header {
    background-color: #ffd0bc !important;
}

.jfb-site-header .elementor-widget-theme-site-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.jfb-site-header .wpml-ls-link {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    color: #272525;
}

.jfb-site-header .elementor-menu-toggle svg {
    fill: currentColor;
}

.jfb-site-header :is(a, .elementor-menu-toggle):focus-visible {
    outline: 2px solid #a12d26;
    outline-offset: 3px;
}

.jfb-site-header .elementor-nav-menu--main .elementor-item.elementor-item-active {
    text-decoration: underline;
    text-underline-offset: .3em;
}

.jfb-site-header .elementor-nav-menu--dropdown .elementor-item {
    min-height: 44px;
    justify-content: flex-end;
}

.jfb-brand-hero {
    isolation: isolate;
}

/* The original desktop artwork fades across the whole hero; the copy sits in the pale zone. */
@media (min-width: 1025px) {
    .jfb-brand-hero.e-con::before {
        content: "";
        position: absolute;
        z-index: 0;
        inset: 0;
        background: linear-gradient(90deg, #fbd8c5 0%, #fbd8c5 43%, #fbd8c5e6 48%, transparent 69%);
        pointer-events: none;
    }
}

.jfb-brand-hero .jfb-brand-hero-copy {
    position: relative;
    z-index: 2;
}

.jfb-brand-hero-copy .jfb-breadcrumbs :is(a, span) {
    color: #51413c;
}

.jfb-brand-hero-copy :is(.elementor-heading-title, p),
.jfb-local-hero .jfb-local-hero-copy,
.jfb-journal .jfb-journal-hero .jfb-journal-wrap {
    text-align: left;
}

.jfb-brand-hero-copy .jfb-breadcrumbs {
    text-align: left;
}

.jfb-local .jfb-local-hero,
.jfb-local.jfb-nb .jfb-local-hero {
    padding-top: clamp(70px, 8vw, 135px);
    min-height: clamp(630px, 53vw, 830px);
}

.jfb-local .jfb-local-hero-copy,
.jfb-local.jfb-nb .jfb-local-hero-copy {
    max-width: min(46%, 570px);
}

.jfb-local.jfb-nb .jfb-local-hero-copy::before {
    content: none;
}

.jfb-journal .jfb-journal-hero > .jfb-journal-wrap {
    padding-top: clamp(54px, 7vw, 115px);
}

@media (max-width: 1024px) {
    .jfb-brand-hero.e-con {
        background-image: none !important;
    }

    .jfb-brand-hero .jfb-brand-hero-art {
        align-self: stretch;
        mask-image: linear-gradient(to bottom, transparent 0%, #000 19%);
    }

    .jfb-local .jfb-local-hero,
    .jfb-local.jfb-nb .jfb-local-hero {
        --jfb-regional-art-height: clamp(240px, 52vw, 506px);
        min-height: 0;
        padding: calc(var(--jfb-regional-art-height) + 22px) clamp(23px, 4vw, 39px) 95px;
        background-color: #ffd0bc !important;
        background-image: none !important;
    }

    .jfb-local .jfb-local-hero::before,
    .jfb-local.jfb-nb .jfb-local-hero::before {
        content: "";
        position: absolute;
        display: block;
        inset: 0 0 auto;
        height: var(--jfb-regional-art-height);
        z-index: 0;
        background: var(--jfb-mobile-hero) 82% center / cover no-repeat;
        mask-image: linear-gradient(to bottom, #000 76%, transparent 100%);
        clip-path: none;
        pointer-events: none;
    }

    .jfb-local .jfb-local-hero-copy,
    .jfb-local.jfb-nb .jfb-local-hero-copy {
        max-width: 680px;
    }

    .jfb-local .jfb-local-hero::after,
    .jfb-local.jfb-nb .jfb-local-hero::after {
        height: 95px;
    }

    .jfb-journal .jfb-journal-hero > .jfb-journal-wrap {
        padding-top: 50px;
    }
}

@media (max-width: 767px) {
    .jfb-site-header .wpml-ls-link {
        min-height: 30px;
    }

    .jfb-journal .jfb-journal-hero > .jfb-journal-wrap {
        padding-top: 36px;
    }
}

/* A site-wide link colour used by the former transparent header takes priority in legacy pages. */
body .elementor-location-header .jfb-site-header .elementor-nav-menu--main .elementor-item,
body .elementor-location-header .jfb-site-header .wpml-ls-link {
    color: #272525 !important;
    border-color: #272525;
}

body .elementor-location-header .jfb-site-header .elementor-nav-menu--main .elementor-item:is(:hover, :focus-visible, .elementor-item-active),
body .elementor-location-header .jfb-site-header .wpml-ls-link:is(:hover, :focus-visible) {
    color: #a12d26 !important;
}

body .elementor-location-header .jfb-site-header .elementor-nav-menu--dropdown .elementor-item {
    color: #272525 !important;
}

body .elementor-location-header .jfb-site-header .elementor-nav-menu--dropdown .elementor-item:is(:hover, :focus, .elementor-item-active) {
    color: #fff !important;
}

.jfb-site-header .elementor-menu-toggle {
    min-width: 44px;
    min-height: 44px;
    padding: 9px;
    justify-content: center;
    background: transparent;
}

body .elementor-location-header .jfb-site-header .elementor-widget-wpml-language-switcher > .elementor-widget-container {
    border-color: #272525 !important;
}

@media (max-width: 1024px) {
    .jfb-brand-hero.e-con.margin-140 {
        padding-inline: 0 !important;
    }

    .jfb-brand-hero.margin-140 > .e-con-inner {
        width: 100%;
        max-width: none !important;
        padding-inline: 0;
    }

    .jfb-brand-hero-copy .elementor-widget-text-editor {
        max-width: 66ch;
    }
}


/* On the public site, a wrapped WordPress toolbar must reserve the height of both rows. */
@media (min-width: 783px) {
    html:has(body.admin-bar .jfb-site-header) {
        margin-top: 0 !important;
    }

    body.admin-bar:has(.jfb-site-header) #wpadminbar {
        position: sticky;
        top: 0;
        height: auto;
    }

    body.admin-bar:has(.jfb-site-header) #wp-toolbar {
        display: flow-root;
        min-height: 32px;
    }
}
