/* =========================================================================
   2026 navigation — header mega-menus, mobile menu, footer differences.
   Loaded only when fs_nav_2026_enabled() (inc/nav-2026/nav-2026.php).
   Spec: docs/nav-2026/SPEC.md (§ numbers below). Desktop > 945px, mobile ≤ 945px
   (the current GeneratePress mobile breakpoint).
   ========================================================================= */

.fsn {
    --fsn-text: #383700;
    --fsn-active: #704CFF;
    --fsn-accent: #6348ED;
    --fsn-hover: #5F49E5;
    --fsn-panel: #E3E1FC;
    --fsn-row: #CECAF8;
    --fsn-cta: linear-gradient(104.09deg, #E42E2A 0%, #5E35CC 101.44%);
    --fsn-card: linear-gradient(to bottom, #2D1A52 37%, #DB3D3D 100%);
    --fsn-ease: cubic-bezier(0.4, 0, 0.2, 1);

    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 100;
    background-color: #ffffff;
    font-family: "Figtree", sans-serif;
    color: var(--fsn-text);
    transition: box-shadow 0.2s;
}

/* the live header's sticky state has a soft shadow once the page scrolls */
.fsn.is-stuck {
    box-shadow: 0 1px 5px rgba(100, 100, 100, 0.3);
}

/* resets against theme/GeneratePress element styles */
.fsn ul,
.fsn li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fsn p {
    margin: 0;
}

.fsn a {
    text-decoration: none;
}

.fsn button {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: none;
    text-align: left;
    cursor: pointer;
}

/* GeneratePress paints button:hover / :focus grey */
.fsn button:hover,
.fsn button:focus {
    background-color: transparent;
    box-shadow: none;
}

.fsn :focus-visible {
    outline: 2px solid var(--fsn-hover);
    outline-offset: 2px;
}

.fsn .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* -------------------------------------------------------------------------
   §2 Desktop bar — 1440 × 78, padding 51; content capped at 1440 on wide screens
   ------------------------------------------------------------------------- */
.fsn-bar {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    box-sizing: border-box;
    max-width: 1440px;
    height: 78px;
    margin: 0 auto;
    padding: 0 51px;
}

.fsn-logo {
    display: block;
    flex: none;
    margin: 25.5px 0 0 6px; /* Figma: 4 + 2 inset, logo box top 25.5 */
    line-height: 0;
}

.fsn-logo img {
    display: block;
    width: 242.19px;
    height: 24px;
}

.fsn-nav {
    margin-top: 18px; /* CTA 18–60, labels centred on y 39 */
}

.fsn-list {
    display: flex;
    align-items: center;
    gap: 48px;
}

.fsn-top,
.fsn .fsn-top {
    display: block;
    font-size: 15px;
    font-weight: 500;
    line-height: 40px;
    letter-spacing: 0.225px;
    color: var(--fsn-text);
    white-space: nowrap;
}

/* dropdown arrow, as the live header: 8 × 4 triangle in a 19px slot after the label, right 5,
   colour follows the text; flips to ▲ while open */
.fsn .fsn-trigger {
    position: relative;
    padding-right: 19px;
}

.fsn-trigger::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 5px;
    width: 0;
    height: 0;
    margin-top: -2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    transition: transform 0.2s var(--fsn-ease);
}

.fsn-trigger[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

/* hover: the current site's (live header blue); open item: Figma #704CFF */
.fsn .fsn-top:hover {
    color: var(--fsn-hover);
}

.fsn .fsn-trigger[aria-expanded="true"] {
    color: var(--fsn-active);
}

.fsn-cta,
.fsn a.fsn-cta {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    height: 42px;
    padding: 0 20px;
    border-radius: 8px;
    background: var(--fsn-cta);
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    line-height: 40px;
    letter-spacing: 0.225px;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.fsn a.fsn-cta:hover,
.fsn a.fsn-cta:focus {
    color: #ffffff;
    opacity: 0.92;
}

/* -------------------------------------------------------------------------
   Panels — y 87 (9px under the bar), no shadow; JS sets `left` so the panel
   sits centred under its trigger, inside the 51px gutters.
   Open: opacity + slight scale, 200ms (§8).
   ------------------------------------------------------------------------- */
.fsn-panel {
    position: absolute;
    top: 87px;
    left: 0;
    display: none;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 16px; /* Solutions: 10 top-left (below); the shadow follows the panel's corners */
    box-shadow: -4px 4px 10px 0 rgba(0, 0, 0, 0.08), 0 0 5px 0 rgba(0, 0, 0, 0.05); /* entail.ai's */
    opacity: 0;
    transform: scale(0.96);
    transform-origin: top center;
    transition: opacity 0.2s var(--fsn-ease), transform 0.2s var(--fsn-ease);
}

/* invisible hover bridge from the bar (items end at y 60) down to the panel (y 87), the bar's full
   width, so the pointer never "leaves" the open item while crossing to the panel */
.fsn-item.is-open::after {
    content: "";
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: 27px;
}

.fsn-panel.is-open {
    display: flex;
}

.fsn-panel.is-visible {
    opacity: 1;
    transform: none;
}

.fsn-col {
    box-sizing: border-box;
}

.fsn-col--lav {
    background-color: var(--fsn-panel);
}

.fsn-panes {
    box-sizing: border-box;
    background-color: #ffffff;
}

.fsn-pane {
    display: none;
}

.fsn-pane.is-active {
    display: block;
}

/* rows: 39px (12 + 15 + 12), Figtree 400 14/15 */
.fsn-row,
.fsn .fsn-row {
    display: block;
    box-sizing: border-box;
    width: 100%;
    padding: 12px 13px;
    font-size: 14px;
    font-weight: 400;
    line-height: 15px;
    letter-spacing: 0;
    color: var(--fsn-text);
    background-color: transparent;
    white-space: nowrap;
}

.fsn .fsn-row:hover,
.fsn .fsn-row:focus-visible,
.fsn .fsn-cat[aria-selected="true"] {
    background-color: var(--fsn-row);
    color: var(--fsn-text);
}

.fsn .fsn-row:focus-visible {
    outline-offset: -2px;
}

/* link rows in Solutions / Partners (white column): text to the live header blue, no background,
   like the Resources post titles (user decision, overrides spec §8). Company keeps the row fill. */
.fsn .fsn-pane .fsn-row:hover,
.fsn .fsn-pane .fsn-row:focus-visible {
    background-color: transparent;
    color: var(--fsn-hover);
    text-decoration: none;
}

.fsn-explore,
.fsn a.fsn-explore {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: -0.2px;
    color: var(--fsn-accent);
    text-decoration: none;
}

.fsn a.fsn-explore:hover,
.fsn a.fsn-explore:focus-visible {
    color: var(--fsn-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

/* §3 Solutions — 782 × 283: card 252 | categories 226 | links 304 */
.fsn-panel--solutions {
    height: 283px;
    border-radius: 10px 16px 16px 16px;
}

.fsn-col--card {
    width: 252px;
    padding: 25px;
    border-radius: 10px 0 0 16px;
    background-color: var(--fsn-panel);
}

.fsn-card,
.fsn a.fsn-card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 233px;
    padding: 15px 15px 16px;
    border-radius: 16px;
    background: var(--fsn-card);
    color: #ffffff;
}

.fsn-card__title {
    display: block;
    height: 53px;
    font-size: 24px;
    font-weight: 600;
    line-height: 28px;
}

.fsn-card__text {
    display: block;
    margin-top: 20px;
    font-size: 15px;
    font-weight: 400;
    line-height: 18px;
}

.fsn-card__btn {
    display: block;
    box-sizing: border-box;
    height: 34px;
    margin-top: auto;
    padding: 10px 14.28px;
    border-radius: 50px;
    background-color: #ffffff;
    color: var(--fsn-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 14px;
    letter-spacing: 0.0378px;
    text-align: center;
}

.fsn-panel--solutions .fsn-col--cats {
    width: 226px;
    padding: 20px 0;
}

.fsn-panel--solutions .fsn-panes {
    width: 304px;
    padding: 20px 0;
    border-radius: 0 16px 16px 0;
}

/* §4 Partners — 460 × 239: groups 226 (labels at 26) | links 234 */
.fsn-panel--partners {
    height: 239px;
}

.fsn-panel--partners .fsn-col--cats {
    display: flex;
    flex-direction: column;
    width: 226px;
    padding: 20px 0 22px;
}

.fsn-panel--partners .fsn-cat {
    padding-left: 26px;
    padding-right: 26px;
}

.fsn-panel--partners .fsn-explore {
    align-self: flex-start;
    margin: auto 0 0 26px; /* text box y 197 */
}

.fsn-panel--partners .fsn-panes {
    width: 234px;
    padding-top: 20px;
}

/* §5 Resources — 826 × 314: categories 226 | 1px | middle 287 · 30 · featured 233 */
.fsn-panel--resources {
    width: 826px;
    height: 314px;
    background-color: #ffffff;
}

.fsn-panel--resources .fsn-col--cats {
    width: 226px;
    padding: 20px 0;
    border-radius: 16px 0 0 16px;
}

.fsn-panel--resources .fsn-cat {
    padding-left: 26px;
    padding-right: 26px;
}

.fsn-panel--resources .fsn-panes {
    width: 599px;
    margin-left: 1px;
    padding: 0 20px;
}

.fsn-panel--resources .fsn-pane.is-active {
    display: flex;
    gap: 30px;
    height: 100%;
}

.fsn-res {
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
    width: 287px;
    padding: 20px 0;
}

.fsn-res__heading,
.fsn .fsn-res__heading {
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    color: var(--fsn-text);
}

.fsn-posts {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.fsn-post,
.fsn a.fsn-post {
    display: flex;
    align-items: center;
    gap: 16.8px;
    height: 44px;
    color: var(--fsn-text);
}

.fsn-post__img {
    display: block;
    flex: none;
    width: 56.4px;
    height: 44px;
    border-radius: 3.6px;
    object-fit: cover;
}

.fsn-post__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    flex: 1 1 0;
    min-width: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 21.6px;
    letter-spacing: -0.3px;
}

.fsn-ph {
    background-color: var(--fsn-panel);
}

.fsn-res .fsn-explore {
    align-self: flex-start;
}

.fsn-feat {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    width: 233px;
    padding: 20px 0;
}

/* fixed 27.5px gaps heading → image → title (Figma's space-between with a 2-line title),
   so the image stays put when a title is one line */
.fsn-feat__link,
.fsn a.fsn-feat__link {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    color: var(--fsn-text);
}

.fsn-feat__img {
    display: block;
    flex: none;
    width: 233px;
    height: 159px;
    margin: 27.5px 0;
    border-radius: 5px;
    object-fit: cover;
}

.fsn-feat__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 14px;
    font-weight: 700;
    line-height: 19px;
}

/* §8 hover: post rows / featured — text to the live header blue, no underline, no zoom */
.fsn a.fsn-post:hover,
.fsn a.fsn-post:focus-visible,
.fsn a.fsn-feat__link:hover,
.fsn a.fsn-feat__link:focus-visible {
    color: var(--fsn-hover);
}

/* §6 Company — 226 × 184, rows from y 14, labels at 26 */
.fsn-panel--company {
    width: 226px;
}

.fsn-panel--company .fsn-rows {
    width: 226px;
    padding: 14px 0;
}

.fsn-panel--company .fsn-row {
    padding-left: 26px;
    padding-right: 26px;
}

/* narrower desktops: keep the bar on one line down to the 946px breakpoint */
@media (max-width: 1200px) {
    .fsn-list {
        gap: 32px;
    }
}

@media (max-width: 1100px) {
    .fsn-bar {
        padding: 0 32px;
    }

    .fsn-list {
        gap: 28px;
    }
}

@media (max-width: 1023px) {
    .fsn-bar {
        padding: 0 24px;
    }

    .fsn-list {
        gap: 20px;
    }
}

/* -------------------------------------------------------------------------
   Mobile bar — the current GeneratePress mobile header (logo 16px tall at the
   page margin, hamburger 24 × 16 on the right, × when open)
   ------------------------------------------------------------------------- */
.fsn-mbar,
.fsn-m {
    display: none;
}

@media (max-width: 945px) {
    .fsn-bar {
        display: none;
    }

    .fsn-mbar {
        position: relative;
        display: block;
        box-sizing: border-box;
        height: 70px;
        border-bottom: 1px solid #E8E8E8;
        background-color: #ffffff;
    }

    .fsn-mbar__logo {
        position: absolute;
        top: 21px;
        left: var(--menu_margin, 17px);
        line-height: 0;
    }

    .fsn-mbar__logo img {
        display: block;
        width: 161.45px;
        height: 16px;
    }

    .fsn .fsn-mbar__toggle {
        position: absolute;
        top: 0;
        right: 0;
        width: 66px;
        height: 54px;
        color: var(--fsn-text);
    }

    .fsn-mbar__toggle svg {
        position: absolute;
        display: block;
    }

    .fsn-mbar__bars {
        top: 19px;
        right: 18px;
    }

    .fsn-mbar__close {
        top: 20.5px;
        right: 23.5px;
        width: 13px;
        height: 13px;
        color: var(--fsn-hover);
        visibility: hidden;
    }

    .fsn.is-m-open .fsn-mbar__bars {
        visibility: hidden;
    }

    .fsn.is-m-open .fsn-mbar__close {
        visibility: visible;
    }

    /* §9 panel: white, padding 20, overlays the page under the bar */
    .fsn.is-m-open .fsn-m {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        display: block;
        box-sizing: border-box;
        max-height: calc(100vh - 70px - var(--wp-admin--admin-bar--height, 0px));
        max-height: calc(100dvh - 70px - var(--wp-admin--admin-bar--height, 0px));
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 20px;
        background-color: #ffffff;
    }

    .fsn-m__item + .fsn-m__item {
        margin-top: 5px;
    }

    .fsn .fsn-m__top {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: 40px;
        font-size: 15px;
        font-weight: 500;
        line-height: 40px;
        letter-spacing: 0.225px;
        color: var(--fsn-text);
    }

    @media (hover: hover) {
        .fsn .fsn-m__top:hover,
        .fsn .fsn-m a:not(.fsn-cta, .fsn-m__card):hover {
            color: var(--fsn-hover);
        }
    }

    .fsn-m__tri {
        display: block;
        flex: none;
        width: 12.5px;
        height: 12.5px;
        transition: transform 0.2s var(--fsn-ease);
    }

    .fsn-m__trigger[aria-expanded="true"] .fsn-m__tri {
        transform: rotate(180deg);
    }

    .fsn-m__sub[hidden] {
        display: none;
    }

    .fsn-m__sub a {
        display: block;
        font-size: 14px;
        font-weight: 500;
        color: var(--fsn-text);
    }

    /* Resources / Company: links at x 40, 48px apart, first 46 below the parent */
    .fsn-m__sub--links {
        padding: 1px 0 0 20px;
    }

    .fsn-m__sub--links a {
        line-height: 48px;
    }

    /* Solutions / Partners: headings at x 40, links at x 60, 35.5 apart, +7 per group */
    .fsn-m__sub--groups {
        padding: 7.75px 0 0 20px;
    }

    .fsn .fsn-m__heading {
        font-size: 14px;
        font-weight: 600;
        line-height: 35.5px;
        color: var(--fsn-hover);
    }

    .fsn .fsn-m__heading:not(:first-child) {
        margin-top: 7px;
    }

    .fsn-m__sub--groups .fsn-m__links {
        padding-left: 20px;
    }

    /* Solutions: Commerce-Native AI card, x 40 to 20 from the right, 12px under the Solutions row,
       Merchandising heading 20px under it. Styled like the desktop card (§3): gradient, white text, white pill. */
    .fsn-m__sub--groups:has(> .fsn-m__card) {
        padding-top: 12px;
    }

    .fsn a.fsn-m__card,
    .fsn a.fsn-m__card:hover {
        display: flex;
        flex-direction: column;
        margin-bottom: 20px;
        padding: 15px 15px 16px;
        border-radius: 16px;
        background: var(--fsn-card);
        color: #ffffff;
    }

    .fsn .fsn-m__card + .fsn-m__heading {
        margin-top: 0;
    }

    .fsn-m__card-title {
        display: block;
        margin-bottom: 20px;
        font-size: 24px;
        font-weight: 600;
        line-height: 28px;
    }

    .fsn-m__card-text {
        display: block;
        margin-bottom: 20px;
        font-size: 15px;
        font-weight: 400;
        line-height: 18px;
    }

    .fsn-m__card-btn {
        display: block;
        box-sizing: border-box;
        height: 34px;
        padding: 10px 14px;
        border-radius: 50px;
        background-color: #ffffff;
        color: var(--fsn-text);
        font-size: 12px;
        font-weight: 500;
        line-height: 14px;
        letter-spacing: 0.0378px;
        text-align: center;
    }

    .fsn-m__sub--groups a {
        line-height: 35.5px;
    }

    /* 143 × 42 in the design: its label is 101.5px wide, i.e. 14px (15px would give 150) */
    .fsn a.fsn-m__cta {
        margin-top: 20px;
        font-size: 14px;
    }
}

/* -------------------------------------------------------------------------
   Contact pages hide the desktop header today (contact.css, .category-form);
   keep that, except on the Schedule Demo design that shows it.
   ------------------------------------------------------------------------- */
@media (min-width: 946px) {
    .category-form:not(:has(.demo-hero)) .fsn {
        display: none;
    }
}

/* =========================================================================
   §7 Footer — the current footer (style.css) with the 2026 differences
   ========================================================================= */

/* social icons: glyph left edges at x 53, 110, 158, 208 (live: 67, ~166, ~256, 352), ~50px apart.
   The widget's per-icon margins/transforms are replaced by one explicit layout. */
.fs-footer--2026 .fs-social-icons > .widget > ul {
    align-items: flex-start;
    gap: 0;
    margin: 0;
    padding: 0;
}

.fs-footer--2026 .fs-social-icons > .widget > ul > li.wp-social-link {
    margin: 0 !important;
    padding: 0 !important;
    transform: none;
}

.fs-footer--2026 .fs-social-icons .wp-social-link a {
    padding: 0 !important;
    transform: none;
}

.fs-footer--2026 .fs-social-icons .wp-social-link svg {
    width: 24px;
    height: 24px;
}

.fs-footer--2026 .fs-social-icons .wp-social-link-facebook,
.fs-footer--2026 .fs-social-icons .wp-social-link-linkedin {
    width: 19px;
    height: 19px;
}

.fs-footer--2026 .fs-social-icons .wp-social-link-facebook a,
.fs-footer--2026 .fs-social-icons .wp-social-link-linkedin a {
    display: block;
    width: 19px;
    height: 19px;
}

/* glyph insets in their boxes: X 4/3, Facebook 5/0, LinkedIn 0/0, YouTube 2/5 */
.fs-footer--2026 .fs-social-icons > .widget > ul > li.wp-social-link-x {
    margin-left: -1px !important;
}

.fs-footer--2026 .fs-social-icons > .widget > ul > li.wp-social-link-facebook {
    margin: 3px 0 0 31px !important;
}

.fs-footer--2026 .fs-social-icons > .widget > ul > li.wp-social-link-linkedin {
    margin: 3px 0 0 34px !important;
}

.fs-footer--2026 .fs-social-icons > .widget > ul > li.wp-social-link-youtube {
    margin-left: 30px !important;
}

.fs-footer--2026 .fs-social-icons > .widget > ul > li.wp-social-link:hover {
    transform: scale(1.1);
}

/* "Designed by MoxieMethod" — was an empty widget */
.fs-footer--2026 .designed-by p {
    margin: 0;
    font-size: 11px;
    font-weight: 400;
    line-height: inherit;
}

.fs-footer--2026 .menus h2 {
    margin-bottom: 0;
}

/* 20px from each column heading to its first link at every width (style.css: 21px, and -1px below 1347px) */
.fs-footer--2026 .menus .menu {
    margin-top: 20px;
}

/* no 46px right padding (style.css) on the links: it squeezed "Schedule Demo" onto two lines in the 120px column */
.fs-footer--2026 .menus .menu a {
    padding-right: 0;
}

/* wide screens: content capped at 1440 like the header (live footer: 1353) */
.fs-footer--2026 .container {
    width: 100%;
    max-width: 1338px;
}

@media screen and (min-width: 1347px) {
    /* columns start level with Contact Us (live: 24px lower) */
    .fs-footer--2026 .menus {
        padding-top: 0;
        justify-content: flex-start;
    }

    /* the design keeps the footer 527 tall: bottom bar text at y ≈ 499 */
    .fs-footer--2026 .menus {
        min-height: 422.5px; /* border-box: includes the 36px bottom padding */
    }

    /* social icons ~10px higher than live (glyphs at y 152–171) */
    .fs-footer--2026 .fs-social-icons {
        margin-top: 41px;
    }

    /* column x 429, 603, 777, 981, 1135, 1269 */
    .fs-footer--2026 .menus .menu-column:nth-of-type(n) {
        flex: none;
    }

    .fs-footer--2026 .menus .menu-column:nth-of-type(1),
    .fs-footer--2026 .menus .menu-column:nth-of-type(2) {
        width: 174px;
    }

    .fs-footer--2026 .menus .menu-column:nth-of-type(3) {
        width: 204px;
    }

    .fs-footer--2026 .menus .menu-column:nth-of-type(4) {
        width: 154px;
    }

    .fs-footer--2026 .menus .menu-column:nth-of-type(5) {
        width: 134px;
    }

    .fs-footer--2026 .menus .menu-column:nth-of-type(6) {
        width: 120px;
    }
}
