#language-form {
    display: inline-block;
}

#language-form select {
    border: 1px solid #ccc;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
}

/* Global Header Styling - Smart & Modern Layout */
.global-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    padding: 6px 0 !important;
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-height: auto !important;
    height: auto !important;
}

.global-header .container {
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 0 25px;
}

.global-header .row {
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    min-height: auto !important;
    height: auto !important;
    align-items: center;
    display: flex !important;
}

.global-header .col-md-8,
.global-header .col-lg-9 {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 0 8px !important;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 !important;
    min-height: auto !important;
    height: auto !important;
}

.global-header .col-md-8::-webkit-scrollbar {
    display: none;
}

.global-header .col-md-4,
.global-header .col-lg-3 {
    padding: 0 !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-shrink: 0;
    margin-left: 15px;
    white-space: nowrap;
}

#language-form {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
    white-space: nowrap;
}

.global-header .col-md-8,
.global-header .col-lg-9 {
    flex: 1;
    min-width: 0;
}

/* Link Separator */
.global-header-link-separator {
    width: 1px;
    height: 16px;
    background: #d0d0d0;
    margin: 0 4px;
    display: inline-block;
    vertical-align: middle;
}

/* Primary Action Links (Contact Us, Research) */
.global-header-link.highlight-link {
    color: #ffffff !important;
    font-weight: 600;
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    padding: 5px 14px !important;
    font-size: 12px;
    line-height: 1.4 !important;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 2px;
}

.global-header-link.highlight-link:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

.global-header-link.highlight-link::after {
    display: none;
}

/* Regular Links */
.global-header-link {
    color: #495057 !important;
    text-decoration: none !important;
    margin: 0 2px;
    padding: 4px 10px !important;
    border-radius: 5px;
    transition: all 0.25s ease;
    font-weight: 500;
    position: relative;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1.4 !important;
}

.global-header-link::after {
    display: none;
}

.global-header-link:hover {
    color: #0066cc !important;
    background: rgba(0, 102, 204, 0.08);
    transform: translateY(-1px);
}

/* Icons */
.global-header-link.highlight-link i {
    font-size: 12px !important;
    margin-right: 5px !important;
    vertical-align: middle;
}

.global-header-link i {
    font-size: 12px !important;
    margin-right: 5px !important;
    vertical-align: middle;
    color: inherit;
}

/* Responsive adjustments for global header */
@media (max-width: 991px) {
    .global-header {
        padding: 5px 0 !important;
    }

    .global-header .container {
        max-width: 100% !important;
        padding: 0 15px;
    }

    .global-header-link {
        font-size: 11px;
        padding: 3px 8px !important;
        margin: 0 1px;
        line-height: 1.3 !important;
    }

    .global-header-link.highlight-link {
        font-size: 11px;
        padding: 4px 12px !important;
        line-height: 1.3 !important;
    }

    .language-selector {
        font-size: 11px !important;
        padding: 4px 30px 4px 10px !important;
        min-width: 90px;
        line-height: 1.3 !important;
        display: inline-block !important;
        white-space: nowrap !important;
    }

    #language-form {
        white-space: nowrap !important;
    }

    .global-header-link-separator {
        display: none;
    }
}

@media (max-width: 768px) {
    .global-header {
        padding: 4px 0 !important;
    }

    .global-header-link {
        font-size: 10px;
        padding: 3px 6px !important;
        line-height: 1.2 !important;
    }

    .global-header-link.highlight-link {
        font-size: 10px;
        padding: 3px 10px !important;
        line-height: 1.2 !important;
    }

    .language-selector {
        font-size: 10px !important;
        padding: 3px 28px 3px 8px !important;
        min-width: 85px;
        display: inline-block !important;
        white-space: nowrap !important;
    }

    #language-form {
        white-space: nowrap !important;
    }

    /* Hide some less important links on mobile */
    .global-header-link:not(.highlight-link):nth-child(n+5) {
        display: none;
    }
}

.language-selector {
    border: 1.5px solid #d0d0d0 !important;
    background: #ffffff !important;
    padding: 5px 35px 5px 12px !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    color: #495057 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
    min-width: 100px;
    width: auto !important;
    line-height: 1.4 !important;
    height: auto !important;
    display: inline-block !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    margin: 0 !important;
}

.language-selector:hover {
    border-color: #0066cc !important;
    box-shadow: 0 3px 8px rgba(0, 102, 204, 0.2) !important;
    transform: translateY(-1px);
    background-color: #f8f9ff !important;
}

.language-selector:focus {
    outline: none !important;
    border-color: #0066cc !important;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15) !important;
    background-color: #ffffff !important;
}

/* CMSA Masthead Styling - Reduced Height */
.cmsa-masthead {
    background: linear-gradient(180deg, #e3f2fd 0%, #bbdefb 40%, #90caf9 70%, #64b5f6 100%);
    padding: 18px 0 0 !important;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: auto !important;
    height: auto !important;
}

/* Diagonal Flag Band - More Attractive */
.cmsa-masthead::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background:
        linear-gradient(135deg,
            #000000 0%,
            #000000 25%,
            #ffd700 25%,
            #ffd700 55%,
            #4fc3f7 55%,
            #4fc3f7 100%
        );
    clip-path: polygon(0 60%, 100% 0%, 100% 100%, 0% 100%);
    z-index: 1;
    opacity: 0.95;
}

/* Bottom Dark Blue Bar */
.cmsa-masthead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #0066cc;
    z-index: 2;
}

.cmsa-masthead .masthead-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px !important;
    position: relative;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 2;
}

/* National Logo - Left Side */
.cmsa-masthead .national-logo-wrapper {
    flex: 0 0 auto;
    order: 1;
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    min-width: 200px;
    max-width: 280px;
    padding: 8px 12px !important;
    background: transparent;
}

.cmsa-masthead .national-logo {
    max-height: 130px !important;
    min-height: 100px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    filter: brightness(1.1) contrast(1.2) !important;
    transition: all 0.3s ease !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.cmsa-masthead .national-logo-wrapper img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100% !important;
}

.cmsa-masthead .national-logo:hover {
    transform: scale(1.03) !important;
    filter: brightness(1.1) contrast(1.15) !important;
}


/* CMSA Logo - Right Side */
.cmsa-masthead .cmsa-logo-wrapper {
    flex: 0 0 auto;
    order: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 200px;
    max-width: 280px;
    padding: 10px 15px;
    position: relative;
    z-index: 3;
}

.cmsa-masthead .cmsa-logo {
    max-height: 130px !important;
    min-height: 100px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    padding: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    filter: brightness(1.05) contrast(1.1) !important;
    transition: all 0.3s ease !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.cmsa-masthead .cmsa-logo-wrapper img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100% !important;
}

.cmsa-masthead .cmsa-logo:hover {
    transform: scale(1.05) !important;
    filter: brightness(1.1) contrast(1.15) !important;
    box-shadow: none !important;
}

/* Title - Center */
.cmsa-masthead .masthead-title {
    flex: 1;
    order: 2;
    text-align: center;
    padding: 0 15px !important;
    min-width: 0;
    margin: 0 !important;
    position: relative;
    z-index: 3;
}

.cmsa-masthead .masthead-title h3 {
    margin: 0 !important;
    font-size: 26px !important;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3 !important;
    font-family: 'Arial', 'Helvetica', sans-serif;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    letter-spacing: 0.3px;
}

.cmsa-masthead .masthead-title h3.swahili {
    font-size: 18px;
}

/* Add CMSA subtitle */
.cmsa-masthead .masthead-title .cmsa-subtitle {
    font-size: 22px !important;
    font-weight: 700;
    color: #ffffff;
    margin: 3px 0 0 0 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    line-height: 1.3 !important;
    letter-spacing: 0.8px;
}

.cmsa-masthead .masthead-title .cmsa-acronym {
    font-size: 18px !important;
    font-weight: 800;
    color: #ffd700;
    margin: 3px 0 0 0 !important;
    font-style: normal;
    line-height: 1.3 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 3px;
    position: relative;
    z-index: 4;
}

