/* =========================
   HEADER BASE
========================= */
.cx-header {
    background: #2d5ea8;
    width: 100%;
}

/* =========================
   CONTAINER
========================= */
.cx-container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 18px 20px;

    display: flex;
    align-items: center;
}

/* =========================
   LOGO
========================= */
.cx-logo img {
    height: 40px;
    display: block;
}

/* =========================
   NAV
========================= */
.cx-nav {
    margin-left: auto;
}

/* =========================
   MENU
========================= */
.cx-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cx-menu li a {
    color: #ffffff;
    font-size: 15px;
    text-decoration: none;
    font-weight: 400;
    font-style: normal;
}

/* CTA POSITION */
.cx-menu li.login {
    margin-left: auto;
}

.cx-menu li.login,
.cx-menu li.register {
    margin-right: 0;
}

/* LOGIN */
.cx-menu li.login a {
    background: #e6e6e6;
    color: #1f3c73;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 400;
    font-size: 18px;
}

/* REGISTER */
.cx-menu li.register {
    margin-left: 4px;
}

.cx-menu li.register a {
    background: #39FF14;
    color: #000;
    padding: 6px 16px;
    border-radius: 6px;
    font-weight: 400;
    font-size: 18px;
}

/* =========================
   RIGHT (FLAG)
========================= */
.cx-right {
    display: flex;
    align-items: center;
    margin-left: 12px;
}

.cx-flag img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    display: block;
}

