/* Stage header only. Menu content, hover, touch and keyboard logic remain in Max Mega Menu. */
header.wp-block-template-part {
    --menu-bg: #fbf9f3;
    --menu-ink: #342e26;
    --menu-muted: #62594c;
    --menu-accent: #745b30;
    --menu-line: #ded5c4;
    --menu-hover: #eee7d8;
    --menu-drawer-width: min(380px, calc(100vw - 56px));
    position: sticky;
    top: 0;
    z-index: 1000;
    margin: 0;
    background: var(--menu-bg);
    border-bottom: 1px solid var(--menu-line);
    box-shadow: 0 3px 14px rgb(52 46 38 / 5%);
    color: var(--menu-ink);
}

header.wp-block-template-part > .wp-block-group,
header.wp-block-template-part > .wp-block-group > .wp-block-group {
    max-width: none;
    margin: 0;
    padding: 0;
}

header.wp-block-template-part .wp-block-group:has(> #mega-menu-wrap-max_mega_menu_1) {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 12px 32px !important;
    gap: 32px;
    justify-content: space-between;
    align-items: center;
    box-shadow: none !important;
}

header.wp-block-template-part .wp-block-site-logo {
    flex: 0 0 150px;
    width: 150px;
    max-width: 100%;
    margin: 0;
}

header.wp-block-template-part .custom-logo-link {
    display: block;
    border-radius: 2px;
    line-height: 0;
}

