/* =========================================
   HEADER CSS — template-parts/hiver-header.php
========================================= */

 .hiver-header {
    position: fixed;
    top: var(--wp-admin--admin-bar--height, 0px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    border-top: 0;
    border-bottom: 1px solid rgba(16, 24, 40, .10);
    transition: border-color .35s ease;
    background: transparent;
    border-top: 0;
    border-bottom: 1px solid rgba(16, 24, 40, .10);
}
/* Transparent effect */
.hiver-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: rgba(255, 255, 255, .62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 8px 30px rgba(16, 24, 40, .10);
    -webkit-backdrop-filter: blur(26px) saturate(180%) brightness(1.05);
    backdrop-filter: blur(26px) saturate(180%) brightness(1.05);
}
/* Transparent effect */
.hiver-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: rgba(255, 255, 255, .62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 8px 30px rgba(16, 24, 40, .10);
    -webkit-backdrop-filter: blur(26px) saturate(180%) brightness(1.05);
    backdrop-filter: blur(26px) saturate(180%) brightness(1.05);
    transition: opacity .35s ease;
}
@supports (container-type: scroll-state) {
    html {
        container-type: scroll-state;
    }
        .hiver-header {
        border-bottom-color: transparent;
    }
    .hiver-header::before {
        opacity: 0;
    }
    @container scroll-state(scrollable: top) {
        .hiver-header {
            border-bottom-color: rgba(16, 24, 40, .10);
        }
        .hiver-header::before {
            opacity: 1;
        }
}  
}
.hiver-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------- Bar ---------- */

.hiver-header__actions {
    display: none;
}
.hiver-header__bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 72px;
}
.hiver-header__brand {
    display: flex;
    flex-shrink: 0;
    margin-right: auto;
    color: var(--black);
}
.hiver-header__logo {
    display: block;
    width: auto;
    height: 32px;
}
.hiver-header .hiver-header__cta {
    flex-shrink: 0;
}

/* ---------- Links (shared) ---------- */

.hiver-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.hiver-nav__arrow {
    flex-shrink: 0;
    color: var(--text-disabled);
}
.hiver-nav__link {
    align-items: center;
    gap: var(--space-xs);
    padding: 7px 12px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background var(--dur-2) var(--ease-out);
}

.navDemoMobile{
    display: none;
}

@media (max-width: 767px) {
    .hiver-header__drawer {
        padding: var(--space-xs) var(--space-sm) var(--space-md) !important;
    }
    .navDemoMobile{
        width: 120px;
    }
}

@media (max-width: 1024px) {
    .navDemoMobile{
        display: flex;
    }

    .hiver-header {
        border-bottom: transparent;
    }
    html:has(.hiver-header__switch:checked) {
        overflow: hidden;
    }
    .hiver-header:has(.hiver-header__switch:checked) {
        height: 100%;
        background-color: var(--white);
        box-shadow: none;
    }
    .hiver-header .hiver-header__cta--bar {
        width: 154px;
    }
    .hiver-header:has(.hiver-header__switch:checked) .hiver-header__cta--bar {
        display: none;
    }

    /* Menu button → X in the same 20px box */
    .hiver-header__toggle {
        position: relative;
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        color: var(--black);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .hiver-header__toggle::before {       
        content: "";
        position: absolute;
        inset: -12px;
    }
    .hiver-header__toggle span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 1.5px;
        border-radius: 1px;
        background: currentColor;
        transition: transform var(--dur-2) var(--ease-out), opacity var(--dur-1) linear;
    }
    .hiver-header__toggle span:nth-child(1) { top: 3px; }
    .hiver-header__toggle span:nth-child(2) { top: 9px; }
    .hiver-header__toggle span:nth-child(3) { top: 15px; }

    .hiver-header__switch:checked + .hiver-header__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg) scaleX(.85); }
    .hiver-header__switch:checked + .hiver-header__toggle span:nth-child(2) { opacity: 0; }
    .hiver-header__switch:checked + .hiver-header__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg) scaleX(.85); }

    /* Full-width panel under the bar */
    .hiver-header__drawer {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100dvh - 72px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 0 50px;
        background: var(--white);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition:
            opacity var(--dur-2) var(--ease-out),
            transform var(--dur-2) var(--ease-out),
            visibility 0s linear var(--dur-2);
    }
    .hiver-header:has(.hiver-header__switch:checked) .hiver-header__drawer {
        opacity: 1;
        visibility: visible;
        transform: none;
        transition-delay: 0s;
    }

    /* Stacked rows */
    .hiver-nav__item{
        border-bottom: 1px solid var(--border-subtle);
    }
    .hiver-nav__link {
        display: flex;
        justify-content: space-between;
        width: 100%;
        padding: var(--space-sm) 0;
    }
    .hiver-nav__label {
        flex: 1;
    }

    #hiver-nav-list .hiver-nav__item:not(.hiver-nav__item--has-mega) svg{
        display: none !important;
    }
}