/* =========================
   MOBILE HEADER ELEMENTS
========================= */
.cx-mobile-menu-toggle,
.cx-mobile-register-btn,
.cx-mobile-menu-overlay,
.cx-mobile-drawer {
    display: none;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {
    .cx-menu {
        gap: 14px;
    }
}

@media (max-width: 768px) {
    .cx-header {
        background: #2862ad;
        position: relative;
        z-index: 10020;
    }

    .cx-container {
        max-width: 100%;
        height: 52px;
        padding: 0 12px;
        box-sizing: border-box;
    }

    .cx-mobile-menu-toggle {
        width: 34px;
        height: 34px;
        padding: 0;
        margin: 0 12px 0 0;
        border: 0;
        outline: 0;
        background: transparent;
        box-shadow: none;
        cursor: pointer;

        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;

        flex: 0 0 auto;
    }

    .cx-mobile-menu-toggle span {
        width: 28px;
        height: 3px;
        display: block;
        background: #ffffff;
        border-radius: 10px;
    }

    .cx-logo {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        margin: 0;
    }

    .cx-logo img {
        height: 24px;
        max-width: 120px;
        width: auto;
    }

    .cx-nav {
        display: none;
    }

    .cx-right {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .cx-mobile-register-btn {
        height: 34px;
        min-width: 90px;
        padding: 0 15px;
        border-radius: 6px;

        background: #52dd19;
        color: #ffffff !important;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        font-size: 14px;
        font-weight: 400;
        font-style: normal;
        line-height: 1;
        text-decoration: none !important;

        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
        flex: 0 0 auto;
    }

    .cx-flag img {
        width: 32px;
        height: 32px;
    }

    .cx-mobile-menu-overlay {
        position: fixed;
        top: 52px;
        left: 0;
        width: 100%;
        height: calc(100vh - 52px);
        background: rgba(0,0,0,0.48);
        z-index: 10005;
    }

    body.cx-mobile-menu-open .cx-mobile-menu-overlay {
        display: block;
    }

    .cx-mobile-drawer {
        position: fixed;
        top: 52px;
        left: 0;
        width: 286px;
        max-width: 84vw;
        height: calc(100vh - 52px);

        background: linear-gradient(180deg, #1559b2 0%, #063a84 100%);
        box-shadow: 8px 0 24px rgba(0,0,0,0.35);

        transform: translateX(-105%);
        transition: transform 0.28s ease;
        z-index: 10010;

        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }

    body.cx-mobile-menu-open .cx-mobile-drawer {
        transform: translateX(0);
    }

    .cx-mobile-drawer-inner {
        padding: 18px 16px 28px;
    }

    .cx-mobile-menu {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .cx-mobile-menu li {
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255,255,255,0.14);
    }

    .cx-mobile-menu li a {
        display: block;
        padding: 14px 4px;
        color: #ffffff !important;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.25;
        text-decoration: none !important;
        letter-spacing: 0.2px;
    }

    .cx-mobile-menu li a:hover {
        color: #6cff2a !important;
    }

    /* Register is already shown as the green mobile button */
    .cx-mobile-menu li.login,
    .cx-mobile-menu li.register {
        display: none;
    }
}

/* =========================
   FONT
   Use loaded Montserrat, not Poppins
========================= */
.cx-header,
.cx-header *,
.cx-menu,
.cx-menu *,
.cx-menu li,
.cx-menu li a,
.cx-menu li a *,
.cx-menu li.login a,
.cx-menu li.login a *,
.cx-menu li.register a,
.cx-menu li.register a *,
.cx-mobile-register-btn,
.cx-mobile-register-btn *,
.cx-mobile-menu,
.cx-mobile-menu *,
.lang-popup,
.lang-popup * {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif !important;
    font-style: normal !important;
    font-synthesis: none;
}

/* =====================================================
   🔥 LANGUAGE POPUP (FINAL UI MATCH)
===================================================== */

.lang-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.lang-popup.active {
    display: block;
}

/* OVERLAY */
.lang-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}

/* POPUP BOX */
.lang-popup-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 520px;
    background: #f5f7fa;
    border-radius: 10px;
    overflow: hidden;
}

/* HEADER */
.lang-popup-header {
    background: #2f5fa7;
    color: #fff;
    padding: 14px 18px;
    font-weight: 600;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* CLOSE */
.lang-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

/* LIST */
.lang-popup-list {
    padding: 10px 0;
}

/* ROW */
.lang-row {
    display: flex;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid #d5dce5;
}

/* LEFT */
.lang-left {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 140px;
}

.lang-left img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.lang-left span {
    color: #2f5fa7;
    font-weight: 600;
}

/* RIGHT */
.lang-right {
    display: flex;
    gap: 14px;
    flex: 1;
}

/* BUTTON */
.lang-btn {
    min-width: 120px;
    text-align: center;

    padding: 8px 14px;
    border-radius: 8px;

    border: 1px solid #2f5fa7;
    color: #2f5fa7;
    background: #fff;

    text-decoration: none;
    font-size: 14px;

    transition: 0.2s;
}

/* ACTIVE */
.lang-btn.active {
    background: #dbe6f6;
}

/* HOVER */
.lang-btn:hover {
    background: #2f5fa7;
    color: #fff;
}

/* MOBILE */
@media (max-width: 600px) {
    .lang-popup-box {
        width: 90%;
    }

    .lang-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .lang-left {
        width: 100%;
    }

    .lang-right {
        width: 100%;
        flex-wrap: wrap;
    }
}

/* =========================
   FINAL HEADER NORMAL TEXT OVERRIDE
   Desktop + Mobile
========================= */
body .cx-header .cx-menu > li > a,
body .cx-header .cx-menu > li > a:link,
body .cx-header .cx-menu > li > a:visited,
body .cx-header .cx-menu > li.login > a,
body .cx-header .cx-menu > li.register > a,
body .cx-header .cx-mobile-register-btn,
body .cx-header .cx-mobile-drawer .cx-mobile-menu > li > a {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    transform: none !important;
    text-decoration: none !important;
}

/* If menu label was added with <em> or <i> from WP menu */
body .cx-header .cx-menu > li > a em,
body .cx-header .cx-menu > li > a i,
body .cx-header .cx-menu > li > a span,
body .cx-header .cx-mobile-drawer .cx-mobile-menu > li > a em,
body .cx-header .cx-mobile-drawer .cx-mobile-menu > li > a i,
body .cx-header .cx-mobile-drawer .cx-mobile-menu > li > a span {
    font-family: 'Montserrat', Arial, Helvetica, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    transform: none !important;
}

/* 26 sept new update nav bar css   */

/* Separate mobile drawer menu */
@media (max-width: 767px) {
    .cx-mobile-drawer .cx-mobile-drawer-inner {
        padding: 16px 20px 32px;
    }

    .cx-mobile-drawer .cx-mobile-menu,
    .cx-mobile-drawer .sub-menu {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .cx-mobile-drawer .cx-mobile-menu > li > a {
        display: block;
        padding: 14px 4px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.22);
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        text-decoration: none;
    }

    .cx-mobile-drawer .sub-menu {
        padding-left: 18px;
    }

    .cx-mobile-drawer .sub-menu a {
        display: block;
        padding: 11px 4px;
        color: #fff;
        text-decoration: none;
    }

    .cx-mobile-drawer a:hover,
    .cx-mobile-drawer a:focus {
        color: #8cff00;
    }
}