header.wp-block-template-part .custom-logo {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    background: transparent !important;
    font-family: inherit;
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    background: transparent;
    text-align: left;
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li.mega-menu-item {
    float: none;
    margin: 0;
    border: 0;
    background: transparent;
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 a.mega-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 46px;
    height: auto;
    padding: 10px 13px;
    border: 0;
    border-radius: 3px;
    background: transparent;
    color: var(--menu-ink);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    text-align: left;
    text-decoration: none;
    text-transform: none;
    white-space: normal;
    cursor: pointer;
    transition: color 160ms ease, background-color 160ms ease;
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li > a.mega-menu-link {
    white-space: nowrap;
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 a.mega-menu-link:hover,
header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li.mega-toggle-on > a.mega-menu-link,
header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li.mega-current-menu-item > a.mega-menu-link,
header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li.mega-current-menu-ancestor > a.mega-menu-link {
    background: var(--menu-hover);
    color: var(--menu-accent);
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li.mega-current-menu-item > a.mega-menu-link {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 1px;
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 a.mega-menu-link:focus-visible,
header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 button:focus-visible,
header.wp-block-template-part .custom-logo-link:focus-visible {
    outline: 3px solid var(--menu-accent);
    outline-offset: 2px;
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 span.mega-indicator {
    display: inline-block;
    float: none;
    flex: 0 0 auto;
    width: 14px;
    height: auto;
    margin: 0;
    color: var(--menu-accent);
    font-size: 14px;
    line-height: 1;
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 span.mega-indicator::after {
    margin: 0;
}

header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 ul.mega-sub-menu {
    width: 272px;
    max-width: calc(100vw - 48px);
    padding: 8px;
    border: 1px solid var(--menu-line);
    border-top: 2px solid #b5a078;
    border-radius: 4px;
    background: var(--menu-bg);
    box-shadow: 0 10px 28px rgb(52 46 38 / 12%);
}

@media (min-width: 1101px) {
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li {
        flex: 0 0 auto;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li > ul.mega-sub-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: auto;
        visibility: hidden;
        opacity: 0;
        transform: none;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li.mega-toggle-on > ul.mega-sub-menu {
        display: block;
        visibility: visible;
        opacity: 1;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li:last-child > ul.mega-sub-menu {
        left: auto;
        right: 0;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 ul.mega-sub-menu li > ul.mega-sub-menu {
        left: 100%;
        top: -2px;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 ul.mega-sub-menu a.mega-menu-link {
        padding: 10px 12px;
    }
}

@media (min-width: 1101px) and (max-width: 1279px) {
    header.wp-block-template-part .wp-block-group:has(> #mega-menu-wrap-max_mega_menu_1) {
        gap: 18px;
        padding-inline: 24px !important;
    }
    header.wp-block-template-part .wp-block-site-logo {
        flex-basis: 130px;
        width: 130px;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 a.mega-menu-link {
        padding-inline: 9px;
        font-size: 15px;
    }
}

@media (max-width: 1100px) {
    header.wp-block-template-part .wp-block-group:has(> #mega-menu-wrap-max_mega_menu_1) {
        gap: 20px;
        padding: 12px 22px !important;
    }
    header.wp-block-template-part .wp-block-site-logo {
        flex-basis: 126px;
        width: 126px;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 {
        flex: 0 0 auto;
        position: static;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        position: relative;
        height: auto;
        line-height: 1;
        border-radius: 3px;
        background: transparent;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-toggle-blocks-left,
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-toggle-blocks-center {
        display: none;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-toggle-blocks-right {
        display: flex;
        padding: 0;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-toggle-block-1 {
        display: flex;
        height: auto;
        margin: 0;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-toggle-block-1 .mega-toggle-animated {
        display: inline-flex;
        align-items: center;
        gap: 12px;
        width: auto;
        min-width: 100px;
        height: 46px;
        margin: 0;
        padding: 10px 12px;
        border: 1px solid var(--menu-line);
        border-radius: 3px;
        background: transparent;
        color: var(--menu-ink);
        opacity: 1;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .parafia-menu-label {
        font-family: inherit;
        font-size: 16px;
        line-height: 1.5;
        color: var(--menu-ink);
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-toggle-animated-box {
        width: 22px;
        height: 20px;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-toggle-animated-inner,
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-toggle-animated-inner::before,
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-toggle-animated-inner::after {
        width: 22px;
        height: 2px;
        border-radius: 1px;
        background-color: var(--menu-accent);
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle + #mega-menu-max_mega_menu_1 {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        position: fixed;
        inset: 0 calc(-1 * var(--menu-drawer-width)) auto auto;
        width: var(--menu-drawer-width);
        max-width: none;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        padding: 28px 18px 32px;
        border-left: 1px solid var(--menu-line);
        background: var(--menu-bg);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        box-sizing: border-box;
        z-index: 9999999999;
        visibility: hidden;
        transition: right 200ms ease, visibility 200ms ease;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle.mega-menu-open + #mega-menu-max_mega_menu_1 {
        right: 0;
        visibility: visible;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li.mega-menu-item {
        display: block;
        flex: 0 0 auto;
        width: 100%;
        border-bottom: 1px solid var(--menu-line);
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 > li > a.mega-menu-link {
        min-height: 54px;
        padding: 14px 10px;
        font-size: 17px;
        white-space: normal;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li > ul.mega-sub-menu {
        display: none;
        position: static;
        width: 100%;
        max-width: 100%;
        margin: 0 0 10px;
        padding: 2px 0 2px 10px;
        border: 0;
        border-left: 1px solid var(--menu-line);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        visibility: visible;
        opacity: 1;
        transform: none;
        transition: none;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li.mega-toggle-on > ul.mega-sub-menu {
        display: block;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 ul.mega-sub-menu a.mega-menu-link {
        min-height: 46px;
        padding: 11px 10px;
        font-size: 15px;
        line-height: 1.5;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 ul.mega-sub-menu ul.mega-sub-menu {
        left: auto;
        top: auto;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li.mega-menu-item span.mega-indicator {
        position: static;
        width: 20px;
        height: auto;
        margin: 0;
        padding: 0;
        line-height: 1;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li.mega-menu-item span.mega-indicator::after {
        content: '\f140';
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 #mega-menu-max_mega_menu_1 li.mega-toggle-on > a > span.mega-indicator::after {
        content: '\f142';
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle ~ button.mega-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 16px;
        left: auto;
        right: calc(var(--menu-drawer-width) + 6px);
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--menu-line);
        border-radius: 3px;
        background: var(--menu-bg);
        z-index: 99999999999;
        cursor: pointer;
        visibility: hidden;
        opacity: 0;
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle.mega-menu-open ~ button.mega-close {
        visibility: visible;
        opacity: 1;
        right: calc(var(--menu-drawer-width) + 6px);
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 button.mega-close::before {
        display: block;
        content: '\f158';
        font-family: dashicons;
        font-size: 22px;
        font-weight: 400;
        color: var(--menu-ink);
    }
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 .mega-menu-toggle.mega-menu-open::after {
        display: block;
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100dvh;
        content: '';
        background: #342e26;
        opacity: .38;
        cursor: pointer;
        z-index: 9999999998;
    }
}

@media (prefers-reduced-motion: reduce) {
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 *,
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 *::before,
    header.wp-block-template-part #mega-menu-wrap-max_mega_menu_1 *::after {
        transition: none !important;
        animation: none !important;
    }
}