/* Responsive adjustments for masthead */
@media (max-width: 991px) {
    .cmsa-masthead .masthead-content {
        flex-wrap: wrap;
        justify-content: center;
    }

    .cmsa-masthead .national-logo-wrapper {
        order: 1;
        flex: 0 0 50%;
        justify-content: center;
        min-width: auto;
    }

    .cmsa-masthead .masthead-title {
        order: 3;
        flex: 0 0 100%;
        padding: 15px 10px 0;
    }

    .cmsa-masthead .national-logo,
    .cmsa-masthead .cmsa-logo {
        max-height: 90px !important;
        min-height: 70px !important;
    }

    .cmsa-masthead .national-logo-wrapper,
    .cmsa-masthead .cmsa-logo-wrapper {
        min-width: 160px;
        max-width: 200px;
    }
}

@media (max-width: 576px) {
    .cmsa-masthead {
        padding: 12px 0 !important;
    }

    .cmsa-masthead .national-logo-wrapper {
        flex: 0 0 100%;
        margin-bottom: 10px;
    }

    .cmsa-masthead .masthead-title {
        order: 3;
        padding: 10px 5px 0;
    }

    .cmsa-masthead .masthead-title h3 {
        font-size: 11px !important;
        line-height: 1.1 !important;
    }

    .cmsa-masthead .masthead-title h3.swahili {
        font-size: 10px !important;
        line-height: 1.1 !important;
    }

    .cmsa-masthead .masthead-title .cmsa-subtitle {
        font-size: 10px !important;
        margin: 1px 0 0 0 !important;
    }

    .cmsa-masthead .masthead-title .cmsa-acronym {
        font-size: 11px !important;
        margin: 1px 0 0 0 !important;
    }

    .cmsa-masthead .national-logo,
    .cmsa-masthead .cmsa-logo {
        max-height: 70px !important;
        min-height: 60px !important;
    }

    .cmsa-masthead .national-logo-wrapper,
    .cmsa-masthead .cmsa-logo-wrapper {
        min-width: 140px;
        max-width: 180px;
    }
}

/* CMSA Logo Styling - Make it clear and visible */
#logo {
    min-width: 150px;
    padding: 0 !important;
    margin-right: 0 !important;
    z-index: 1000;
    position: relative;
    flex: 0 0 auto;
}

#logo img {
    max-height: 60px !important;
    min-height: 50px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    filter: none !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
    border-radius: 0;
    box-shadow: none;
    border: none;
}

#logo img:hover {
    transform: scale(1.05);
    filter: none !important;
    box-shadow: none;
    border: none;
}

#logo a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    border-radius: 0;
    transition: all 0.3s ease;
    background: transparent;
    position: relative;
    min-height: auto;
}

#logo a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(195, 31, 38, 0.05) 0%, rgba(230, 57, 70, 0.03) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

#logo a:hover::before {
    opacity: 1;
}

#logo a:hover {
    transform: translateY(-2px);
}

/* Ensure logo is visible on all backgrounds */
.sticky-header #logo img,
.transparent-header #logo img {
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3)) brightness(1.2) contrast(1.15) !important;
    background: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2), 0 0 0 2px rgba(255,255,255,0.8) !important;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Make logo always visible */
#logo img.logo-default,
#logo img.logo-dark {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Additional Masthead Logo Wrapper Styling */
.cmsa-masthead .national-logo-wrapper,
.cmsa-masthead .cmsa-logo-wrapper {
    padding: 2px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0 !important;
}

.cmsa-masthead .national-logo-wrapper:hover,
.cmsa-masthead .cmsa-logo-wrapper:hover {
    background: transparent;
}

.cmsa-masthead .national-logo-wrapper a,
.cmsa-masthead .cmsa-logo-wrapper a {
    display: block !important;
    line-height: 0 !important;
    text-decoration: none !important;
}

.cmsa-masthead .national-logo-wrapper a img,
.cmsa-masthead .cmsa-logo-wrapper a img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
}

/* Logo Placeholder Styling */
.cmsa-masthead .logo-placeholder {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 60px !important;
    max-height: 80px !important;
    width: 150px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    border: 2px dashed #c31f26 !important;
    padding: 5px !important;
    position: relative !important;
    z-index: 10 !important;
}

.cmsa-masthead .logo-placeholder span {
    color: #c31f26 !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-align: center !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* Ensure images are always visible */
.cmsa-masthead img.national-logo {
    min-width: 120px !important;
    min-height: 90px !important;
}

/* Enhanced Primary Menu Styling */
.primary-menu {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0;
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0;
    margin: 0;
    width: 100vw;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    overflow: visible;
    min-height: 50px;
    margin-left: calc(-50vw + 50%);
}

/* Gold Bar Below Menu Only - Removed Above Bar */
.primary-menu {
    position: relative;
}

/* Removed gold bar above menu */
.primary-menu::before {
    display: none !important;
    content: none !important;
}

.primary-menu::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
}

/* Ensure header-wrap allows full width */
#header-wrap {
    position: relative;
    overflow: visible;
}

.is-expanded-menu .primary-menu {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.menu-container {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap !important;
    padding: 0;
    list-style: none;
    margin: 0;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0;
}

.menu-container::-webkit-scrollbar {
    display: none;
}

.is-expanded-menu .menu-container {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap !important;
    justify-content: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
}

.menu-container > .menu-item {
    border-top: none !important;
    margin: 0 !important;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0 !important;
    flex: 0 0 auto !important;
    min-width: fit-content;
    white-space: nowrap;
}

.menu-item:has(.sub-menu-container) {
    position: relative !important;
}

.menu-item {
    position: relative !important;
}

/* Ensure menu items with submenus are properly positioned */
.menu-container > .menu-item:has(.sub-menu-container) {
    position: relative !important;
}

/* Make sure hover works on menu items */
.menu-item:hover {
    position: relative !important;
}

/* Ensure submenu appears when hovering over menu item */
.menu-container .menu-item:hover > .sub-menu-container {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    display: block !important;
}

.menu-container > .menu-item:first-child {
    border-left: none;
}

.menu-container > .menu-item:last-child {
    border-right: none;
}

.is-expanded-menu .menu-container > .menu-item {
    border-top: none !important;
    margin: 0 2px;
}

.menu-link {
    position: relative;
    padding: 18px 12px !important;
    color: #ffd700 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 0;
    margin: 0 !important;
    display: block;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap !important;
    overflow: hidden;
}

.menu-link div {
    color: #ffd700 !important;
}

.is-expanded-menu .menu-link {
    position: relative;
    padding: 18px 14px !important;
    color: #ffd700 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 6px;
    margin: 0 2px;
}

.menu-link:hover {
    color: #ffed4e !important;
    background: rgba(255, 215, 0, 0.15) !important;
    transform: translateY(-1px);
    box-shadow: inset 0 -3px 0 rgba(255, 215, 0, 0.7);
}

.is-expanded-menu .menu-link:hover {
    color: #ffed4e !important;
    background: rgba(255, 215, 0, 0.15) !important;
    transform: translateY(-1px);
    box-shadow: inset 0 -3px 0 rgba(255, 215, 0, 0.7);
}

/* Menu items with dropdowns - show arrow */
.menu-item:has(.sub-menu-container) > .menu-link div::after,
.menu-item.mega-menu > .menu-link div::after {
    content: ' ▼';
    font-size: 8px;
    margin-left: 5px;
    opacity: 0.9;
    vertical-align: middle;
    display: inline-block;
    color: #ffffff;
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-weight: normal;
    line-height: 1;
}

.menu-item:has(.sub-menu-container):hover > .menu-link div::after,
.menu-item.mega-menu:hover > .menu-link div::after {
    opacity: 1;
    color: #ffffff;
    transform: translateY(2px) rotate(180deg);
}

/* Home icon removed */

.menu-item.current > .menu-link {
    color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.25) !important;
    box-shadow: inset 0 -3px 0 rgba(255, 215, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 700 !important;
    position: relative;
}

.menu-item.current > .menu-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 215, 0, 0.9);
    z-index: 1;
}

.is-expanded-menu .menu-item.current > .menu-link {
    color: #ffd700 !important;
    background: rgba(255, 215, 0, 0.3) !important;
    box-shadow: inset 0 -3px 0 rgba(255, 215, 0, 0.8);
    font-weight: 700 !important;
}

.menu-link::after {
    display: none;
}

.is-expanded-menu .menu-link::after {
    display: none;
}

