/* ==========================================================================
   Main CBK header, modernised (25 Nov 2026)
   Layered over style.css and the inline <style> in header.php; loaded only on
   pages that use the main header (not the IMS or DhowCSD headers). Markup, menu
   walker and the hover logic in js/main.js are unchanged; behaviour additions are
   in assets/js/cbk-header-modern.js.
   CBK branding: navy #0B2A5E / blue #194C9F / gold #CC9F26, Poppins, square buttons.
   ========================================================================== */

:root {
    --cbkh-navy: #0B2A5E;
    --cbkh-blue: #194C9F;
    --cbkh-blue-700: #143E84;
    --cbkh-gold: #CC9F26;
    --cbkh-gold-600: #A9821C;
    --cbkh-ink: #1d2433;
    --cbkh-muted: #5b6577;
    --cbkh-line: #E6E9F0;
    --cbkh-soft: #F4F6FA;
    --cbkh-tint: #EAF0FA;
}

/* ---------- Desktop ---------- */
@media (min-width: 1025px) {

    /* Utility bar: quieter links, no pipe separators, gold underline on hover. */
    body .desktop-header-wrapper .utility-bar {
        background: #fff;
    }
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right {
        gap: 18px;
    }
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul {
        gap: 4px;
    }
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li,
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li:first-child,
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li:last-child {
        padding: 0;
    }
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li a,
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li:first-child a,
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li:last-child a {
        display: inline-block;
        padding: 8px 12px;
        font-size: 15px;
        font-weight: 500;
        letter-spacing: .1px;
        color: var(--cbkh-ink);
        transition: color .2s ease;
    }
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li a::after,
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li:first-child a::after {
        display: block;
        content: "";
        position: absolute;
        left: 12px;
        right: 12px;
        bottom: 2px;
        width: auto;
        height: 2px;
        background: var(--cbkh-gold);
        transform: scaleX(0);
        transform-origin: left center;
        transition: transform .25s ease;
    }
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li a:hover,
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li.current-menu-item > a,
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li.current-menu-ancestor > a {
        color: var(--cbkh-blue);
    }
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li a:hover::after,
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li a:focus-visible::after,
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li.current-menu-item > a::after,
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right nav.utility-nav ul li.current-menu-ancestor > a::after {
        transform: scaleX(1);
    }
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right .search-submit-trigger {
        transition: background-color .2s ease;
    }
    body .desktop-header-wrapper .utility-bar-inner-left .utility-bar-inner-right .search-submit-trigger:hover {
        background: var(--cbkh-gold-600);
    }

    /* Main bar: brand blue with a thin gold rule; flat links, gold underline for hover and the current section. */
    body .desktop-header-wrapper .hearder-sec-row-main {
        background: var(--cbkh-blue);
        box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08);
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > a {
        position: relative;
        transition: background-color .2s ease, color .2s ease;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > a::after {
        content: "";
        position: absolute;
        left: 14px;
        right: 14px;
        bottom: 8px;
        height: 3px;
        background: var(--cbkh-gold);
        transform: scaleX(0);
        transition: transform .25s ease;
        pointer-events: none;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li:hover > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > a:focus-visible {
        background-color: rgba(255, 255, 255, .08) !important;
        color: #fff !important;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li:hover > a::after,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > a:focus-visible::after,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.current-menu-ancestor > a::after,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.current-menu-parent > a::after,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.current-menu-item > a::after {
        transform: scaleX(1);
    }
    /* Home's underline would sit on every page that is the front page; keep it for hover only. */
    body.home .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.menu-item-home:not(:hover) > a::after {
        transform: scaleX(0);
    }

    /* Open item becomes a white tab that runs straight into the white panel. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.has-dropdown.dropdown-active > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.has-dropdown.dropdown-active:hover > a {
        background-color: #fff !important;
        color: var(--cbkh-blue) !important;
        font-weight: 500;
    }
    /* No gold underline on the open white tab: the tab itself marks it (David, 26 Nov). */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.has-dropdown.dropdown-active > a::after {
        transform: scaleX(0) !important;
        opacity: 0;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > a .dropdown-icon i {
        display: inline-block;
        transition: transform .25s ease;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.dropdown-active > a .dropdown-icon i {
        transform: rotate(180deg);
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.dropdown-active > a .dropdown-icon i,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.dropdown-active > a .dropdown-icon svg {
        color: var(--cbkh-blue) !important;
        fill: var(--cbkh-blue) !important;
    }

    /* ---------- Mega panel ---------- */
    /* Solid white card instead of frosted glass; height follows the content (the JS sets
       --cbkh-mega-h to the tallest open column) instead of a fixed 520px. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0 {
        height: auto !important;
        min-height: var(--cbkh-mega-h, 0px);
        padding: 14px 0 18px;
        /* Frosted glass: the page shows through, blurred and tinted towards CBK blue, so the free
           space reads as a surface rather than a blank sheet. Column 1 is a near-opaque strip. */
        background:
            linear-gradient(90deg, rgba(243, 246, 251, .95) 0, rgba(243, 246, 251, .95) 33.33%, transparent 33.33%),
            radial-gradient(110% 130% at 100% 100%, rgba(25, 76, 159, .10) 0, rgba(25, 76, 159, 0) 60%),
            linear-gradient(180deg, rgba(250, 251, 254, .90) 0, rgba(244, 247, 252, .84) 100%) !important;
        backdrop-filter: blur(36px) saturate(130%) !important;
        -webkit-backdrop-filter: blur(36px) saturate(130%) !important;
        border: 0 !important;
        border-top: 3px solid var(--cbkh-gold) !important;
        box-shadow: 0 28px 56px -18px rgba(11, 42, 94, .38), 0 2px 6px rgba(11, 42, 94, .08), inset 0 1px 0 rgba(255, 255, 255, .7) !important;
    }
    /* Browsers without backdrop blur get a solid panel instead of see-through text behind. */
    @supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
        body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0 {
            background: linear-gradient(90deg, var(--cbkh-soft) 0, var(--cbkh-soft) 33.33%, #fff 33.33%) !important;
        }
    }

    /* Brand watermark in the free space: the crest (set by the JS from the site logo) and the
       section name under a gold rule. Open columns sit on top of it and hide it. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0[data-cbkh-section]::after {
        content: "";
        display: block !important;
        position: absolute;
        z-index: 0;
        right: 56px;
        bottom: 118px;
        top: auto;
        left: auto;
        width: 190px;
        height: 130px;
        background: var(--cbkh-crest, none) right bottom / contain no-repeat;
        opacity: .1;
        filter: grayscale(.2);
        pointer-events: none;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0[data-cbkh-section]::before {
        content: attr(data-cbkh-section);
        display: block !important;
        position: absolute;
        z-index: 0;
        right: 56px;
        bottom: 40px;
        top: auto;
        left: auto;
        width: auto;
        height: auto;
        max-width: 50%;
        padding-top: 14px;
        border-top: 3px solid rgba(204, 159, 38, .55);
        background: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        font-family: "Poppins", sans-serif;
        font-size: 44px;
        font-weight: 600;
        line-height: 1.1;
        letter-spacing: -.5px;
        text-align: right;
        color: rgba(25, 76, 159, .16);
        pointer-events: none;
    }
    /* Too short a panel for the watermark: leave it out rather than crowd the rows. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0.cbkh-short::before,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0.cbkh-short::after,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0:not(:has(.sub-menu))::before,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0:not(:has(.sub-menu))::after {
        display: none !important;
    }

    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu li ul.sub-menu.level-1,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu li ul.sub-menu.level-2 {
        top: 0 !important;
        bottom: 0;
        z-index: 2;
        height: auto !important;
        padding: 14px 0 18px;
        background: rgba(255, 255, 255, .98) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        border: 0 !important;
        border-left: 1px solid rgba(25, 76, 159, .1) !important;
        box-shadow: -10px 0 24px -18px rgba(11, 42, 94, .35) !important;
    }

    /* Column labels: each column names the item it belongs to (set by the JS as data-cbkh-title). */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu[data-cbkh-title]::before {
        content: attr(data-cbkh-title);
        display: block !important;
        position: static;
        width: auto;
        height: auto;
        margin: 0 28px 8px;
        padding: 6px 0 10px;
        border-bottom: 1px solid var(--cbkh-line);
        background: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        font-family: "Poppins", sans-serif;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.3;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        color: var(--cbkh-gold-600);
    }

    /* Publications uses a grid panel (assets/css/publication-menu.css): the label spans the
       whole row, and rows keep the same rhythm as the other menus. */
    body .desktop-header-wrapper #site-navigation #primary-menu .publication-menu-section > .sub-menu.level-1[data-cbkh-title]::before {
        grid-column: 1 / -1;
        margin: 0 16px 4px;
    }
    body .desktop-header-wrapper #site-navigation #primary-menu .publication-menu-section > .sub-menu.level-1 > li > a {
        min-height: 0;
        margin: 0;
    }

    /* Rows */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu > li,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu > li.active,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu > li:hover {
        background: transparent !important;
        border: 0 !important;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu > li > a {
        position: relative;
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        /* style.css gives rows width:100%; with side margins that pushed the highlight 24px
           past the column edge. */
        width: auto !important;
        max-width: none !important;
        box-sizing: border-box;
        margin: 1px 12px;
        padding: 10px 16px !important;
        font-family: "Poppins", sans-serif;
        font-size: 15px !important;
        font-weight: 500 !important;
        line-height: 1.35 !important;
        color: var(--cbkh-ink) !important;
        background: transparent !important;
        border-radius: 4px;
        transition: background-color .18s ease, color .18s ease, padding-left .18s ease;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu > li > a .dropdown-icon {
        color: #9aa4b5;
        transition: color .18s ease, transform .18s ease;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu > li > a .dropdown-icon i {
        color: inherit !important;
    }

    /* Column 1 (soft grey): active / hovered row turns into a white card (no gold marker, David 26 Nov). */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-0 > li.active > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-0 > li:hover > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-0 > li > a:focus-visible {
        background: #fff !important;
        color: var(--cbkh-blue) !important;
        box-shadow: 0 1px 3px rgba(11, 42, 94, .08);
    }
    /* Columns 2 and 3 (white): tinted blue row. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-1 > li.active > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-1 > li:hover > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-1 > li > a:focus-visible,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-2 > li:hover > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-2 > li > a:focus-visible {
        background: var(--cbkh-tint) !important;
        color: var(--cbkh-blue) !important;
    }
    /* Only an item that opens another column keeps the highlight while you move on. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-1 > li.active:not(.menu-item-has-children):not(:hover) > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-0 > li.active:not(.menu-item-has-children):not(:hover) > a {
        background: transparent !important;
        color: var(--cbkh-ink) !important;
        box-shadow: none;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu > li:hover > a .dropdown-icon,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu > li.active.menu-item-has-children > a .dropdown-icon {
        color: var(--cbkh-blue);
        transform: translateX(3px);
    }
    /* The page you are on is marked in the panel as well. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu li.current-menu-item > a {
        color: var(--cbkh-blue) !important;
        font-weight: 600 !important;
    }

    /* Compact dropdowns (Core Functions, Research, News): a white card under the tab. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0:not(:has(.sub-menu)) {
        min-height: 0 !important;
        min-width: 260px !important;
        padding: 10px 0 !important;
        background: #fff !important;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0:not(:has(.sub-menu)) > li > a {
        margin: 1px 8px;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0:not(:has(.sub-menu)) > li:hover > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0:not(:has(.sub-menu)) > li > a:focus-visible {
        background: var(--cbkh-tint) !important;
        box-shadow: none;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li > ul.sub-menu.level-0:not(:has(.sub-menu)) > li.active:not(:hover) > a {
        background: transparent !important;
        color: var(--cbkh-ink) !important;
        box-shadow: none;
    }

    /* A label over the rows that follow it (menu item with the CSS class cbk-menu-heading). */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu > li.cbk-menu-heading {
        pointer-events: none;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu > li.cbk-menu-heading > .menu-heading {
        display: block;
        margin: 0 28px 8px;
        padding: 6px 0 10px;
        border-bottom: 1px solid var(--cbkh-line);
        font-family: "Poppins", sans-serif;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.3;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        color: var(--cbkh-gold-600);
    }

    /* A fourth level (Statistics > ... > Rates > Interest Rates) opens in place, indented under
       its row, because the panel has three columns. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu li ul.sub-menu.level-3 {
        position: static !important;
        float: none !important;
        display: block !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 0 12px 4px 28px !important;
        padding: 0 !important;
        background: none !important;
        border: 0 !important;
        border-left: 2px solid var(--cbkh-line) !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-3 > li > a {
        margin: 0 0 0 6px;
        padding: 7px 14px !important;
        font-size: 14px !important;
        font-weight: 400 !important;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-3 > li:hover > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-3 > li > a:focus-visible {
        background: var(--cbkh-tint) !important;
        color: var(--cbkh-blue) !important;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-2 > li > a .dropdown-icon,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-3 > li > a .dropdown-icon {
        display: none;
    }
    /* The series of one table (Central Bank Rates: Repo, KESONIA, 91-Day T-bill...) as a compact row. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu li ul.sub-menu.level-4 {
        position: static !important;
        float: none !important;
        display: flex !important;
        flex-flow: row wrap;
        gap: 4px 6px;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        margin: 2px 0 8px 20px !important;
        padding: 0 !important;
        background: none !important;
        border: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu li ul.sub-menu.level-4 > li {
        flex: 0 0 auto;
        width: auto !important;
        min-width: 0 !important;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-4 > li > a {
        margin: 0;
        padding: 4px 9px !important;
        font-size: 12.5px !important;
        font-weight: 400 !important;
        background: var(--cbkh-soft) !important;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-4 > li:hover > a,
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.sub-menu.level-4 > li > a:focus-visible {
        background: var(--cbkh-tint) !important;
        color: var(--cbkh-blue) !important;
    }

    /* Short screens: a long third column (Rates) scrolls instead of running off the page. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu li ul.sub-menu.level-2:has(.level-3) {
        max-height: calc(100vh - 160px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    /* Panels fade and drop in rather than snapping open. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.dropdown-active > ul.sub-menu.level-0 {
        animation: cbkh-drop .18s ease-out;
    }
    @keyframes cbkh-drop {
        from { opacity: 0; transform: translateY(-6px); }
        to   { opacity: 1; transform: translateY(0); }
    }

    /* DhowCSD Portal button: square gold, darker on hover. */
    body .desktop-header-wrapper .hearder-sec-row-main .header-content .portal-button .wp-block-button__link {
        transition: background-color .2s ease, box-shadow .2s ease;
    }
    body .desktop-header-wrapper .hearder-sec-row-main .header-content .portal-button .wp-block-button__link:hover {
        filter: brightness(.94);
        box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
    }

    /* Keyboard focus */
    body .desktop-header-wrapper a:focus-visible,
    body .desktop-header-wrapper button:focus-visible {
        outline: 2px solid var(--cbkh-gold) !important;
        outline-offset: -2px;
    }

    /* ---------- Scrolled (fixed) bar: stays brand blue, gains a shadow ---------- */
    body .desktop-header-wrapper .hearder-sec-row-main.sticky-header.scrolled {
        background: var(--cbkh-blue) !important;
        box-shadow: 0 10px 28px rgba(8, 24, 56, .22);
    }
    body .desktop-header-wrapper .hearder-sec-row-main.sticky-header.scrolled .hearder-sec-row-main-before-inner::before {
        display: none !important;
    }
    body .desktop-header-wrapper .hearder-sec-row-main.sticky-header.scrolled .header-content nav#site-navigation ul.nav-menu > li > a,
    body .desktop-header-wrapper .hearder-sec-row-main.sticky-header.scrolled .header-content nav#site-navigation ul.nav-menu > li > a .dropdown-icon i {
        color: #fff;
    }
}

@media (min-width: 1025px) and (prefers-reduced-motion: reduce) {
    body .desktop-header-wrapper .hearder-sec-row-main .header-content nav#site-navigation ul.nav-menu > li.dropdown-active > ul.sub-menu.level-0 {
        animation: none;
    }
}

/* ---------- Phone and tablet ---------- */
@media (max-width: 1024px) {
    body .mobile-header-bar {
        background: rgba(255, 255, 255, .96) !important;
        box-shadow: 0 4px 18px rgba(11, 42, 94, .12) !important;
        border-bottom: 3px solid var(--cbkh-blue);
    }
    @supports (backdrop-filter: blur(8px)) {
        body .mobile-header-bar { background: rgba(255, 255, 255, .88) !important; }
    }

    /* Menu: solid white sheet instead of see-through blur. */
    body #mobile-menu-overlay {
        background: #fff !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
    }
    body #mobile-menu-overlay .mm-header {
        background: #fff !important;
        backdrop-filter: none !important;
        box-shadow: none !important;
        border-bottom: 1px solid var(--cbkh-line) !important;
    }
    body #mobile-menu-overlay .mm-header #mobile-menu-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: var(--cbkh-soft);
        color: var(--cbkh-blue);
        font-size: 22px;
    }
    body #mobile-menu-overlay .mm-action-bar {
        gap: 12px;
        padding: 14px 18px !important;
        background: var(--cbkh-soft) !important;
        border-bottom: 1px solid var(--cbkh-line) !important;
    }
    body #mobile-menu-overlay .mm-action-bar .mm-home-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
    }
    body #mobile-menu-overlay .mm-action-bar .mm-home-link::before {
        content: "\f015";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 15px;
    }
    body #mobile-menu-overlay .mm-action-bar .wp-block-button__link {
        background: var(--cbkh-gold) !important;
        color: var(--cbkh-navy) !important;
        font-weight: 600;
    }
    body #mobile-menu-overlay .mm-nav-wrapper {
        padding: 6px 0 4px;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu li {
        margin-bottom: 0 !important;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li {
        border-bottom: 1px solid var(--cbkh-line) !important;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li > a {
        min-height: 54px;
        padding: 14px 18px !important;
        font-size: 17px;
        font-weight: 500;
        color: var(--cbkh-ink) !important;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li > a:active,
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li > a:active {
        background: var(--cbkh-tint) !important;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li.current-menu-item > a,
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li.current-menu-ancestor > a {
        color: var(--cbkh-blue) !important;
        box-shadow: inset 3px 0 0 var(--cbkh-gold);
    }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu .dropdown-icon,
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu .dropdown-icon i {
        color: var(--cbkh-blue) !important;
    }

    /* Quick links (utility menu) as a tidy block under the main list. */
    body #mobile-menu-overlay .utility-bar-mobile {
        margin: 18px 18px 28px;
        padding: 14px 16px 6px;
        background: var(--cbkh-soft);
        border-top: 3px solid var(--cbkh-gold);
    }
    body #mobile-menu-overlay .utility-bar-mobile::before {
        content: "Quick links";
        display: block;
        margin-bottom: 6px;
        font-family: "Poppins", sans-serif;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        color: var(--cbkh-gold-600);
    }
    body #mobile-menu-overlay .utility-bar-mobile nav.utility-nav-mob ul {
        display: block;
        margin: 0;
        padding: 0;
        list-style: none;
    }
    body #mobile-menu-overlay .utility-bar-mobile ul li {
        width: 100%;
        margin: 0 !important;
        border-bottom: 1px solid var(--cbkh-line);
    }
    body #mobile-menu-overlay .utility-bar-mobile ul li:last-child {
        border-bottom: 0;
    }
    body #mobile-menu-overlay .utility-bar-mobile nav.utility-nav-mob ul li a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 12px 0;
        font-family: "Poppins", sans-serif;
        font-size: 15px;
        font-weight: 500;
        color: var(--cbkh-blue) !important;
        text-decoration: none;
    }
    body #mobile-menu-overlay .utility-bar-mobile ul li a::after {
        content: "\f105";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 13px;
        color: var(--cbkh-gold-600);
    }

    /* Main list: an icon chip per section (added by cbk-header-modern.js), name next to it,
       chevron pushed right; rows ease in when the menu opens or you come back to it. */
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li > a {
        justify-content: flex-start !important;
        gap: 14px;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li > a .dropdown-icon {
        margin-left: auto;
    }
    body #mobile-menu-overlay .cbkm-ico {
        display: inline-flex;
        flex: 0 0 38px;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 6px;
        background: var(--cbkh-tint);
        color: var(--cbkh-blue);
        font-size: 16px;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li.current-menu-item > a .cbkm-ico,
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li.current-menu-ancestor > a .cbkm-ico {
        background: rgba(204, 159, 38, .16);
        color: var(--cbkh-gold-600);
    }
    /* Opacity + top only: a transform (even an animated one) would make the row the frame
       for the position:fixed sub-menu screens inside it. */
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li {
        position: relative;
        animation: cbkm-rise .32s cubic-bezier(.2, .7, .3, 1) backwards;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li:nth-child(2) { animation-delay: .02s; }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li:nth-child(3) { animation-delay: .05s; }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li:nth-child(4) { animation-delay: .08s; }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li:nth-child(5) { animation-delay: .11s; }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li:nth-child(6) { animation-delay: .14s; }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li:nth-child(7) { animation-delay: .17s; }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li:nth-child(8) { animation-delay: .20s; }
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li:nth-child(n+9) { animation-delay: .23s; }

    /* Sub-menu screens: full-screen layers (style.css), now a column so the watermark sits at
       the foot of a short list and after a long one, never under the rows. */
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu {
        background: linear-gradient(180deg, #fff 0, #fff 50%, var(--cbkh-soft) 100%) !important;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu.active-sub {
        display: flex !important;
        flex-direction: column;
        animation: cbkm-in .26s cubic-bezier(.2, .7, .3, 1) both;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu.active-sub > li {
        flex: 0 0 auto;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu[data-cbkm-section]::after {
        content: attr(data-cbkm-section);
        display: block;
        flex: 0 0 auto;
        margin-top: auto;
        padding: 132px 24px 36px;
        background: var(--cbkh-crest, none) right 24px top 16px / auto 100px no-repeat;
        font-family: "Poppins", sans-serif;
        font-size: 34px;
        font-weight: 600;
        line-height: 1.1;
        text-align: right;
        color: var(--cbkh-blue);
        opacity: .13;
        pointer-events: none;
    }

    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li.cbk-menu-heading > .menu-heading {
        display: block;
        padding: 18px 18px 8px;
        font-family: "Poppins", sans-serif;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 1.2px;
        text-transform: uppercase;
        color: var(--cbkh-gold-600);
    }

    /* Sub-screen header: back, breadcrumb over the title, close. Sticks while a long list scrolls. */
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu .submenu-header {
        position: sticky;
        top: 0;
        z-index: 3;
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 66px;
        padding: 10px 12px 13px !important;
        background: var(--cbkh-blue) !important;
        border: 0 !important;
        box-shadow: inset 0 -3px 0 var(--cbkh-gold), 0 6px 16px -8px rgba(11, 42, 94, .5);
        font-family: "Poppins", sans-serif;
        font-size: 17px;
        font-weight: 600;
        color: #fff !important;
    }
    body #mobile-menu-overlay .submenu-header .cbkm-back,
    body #mobile-menu-overlay .submenu-header .cbkm-close {
        display: inline-flex;
        flex: 0 0 44px;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: rgba(255, 255, 255, .13);
        color: #fff;
        font-size: 18px;
        cursor: pointer;
    }
    body #mobile-menu-overlay .submenu-header .cbkm-close {
        font-size: 21px;
    }
    body #mobile-menu-overlay .submenu-header .cbkm-title {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-width: 0;
        line-height: 1.2;
    }
    body #mobile-menu-overlay .submenu-header .cbkm-trail {
        font-size: 11px;
        font-weight: 600;
        letter-spacing: 1.1px;
        text-transform: uppercase;
        color: #F2D47A;
    }
    body #mobile-menu-overlay .submenu-header .cbkm-name {
        overflow: hidden;
        font-size: 18px;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    body #mobile-menu-overlay .submenu-header:focus-visible,
    body #mobile-menu-overlay .submenu-header .cbkm-close:focus-visible,
    body #mobile-menu-overlay .mm-nav-wrapper a:focus-visible {
        outline: 2px solid var(--cbkh-gold);
        outline-offset: -2px;
    }
    body #mobile-menu-overlay .submenu-header:focus:not(:focus-visible) {
        outline: none;
    }

    /* "Go to the ... page" for a parent that has its own page (was a hidden double tap). */
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li.cbkm-overview {
        border-bottom: 0 !important;
        padding: 14px 16px 6px;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li.cbkm-overview > a,
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li.cbkm-overview > a:hover {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 50px;
        padding: 12px 16px !important;
        background: var(--cbkh-tint) !important;
        box-shadow: inset 3px 0 0 var(--cbkh-gold);
        font-family: "Poppins", sans-serif;
        font-size: 15px;
        font-weight: 600;
        color: var(--cbkh-blue) !important;
    }
    body #mobile-menu-overlay .sub-menu > li.cbkm-overview > a i {
        color: var(--cbkh-gold-600);
        font-size: 14px;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li.cbkm-overview + li {
        margin-top: 8px;
        border-top: 1px solid var(--cbkh-line);
    }

    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li:not(.submenu-header):not(.cbkm-overview) {
        border-bottom: 1px solid var(--cbkh-line) !important;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li > a {
        display: flex;
        align-items: center;
        min-height: 54px;
        padding: 14px 20px !important;
        font-family: "Poppins", sans-serif;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.35 !important;
        color: var(--cbkh-ink) !important;
        background: transparent !important;
    }
    /* The theme's rotated angle-down sits off-centre; draw a plain right chevron instead. */
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li > a .dropdown-icon {
        display: none !important;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li.menu-item-has-children > a::after {
        content: "\f105" !important;
        display: inline-block !important;
        margin-left: auto;
        padding-left: 12px;
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 17px;
        line-height: 1;
        color: var(--cbkh-blue);
    }
    /* Touch screens keep :hover on the last tapped spot, so the old blue hover sticks to
       whatever row sits under the finger; only the current page is marked. */
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu li:not(.cbkm-overview) a:hover {
        background: transparent !important;
        color: var(--cbkh-ink) !important;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li:not(.cbkm-overview) > a:active {
        background: var(--cbkh-tint) !important;
    }
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li.current-menu-item > a,
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li.current-menu-item > a:hover,
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li.current-menu-ancestor > a {
        background: var(--cbkh-tint) !important;
        color: var(--cbkh-blue) !important;
        box-shadow: inset 3px 0 0 var(--cbkh-gold);
    }
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li > a .dropdown-icon,
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu > li > a .dropdown-icon i {
        color: var(--cbkh-blue) !important;
    }
}

@keyframes cbkm-in {
    from { opacity: 0; transform: translateX(32px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes cbkm-rise {
    from { opacity: 0; top: 8px; }
    to { opacity: 1; top: 0; }
}
@media (max-width: 1024px) and (prefers-reduced-motion: reduce) {
    body #mobile-menu-overlay .mm-nav-wrapper .nav-menu > li,
    body #mobile-menu-overlay .mm-nav-wrapper .sub-menu.active-sub {
        animation: none;
    }
}
