/* =====================================================
   SX MEGA MENU STYLES
   Matches Figma design: cream bg, orange bottom border,
   Inter font, no column dividers
   ===================================================== */

/* ── Wrapper ───────────────────────────────────────── */
.sx-megamenu-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    z-index: 99998;
    pointer-events: none;
}

/* ── Panel (each mega menu dropdown) ───────────────── */
/* Tripled specificity to beat Divi's CSS resets */
div.sx-megamenu-panel.sx-megamenu-panel,
.sx-megamenu-wrapper .sx-megamenu-panel {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;

    /* Figma: cream background + orange bottom accent */
    background: #F5F3ED !important;
    border: none !important;
    border-bottom: 3px solid #F05407 !important;
    border-radius: 0px !important;
    -webkit-border-radius: 0px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08),
        0 2px 6px rgba(0, 0, 0, 0.04) !important;

    padding: 36px 40px 32px;
    pointer-events: none;
    z-index: 99999;
}

div.sx-megamenu-panel.sx-megamenu-panel.is-active,
.sx-megamenu-wrapper .sx-megamenu-panel.is-active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto;
}

/* ── Per-panel widths (from Figma) ─────────────────── */
.sx-megamenu-panel[data-megamenu="products"] {
    width: 543px;
}

.sx-megamenu-panel[data-megamenu="solutions"] {
    /*     width: 618px; */
	width: 448px;
}

.sx-megamenu-panel[data-megamenu="company"] {
/*     width: 777px; */
	 width: 363px;
}

/* ── Inner layout (columns) ────────────────────────── */
.sx-megamenu-inner {
    display: flex;
    gap: 0;
    align-items: flex-start;
}

/* Left column: product links */
.sx-megamenu-col--products {
    flex: 1 1 58%;
    padding-right: 32px;

    /* No divider — matches Figma */
    border-right: none;

    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Stats column(s) */
.sx-megamenu-col--stats {
    flex: 0 0 auto;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 18px;
    min-width: 120px;
}


/* ── Product item ──────────────────────────────────── */
.sx-megamenu-product {
    display: block;
    text-decoration: none !important;
    padding: 4px 0;
    transition: opacity 0.2s ease;
}

.sx-megamenu-product:hover {
    /*opacity: 0.75;*/
}

/* Title: Inter Bold 24px #000 */
.sx-megamenu-product__title {
    display: block;
    font-family: 'Inter', 'visbibold', Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    line-height: 28px;
    margin-bottom: 6px;
}

/* Description: Inter Regular 16px #000 */
.sx-megamenu-product__desc {
    display: block;
    font-family: 'Inter', 'visbiregular', Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
    line-height: 20px;
}


/* ── Stat item ─────────────────────────────────────── */
.sx-megamenu-stat {
    display: flex;
    flex-direction: column;
}

/* Stat number: muted gold/brown */
.sx-megamenu-stat__number {
    font-family: 'Inter', 'visbibold', Helvetica, Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #a09078;
    line-height: 1.1;
}

/* Stat label: lighter gray */
.sx-megamenu-stat__label {
    font-family: 'Inter', 'visbiregular', Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #908a80;
    line-height: 1.35;
    margin-top: 2px;
}


/* ── Company panel (3 columns — wider) ─────────────── */
.sx-megamenu-panel[data-megamenu="company"] {
    max-width: 800px;
/*     min-width: 700px; */
    min-width: 363px;
}

/* Extra stats column — no border, just left padding */
.sx-megamenu-col--stats-extra {
    padding-left: 28px;
    border-left: none;
}


/* ── Get Started panel (links-only, no stats) ──────── */
.sx-megamenu-panel[data-megamenu="get_started"] {
    width: auto;
    min-width: 280px;
    max-width: 360px;
    padding: 28px 32px 24px;
}

/* Links-only layout — single column, no stats */
.sx-megamenu-panel[data-megamenu="get_started"] .sx-megamenu-inner {
    flex-direction: column;
    gap: 0;
}

.sx-megamenu-panel[data-megamenu="get_started"] .sx-megamenu-col--products {
    padding-right: 0;
    gap: 20px;
}

/* Hide empty stats columns in Get Started */
.sx-megamenu-panel[data-megamenu="get_started"] .sx-megamenu-col--stats {
    display: none;
}

/* Title styling — bolder for CTA feel */
.sx-megamenu-panel[data-megamenu="get_started"] .sx-megamenu-product__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 22px;
    color: #1a1a1a;
    margin-bottom: 4px;
}