@media (min-width: 1025px) {
    .hiver-header__bar {
        gap: 20px;
    }
    .hiver-header__brand {
        margin-right: 0;
    }
    .hiver-header__toggle,
    .hiver-header__cta--bar,
    .hiver-nav__arrow {
        display: none;
    }

    /* Mark · links · spacer · Sign in · CTA */
    .hiver-header__drawer,
    .hiver-nav,
    .hiver-nav__list,
    .hiver-nav__item {
        display: flex;
        align-self: stretch;
    }
    .hiver-header__drawer {
        flex: 1;
        align-items: center;
    }
    .hiver-nav__list {
        gap: 4px;
    }
    .hiver-nav__item {
        align-items: center;
    }
    .hiver-nav__link:hover {
        color: var(--black);
        background-color: rgba(11, 12, 12, 0.06);
        border-radius: 999px;
    }

    .hiver-header__actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-left: auto;
    }
    .hiver-header .hiver-header__cta {
        width: 200px;
    }
    .hiver-header__actions .demo-signup-dual{
        gap: 8px;
    }
}

@media (min-width: 1400px) {
    .hiver-header .hiver-header__cta {
        width: 220px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hiver-header,
    .hiver-header * {
        transition-duration: 0s !important;
        transition-delay: 0s !important;
    }
    .hiver-header {
        transition: opacity .2s linear !important; 
    }
}

/* ------------------------------------ Mega menu hover effect - Start ------------------------------------ */
.hiver-nav__item--has-mega.is-open > .hiver-nav__link {
    background: rgba(11, 12, 12, 0.06);
    color: var(--black);
    border-radius: 999px;
}
/* Hide panels until mega-menu.js moves them into the shell */
.hiver-nav__item--has-mega > .hiver_mega {
    display: none;
}
.hiver_mega_shell {
    --hiver-mega-ease: var(--ease-out, cubic-bezier(0.22, 0.61, 0.36, 1));
    position: absolute;
    z-index: 60;
    left: 0;
    top: calc(100% + 8px);
    box-sizing: content-box; 
    width: 0;
    height: 0;
    overflow: hidden;
    background: var(--white, #fff);
    border: 1px solid var(--border-default, #e5e7eb);
    border-radius: 20px;
    box-shadow: 0 22px 54px -28px rgba(3, 4, 7, 0.3);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
    opacity 160ms var(--hiver-mega-ease),
    visibility 0s linear 160ms,
    left 520ms var(--hiver-mega-ease),
    width 520ms var(--hiver-mega-ease),
    height 520ms var(--hiver-mega-ease);
}
.hiver_mega_shell.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition:
    opacity 200ms var(--hiver-mega-ease),
    left 520ms var(--hiver-mega-ease),
    width 520ms var(--hiver-mega-ease),
    height 520ms var(--hiver-mega-ease);
}
.hiver_mega_body {
    position: absolute;
    top: 0;
    left: 0;
}
/* Each menu's content. All leaves stay laid out (so JS can measure them);
   only the active one is visible/clickable. */
.hiver_mega_leaf {
    position: absolute;
    top: 0;
    left: 0;
    width: max-content;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms linear, visibility 0s linear 200ms;
}
.hiver_mega_leaf.is-on {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 200ms linear, visibility 0s;
}
.hiver_mega_leaf .hiver_mega_stagger {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
}
.hiver_mega_leaf.is-on .hiver_mega_stagger {
    opacity: 1;
    transform: none;
    transition:
    opacity 560ms var(--hiver-mega-ease),
    transform 560ms var(--hiver-mega-ease);
    transition-delay: calc(60ms + var(--i, 0) * 140ms);
}
/* The shell owns the box; strip it from the panels (beats your #id rules). */
.hiver_mega_leaf .hiver_mega {
    position: static !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: none !important;
    overflow: visible !important;
}
/* Hook for your trigger styling while its menu is open. */
.hiver-nav__item--has-mega.is-open > .hiver-nav__link .hiver-nav__arrow {
    transform: rotate(90deg);
}
/* Desktop-only: below the drawer breakpoint the shell is off. */
@media (max-width: 1024px) {
    .hiver_mega_shell { display: none; }
    .hiver-nav__item--has-mega > .hiver_mega {
        position: static !important;
        width: auto !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    .hiver-nav__item--has-mega.is-open > .hiver-nav__link {
        background: transparent;
        border-bottom: 1px solid var(--border-subtle);
        border-radius: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .hiver_mega_shell,
    .hiver_mega_leaf,
    .hiver_mega_leaf .hiver_mega_stagger {
        transition-duration: 1ms !important;
        transition-delay: 0s !important;
    }
}
/* ------------------------------------ Mega menu hover effect - End ------------------------------------ */

/************************** Mega menu item styling ****************************/
.hiver-nav__list .hiver-nav__item.hiver-nav__item--has-mega{
    position: relative;
    z-index: 1;
}
.hiver_mega{
    border-radius: 20px;
    border: 1px solid var(--border-default);
    background: var(--white);
    box-shadow: 0 22px 54px -28px rgba(3, 4, 7, .3);
    position: absolute;
    left: 0;
    top: 80px;
    overflow: hidden;
}
.hiver_mega .hiver_mega_inner a.has_icon {
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    transition: background var(--dur-2) var(--ease-out);
}
.hiver_mega .hiver_mega_inner a.has_icon > span{
    color: var(--black);
}
.hiver_mega .hiver_mega_inner a.has_icon.dbl{
    align-items: flex-start;
}
.hiver_mega_inner a.dbl > span{
    color: var(--black);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hiver_mega_inner a.dbl > span span{
    color: var(--text-muted);
}
.hiver_mega .hiver_mega_inner a.has_icon:hover {
    background: var(--surface-base);
}
.hiver_mega .hiver_mega_inner a.has_icon:hover > span{
    font-weight: 600;
}
.hiver_mega .hiver_mega_inner a.has_icon:hover span span{
    color: var(--text-secondary);
}
.hiver_mega .hiver_mega_inner a.has_icon .icon {
    border-radius: 9px;
    border: 1px solid var(--border-default);
    background: var(--surface-base);
    display: flex;
    width: 30px;
    height: 30px;
    padding: 6px 7px;
}
.hiver_mega .textButton{
    width: max-content;
}
.hiver_mega .mega_menu_heading{
    margin: 0 0 16px 10px;
}
.hiver_mega .menu_row{
    display: grid;
    gap: 0;
}
.hiver_mega .menu_row .menu_col {
    padding: 28px 24px;
}
.hiver_mega .nav_case_study{
    padding: 30px 30px 24px;
}
.hiver_mega .nav_case_study .logo{
    width: auto;
    height: 32px;
    margin-bottom: 34px;
}
.hiver_mega .nav_case_study h4{
    color: var(--black);
    margin-bottom: 16px;
}
.hiver_mega .nav_case_study p{
    color: var(--text-muted);
    margin-bottom: 34px;
}
.hiver_mega .nav_customer_details{
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
}
.hiver_mega .nav_customer_details img{
    width: auto;
    height: 120px;
}
.hiver_mega .nav_customer_details > span{
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px 16px 30px;
}
@media(max-width: 1024px){
    .hiver_mega .menu_row {
        grid-template-columns: 1fr !important;
    }
    .hiver_mega .menu_row .menu_col {
        padding: 20px 20px 0 20px !important;
    }
}
@media(max-width: 767px){
    .hiver_mega .menu_row .menu_col {
        padding: 20px 0 0 !important;
    }
}

/* Products Mega Menu */
#hiver-mega-products{
    width: 1200px;
}
#hiver-mega-products .hiver_mega_inner > .menu_row {
    grid-template-columns: 1fr 2fr;
}
#hiver-mega-products .hiver_mega_inner > .menu_row > .menu_col:first-child {
    border-right: 1px solid var(--border-subtle);
    background: var(--surface-base);
}
#hiver-mega-products .hiver_mega_inner > .menu_row > .menu_col:first-child .textButton{
    margin: 18px 0 0 10px;
}
#hiver-mega-products .hiver_mega_inner > .menu_row  > .menu_col:first-child a.has_icon:hover{
    background: var(--white);
}
#hiver-mega-products .hiver_mega_inner > .menu_row  > .menu_col:last-child{
    padding: 0 !important;
}
#hiver-mega-products .hiver_mega_inner > .menu_row  > .menu_col .menu_row {
    grid-template-columns: 1fr 1fr;
}
@media(max-width: 1700px){
    #hiver-mega-products{
        width: 1000px;
    }
}
@media(max-width: 1024px){
    #hiver-mega-products .hiver_mega_inner > .menu_row > .menu_col:first-child {
        border-right: none;
        background: var(--white);
    }
}