/* Enhanced Submenu Styling - Modern Smart Design - Always Visible on Hover */
.sub-menu-container {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #ffffff !important;
    border: none !important;
    border-top: 3px solid #0066cc !important;
    border-radius: 0 0 12px 12px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25),
                0 8px 25px rgba(0, 102, 204, 0.2),
                0 0 0 1px rgba(0, 0, 0, 0.08) !important;
    padding: 10px 0 !important;
    margin-top: 0 !important;
    min-width: 260px;
    max-width: 320px;
    width: auto;
    list-style: none;
    overflow: visible !important;
    max-height: none !important;
    z-index: 99999 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    pointer-events: none;
    display: block !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Smart positioning - adjust if near right edge */
.menu-container > .menu-item:last-child .sub-menu-container,
.menu-container > .menu-item:nth-last-child(2) .sub-menu-container,
.menu-container > .menu-item:nth-last-child(3) .sub-menu-container {
    left: auto !important;
    right: 0 !important;
}

.sub-menu-container::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066cc 0%, #0052a3 100%);
    border-radius: 10px 10px 0 0;
}

/* Make submenu visible on hover - Clear and Immediate */
.menu-item:hover > .sub-menu-container,
.menu-item:hover .sub-menu-container,
.menu-item:focus-within > .sub-menu-container {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    display: block !important;
}

/* Keep submenu visible when hovering over it */
.sub-menu-container:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    display: block !important;
}

/* Make submenu items visible */
.menu-item:hover .sub-menu-container .menu-item {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.is-expanded-menu .sub-menu-container {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    padding: 10px 0 !important;
    margin-top: 8px !important;
    min-width: 280px;
}

.sub-menu-container .menu-item {
    border-top: none !important;
    margin: 2px 8px !important;
    position: relative;
    display: block !important;
    width: auto;
    border-radius: 6px;
    background: rgba(0, 102, 204, 0.03);
    transition: all 0.2s ease;
}

.sub-menu-container .menu-item:hover {
    background: rgba(0, 102, 204, 0.08);
    border-radius: 6px;
}

.sub-menu-container .menu-item:first-child .menu-link {
    padding-top: 12px !important;
    margin-top: 0 !important;
}

.sub-menu-container .menu-item:last-child .menu-link {
    padding-bottom: 12px !important;
    margin-bottom: 0 !important;
}

/* Ensure no scrolling - fit all items */
.sub-menu-container {
    max-height: none !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
    overflow: visible !important;
}

/* Compact spacing for more items without scroll */
.sub-menu-container .menu-item .menu-link {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.sub-menu-container .menu-item:first-child {
    margin-top: 0;
}

.sub-menu-container .menu-item:last-child {
    margin-bottom: 0;
}

.is-expanded-menu .sub-menu-container .menu-item {
    border-top: none !important;
    margin: 0 !important;
}

.sub-menu-container .menu-link {
    padding: 12px 20px !important;
    color: #1a1a1a !important;
    font-size: 15px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    border-radius: 0 !important;
    margin: 0 !important;
    position: relative;
    display: block !important;
    white-space: nowrap;
    letter-spacing: 0.2px;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    z-index: 1;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.sub-menu-container .menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #0066cc;
    transform: scaleY(0);
    transition: transform 0.2s ease;
    border-radius: 0 2px 2px 0;
}

.sub-menu-container .menu-link::after {
    display: none;
}

.sub-menu-container .menu-link:hover {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.12) 0%, rgba(0, 102, 204, 0.08) 100%) !important;
    color: #0066cc !important;
    transform: translateX(5px) !important;
    border-left-color: #0066cc !important;
    padding-left: 25px !important;
    text-shadow: none !important;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15) !important;
    font-weight: 700 !important;
}

.sub-menu-container .menu-link:hover::before {
    transform: scaleY(1);
    background: #0066cc;
}

.is-expanded-menu .sub-menu-container .menu-link {
    padding: 14px 28px !important;
    color: #1a1a1a !important;
    font-size: 15px !important;
    text-transform: none !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 8px !important;
    margin: 0 8px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.is-expanded-menu .sub-menu-container .menu-link:hover {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.15) 0%, rgba(0, 102, 204, 0.1) 100%) !important;
    color: #0066cc !important;
    padding-left: 32px !important;
    transform: translateX(4px) !important;
    font-weight: 700 !important;
}


.sub-menu-container .menu-link:hover::before {
    transform: scaleY(1);
}

.is-expanded-menu .sub-menu-container .menu-link:hover {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.15) 0%, rgba(0, 102, 204, 0.1) 100%) !important;
    color: #0066cc !important;
    padding-left: 32px !important;
    transform: translateX(4px) !important;
    font-weight: 700 !important;
}

.sub-menu-container .menu-link:hover::before {
    transform: scaleY(1);
}

.sub-menu-container .menu-link::after {
    display: none;
}

.is-expanded-menu .sub-menu-container .menu-link::after {
    display: none;
}

/* Mega Menu Styling */
.mega-menu-content {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    padding: 30px 35px !important;
    margin-top: 8px !important;
    animation: fadeInDown 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.is-expanded-menu .mega-menu-content {
    background: #0066cc !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
    padding: 20px 30px !important;
    margin-top: 0 !important;
}

.mega-menu-title .menu-link {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    margin-bottom: 15px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    position: relative;
}

.is-expanded-menu .mega-menu-title .menu-link {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    margin-bottom: 15px !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
    position: relative;
}

.mega-menu-title .menu-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #c31f26 0%, #e63946 100%);
    border-radius: 2px;
}

.mega-menu-column .sub-menu-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.mega-menu-column .sub-menu-container .menu-link {
    padding: 10px 0 !important;
    color: #000000 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative;
}

.is-expanded-menu .mega-menu-column .sub-menu-container .menu-link {
    padding: 10px 0 !important;
    color: #000000 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.mega-menu-column .sub-menu-container .menu-link::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #0066cc;
}

.mega-menu-column .sub-menu-container .menu-link:hover {
    color: #0066cc !important;
    padding-left: 20px !important;
    transform: translateX(4px) !important;
    background: transparent !important;
}

.mega-menu-column .sub-menu-container .menu-link:hover::before {
    opacity: 1;
    left: 0;
}

.is-expanded-menu .mega-menu-column .sub-menu-container .menu-link:hover {
    color: #0066cc !important;
    padding-left: 20px !important;
    transform: translateX(4px) !important;
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.15) 0%, rgba(0, 102, 204, 0.1) 100%) !important;
    font-weight: 700 !important;
}

.mega-menu-column .sub-menu-container .menu-link:hover::before {
    opacity: 1;
    left: 0;
}

/* Search and Language Icons Styling */
.header-misc {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.header-misc-icon {
    margin-left: 0;
}

.header-misc-icon a {
    color: #495057;
    font-size: 22px;
    transition: all 0.3s ease;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    position: relative;
}

.header-misc-icon a:hover {
    color: #c31f26;
    background: rgba(195, 31, 38, 0.1);
    transform: scale(1.05);
}

/* Shopping bag badge */
.top-cart-number {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #c31f26;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Header Background Enhancement */
#header-wrap {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    padding: 0 !important;
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

#header {
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
}

#header-wrap > .container {
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    max-width: 100% !important;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 0 0;
    flex-wrap: nowrap;
    width: 100%;
    position: relative;
    gap: 20px;
    order: 1;
    margin: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.primary-menu {
    width: 100vw !important;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: calc(-50vw + 50%) !important;
    padding: 0 !important;
    order: 2;
}

/* Remove gap between header and content - AGGRESSIVE */
#header,
#header-wrap,
header {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Hide empty page-title block completely */
#page-title:empty,
.page-title:empty,
section.page-title:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    line-height: 0 !important;
}

/* Remove spacing from page-title block */
#page-title,
.page-title,
section.page-title {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove spacing from content section */
#content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
}

section#content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    margin-bottom: 0 !important;
}

.content-wrap {
    padding-top: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove spacing from any element after header - AGGRESSIVE */
#header-wrap + *,
#header + *,
header + *,
#header-wrap ~ #content,
#header ~ #content {
    margin-top: -50px !important;
    padding-top: 0 !important;
}

