/* ============================================================
   Best Insurance Header Widget
   ============================================================ */

/* Site-wide: the mobile nav drawer below is a position:fixed box shifted
   off-screen via transform:translateX(100%). Nothing clips a fixed element
   positioned beyond the viewport, so it was enlarging the page's own
   horizontal scrollable area on every page - letting the "closed" drawer
   peek in at the right edge on load/scroll. This theme has no site-wide
   overflow-x guard, so it's added here since this stylesheet loads on
   every page via the header widget. */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Reset box model inside the widget */
.bih-header-wrap *,
.bih-header-wrap *::before,
.bih-header-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    line-height: 0px;
}

/* ── Shared typography base ───────────────────────────────── */
.bih-header-wrap {
    font-family: 'Poppins', sans-serif;
    width: 100%;
}

/* ══════════════════════════════════════════════════════════
   TOP BAR
   ══════════════════════════════════════════════════════════ */
.bih-top-bar {
    background-color: #011B22;
    width: 100%;
}

.bih-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1340px;
    margin: 0 auto;
    padding: 10px 24px;
    gap: 16px;
}

/* ── Left: tabs ───────────────────────────────────────────── */
.bih-top-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.bih-tab {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: -0.5px;
    color: #CCCCCC;
    text-decoration: none;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.bih-tab--active {
    color: #FFFFFF;
    border-bottom-color: #EB8D1D;
    font-weight: 600;
}

.bih-tab:hover {
    color: #FFFFFF;
}

/* ── Center: notice ──────────────────────────────────────── */
.bih-top-center {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    flex-wrap: wrap;
}

.bih-notice-emoji {
    font-size: 14px;
    line-height: 1;
}

.bih-notice-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: -0.5px;
    color: #FFFFFF;
}
.bih-top-left a.bih-tab {
    padding: 13px 15px;
}

.bih-notice-link {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: -0.5px;
    color: #3FD5FF;
    text-decoration: underline !important;
    white-space: nowrap;
}

.bih-notice-link:hover {
  
    text-decoration: underline;
}

/* ── Right: phone ────────────────────────────────────────── */
.bih-top-right {
    flex-shrink: 0;
}

.bih-phone {
    display: flex;
    gap: 8px;
    text-decoration: none;
}

.bih-phone-icon {
    flex-shrink: 0;
}

.bih-phone-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bih-phone-number {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: -0.5px;
    color: #FFFFFF;
}

.bih-phone-hours {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 10px;
    line-height: 100%;
    letter-spacing: -0.5px;
    color: #A9BBC0;
        padding-top: 5px;
}

/* ══════════════════════════════════════════════════════════
   MAIN HEADER
   ══════════════════════════════════════════════════════════ */
.bih-main-header {
    background-color: #FFFFFF;
    width: 100%;
}

.bih-main-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1340px;
    margin: 0 auto;
    padding: 14px 24px;
    gap: 24px;
}

/* ── Logo ────────────────────────────────────────────────── */
.bih-logo a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.bih-logo-img {
    max-height: 48px;
    width: auto;
    display: block;
}

.bih-logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 26px;
    line-height: 1;
}

.bih-logo-part1 {
    color: #0485A9;
}

.bih-logo-part2 {
    color: #EB8D1D;
}

/* ── Navigation ─────────────────────────────────────────── */
.bih-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.bih-nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.bih-nav-item {
    position: relative;
}

.bih-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: -0.5px;
    color: #1A1A1A;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.bih-nav-link:hover {
    background-color: #333333;
    color: #FFFFFF;
}

.bih-nav-arrow {
    transition: transform 0.2s;
}

.bih-nav-link:hover .bih-nav-arrow {
    transform: rotate(180deg);
}

/* ── CTA Button ──────────────────────────────────────────── */
.bih-cta {
    flex-shrink: 0;
}

.bih-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #0485A9;
    color: #FFFFFF;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 100%;
    letter-spacing: -0.5px;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    transition: background-color 0.25s, gap 0.25s;
    white-space: nowrap;
}

.bih-cta-btn:hover {
    background-color: #036b8a;
    gap: 16px;
}

.bih-cta-arrow {
    transition: transform 0.25s;
    flex-shrink: 0;
}

.bih-cta-btn:hover .bih-cta-arrow {
    transform: translateX(4px);
}