/* Solutions Mega Menu */
#hiver-mega-solutions{
    width: 1200px;
}
#hiver-mega-solutions .hiver_mega_inner > .menu_row {
    grid-template-columns: 2fr 1fr;
}
#hiver-mega-solutions .hiver_mega_inner > .menu_row > .menu_col:last-child {
    border-left: 1px solid var(--border-subtle);
    background: var(--surface-base);
}
#hiver-mega-solutions .hiver_mega_inner > .menu_row  > .menu_col{
    padding: 0 !important;
}
#hiver-mega-solutions .hiver_mega_inner > .menu_row  > .menu_col .menu_row {
    grid-template-columns: 1fr 1fr;
}
@media(max-width: 1700px){
    #hiver-mega-solutions{
        width: 1000px;
    }
}
@media(max-width: 1024px){
    #hiver-mega-solutions .hiver_mega_inner > .menu_row > .menu_col:last-child {
        display: none;
    }
}

/* Customers Mega Menu */
#hiver-mega-customers{
    width: 800px;
}
#hiver-mega-customers .hiver_mega_inner .menu_row {
    grid-template-columns: 1fr 1fr;
}
#hiver-mega-customers .hiver_mega_inner .menu_row .menu_col:first-child{
    position: relative;
}
#hiver-mega-customers .hiver_mega_inner .menu_row .menu_col:first-child a.textButton{
    position: absolute;
    bottom: 38px;
    left: 34px;
}
#hiver-mega-customers .hiver_mega_inner .menu_row .menu_col:last-child {
    border-left: 1px solid var(--border-subtle);
    background: var(--surface-base);
    padding: 0 !important;
}
@media(max-width: 1700px){
    #hiver-mega-customers{
        width: 760px;
    }
}
@media(max-width: 1024px){
    #hiver-mega-customers .hiver_mega_inner .menu_row .menu_col:first-child a.textButton{
        position: unset;
        margin-top: 26px;
    }
    #hiver-mega-customers .hiver_mega_inner .menu_row .menu_col:last-child {
        display: none;
    }
}

