/* ===== Marathi / English language toggle ===== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

html[data-lang="mr"] body,
html[data-lang="mr"] input,
html[data-lang="mr"] textarea,
html[data-lang="mr"] button {
    font-family: 'Noto Sans Devanagari', 'Noto Sans', Arial, sans-serif;
}

/* Small, compact toggle switch */
.lang-switch {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 999px;
    padding: 2px;
    line-height: 1;
    flex-shrink: 0;
    margin-left: 10px;
    vertical-align: middle;
}

.lang-switch .lang-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 999px;
    color: inherit;
    opacity: 0.65;
    line-height: 1.2;
    white-space: nowrap;
    transition: background .2s, opacity .2s, color .2s;
}

.lang-switch .lang-btn.active {
    background: #ffffff;
    opacity: 1;
    color: #222;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.top-contact .lang-switch {
    background: rgba(255, 255, 255, 0.18);
}

.top-contact .lang-switch .lang-btn {
    color: #fff;
}

.top-contact .lang-switch .lang-btn.active {
    background: #fff;
    color: #222;
}

.header-bottom .lang-switch {
    background: rgba(0, 0, 0, 0.07);
    margin-left: 0;
}

/* Keep logo + hamburger + toggle tidily on one row, on every screen size */
header .header-bottom .nav-row>.col-lg-3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-right-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* A span.i18n inside a heading must never pick up unrelated float rules
   (e.g. .session-title span { float:right } in style.css) */
.session-title h2 .i18n,
h1 .i18n,
h2 .i18n,
h3 .i18n,
h4 .i18n {
    float: none;
    display: inline;
}

/* ===== Responsive placement: mobile = near hamburger, desktop = in menu ===== */
@media screen and (min-width: 992px) {
    header .header-bottom .mobile-right-group .lang-switch {
        display: none !important;
    }
}

/* Mobile/tablet (<992px): logo shejari EN/मर + hamburger dista, menu madhla button lapto */
@media screen and (max-width: 991px) {
    header .header-bottom .mobile-right-group .lang-switch {
        display: inline-flex !important;
    }

    header .nav-col .lang-switch-item {
        display: none !important;
    }
}

.lang-switch-item {
    display: none;
}

@media screen and (min-width: 992px) {
    .lang-switch-item {
        display: flex;
        align-items: center;
        list-style: none;
        margin: 0 6px;
    }
}

/* ===== Improved pill design ===== */
.header-bottom .lang-switch {
    display: inline-flex;
    align-items: center;
    background: #eef1e9;
    border: 1px solid #d7ddcb;
    border-radius: 999px;
    padding: 3px;
    line-height: 1;
    margin-left: 8px;
}

.header-bottom .lang-switch .lang-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 999px;
    color: var(--primary-dark);
    opacity: 0.7;
    transition: background .25s ease, color .25s ease, opacity .25s ease, box-shadow .25s ease;
}

.header-bottom .lang-switch .lang-btn:hover {
    opacity: 1;
}

.header-bottom .lang-switch .lang-btn.active {
    background: var(--primary);
    color: #fff;
    opacity: 1;
    box-shadow: 0 3px 8px rgba(79, 122, 44, 0.35);
}

/* Keep it small on phones too */
@media (max-width: 767px) {
    .lang-switch {
        padding: 1px;
        margin-left: 6px;
        transform: scale(0.92);
    }

    .lang-switch .lang-btn {
        font-size: 10px;
        padding: 3px 7px;
    }
}

@media (max-width: 400px) {
    .lang-switch .lang-btn {
        padding: 3px 6px;
        font-size: 9.5px;
    }
}

/* ===== Desktop header: logo + links + toggle on one line, tight gap ===== */
@media screen and (min-width: 992px) {
    header .header-bottom .nav-row {
        flex-wrap: nowrap;
    }

    header .header-bottom .nav-row>.col-lg-3 {
        flex: 0 0 auto;
        width: auto;
        max-width: none;
        margin-right: 12px;
    }

    header .header-bottom .nav-row>.nav-col {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        min-width: 0;
    }

    header .nav-col .navbad {
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    header .nav-col .navbad li a {
        padding: 10px 10px;
    }

    header .nav-col .navbad li a::after {
        left: 10px;
        right: 10px;
    }

    header .nav-col .navbad .nav-button {
        margin-left: 6px;
    }

    header .nav-col .navbad .nav-donate-btn {
        padding: 10px 18px !important;
    }

    header .header-bottom .lang-switch {
        margin-left: 0;
    }

    header .brand-name {
        white-space: nowrap;
    }
}

@media screen and (min-width: 992px) and (max-width: 1199px) {
    header .nav-col .navbad li {
        font-size: .85rem;
    }

    header .nav-col .navbad li a {
        padding: 10px 7px;
    }
}