/* Description — smaller muted text */
.sx-megamenu-panel[data-megamenu="get_started"] .sx-megamenu-product__desc {
    font-size: 14px;
    font-weight: 400;
    color: #6b6560;
    line-height: 18px;
}

/* Divider between links */
.sx-megamenu-panel[data-megamenu="get_started"] .sx-megamenu-product+.sx-megamenu-product {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 16px;
}



/* ── Standalone Get Started mobile panel ───────────────
   This element is appended to <body> by JS (initGetStartedButton)
   so it bypasses the .sx-megamenu-wrapper display:none on mobile ── */
.sx-gs-mobile-panel {
    position: fixed;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
    z-index: 99999;
    background: #F5F3ED;
    border-bottom: 3px solid #F05407;
    border-radius: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.10), 0 2px 6px rgba(0, 0, 0, 0.06);
    padding: 24px 28px 20px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    pointer-events: none;
}

.sx-gs-mobile-panel.is-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Layout: single column, no stats */
.sx-gs-mobile-panel .sx-megamenu-inner {
    flex-direction: column;
    gap: 0;
}

.sx-gs-mobile-panel .sx-megamenu-col--products {
    padding-right: 0;
    gap: 16px;
    display: flex;
    flex-direction: column;
}

.sx-gs-mobile-panel .sx-megamenu-col--stats {
    display: none;
}

/* Link item */
.sx-gs-mobile-panel .sx-megamenu-product {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    padding: 10px 0 !important;
    text-decoration: none !important;
    gap: 0 !important;
}