/* ── Mobile controls (hidden on desktop) ────────────────── */
.bih-mobile-controls {
    display: none;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .bih-top-center {
        display: none;
    }
    .bih-top-inner {
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .bih-top-bar {
        display: none;
    }
    .bih-nav {
        display: none;
    }
    .bih-cta {
        display: none;
    }
    .bih-main-inner {
        justify-content: space-between;
        padding: 10px 16px;
    }
    .bih-top-center {
        display: none;
    }
    .bih-phone-hours {
        display: none;
    }

    /* Show mobile controls */
    .bih-mobile-controls {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
    }

    /* Mobile phone button */
    .bih-mobile-phone-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border: 1px solid rgba(4, 133, 169, 0.1);
        border-radius: 50px;
        padding: 6px 12px;
        text-decoration: none;
        background: transparent;
    }
    .bih-main-header {
    padding: 0px 20px;
    border-bottom: 1px solid #00000014;
}
.bip-read-more{
    font-size: 14px;

}

    .bih-mobile-phone-label {
        font-family: 'Poppins', sans-serif;
        font-weight: 500;
        font-size: 12px;
        line-height: 100%;
        letter-spacing: -0.5px;
        color: #0485A9;
    }

    /* Divider between phone and hamburger */
    .bih-mobile-divider {
        width: 1px;
        height: 20px;
        background-color: rgba(0, 0, 0, 0.06);
        border: none;
        flex-shrink: 0;
    }

    /* Hamburger button */
    .bih-mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .bih-top-left {
        gap: 12px;
    }
    .bih-tab {
        font-size: 12px;
    }
}

/* ══════════════════════════════════════════════════════════
   MEGA MENU (Products dropdown, desktop) + simple dropdowns
   ══════════════════════════════════════════════════════════ */
body.bih-no-scroll {
    overflow: hidden;
}

.bih-nav-link span {
    line-height: 1;
}

.bih-submenu-toggle,
.bih-header-wrap button {
    -webkit-tap-highlight-color: transparent;
}

.bih-submenu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    color: #111111;
    border-radius: 0 !important;
}

.bih-submenu-toggle:hover,
.bih-submenu-toggle:focus,
.bih-submenu-toggle:focus-visible,
.bih-submenu-toggle:active {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #111111;
}

.bih-mobile-overlay,
.bih-mobile-nav-header,
.bih-mobile-cta {
    display: none;
}

.bih-mega-panel {
    display: none;
    position: fixed;
    top: 110px; /* fallback; JS locks this to the real header height */
    left: 0;
    width: 100vw;
    background: #FFFFFF;
    border: 0;
    border-top: 1px solid #E8E8E8;
    border-radius: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    z-index: 60;
    text-align: left;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}

.bih-mega-parent.is-open > .bih-mega-panel {
    display: block;
}

.bih-mega-panel-inner {
    max-width: 1340px;
    margin: 0 auto;
    padding: 20px 0 32px;
}

.bih-mega-group {
    padding: 28px 0;
}

.bih-mega-group:first-child {
    padding-top: 0;
}

.bih-mega-group + .bih-mega-group {
    border-top: 1px solid #DFE4EA;
}

.bih-mega-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.bih-mega-heading {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 22px;
    line-height: 1.3;
    letter-spacing: -0.5px;
    color: #111111;
    text-decoration: none;
}

.bih-mega-heading:hover {
    color: #0485A9;
}

.bih-mega-group .bih-submenu-toggle {
    display: none;
}

.bih-mega-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 60px;
    row-gap: 16px;
}

.bih-mega-grid a {
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: -0.3px;
    color: #333333;
    text-decoration: none;
}

.bih-mega-grid a:hover {
    color: #0485A9;
}

.bih-mega-grid--flat a {
    font-weight: 600;
    font-size: 17px;
    color: #111111;
}

.bih-simple-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #FFFFFF;
    border: 1px solid #E8E8E8;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    padding: 8px;
    z-index: 60;
    margin-top: 8px;
    text-align: left;
}

.bih-nav-item.menu-item-has-children.is-open > .bih-simple-panel,
.bih-nav-item.menu-item-has-children:hover > .bih-simple-panel {
    display: block;
}

.bih-simple-list {
    list-style: none;
}

.bih-simple-list > li {
    position: relative;
}

.bih-simple-list a {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.4;
    color: #333333;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.bih-simple-list a:hover {
    background: #F5F5F5;
    color: #0485A9;
}