/* Remove spacing from primary-menu and everything after it */
.primary-menu {
    margin-bottom: -50px !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.primary-menu + *,
.primary-menu ~ *,
nav.primary-menu + *,
nav.primary-menu ~ * {
    margin-top: -50px !important;
    padding-top: 0 !important;
}

body > #content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure no spacing after header */
#header + #content,
#header-wrap + #content,
header + #content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Remove spacing from container inside content-wrap */
.content-wrap > .container:first-child {
    margin-top: -50px !important;
    padding-top: 0 !important;
}

/* Remove spacing from header-wrap completely */
#header-wrap {
    margin-bottom: -50px !important;
    padding-bottom: 0 !important;
}

/* Remove spacing from header */
#header {
    margin-bottom: -50px !important;
    padding-bottom: 0 !important;
}

.content-wrap > .container:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#content > .content-wrap > .container:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

#content > .content-wrap > .container:first-child > .row:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Ensure no gap after header */
body #header-wrap {
    margin-bottom: 0 !important;
}

body #content {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body .content-wrap {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.sticky-header #header-wrap {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

/* Menu Item Spacing and Alignment */
.menu-item {
    position: relative;
}

.menu-item.mega-menu {
    position: static;
}

/* Improved Menu Container */
.primary-menu {
    padding: 0;
}

/* Better Visual Hierarchy */
.menu-link div {
    position: relative;
    z-index: 1;
}

/* Smooth Transitions for All Menu States */
.menu-item:hover > .sub-menu-container,
.menu-item:hover > .mega-menu-content {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    display: block !important;
}

/* Additional hover support for better compatibility */
.menu-container .menu-item:has(.sub-menu-container):hover .sub-menu-container {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    display: block !important;
}

/* Mobile Menu Improvements - Enhanced with Submenu Toggle */
@media (max-width: 991px) {
    .primary-menu {
        background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%) !important;
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10020;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
        max-height: 100vh;
        overflow-y: auto;
        padding-top: 70px;
        margin: 0 !important;
        width: 100% !important;
        margin-left: 0 !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    }

    .primary-menu.primary-menu-active,
    body.primary-menu-open .primary-menu {
        display: block !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    /* Prevent body scroll when menu is open */
    body.primary-menu-open {
        overflow: hidden;
    }

    /* Menu overlay background */
    body.primary-menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9997;
    }

    .menu-container {
        display: flex !important;
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        width: 100%;
        margin: 0;
    }

    .menu-container > .menu-item {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        margin: 0 !important;
    }

    .menu-link {
        padding: 18px 24px !important;
        border-radius: 0;
        margin: 0;
        width: 100%;
        color: #ffd700 !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        position: relative;
    }

    .menu-link:hover,
    .menu-link:focus {
        background: rgba(255, 215, 0, 0.15) !important;
        color: #ffed4e !important;
    }

    .menu-item.current > .menu-link {
        background: rgba(255, 215, 0, 0.2) !important;
        color: #ffd700 !important;
        border-left: 4px solid #ffd700;
    }

    /* Submenu Toggle Button */
    .submenu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        color: #ffd700;
        transition: all 0.3s ease;
        margin-left: auto;
        flex-shrink: 0;
    }

    .submenu-toggle i {
        font-size: 16px;
        transition: transform 0.3s ease;
    }

    .menu-item.submenu-open .submenu-toggle {
        background: rgba(255, 215, 0, 0.2);
        transform: rotate(180deg);
    }

    .menu-item.submenu-open .submenu-toggle i {
        transform: rotate(180deg);
    }

    /* Submenu Container - Mobile */
    .primary-menu .menu-item > .sub-menu-container {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 4px solid rgba(255, 215, 0, 0.3) !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
        background: rgba(0, 0, 0, 0.15) !important;
        padding: 0 !important;
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: none !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.25s ease, opacity 0.2s ease !important;
    }

    .sub-menu-container .menu-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin: 0 !important;
    }

    .sub-menu-container .menu-item:last-child {
        border-bottom: none;
    }

    .sub-menu-container .menu-link {
        padding: 14px 24px 14px 40px !important;
        color: #ffffff !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        background: transparent !important;
        border-left: none !important;
    }

    .sub-menu-container .menu-link:hover {
        background: linear-gradient(90deg, rgba(0, 102, 204, 0.15) 0%, rgba(0, 102, 204, 0.1) 100%) !important;
        color: #0066cc !important;
        transform: translateX(4px) !important;
        padding-left: 44px !important;
        font-weight: 700 !important;
    }

    /* Mega Menu - Mobile */
    .primary-menu .menu-item > .mega-menu-content {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        border-left: 4px solid rgba(255, 215, 0, 0.3) !important;
        margin-left: 0 !important;
        padding: 0 !important;
        background: rgba(0, 0, 0, 0.15) !important;
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.25s ease, opacity 0.2s ease !important;
    }

    .mega-menu-content .menu-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mega-menu-content .menu-link {
        padding: 14px 24px 14px 40px !important;
        color: #ffffff !important;
        font-size: 14px !important;
    }

    /* Disable desktop hover-open behavior on touch/mobile */
    .primary-menu .menu-item:hover > .sub-menu-container,
    .primary-menu .menu-item:focus-within > .sub-menu-container,
    .primary-menu .menu-item:hover > .mega-menu-content,
    .primary-menu .menu-item:focus-within > .mega-menu-content {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        max-height: 0 !important;
        overflow: hidden !important;
    }

    .primary-menu .menu-item.submenu-open > .sub-menu-container,
    .primary-menu .menu-item.submenu-open:hover > .sub-menu-container,
    .primary-menu .menu-item.submenu-open:focus-within > .sub-menu-container,
    .primary-menu .menu-item.submenu-open > .mega-menu-content,
    .primary-menu .menu-item.submenu-open:hover > .mega-menu-content,
    .primary-menu .menu-item.submenu-open:focus-within > .mega-menu-content {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        max-height: 1000px !important;
        overflow: visible !important;
    }

    /* Hamburger Menu Trigger */
    .primary-menu-trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        z-index: 10030;
        position: relative;
    }

    .primary-menu-trigger .cnvs-hamburger {
        background: transparent;
        border: none;
        padding: 10px;
        cursor: pointer;
        outline: none;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        transition: all 0.3s ease;
    }

    .primary-menu-trigger .cnvs-hamburger:hover {
        background: rgba(0, 102, 204, 0.1);
    }

    .primary-menu-trigger .cnvs-hamburger-box {
        width: 24px;
        height: 18px;
        position: relative;
    }

    .primary-menu-trigger .cnvs-hamburger-inner,
    .primary-menu-trigger .cnvs-hamburger-inner::before,
    .primary-menu-trigger .cnvs-hamburger-inner::after {
        background-color: #0066cc;
        width: 24px;
        height: 2px;
        border-radius: 2px;
        transition: all 0.3s ease;
        position: absolute;
    }

    .primary-menu-trigger .cnvs-hamburger-inner {
        top: 50%;
        transform: translateY(-50%);
    }

    .primary-menu-trigger .cnvs-hamburger-inner::before {
        top: -8px;
    }

    .primary-menu-trigger .cnvs-hamburger-inner::after {
        bottom: -8px;
    }

    .primary-menu-trigger-active .cnvs-hamburger-inner,
    .cnvs-hamburger.is-active .cnvs-hamburger-inner {
        background-color: transparent;
    }

    .primary-menu-trigger-active .cnvs-hamburger-inner::before,
    .cnvs-hamburger.is-active .cnvs-hamburger-inner::before {
        transform: translateY(0) rotate(45deg);
        top: 0;
    }

    .primary-menu-trigger-active .cnvs-hamburger-inner::after,
    .cnvs-hamburger.is-active .cnvs-hamburger-inner::after {
        transform: translateY(0) rotate(-45deg);
        bottom: 0;
    }

    /* Close button in mobile menu */
    .mobile-menu-close {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        border-radius: 50%;
        color: #ffd700;
        font-size: 24px;
        cursor: pointer;
        z-index: 10031;
        transition: all 0.3s ease;
    }

    .mobile-menu-close:hover {
        background: rgba(255, 215, 0, 0.2);
        transform: rotate(90deg);
    }
}

