.forenia-header,
.forenia-header * {
    box-sizing: border-box;
}

.forenia-header {
    --forenia-header-wide-max: 1240px;
    --forenia-header-gutter: 16px;
    --forenia-header-background: #ffffff;
    --forenia-header-text: #16352f;
    --forenia-header-muted: #52645f;
    --forenia-header-border: #dfe8e5;
    --forenia-header-focus: #146c5a;
    --forenia-header-cta: #146c5a;
    display: block;
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    background: var(--forenia-header-background);
    border: 1px solid var(--forenia-header-border);
    color: var(--forenia-header-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.4;
    isolation: isolate;
}

.forenia-header--canvas {
    width: auto;
    margin-inline: calc(50% - 50vw);
}

.forenia-header--sticky {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0);
    z-index: 100;
}

body.admin-bar .forenia-header--sticky {
    top: 32px;
}

.forenia-header__inner {
    display: flex;
    position: relative;
    align-items: center;
    gap: 28px;
    width: 100%;
    max-width: var(--forenia-header-wide-max);
    min-height: 84px;
    margin-inline: auto;
    padding-inline: var(--forenia-header-gutter);
    box-sizing: border-box;
}

.forenia-header--compact .forenia-header__inner {
    min-height: 62px;
}

.forenia-header a {
    color: inherit;
    text-decoration: none;
}

.forenia-header a:hover {
    color: var(--forenia-header-focus);
}

.forenia-header a:focus-visible,
.forenia-header button:focus-visible {
    outline: 3px solid var(--forenia-header-focus);
    outline-offset: 3px;
}

.forenia-header__skip-link {
    position: absolute;
    left: var(--forenia-header-gutter);
    top: 0;
    z-index: 130;
    padding: 10px 14px;
    background: #ffffff;
    border: 2px solid var(--forenia-header-focus);
    border-radius: 0 0 6px 6px;
    color: var(--forenia-header-text);
    font-weight: 700;
    transform: translateY(-130%);
}

.forenia-header__skip-link:focus {
    transform: translateY(0);
}

.forenia-header__brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 11px;
    min-width: 112px;
    min-height: 56px;
    max-width: min(260px, 30vw);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.025em;
}

.forenia-header__brand-mark {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    max-width: 100%;
}

.forenia-header__brand-mark .forenia-header__logo,
.forenia-header__brand-mark img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 56px;
    object-fit: contain;
}

.forenia-header__brand-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    min-width: 0;
    overflow: hidden;
    text-align: center;
}

.forenia-header__brand-wordmark {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--forenia-header-text);
    font-size: 23px;
    font-weight: 750;
    line-height: 0.98;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forenia-header__brand-tagline {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--forenia-header-muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forenia-header__nav {
    display: flex;
    flex: 1 1 560px;
    justify-content: flex-start;
    min-width: 0;
}

.forenia-header__menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.forenia-header__menu li {
    position: relative;
    margin: 0;
    list-style: none;
}

.forenia-header__menu a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--forenia-header-text);
    font-weight: 700;
}

.forenia-header__menu a:hover,
.forenia-header__menu .current-menu-item > a {
    background: #edf5f2;
}

.forenia-header__menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 210px;
    margin: 0;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--forenia-header-border);
    border-radius: 10px;
    box-shadow: 0 14px 36px rgba(21, 53, 47, 0.14);
    list-style: none;
}

.forenia-header__menu li:hover > .sub-menu,
.forenia-header__menu li:focus-within > .sub-menu {
    display: block;
}

.forenia-header__actions,
.forenia-header__mobile-secondary,
.forenia-header__mobile-account {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
}

.forenia-header--without-menu .forenia-header__actions {
    margin-left: auto;
}

.forenia-header__cta,
.forenia-header__account {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 15px;
    border: 1px solid var(--forenia-header-border);
    border-radius: 9px;
    font-weight: 650;
    white-space: nowrap;
}

.forenia-header__cta {
    background: transparent;
    border-color: #a9bbb6;
    color: var(--forenia-header-text);
}

.forenia-header__cta:hover {
    background: #f3f7f6;
    border-color: #78938b;
    color: var(--forenia-header-text);
}