/* ══════════════════════════════════════════════════════════
   MOBILE MENU DRAWER (Products accordion + top-level menu)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .bih-nav {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        inset: 0;
        height: 100dvh;
        width: 100vw;
        background: #FFFFFF;
        z-index: 100;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        padding: 0;
    }

    .bih-header-wrap.bih-mobile-open .bih-nav {
        transform: translateX(0);
    }

    .bih-mobile-overlay {
        display: none !important;
    }

    .bih-mobile-nav-header {
        display: flex;
        justify-content: flex-end;
        flex-shrink: 0;
        padding: 20px 24px;
    }

    .bih-mobile-close {
        background: none;
        border: none;
        cursor: pointer;
        color: #111111;
        padding: 4px;
        line-height: 0;
    }

    .bih-nav-list {
        flex: 1 1 auto;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 24px;
    }

    .bih-nav-item {
        position: relative;
        border-bottom: 1px solid #D9D9D9;
    }

    .bih-nav-link {
        justify-content: space-between;
        width: 100%;
        padding: 16px 32px 16px 8px;
        font-size: 18px;
        font-weight: 600;
        line-height: 1.3;
        color: #111111;
        border-radius: 0;
    }

    .bih-nav-link:hover {
        background: none;
        color: #111111;
    }

    .bih-nav-arrow {
        display: none;
    }

    .bih-submenu-toggle {
        display: inline-flex;
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        padding: 0 8px;
    }

    /* Top-level toggle (e.g. "Products") is a direct child of <li> - its
       positioned ancestor is the whole <li>, which also contains the mega
       panel. Left stretched top:0/bottom:0, opening the panel grows the
       <li> and the flex-centered arrow re-centers into the middle of the
       expanded content instead of staying by the "Products" row. Mega-group
       heading toggles (Income Protection Insurance, etc.) don't have this
       problem - their positioned ancestor is just their own small header
       row, not the row + its expandable grid. */
    .bih-nav-item > .bih-submenu-toggle {
        top: 16px;
        bottom: auto;
    }

    .bih-submenu-toggle svg {
        transition: transform 0.2s;
    }

    .is-open > .bih-submenu-toggle svg {
        transform: rotate(180deg);
    }

    .bih-mega-panel {
        display: none;
        position: static;
        top: auto;
        width: auto;
        max-height: none;
        overflow: visible;
        border: none;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
    }

    .bih-mega-parent.is-open > .bih-mega-panel {
        display: block;
    }

    .bih-mega-panel-inner {
        max-width: none;
        margin: 0;
        padding: 0 0 8px;
    }

    .bih-mega-group {
        position: relative;
        padding: 0;
        border-bottom: 1px solid #D9D9D9;
    }

    .bih-mega-group + .bih-mega-group {
        border-top: none;
    }

    .bih-mega-group-head {
        padding: 16px 32px 16px 8px;
        margin-bottom: 0;
        position: relative;
    }

    .bih-mega-heading {
        font-size: 18px;
    }

    .bih-mega-group .bih-submenu-toggle {
        display: inline-flex;
        top: 0;
        bottom: 0;
        padding: 0 8px;
    }

    .bih-mega-grid {
        display: none;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0 0 12px 12px;
    }

    .bih-mega-group.is-open .bih-mega-grid {
        display: grid;
    }

    .bih-mega-group.is-open > .bih-mega-group-head .bih-submenu-toggle svg {
        transform: rotate(180deg);
    }

    .bih-mega-grid a {
        padding: 12px;
        display: block;
    }

    .bih-mega-group--flat {
        padding-top: 0;
    }

    .bih-mega-group--flat .bih-mega-grid {
        display: grid;
        grid-template-columns: 1fr;
        padding: 0;
    }

    .bih-mega-grid--flat li {
        border-bottom: 1px solid #D9D9D9;
    }

    .bih-mega-grid--flat li:last-child {
        border-bottom: none;
    }

    .bih-mega-grid--flat a {
        padding: 16px 8px;
        display: block;
    }

    .bih-simple-panel {
        display: none;
        position: static;
        border: none;
        box-shadow: none;
        padding: 0 0 8px 12px;
        margin: 0;
    }

    .bih-nav-item.menu-item-has-children.is-open > .bih-simple-panel {
        display: block;
    }

    .bih-simple-list a {
        padding: 12px 8px;
    }

    .bih-mobile-cta {
        display: block;
        flex-shrink: 0;
        padding: 16px 24px;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        border-top: 1px solid #EEEEEE;
    }

    .bih-mobile-cta .bih-cta-btn {
        width: 100%;
        justify-content: center;
    }
}