/* Tablet Styles (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .primary-menu {
        padding-top: 80px;
    }

    .menu-link {
        padding: 16px 20px !important;
        font-size: 14px !important;
    }

    .sub-menu-container .menu-link {
        padding: 12px 20px 12px 35px !important;
    }
}

/* Small Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .menu-link {
        padding: 16px 14px !important;
        font-size: 12px !important;
    }

    .sub-menu-container {
        min-width: 240px;
    }
}

/* Ensure submenus are always visible on desktop */
@media (min-width: 992px) {
    .sub-menu-container {
        display: block !important;
    }

    .mobile-menu-close {
        display: none !important;
    }

    .submenu-toggle {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .primary-menu {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: none !important;
    }

    .primary-menu-trigger {
        display: none;
    }

    .menu-container {
        flex-wrap: nowrap;
    }

    .menu-link {
        white-space: nowrap;
    }
}

/* Smooth Menu Transitions */
.menu-container > .menu-item {
    transition: background 0.25s ease;
}

.menu-link {
    position: relative;
    overflow: hidden;
}

.menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.menu-link:hover::before {
    width: 100%;
}

.menu-link div {
    position: relative;
    z-index: 1;
}

/* Additional Menu Polish */
.menu-item:first-child .menu-link {
    margin-left: 0;
}

.menu-item:last-child .menu-link {
    margin-right: 0;
}

/* Active State Enhancement */
.menu-item.current > .menu-link,
.menu-item.active > .menu-link {
    position: relative;
}

.menu-item.current > .menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(195, 31, 38, 0.1) 0%, rgba(195, 31, 38, 0.05) 100%);
    border-radius: 6px;
    z-index: 0;
}

/* Submenu Arrow Indicator - Using div content */
.menu-item.mega-menu > .menu-link div::after,
.menu-item:has(.sub-menu-container) > .menu-link div::after {
    content: ' ▼';
    font-size: 10px;
    margin-left: 6px;
    opacity: 0.5;
    transition: all 0.3s ease;
    display: inline-block;
    vertical-align: middle;
}

.menu-item.mega-menu:hover > .menu-link div::after,
.menu-item:has(.sub-menu-container):hover > .menu-link div::after {
    opacity: 1;
    color: #c31f26;
    transform: translateY(2px);
}