.forenia-header__account {
    gap: 7px;
    padding-inline: 10px 4px;
    background: transparent;
    border-color: transparent;
    color: var(--forenia-header-muted);
    font-size: 14px;
    font-weight: 550;
}

.forenia-header__account:hover {
    background: #f5f8f7;
    border-color: var(--forenia-header-border);
    color: var(--forenia-header-text);
}

.forenia-header__account-icon {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    color: currentColor;
}

.forenia-header__mobile-toggle {
    display: none;
    min-height: 44px;
    padding: 9px 14px;
    background: #ffffff;
    border: 1px solid var(--forenia-header-border);
    border-radius: 9px;
    color: var(--forenia-header-text);
    cursor: pointer;
    font: inherit;
    font-weight: 750;
}

.forenia-header__rainbow {
    display: block;
    width: 100%;
    height: 5px;
    background-color: #1d7cff;
    background-image: linear-gradient(
        100deg,
        #1d7cff 0%,
        #4664ff 13%,
        #7d3cff 27%,
        #ca4bd1 39%,
        #ff9f1c 52%,
        #7fbc31 66%,
        #18a84f 76%,
        #ef3f6d 91%,
        #1d7cff 112%
    );
    background-position: center;
    background-size: 120% 100%;
}

.forenia-header__backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(8, 24, 21, 0.52);
}

.forenia-header__mobile-panel {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: min(88vw, 380px);
    height: 100dvh;
    padding: 84px 24px 28px;
    overflow-y: auto;
    background: #ffffff;
    border-left: 1px solid var(--forenia-header-border);
    box-shadow: -18px 0 45px rgba(8, 24, 21, 0.2);
}

body.admin-bar .forenia-header__backdrop,
body.admin-bar .forenia-header__mobile-panel {
    top: 32px;
}

body.admin-bar .forenia-header__mobile-panel {
    height: calc(100dvh - 32px);
}

.forenia-header__backdrop[hidden],
.forenia-header__mobile-panel[hidden] {
    display: none;
}

.forenia-header__mobile-nav,
.forenia-header__mobile-nav .forenia-header__menu {
    display: block;
}

.forenia-header__mobile-nav .forenia-header__menu a {
    display: flex;
    width: 100%;
}

.forenia-header__mobile-nav .sub-menu {
    display: block;
    position: static;
    margin-left: 14px;
    box-shadow: none;
}

.forenia-header__mobile-primary,
.forenia-header__mobile-secondary,
.forenia-header__mobile-account {
    width: 100%;
}

.forenia-header__mobile-secondary {
    align-items: stretch;
}

.forenia-header__mobile-account {
    align-items: stretch;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--forenia-header-border);
}

.forenia-header__mobile-account .forenia-header__account {
    justify-content: flex-start;
    width: 100%;
    min-height: 48px;
    padding: 11px 12px;
    font-size: 15px;
}

.forenia-header__action--mobile {
    width: 100%;
}

body.forenia-header-mobile-open {
    overflow: hidden;
}

body.forenia-header-canvas .wp-site-blocks > header.wp-block-template-part,
body.forenia-header-canvas.forenia-hide-page-title main#wp--skip-link--target > .wp-block-group.alignfull:first-child:has(> h1.wp-block-post-title) {
    display: none !important;
}

@media (max-width: 1099px) {
    .forenia-header__nav,
    .forenia-header__actions {
        display: none;
    }

    .forenia-header__mobile-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .forenia-header__brand-tagline {
        display: none;
    }
}

@media (max-width: 782px) {
    body.admin-bar .forenia-header--sticky {
        top: 46px;
    }

    body.admin-bar .forenia-header__backdrop,
    body.admin-bar .forenia-header__mobile-panel {
        top: 46px;
    }

    body.admin-bar .forenia-header__mobile-panel {
        height: calc(100dvh - 46px);
    }
}

@media (max-width: 600px) {
    .forenia-header__inner {
        min-height: 72px;
        gap: 14px;
    }

    .forenia-header__brand {
        min-height: 44px;
        max-width: min(190px, 58vw);
        gap: 9px;
    }

    .forenia-header__brand-mark .forenia-header__logo,
    .forenia-header__brand-mark img {
        max-height: 44px;
    }

    .forenia-header__brand-wordmark {
        font-size: 19px;
    }
}