.sx-gs-mobile-panel .sx-megamenu-product+.sx-megamenu-product {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.sx-gs-mobile-panel .sx-megamenu-product__title {
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 20px;
    margin-bottom: 3px;
    display: block;
}

.sx-gs-mobile-panel .sx-megamenu-product__desc {
    font-family: 'Inter', Helvetica, Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #6b6560;
    line-height: 17px;
    display: block;
}

.sx-gs-mobile-panel .sx-megamenu-product__title:hover,
.sx-gs-mobile-panel .sx-megamenu-product:hover .sx-megamenu-product__title {
    color: #F05407;
}

/* =====================================================
   MOBILE / TABLET (≤ 980px)
   Premium slide-out panel + mega menu accordion
   Uses JS-managed .sx-open class (bypasses Divi slideToggle)
   ===================================================== */
@media (max-width: 980px) {

    /* Hide the fixed-position desktop panels on mobile */
    .sx-megamenu-wrapper {
        display: none !important;
    }

    /* ── Overlay hidden — not needed for full-width menu ── */
    .sx-mobile-overlay,
    .sx-mobile-overlay.is-visible {
        display: none !important;
    }

    /* ── Slide-out panel ──────────────────────────────── */
    .et_mobile_menu.sx-open {
        display: flex !important;
        flex-direction: column !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin: 0 !important;
        padding: 56px 28px 40px !important;
        background: #F5F3ED !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        z-index: 99995 !important;
        transform: translateX(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        /* Hide scrollbar for clean look */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .et_mobile_menu.sx-open::-webkit-scrollbar {
        display: none;
    }

    /* Slide-out transition */
    .et_mobile_menu.sx-animated {
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    /* Closed state with animation class */
    .et_mobile_menu.sx-animated:not(.sx-open) {
        transform: translateX(100%) !important;
    }

    /* Body scroll lock */
    body.sx-menu-open {
        overflow: hidden !important;
    }

    /* ── Close button ────────────────────────────────── */
    .sx-mobile-close {
        position: absolute;
        top: 20px;
        right: 24px;
        width: 36px;
        height: 36px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }

    .sx-mobile-close::before,
    .sx-mobile-close::after {
        content: "";
        position: absolute;
        width: 22px;
        height: 1.5px;
        background-color: #8a8578;
        transition: background-color 0.2s ease;
    }

    .sx-mobile-close::before {
        transform: rotate(45deg);
    }

    .sx-mobile-close::after {
        transform: rotate(-45deg);
    }

    .sx-mobile-close:hover::before,
    .sx-mobile-close:hover::after,
    .sx-mobile-close:active::before,
    .sx-mobile-close:active::after {
        background-color: #1a1a1a;
    }

    /* ── Menu items ────────────────────────────────── */
    .et_mobile_menu li {
        padding: 0 !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
        background: none !important;
        list-style: none !important;
    }

    .et_mobile_menu li:last-child {
        border-bottom: none !important;
    }

    .et_mobile_menu li a {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 20px 0 !important;
        font-family: 'Inter', Helvetica, Arial, sans-serif !important;
        font-size: 17px !important;
        font-weight: 500 !important;
        color: #1a1a1a !important;
        text-decoration: none !important;
        text-transform: none !important;
        letter-spacing: -0.01em !important;
        line-height: 1.35 !important;
        background: none !important;
        border: none !important;
        transition: color 0.25s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }

    .et_mobile_menu li a:hover,
    .et_mobile_menu li a:active {
        color: #F05407 !important;
    }



    /* ── Expanded item: text turns orange ─────────── */
    /* High specificity needed to beat Divi's .et_pb_menu_* generated selectors */
    body .et_pb_menu .et_mobile_menu li.has-megamenu.is-expanded>a,
    body .et_mobile_menu li.has-megamenu.is-expanded>a,
    .et_mobile_menu li.has-megamenu.is-expanded>a {
        color: #F05407 !important;
    }

    /* ── Chevron arrows ──────────────────────────────── */
    .et_mobile_menu li.has-megamenu>a::after {
        content: "";
        display: inline-block;
        width: 10px;
        height: 10px;
        border-right: 1.5px solid #8a8578;
        border-bottom: 1.5px solid #8a8578;
        transform: rotate(45deg);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
            border-color 0.25s ease;
        flex-shrink: 0;
        margin-left: 16px;
        margin-bottom: 2px;
    }

    .et_mobile_menu li.has-megamenu.is-expanded>a::after {
        transform: rotate(-135deg);
        margin-bottom: -3px;
        border-color: #F05407;
    }

    /* ── Hide Divi default sub-menu arrows ────────── */
    .et_mobile_menu .menu-item-has-children>a::after,
    .mobile_menu_bar_toggle::after {
        display: none !important;
    }

    /* ── Login button ────────────────────────────────── */
    .et_mobile_menu li.menu-login,
    .et_mobile_menu li:last-child:not(.has-megamenu) {
        border-bottom: none !important;
        margin-top: 40px !important;
        padding-top: 0 !important;
    }

    .et_mobile_menu li.menu-login>a,
    .et_mobile_menu li:last-child:not(.has-megamenu)>a {
        display: inline-flex !important;
        justify-content: center !important;
        padding: 13px 36px !important;
        border: 1.5px solid #c5bfb4 !important;
        border-radius: 999px !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        color: #1a1a1a !important;
        width: auto !important;
        letter-spacing: 0 !important;
        transition: border-color 0.25s ease,
            color 0.25s ease,
            background-color 0.25s ease !important;
    }

    .et_mobile_menu li.menu-login>a:hover,
    .et_mobile_menu li.menu-login>a:active,
    .et_mobile_menu li:last-child:not(.has-megamenu)>a:hover,
    .et_mobile_menu li:last-child:not(.has-megamenu)>a:active {
        border-color: #F05407 !important;
        color: #F05407 !important;
    }

    /* Remove chevron from Login */
    .et_mobile_menu li.menu-login>a::after,
    .et_mobile_menu li:last-child:not(.has-megamenu)>a::after {
        display: none !important;
    }

    /* ── Hide Divi default mobile sub-menu ────────── */
    .et_mobile_menu .sub-menu {
        display: none !important;
    }

    /* ═════════════════════════════════════════════════
       MEGA MENU ACCORDION CONTENT
       ═════════════════════════════════════════════════ */

    /* ── Mobile mega menu accordion content ─────────── */
    .sx-megamenu-mobile {
        display: none;
        padding: 4px 0 24px;
        background-color: transparent;
        border-radius: 0;
        border-bottom: none;
        margin: 0;
        overflow: hidden;
    }

    .sx-megamenu-mobile.is-open {
        display: block;
    }

    /* Layout: stack columns vertically */
    .sx-megamenu-mobile .sx-megamenu-inner {
        flex-direction: column;
        gap: 0;
    }

    /* Products column — no borders */
    .sx-megamenu-mobile .sx-megamenu-col--products {
        padding-right: 0;
        border-right: none;
        border-bottom: none;
        padding-bottom: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    /* Stats row — horizontal layout */
    .sx-megamenu-mobile .sx-megamenu-col--stats {
        padding-left: 0;
        padding-top: 20px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 40px;
        row-gap: 16px;
        display: none;
    }

    /* Extra stats row — two-column layout (Company panel — 500+, 50M+) */
    .sx-megamenu-mobile .sx-megamenu-col--stats-extra {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        padding-left: 0;
        padding-top: 40px;
        border-left: none;
        gap: 24px;
        row-gap: 16px;
        display: none;
    }

    /* Extra stat items: two equal columns */
    .sx-megamenu-mobile .sx-megamenu-col--stats-extra .sx-megamenu-stat {
        flex: 1 1 calc(50% - 12px);
        min-width: 0;
    }

    .sx-megamenu-mobile .sx-megamenu-stat {
        min-width: 70px;
    }

    /* Product/solution item — override parent .et_mobile_menu li a flex */
    .sx-megamenu-mobile .sx-megamenu-product {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: 14px 0 !important;
        text-decoration: none !important;
        gap: 0 !important;
    }

    /* ── Product titles — Figma: Inter Bold 24/28 #000 ── */
    .sx-megamenu-mobile .sx-megamenu-product__title {
        font-family: 'Inter', Helvetica, Arial, sans-serif;
        font-size: 24px;
        font-weight: 700;
        line-height: 28px;
        color: #000000;
        letter-spacing: 0;
        margin-bottom: 4px;
    }

    /* ── Descriptions — Figma: Inter Regular 16/20 #000 ── */
    .sx-megamenu-mobile .sx-megamenu-product__desc {
        font-family: 'Inter', Helvetica, Arial, sans-serif;
        font-size: 16px;
        font-weight: 400;
        line-height: 20px;
        color: #000000;
        margin-top: 0;
    }

    /* ── Stat numbers — Figma: Inter Bold 30/34 #9B9482 ── */
    .sx-megamenu-mobile .sx-megamenu-stat__number {
        font-family: 'Inter', Helvetica, Arial, sans-serif;
        font-size: 30px;
        font-weight: 700;
        color: #9B9482;
        line-height: 34px;
        letter-spacing: 0;
    }

    /* ── Stat labels — Figma: Inter Regular 16/20 #9B9482 ── */
    .sx-megamenu-mobile .sx-megamenu-stat__label {
        font-family: 'Inter', Helvetica, Arial, sans-serif;
        font-size: 16px;
        font-weight: 400;
        color: #9B9482;
        line-height: 20px;
        margin-top: 2px;
    }

    /* Toggle arrow on parent menu item */
    .has-megamenu>a {
        position: relative;
    }
}

/* =====================================================
   DESKTOP: hide default Divi sub-menu for mega menu items
   ===================================================== */
@media (min-width: 981px) {
    .has-megamenu>.sub-menu {
        display: none !important;
    }

    /* Remove Divi's opacity fade on menu link hover */
    .et-menu a:hover {
        opacity: 1 !important;
		transition: unset !important;
    }

    /* ── Dropdown chevron arrows ────────────────────── */
    li.menu-item.has-megamenu>a::after {
        content: "";
        display: inline-block;
        width: 6px;
        height: 6px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(45deg);
        margin-left: 6px;
        margin-bottom: 3px;
        transition: transform 0.25s ease, border-color 0.25s ease, color 0.25s ease;
        vertical-align: middle;
    }

    /* Active state: arrow flips up + orange text & arrow */
    .top-menu .et_pb_menu__menu>nav>ul>li.has-megamenu[aria-expanded="true"]>a,
    li.menu-item.has-megamenu[aria-expanded="true"]>a,
    body .et_pb_menu li.has-megamenu[aria-expanded="true"]>a {
        color: #F05407 !important;
    }

    li.menu-item.has-megamenu[aria-expanded="true"]>a::after,
    .top-menu li.has-megamenu[aria-expanded="true"]>a::after {
        transform: rotate(-135deg);
        margin-bottom: -1px;
        border-color: #F05407 !important;
    }
}

.sx-megamenu-product:hover .sx-megamenu-product__title,
li#menu-item-20 a:hover {
    color: #F05407;

}