/* Header / Navbar: keep it above page content */
    #header,
    #header-wrap,
    .primary-menu,
    .primary-menu .menu-container {
        overflow: visible !important;
    }

    .primary-menu .menu-item {
        position: relative;
    }

    .primary-menu .sub-menu-container {
        position: absolute;
        top: 100%; /* exactly under the parent menu item */
        left: 0;
        z-index: 10000; /* above everything else */
    }

    #header,
    #header-wrap {
        z-index: 9999 !important;
    }

    /* Optional: if you still feel the gap below header is too big, you can tweak this
       instead of forcing #content margins with !important */
    #content .content-wrap {
        padding-top: 0;
    }

    /* Recent Publications Section */
    .publications-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 25px;
        margin-top: 50px;
    }

    .publication-card {
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        border: 1px solid #e9ecef;
        position: relative;
    }

    .publication-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 25px rgba(0, 102, 204, 0.2);
        border-color: #0066cc;
    }

    .publication-link {
        display: flex;
        align-items: center;
        padding: 25px;
        text-decoration: none;
        color: inherit;
        gap: 20px;
        position: relative;
    }

    .publication-icon-wrapper {
        flex: 0 0 60px;
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        transition: all 0.3s ease;
    }

    .publication-icon-wrapper i {
        font-size: 28px;
        color: #ffffff;
    }

    .publication-badge {
        position: absolute;
        top: -8px;
        right: -8px;
        background: #c31f26;
        color: #ffffff;
        font-size: 11px;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 2px 8px rgba(195, 31, 38, 0.4);
        animation: pulse 2s infinite;
    }

    @keyframes pulse {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.05);
        }
    }

    .publication-card:hover .publication-icon-wrapper {
        transform: scale(1.1) rotate(5deg);
        box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
    }

    .publication-content {
        flex: 1;
        min-width: 0;
    }

    .publication-title {
        font-size: 16px;
        font-weight: 600;
        color: #212529;
        margin: 0 0 12px 0;
        line-height: 1.4;
        transition: color 0.3s ease;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .publication-card:hover .publication-title {
        color: #0066cc;
    }

    .publication-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        color: #6c757d;
    }

    .publication-meta i {
        font-size: 14px;
        color: #0066cc;
    }

    .publication-action {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        background: rgba(0, 102, 204, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        opacity: 0;
        transform: translateX(-10px);
    }

    .publication-card:hover .publication-action {
        opacity: 1;
        transform: translateX(0);
        background: #0066cc;
    }

    .publication-action i {
        color: #ffffff;
        font-size: 18px;
    }

    .btn-view-all {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 14px 32px;
        background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
        color: #ffffff;
        font-size: 16px;
        font-weight: 600;
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
        letter-spacing: 0.3px;
    }

    .btn-view-all:hover {
        background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
        color: #ffffff;
    }

    .btn-view-all i {
        transition: transform 0.3s ease;
    }

    .btn-view-all:hover i {
        transform: translateX(4px);
    }

    /* Responsive Design for Publications */
    @media (max-width: 992px) {
        .publications-grid {
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 20px;
        }
    }

    @media (max-width: 768px) {
        .publications-grid {
            grid-template-columns: 1fr;
            gap: 20px;
        }

        .publication-link {
            padding: 20px;
        }

        .publication-icon-wrapper {
            width: 50px;
            height: 50px;
            flex: 0 0 50px;
        }

        .publication-icon-wrapper i {
            font-size: 24px;
        }
    }

    /* Our Partners Section */
    .partners-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
        margin-top: 50px;
    }

    .partner-item {
        position: relative;
    }

    .partner-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        transition: all 0.3s ease;
        padding: 20px;
    }

    .partner-logo-wrapper {
        width: 180px;
        height: 180px;
        background: #ffffff;
        border-radius: 50%;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: 3px solid transparent;
        position: relative;
        overflow: hidden;
        margin-bottom: 20px;
    }

    .partner-logo-wrapper::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(0, 102, 204, 0.05), transparent);
        transition: left 0.5s ease;
        border-radius: 50%;
    }

    .partner-logo-wrapper:hover::before {
        left: 100%;
    }

    .partner-logo {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 1;
        position: relative;
    }

    .partner-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        border-radius: 50%;
        transition: transform 0.3s ease;
    }

    .partner-name {
        display: block;
        font-size: 15px;
        font-weight: 600;
        color: #212529;
        line-height: 1.4;
        margin-top: 15px;
        text-align: center;
        transition: color 0.3s ease;
    }

    .partner-acronym {
        display: block;
        font-size: 18px;
        font-weight: 700;
        color: #0066cc;
        letter-spacing: 2px;
        margin-top: 5px;
        text-align: center;
        transition: color 0.3s ease, transform 0.3s ease;
    }

    .partner-link:hover .partner-logo-wrapper {
        transform: translateY(-8px) scale(1.05);
        box-shadow: 0 8px 25px rgba(0, 102, 204, 0.2);
        border-color: #0066cc;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    }

    .partner-link:hover .partner-logo img {
        transform: scale(1.1);
    }

    .partner-link:hover .partner-name {
        color: #0066cc;
    }

    .partner-link:hover .partner-acronym {
        color: #c31f26;
        transform: scale(1.1);
    }

    /* Responsive Design for Partners */
    @media (max-width: 992px) {
        .partners-grid {
            grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
            gap: 25px;
        }

        .partner-logo-wrapper {
            width: 160px;
            height: 160px;
        }

        .partner-name {
            font-size: 14px;
        }

        .partner-acronym {
            font-size: 18px;
        }
    }

    @media (max-width: 768px) {
        .partners-grid {
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
        }

        .partner-logo-wrapper {
            width: 140px;
            height: 140px;
            padding: 15px;
        }

        .partner-name {
            font-size: 13px;
        }

        .partner-acronym {
            font-size: 16px;
        }
    }

    @media (max-width: 576px) {
        .partners-grid {
            grid-template-columns: 1fr;
            gap: 20px;
        }

        .partner-logo-wrapper {
            width: 120px;
            height: 120px;
            padding: 12px;
        }
    }

    /* =========================
       HERO FULL IMAGE SECTION
       ========================= */
    .hero-banner {
        /* remove side padding so it can touch the edges */
        padding: 0 0 30px;
        background: #f5f7fb;
    }

    /* make slider full-width */
    .hero-slider {
        position: relative;
        width: 100%;
        max-width: none; /* was 1140px */
        margin: 0; /* was 0 auto */
        border-radius: 0; /* remove rounded corners */
        overflow: hidden;
        box-shadow: none; /* remove shadow so it looks like a full banner */
        background: #e5e5e5;

        aspect-ratio: 16 / 6;
        min-height: 320px;
    }

    /* Each slide is full image + header block below */
    .hero-slide {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        opacity: 0;
        transition: opacity 0.6s ease;
        pointer-events: none;
    }

    .hero-slide.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Image takes most of the height */
    .hero-slide-image {
        flex: 1 1 auto;
        width: 100%;
        background: #d9d9d9;
    }

    .hero-slide-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* Caption / header BELOW the picture */
    .hero-slide-caption {
        flex: 0 0 auto;
        background: #ffffff;
        padding: 14px 20px;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        text-align: center;
    }

    .hero-slide-caption h3 {
        font-size: 1.15rem;
        font-weight: 700;
        margin-bottom: 4px;
        color: #0b3a78;
        text-transform: uppercase;
        letter-spacing: 0.06em;
    }

    .hero-slide-caption p {
        margin: 0;
        font-size: 0.95rem;
        color: #555f70;
    }

    /* CSS-only slideshow timing */
    .hero-slide:nth-child(1) {
        animation-delay: 0s;
    }

    .hero-slide:nth-child(2) {
        animation-delay: 6s;
    }

    .hero-slide:nth-child(3) {
        animation-delay: 12s;
    }

    /* Start visible immediately, then fade out */
    @keyframes heroFullFade {
        0%, 20% {
            opacity: 1;
            transform: scale(1);
        }
        25%, 100% {
            opacity: 0;
            transform: scale(1.01);
        }
    }

    /* Optional: decorative arrows (still static) */
    .hero-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.95);
        color: #0b3a78;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        font-size: 18px;
        z-index: 20;
        pointer-events: none; /* just visual for now */
    }

    .hero-arrow-left {
        left: 12px;
    }

    .hero-arrow-right {
        right: 12px;
    }

    /* Responsive */
    @media (max-width: 991.98px) {
        .hero-banner {
            padding: 25px 0 20px;
        }
    }

    @media (max-width: 575.98px) {
        .hero-slider {
            border-radius: 0;
            box-shadow: none;
            min-height: 260px;
        }

        .hero-slide-caption h3 {
            font-size: 1rem;
        }

        .hero-slide-caption p {
            font-size: 0.9rem;
        }
    }

    /* =========================
       CMSA MANDATE STRIP
       ========================= */
    .mandate-section {
        background: #f5f7fb;
        padding: 40px 0 35px;
    }

    .mandate-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }

    .mandate-card {
        background: #ffffff;
        border-radius: 12px;
        padding: 24px 18px 22px;
        text-align: center;
        box-shadow: 0 6px 18px rgba(15, 52, 96, 0.08);
        border: 1px solid rgba(15, 52, 96, 0.06);
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    .mandate-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 24px rgba(15, 52, 96, 0.16);
        border-color: rgba(0, 102, 204, 0.35);
    }

    .mandate-icon {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        margin: 0 auto 14px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 102, 204, 0.08);
    }

    .mandate-icon i {
        font-size: 26px;
        color: #c31f26;
    }

    .mandate-title {
        font-size: 1rem;
        font-weight: 700;
        color: #102a43;
        margin-bottom: 8px;
    }

    .mandate-text {
        font-size: 0.9rem;
        line-height: 1.5;
        color: #5f6c80;
        margin: 0;
    }

    /* ensure 5 in one row on large screens */
    @media (min-width: 1200px) {
        .mandate-grid {
            grid-template-columns: repeat(5, 1fr);
        }
    }

    /* =========================
       WELCOME NOTE SECTION
       ========================= */
    .welcome-section {
        background: #ffffff;
        padding: 45px 0 40px;
    }

    .welcome-card {
        background: #f5f7fb;
        border-radius: 16px;
        padding: 30px 30px 26px;
        box-shadow: 0 10px 26px rgba(15, 52, 96, 0.08);
        border: 1px solid rgba(15, 52, 96, 0.06);
    }

    .welcome-photo-wrap {
        text-align: center;
    }

    .welcome-photo {
        max-width: 230px;
        width: 100%;
        border-radius: 12px;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
        object-fit: cover;
    }

    .welcome-name {
        margin-top: 14px;
        font-weight: 700;
        font-size: 1rem;
        color: #0b3a78;
    }

    .welcome-title {
        font-size: 0.9rem;
        color: #6b778c;
        margin-bottom: 0;
    }

    .welcome-heading {
        font-size: 1.4rem;
        font-weight: 700;
        color: #102a43;
        margin-bottom: 10px;
    }

    .welcome-intro-pill {
        display: inline-block;
        font-size: 0.8rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        padding: 4px 10px;
        border-radius: 999px;
        background: rgba(0, 102, 204, 0.06);
        color: #0066cc;
        margin-bottom: 10px;
    }

    .welcome-body {
        font-size: 0.95rem;
        line-height: 1.7;
        color: #4b5565;
    }

    @media (max-width: 991.98px) {
        .welcome-card {
            padding: 24px 20px 22px;
        }

        .welcome-section {
            padding: 35px 0 32px;
        }

        .welcome-heading {
            font-size: 1.25rem;
        }
    }

    /* =========================
   RECENT ANNOUNCEMENTS
   ========================= */
    .announcements-section {
        background: #ffffff;
        padding: 50px 0 40px;
    }

    .announcements-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 24px;
    }

    .announcement-card-link {
        text-decoration: none;
        color: inherit;
        display: block;
    }

    .announcement-card {
        background: #f8fafc;
        border-radius: 12px;
        padding: 18px 18px 16px;
        border: 1px solid rgba(15, 52, 96, 0.08);
        box-shadow: 0 8px 20px rgba(15, 52, 96, 0.08);
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .announcement-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 14px 28px rgba(15, 52, 96, 0.14);
        border-color: rgba(0, 102, 204, 0.5);
    }

    .announcement-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }

    .announcement-icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 102, 204, 0.08);
    }

    .announcement-icon i {
        font-size: 18px;
        color: #c31f26;
    }

    .announcement-badge-new {
        display: inline-block;
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        padding: 3px 8px;
        border-radius: 999px;
        background: #c31f26;
        color: #ffffff;
    }

    .announcement-title {
        font-size: 0.98rem;
        font-weight: 700;
        color: #102a43;
        margin-bottom: 6px;
    }

    .announcement-excerpt {
        font-size: 0.88rem;
        color: #4b5565;
        margin-bottom: 10px;
        flex: 1 1 auto;
    }

    .announcement-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 14px;
        align-items: center;
        font-size: 0.8rem;
        color: #6b7280;
    }

    .announcement-meta i {
        font-size: 14px;
        margin-right: 4px;
    }

    .announcement-date {
        display: inline-flex;
        align-items: center;
    }

    .announcement-status {
        padding: 2px 8px;
        border-radius: 999px;
        background: rgba(0, 102, 204, 0.06);
        color: #0052a3;
        font-weight: 600;
    }

    /* small screens */
    @media (max-width: 575.98px) {
        .announcements-section {
            padding: 40px 0 30px;
        }
    }

    /* =========================
       MARKET SUMMARY (DSE & TMX)
       ========================= */
    .market-summary-section {
        background: #f5f7fb;
        padding: 45px 0 40px;
    }

    .market-summary-card {
        background: #ffffff;
        border-radius: 16px;
        padding: 22px 22px 18px;
        box-shadow: 0 10px 26px rgba(15, 52, 96, 0.08);
        border: 1px solid rgba(15, 52, 96, 0.06);
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .market-summary-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 14px;
    }

    .market-exchange-pill {
        display: inline-block;
        padding: 3px 10px;
        border-radius: 999px;
        font-size: 0.75rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        background: rgba(0, 102, 204, 0.08);
        color: #0066cc;
        margin-bottom: 6px;
    }

    .market-exchange-pill.tmx-pill {
        background: rgba(195, 31, 38, 0.08);
        color: #c31f26;
    }

    .market-exchange-name {
        font-size: 1rem;
        font-weight: 700;
        color: #102a43;
    }

    .market-header-icon {
        font-size: 26px;
        color: #0066cc;
    }

    .market-summary-subtitle {
        font-size: 0.85rem;
        color: #6b7280;
        margin-bottom: 10px;
    }

    /* table */
    .market-summary-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.86rem;
    }

    .market-summary-table thead th {
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.1em;
        color: #9ca3af;
        font-weight: 600;
        padding: 4px 0 6px;
        border-bottom: 1px solid #e5e7eb;
    }

    .market-summary-table tbody td {
        padding: 7px 0;
        border-bottom: 1px dashed #e5e7eb;
    }

    .market-summary-table tbody tr:last-child td {
        border-bottom: none;
    }

    .market-symbol {
        font-weight: 700;
        color: #111827;
    }

    .market-name {
        display: block;
        font-size: 0.78rem;
        color: #6b7280;
    }

    .market-price {
        font-weight: 600;
        color: #111827;
    }

    .price-up {
        color: #0f9d58;
        font-weight: 600;
    }

    .price-down {
        color: #c31f26;
        font-weight: 600;
    }

    .market-summary-footer {
        margin-top: 10px;
        font-size: 0.82rem;
        color: #6b7280;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .market-link {
        font-size: 0.82rem;
        font-weight: 600;
        color: #0066cc;
        text-decoration: none;
    }

    .market-link i {
        vertical-align: middle;
    }

    .market-link:hover {
        text-decoration: underline;
    }

    @media (max-width: 991.98px) {
        .market-summary-section {
            padding: 35px 0 32px;
        }
    }

    /* =========================
   FAQ & HOW DO I QUICK HELP
   ========================= */
    .help-section {
        background: #ffffff;
        padding: 60px 0 50px;
    }

    .help-card {
        background: #f5f7fb;
        border-radius: 16px;
        padding: 24px 22px 20px;
        box-shadow: 0 10px 26px rgba(15, 52, 96, 0.08);
        border: 1px solid rgba(15, 52, 96, 0.06);
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .help-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
    }

    .help-pill {
        display: inline-block;
        padding: 3px 10px;
        border-radius: 999px;
        font-size: 0.75rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        background: rgba(0, 102, 204, 0.08);
        color: #0066cc;
        margin-bottom: 6px;
    }

    .help-pill-howdoi {
        background: rgba(195, 31, 38, 0.08);
        color: #c31f26;
    }

    .help-heading {
        font-size: 1.05rem;
        font-weight: 700;
        color: #102a43;
    }

    .help-icon {
        font-size: 28px;
        color: #0066cc;
    }

    .help-icon-howdoi {
        color: #c31f26;
    }

    .help-list {
        list-style: none;
        padding-left: 0;
        margin-bottom: 10px;
    }

    .help-list li {
        display: flex;
        align-items: flex-start;
        font-size: 0.9rem;
        color: #4b5565;
        margin-bottom: 6px;
    }

    .help-list i {
        font-size: 0.9rem;
        margin-right: 6px;
        margin-top: 3px;
    }

    .help-card .market-link {
        margin-top: auto;
    }

    @media (max-width: 767.98px) {
        .help-section {
            padding: 45px 0 40px;
        }
    }

    /* =========================
   LATEST NEWS + WELCOME NOTE
   ========================= */
    .news-welcome-section {
        background: #ffffff;
        padding: 45px 0 40px;
    }

    .latest-news-card {
        background: #f5f7fb;
        border-radius: 16px;
        padding: 24px 22px 20px;
        box-shadow: 0 10px 26px rgba(15, 52, 96, 0.08);
        border: 1px solid rgba(15, 52, 96, 0.06);
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .latest-news-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
    }

    .latest-news-pill {
        display: inline-block;
        padding: 3px 10px;
        border-radius: 999px;
        font-size: 0.75rem;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        background: rgba(0, 102, 204, 0.08);
        color: #0066cc;
        margin-bottom: 6px;
    }

    .latest-news-title {
        font-size: 1.05rem;
        font-weight: 700;
        color: #102a43;
    }

    .latest-news-icon {
        font-size: 28px;
        color: #0066cc;
    }

    .latest-news-list {
        list-style: none;
        padding-left: 0;
        margin: 0 0 12px;
    }

    .latest-news-item + .latest-news-item {
        border-top: 1px dashed #e5e7eb;
    }

    .latest-news-item {
        padding: 10px 0;
    }

    .latest-news-link {
        display: block;
        text-decoration: none;
        color: inherit;
    }

    .latest-news-link:hover .latest-news-main {
        color: #0066cc;
    }

    .latest-news-main {
        font-size: 0.95rem;
        font-weight: 600;
        color: #111827;
    }

    .latest-news-excerpt {
        font-size: 0.85rem;
        color: #4b5565;
        margin-top: 2px;
    }

    .latest-news-meta {
        font-size: 0.8rem;
        color: #6b7280;
        margin-top: 4px;
    }

    @media (max-width: 991.98px) {
        .news-welcome-section {
            padding: 35px 0 32px;
        }
    }

    /* =========================
   CMSA HEADER – STOCK / MARKET THEME
   ========================= */