/* Resources Mega Menu */
#hiver-mega-resources{
    width: 1245px;
}
#hiver-mega-resources .hiver_mega_inner .menu_row {
    grid-template-columns: 1.1fr 0.6fr 0.8fr 1.2fr;
}
#hiver-mega-resources .hiver_mega_inner .menu_row .inTitle{
    margin-top: 28px;
}
#hiver-mega-resources .hiver_mega_inner .menu_row .menu_col:last-child {
    background: var(--black);
    padding: 0 !important;
}
#hiver-mega-resources .hiver_mega_inner .menu_row .menu_col:last-child img{
    width: auto;
    height: 375px;
}
#hiver-mega-resources .hiver_mega_inner .menu_row .menu_col:last-child .textButton{
    color: var(--white);
    margin: 21px 0 21px 24px;
}
#hiver-mega-resources .hiver_mega_inner .menu_row .menu_col:last-child .textButton::after{
    background:var(--white);
}
#hiver-mega-resources .hiver_mega_inner .menu_row .menu_col:last-child .textButton:hover{color:var(--white)}
@media(max-width: 1700px){
    #hiver-mega-resources{
        width: 1160px;
    }
}
@media(max-width: 1024px){
    #hiver-mega-resources .hiver_mega_inner .menu_row .menu_col:last-child {
        display: none;
    }
}

/* Signin Mega menu */
#hiver-mega-signin{
    width: 300px;
}
#hiver-mega-signin .hiver_mega_inner{
    padding: 20px;
}