/* Main strip */
.cmsa-masthead {
    position: relative;
    overflow: hidden;
    padding: 18px 0 !important;

    /* multi-layer background using CMSA blues + light gold glows */
    background:
        radial-gradient(circle at 12% 15%, rgba(255,255,255,0.85) 0, rgba(255,255,255,0) 55%),
        radial-gradient(circle at 88% 80%, rgba(255,255,255,0.75) 0, rgba(255,255,255,0) 60%),
        linear-gradient(180deg, #e3f2fd 0%, #bbdefb 40%, #90caf9 70%, #64b5f6 100%);
    border-bottom: 4px solid #0066cc; /* bottom blue bar instead of old ::after */
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

/* Background grid + “network” dots (like PDPC security pattern, but for markets) */
.cmsa-masthead::before {
    content: '';
    position: absolute;
    inset: -40px;
    pointer-events: none;
    opacity: 0.45;
    mix-blend-mode: soft-light;

    /* dotted grid + diagonal lines */
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.26) 0, rgba(255,255,255,0.26) 2px, transparent 3px),
        radial-gradient(circle, rgba(255,255,255,0.18) 0, rgba(255,255,255,0.18) 2px, transparent 3px),
        linear-gradient(120deg, rgba(255,255,255,0.18) 1px, transparent 1px),
        linear-gradient(60deg, rgba(255,255,255,0.12) 1px, transparent 1px);
    background-size:
        80px 80px,
        80px 80px,
        80px 80px,
        80px 80px;
    background-position:
        0 0,
        40px 40px,
        0 10px,
        0 -10px;
}

/* Moving “stock price line” overlay */
.cmsa-masthead::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.65;
    mix-blend-mode: screen;

    /* one bright diagonal band that slides across, mimicking a price curve */
    background-image:
        linear-gradient(120deg,
            rgba(255,255,255,0) 0%,
            rgba(255,255,255,0.95) 10%,
            rgba(255,255,255,0) 20%);
    background-size: 260px 140%;
    animation: cmsaStockWave 18s linear infinite;
}

/* slow, continuous movement left → right */
@keyframes cmsaStockWave {
    from { background-position: 0 0; }
    to   { background-position: -260px 0; }
}
/* =======================
   CMSA HEADER – DYNAMIC BACKGROUND
   ======================== */

.cmsa-masthead {
    position: relative;
    overflow: hidden;
    padding: 18px 0 !important;
    border-bottom: 3px solid #ffd200; /* CMSA yellow */
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.25) 0, transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(255,255,255,0.25) 0, transparent 55%),
        linear-gradient(120deg, #0052a3 0%, #008fe5 40%, #1f7ccc 70%, #0052a3 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* Moving “market grid” + subtle candlesticks */
.cmsa-masthead::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    /* 1) soft grid  2) vertical lines like stock candles */
    background-image:
        repeating-linear-gradient(
            to right,
            rgba(255, 255, 255, 0.08) 0,
            rgba(255, 255, 255, 0.08) 1px,
            transparent 1px,
            transparent 14px
        ),
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.06) 0,
            rgba(255, 255, 255, 0.06) 1px,
            transparent 1px,
            transparent 14px
        ),
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent 26px,
            rgba(0, 214, 111, 0.55) 26px,   /* green “up” candles */
            rgba(0, 214, 111, 0.55) 28px,
            transparent 28px,
            transparent 42px
        ),
        repeating-linear-gradient(
            to right,
            transparent 0,
            transparent 40px,
            rgba(255, 76, 76, 0.45) 40px,   /* red “down” candles */
            rgba(255, 76, 76, 0.45) 42px,
            transparent 42px,
            transparent 58px
        );
    background-size:
        28px 28px,
        28px 28px,
        140px 120%,
        160px 120%;
    opacity: 0.45;
    mix-blend-mode: screen;
    animation: cmsaMarketFlow 28s linear infinite;
}

/* Soft blue/yellow “wave” behind the text & logos */
.cmsa-masthead::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 80%, rgba(0, 168, 89, 0.25) 0, transparent 55%),
        radial-gradient(circle at 85% 80%, rgba(255, 210, 0, 0.32) 0, transparent 55%),
        linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.45) 0%,
            rgba(255, 255, 255, 0.08) 45%,
            rgba(255, 255, 255, 0.0) 80%
        );
    clip-path: path("M0,60 C180,10 340,0 520,35 C720,80 920,30 1200,50 L1200,150 L0,150 Z");
    opacity: 0.9;
    transform-origin: center;
    animation: cmsaWave 18s ease-in-out infinite alternate;
}

/* Slight speed-up on hover so it feels reactive */
.cmsa-masthead:hover::before {
    animation-duration: 18s;
}

/* Animations */
@keyframes cmsaMarketFlow {
    0% {
        background-position:
            0 0,
            0 0,
            0 0,
            0 0;
    }
    100% {
        background-position:
            40px 0,
            0 40px,
            -260px 0,
            -320px 0;
    }
}

@keyframes cmsaWave {
    0% {
        transform: translateY(0px) scale(1);
    }
    100% {
        transform: translateY(6px) scale(1.02);
    }
}
/* =========================
   CMSA HEADER – DYNAMIC BACKGROUND WITH MOVING MARKET ICONS
   ======================== */

.cmsa-masthead {
    position: relative;
    overflow: hidden;
    padding: 18px 0 !important;
    border-bottom: 3px solid #ffd200; /* CMSA yellow */
    background:
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.25) 0, transparent 55%),
        radial-gradient(circle at 100% 0%, rgba(255,255,255,0.25) 0, transparent 55%),
        linear-gradient(120deg, #0052a3 0%, #008fe5 40%, #1f7ccc 70%, #0052a3 100%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

/* Soft moving market grid (kept subtle so icons stand out) */
.cmsa-masthead::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background-image:
        repeating-linear-gradient(
            to right,
            rgba(255, 255, 255, 0.05) 0,
            rgba(255, 255, 255, 0.05) 1px,
            transparent 1px,
            transparent 14px
        ),
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.04) 0,
            rgba(255, 255, 255, 0.04) 1px,
            transparent 1px,
            transparent 14px
        );
    background-size: 28px 28px, 28px 28px;
    opacity: 0.25;
    mix-blend-mode: screen;
    animation: cmsaMarketFlow 28s linear infinite;
}

/* Soft blue / yellow wave behind logos & title */
.cmsa-masthead::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 15% 80%, rgba(0, 168, 89, 0.25) 0, transparent 55%),
        radial-gradient(circle at 85% 80%, rgba(255, 210, 0, 0.32) 0, transparent 55%),
        linear-gradient(
            120deg,
            rgba(255, 255, 255, 0.40) 0%,
            rgba(255, 255, 255, 0.08) 45%,
            rgba(255, 255, 255, 0.0) 80%
        );
    clip-path: path("M0,60 C180,10 340,0 520,35 C720,80 920,30 1200,50 L1200,150 L0,150 Z");
    opacity: 0.9;
    transform-origin: center;
    animation: cmsaWave 18s ease-in-out infinite alternate;
}

/* Moving icon strips (stocks, money, charts) */
.cmsa-masthead-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1; /* above background, below logos/text */
}

.cmsa-icon-strip {
    position: absolute;
    display: inline-flex;
    gap: 34px;
    white-space: nowrap;
    font-size: 22px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
    animation: cmsaIconMarquee 32s linear infinite;
}

.cmsa-icon-strip i {
    opacity: 0.9;
}

/* top line of icons */
.cmsa-icon-strip-top {
    top: 10px;
    left: 0;
    opacity: 0.85;
    animation-duration: 30s;
}

/* bottom line of icons moving opposite direction */
.cmsa-icon-strip-bottom {
    bottom: 8px;
    left: 0;
    opacity: 0.65;
    font-size: 20px;
    animation-duration: 40s;
    animation-direction: reverse;
}

@keyframes cmsaMarketFlow {
    0%   { background-position: 0 0, 0 0; }
    100% { background-position: 40px 0, 0 40px; }
}

@keyframes cmsaWave {
    0%   { transform: translateY(0px) scale(1); }
    100% { transform: translateY(6px) scale(1.02); }
}

/* icons marquee – slide across header */
@keyframes cmsaIconMarquee {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === SIMPLE IMAGE-ONLY MASTHEAD ======================= */
.cmsa-masthead {
    position: relative;
    overflow: hidden;
    padding: 18px 0 !important;

    /* remove borders, shadows, colours */
    border-bottom: none !important;
    box-shadow: none !important;

    /*!* use Fimage.png as background *!*/
    /*background: url("/static/assets_new/images/extras/Fimage3.jpg")*/
    /*            center center / cover no-repeat !important;*/
}

/* kill gradient/grid overlays */
.cmsa-masthead::before,
.cmsa-masthead::after {
    content: none !important;
    background: none !important;
}

/* hide moving icon strips completely */
.cmsa-masthead-icons {
    display: none !important;
}

/* Lightweight live market ticker inspired by TMX's header treatment. */
.cmsa-market-ticker {
    position: relative;
    z-index: 9997;
    width: 100%;
    height: 40px;
    overflow: hidden;
    background: linear-gradient(90deg, #031a3d 0%, #064d96 48%, #031a3d 100%);
    border-bottom: 2px solid #c31f26;
    color: rgba(255, 255, 255, 0.86);
    font-size: 14px;
    line-height: 40px;
}

.cmsa-market-ticker::before,
.cmsa-market-ticker::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 2;
    width: 50px;
    pointer-events: none;
}

.cmsa-market-ticker::before {
    left: 0;
    background: linear-gradient(90deg, #031a3d, transparent);
}

.cmsa-market-ticker::after {
    right: 0;
    background: linear-gradient(270deg, #031a3d, transparent);
}

.cmsa-market-ticker-loading {
    display: block;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cmsa-market-ticker-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: cmsaMarketTicker var(--ticker-duration, 48s) linear infinite;
}

.cmsa-market-ticker:hover .cmsa-market-ticker-track,
.cmsa-market-ticker:focus .cmsa-market-ticker-track,
.cmsa-market-ticker:focus-within .cmsa-market-ticker-track {
    animation-play-state: paused;
}

.cmsa-market-ticker-group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cmsa-market-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 26px;
    white-space: nowrap;
    font-weight: 600;
}

.cmsa-market-ticker-source {
    padding: 2px 6px;
    border: 1px solid rgba(251, 191, 36, 0.55);
    border-radius: 4px;
    color: #ffffff;
    font-size: 10px;
    line-height: 16px;
    letter-spacing: 0.08em;
}

.cmsa-market-ticker-symbol {
    color: #fbbf24;
    letter-spacing: 0.04em;
}

.cmsa-market-ticker-price {
    color: rgba(255, 255, 255, 0.9);
}

.cmsa-market-ticker-change.is-positive {
    color: #10b981;
}

.cmsa-market-ticker-change.is-negative {
    color: #ef4444;
}

.cmsa-market-ticker-change.is-neutral {
    color: #94a3b8;
}

@keyframes cmsaMarketTicker {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-50%, 0, 0); }
}

@media (max-width: 767.98px) {
    .cmsa-market-ticker {
        font-size: 13px;
    }

    .cmsa-market-ticker-item {
        padding: 0 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cmsa-market-ticker {
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .cmsa-market-ticker-track {
        animation: none;
    }

    .cmsa-market-ticker-group[aria-hidden="true"] {
        display: none;
    }
}
