:root {
    --bg: #f7f2ea;
    --header-bg: #f7f2ea;
    --pill: #8c867b;
    --pill-hover: #7a7468;
    --pill-fg: #faf9f7;
    /* Selected nav pill */
    --pill-active-bg: #408e40;
    --pill-active-fg: #ffffff;
    --pill-active-border: #2f6b2f;
    --text: #000;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg);
}

/* ================= HEADER ================= */
.main-header {
    background: var(--header-bg);
    padding: 16px 0;
    position: relative;
    z-index: 1030;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-container {
    width: 95%;
    max-width: 1450px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

/* Header logo image (IndianEconomy.com LMS banner) */
.site-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    line-height: 0;
}

.site-brand__img {
    display: block;
    height: clamp(28px, 5.5vw, 56px);
    width: auto;
    max-width: min(320px, 58vw);
    object-fit: contain;
}

.footer-brand-logo {
    display: block;
    width: auto;
    max-width: min(280px, 85vw);
    height: auto;
    max-height: clamp(40px, 10vw, 56px);
    object-fit: contain;
}

/* LEGACY: image-only logo blocks (student hub, old pages) */
.logo-box img {
    height: clamp(24px, 5.2vw, 56px);
    width: auto;
    max-width: min(320px, 52vw);
    object-fit: contain;
}

/* NAV MENU — centered between brand and user */
.nav-menu {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px 12px;
    margin: 0;
    padding: 0;
}

/* NAV PILLS */
.nav-pill {
    padding: 10px 20px;
    background: var(--pill);
    border-radius: 999px;
    color: var(--pill-fg);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
    border: 2px solid transparent;
    outline: none;
    white-space: nowrap;
}

.nav-pill:hover {
    background: var(--pill-hover);
    color: #fff;
}

.nav-pill.active,
.nav-updates-dropdown .dropdown-toggle.nav-pill.active {
    background: var(--pill-active-bg);
    color: var(--pill-active-fg);
    border-color: var(--pill-active-border);
    box-shadow: 0 2px 12px rgba(64, 142, 64, 0.35);
}

.nav-pill.active:hover,
.nav-updates-dropdown .dropdown-toggle.nav-pill.active:hover {
    background: #357a35;
    color: #fff;
    border-color: #2d682d;
}

/* Bootstrap caret on active Updates pill */
.nav-updates-dropdown .dropdown-toggle.nav-pill.active::after {
    border-top-color: var(--pill-active-fg);
}

.nav-updates-dropdown .dropdown-toggle::after {
    margin-left: 8px;
}

.nav-updates-menu .dropdown-item {
    font-weight: 600;
    font-size: 14px;
    padding: 8px 14px;
}

.nav-updates-menu .dropdown-item.active,
.nav-updates-menu .dropdown-item:active {
    background: #eef2ff;
    color: #1f2937;
}

/* User area: Login / profile dropdown */
.header-user {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Plain text contact (guests) — not a nav pill */
.header-contact-link {
    font-weight: 600;
    font-size: 14px;
    color: #4b5563;
    text-decoration: none;
    white-space: nowrap;
    padding: 6px 4px;
}
.header-contact-link:hover {
    color: #111827;
    text-decoration: underline;
}

.header-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #828b91;
    border: 1px solid #6f777d;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    min-height: 44px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(130, 139, 145, 0.28);
    transition: background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.header-login-btn i {
    color: #fff;
}

.header-login-btn span {
    color: #fff;
}

.header-login-btn:hover {
    background: #6f777d;
    border-color: #656c72;
    color: #fff;
    box-shadow: 0 3px 10px rgba(130, 139, 145, 0.35);
}

.header-login-btn:hover i,
.header-login-btn:hover span {
    color: #fff;
}

.header-user-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #828b91 !important;
    border: 1px solid #6f777d !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 14px;
    min-height: 44px;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(130, 139, 145, 0.28);
}

.header-user-btn i {
    color: #fff !important;
}

.header-user-btn::after {
    margin-left: 4px;
    border-top-color: #fff !important;
}

.header-user-btn span {
    text-transform: capitalize;
    color: #fff !important;
}

.header-user-btn:hover,
.header-user-btn:focus,
.header-user-btn.show {
    background: #6f777d !important;
    border-color: #656c72 !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(130, 139, 145, 0.35);
}

.header-user-btn:hover i,
.header-user-btn:focus i,
.header-user-btn.show i {
    color: #fff !important;
}

.header-user-btn:hover span,
.header-user-btn:focus span,
.header-user-btn.show span {
    color: #fff !important;
}

.header-user-btn:hover::after,
.header-user-btn:focus::after,
.header-user-btn.show::after {
    border-top-color: #fff !important;
}

.header-user-dropdown .dropdown-menu {
    min-width: 220px;
    z-index: 10001;
}

.header-user-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 14px;
}

.header-user-menu .dropdown-item i {
    width: 16px;
    text-align: center;
}

/* Student notification bell */
.header-notifications-dropdown {
    position: relative;
}

.header-notifications-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 8px !important;
    color: #374151 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}

.header-notifications-btn i {
    font-size: 1.05rem;
    color: #374151 !important;
}

.header-notifications-btn::after {
    display: none !important;
}

.header-notifications-btn:hover,
.header-notifications-btn:focus,
.header-notifications-btn.show {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
}

.header-notifications-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    border: 2px solid #fff;
}

.header-notifications-menu {
    width: min(360px, calc(100vw - 24px));
    max-height: min(70vh, 520px);
    overflow: hidden;
    flex-direction: column;
    z-index: 10002;
}

.header-notifications-menu.show {
    display: flex !important;
}

.header-notifications-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 10px;
    border-bottom: 1px solid #eef2f7;
}

.header-notifications-head__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.header-notifications-close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.header-notifications-close:hover {
    background: #e5e7eb;
    color: #111827;
}

.header-notifications-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1060;
    background: rgba(15, 23, 42, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.header-notifications-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

body.lms-notif-open .main-header {
    z-index: 1066;
}

.header-notifications-head strong {
    font-size: 15px;
    color: #111827;
}

.header-notifications-mark-all {
    border: 0;
    background: transparent;
    color: #2c533e;
    font-size: 12px;
    font-weight: 700;
    padding: 0;
}

.header-notifications-mark-all:hover {
    text-decoration: underline;
}

.header-notifications-list {
    overflow-y: auto;
    max-height: min(58vh, 420px);
}

.header-notifications-empty {
    padding: 24px 16px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.header-notifications-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
}

.header-notifications-item:hover {
    background: #f9fafb;
    color: inherit;
}

.header-notifications-item.is-unread {
    background: #f8fafc;
}

.header-notifications-item__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--notif-icon-color, #64748b) 12%, #fff);
    color: var(--notif-icon-color, #64748b);
}

.header-notifications-item__emoji {
    font-size: 18px;
    line-height: 1;
}

.header-notifications-item__title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    line-height: 1.35;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.header-notifications-item__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-notifications-item__type {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #6b7280;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.header-notifications-item__text {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    line-height: 1.35;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.header-notifications-item.is-read .header-notifications-item__text {
    color: #4b5563;
    font-weight: 500;
}

.header-notifications-item__time {
    font-size: 12px;
    color: #9ca3af;
}

.header-notifications-item__dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: #2c533e;
}

.header-notifications-item.is-important {
    border-left: 3px solid #ca8a04;
}

.header-notifications-item.is-urgent {
    border-left: 3px solid #dc2626;
    background: #fef2f2;
}

.header-notifications-item__action {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #2c533e;
}

.header-notifications-item.is-expandable .header-notifications-item__text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.header-notifications-item__hint {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #2c533e;
}

.header-notifications-item__full {
    display: none !important;
}

.header-notif-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.header-notif-detail-modal[hidden] {
    display: none !important;
}

.header-notif-detail-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.header-notif-detail-modal__panel {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(85vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.header-notif-detail-modal.is-urgent .header-notif-detail-modal__panel {
    border-top: 4px solid #dc2626;
}

.header-notif-detail-modal.is-important .header-notif-detail-modal__panel {
    border-top: 4px solid #ca8a04;
}

.header-notif-detail-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 12px;
    border-bottom: 1px solid #eef2f7;
}

.header-notif-detail-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-notif-detail-modal__emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 18px;
    flex-shrink: 0;
}

.header-notif-detail-modal__close {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #f3f4f6;
    color: #4b5563;
    cursor: pointer;
}

.header-notif-detail-modal__close:hover {
    background: #e5e7eb;
}

.header-notif-detail-modal__body {
    padding: 16px 20px;
    overflow-y: auto;
}

.header-notif-detail-modal__image {
    display: block;
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 14px;
}

.header-notif-detail-modal__message {
    font-size: 15px;
    line-height: 1.65;
    color: #374151;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

.header-notif-detail-modal__foot {
    padding: 12px 20px 18px;
    border-top: 1px solid #eef2f7;
}

.header-notif-detail-modal__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    background: #2c533e;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.header-notif-detail-modal__action:hover {
    background: #234432;
    color: #fff !important;
}

body.lms-notif-detail-open {
    overflow: hidden;
}

.header-notifications-foot {
    padding: 10px 16px 12px;
    border-top: 1px solid #eef2f7;
    text-align: center;
}

.header-notifications-foot a {
    font-size: 13px;
    font-weight: 700;
    color: #2c533e;
    text-decoration: none;
}

.header-notifications-foot a:hover {
    text-decoration: underline;
}

/* HAMBURGER */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    border-radius: 10px;
    flex-shrink: 0;
}

.menu-toggle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: #000;
    border-radius: 3px;
    transition: .3s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.footer-margin {
    margin-top: 0 !important;
}



@media(max-width:1200px) {
    .nav-pill {
        padding: 9px 14px;
        font-size: 13px;
    }

    .nav-menu {
        gap: 8px;
    }

    .site-brand__img {
        height: clamp(24px, 4.8vw, 48px);
        max-width: min(280px, 50vw);
    }
}

@media(max-width:900px) {
    .header-container {
        padding: 0 12px;
        gap: 8px;
    }

    .menu-toggle {
        display: flex;
        order: 2;
    }

    .site-brand {
        order: 1;
        flex: 1;
        min-width: 0;
    }

    .header-user {
        order: 3;
        margin-left: 0;
    }

    .header-user-btn,
    .header-login-btn {
        min-height: 40px;
        padding: 8px 10px !important;
        border-radius: 10px !important;
    }

    .nav-menu {
        order: 4;
        flex: 1 1 100%;
        position: absolute;
        top: 100%;
        left: 12px;
        right: 12px;
        margin-top: 10px;
        background: #ffffff;
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
        border-radius: 12px;
        box-shadow: 0 14px 30px rgba(2, 6, 23, 0.08);
        display: flex;
        z-index: 1045;
        justify-content: stretch;
        max-height: min(72vh, calc(100dvh - 120px));
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        border: 1px solid rgba(15, 23, 42, 0.06);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px) scale(0.985);
        transform-origin: top center;
        transition: opacity 0.2s ease, transform 0.24s ease, visibility 0.2s ease;
    }

    .nav-menu.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .nav-pill {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 44px;
        text-align: left;
        justify-content: flex-start;
        font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
        font-size: 17px;
        font-weight: 600;
        letter-spacing: 0.01em;
        line-height: 1.2;
        text-transform: none;
        white-space: normal;
        word-break: break-word;
        padding: 10px 18px;
        background: transparent;
        border-radius: 0;
        border: 0;
        border-left: 3px solid transparent;
        flex-shrink: 0;
        box-shadow: none;
        color: #0f172a;
        transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    }

    .nav-menu .nav-pill:hover,
    .nav-menu .nav-pill:focus-visible {
        background: #f8fafc;
        transform: none;
        box-shadow: none;
        color: #020617;
        opacity: 1;
        outline: none;
    }

    .nav-menu .nav-pill.active,
    .nav-menu .nav-updates-dropdown .dropdown-toggle.nav-pill.active {
        background: rgba(64, 142, 64, 0.12);
        border: 0;
        border-left: 4px solid var(--pill-active-bg);
        box-shadow: none;
        color: #1b5e1b;
        font-weight: 700;
    }

    .nav-menu .nav-updates-dropdown .dropdown-toggle.nav-pill.active::after {
        border-top-color: #1b5e1b;
    }

    .nav-menu .nav-pill:last-child {
        margin-bottom: 0;
    }

    .nav-menu .nav-pill + .nav-pill {
        border-top: 1px solid #f1f5f9;
    }

    .nav-updates-dropdown {
        width: 100%;
    }

    .nav-updates-dropdown .dropdown-toggle.nav-pill {
        width: 100%;
        border-top: 1px solid #f1f5f9;
    }

    .nav-updates-menu {
        width: calc(100% - 16px);
        margin: 6px 8px 8px;
        border: 1px solid #e5e7eb !important;
        position: static !important;
        transform: none !important;
    }

    .header-login-btn span,
    .header-user-btn span {
        max-width: 72px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Leave room for hamburger (~44px) + user chip + gaps — logo must shrink first */
    .site-brand__img {
        height: clamp(22px, 4.2vw, 34px);
        max-width: min(170px, calc(100vw - 148px));
    }

    .logo-box img {
        height: clamp(22px, 4.2vw, 34px);
        max-width: min(170px, calc(100vw - 148px));
    }

    body.lms-mobile-nav-open::before {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.26);
        backdrop-filter: blur(2px);
        z-index: 1040;
    }

    body.lms-mobile-nav-open .main-header {
        z-index: 1050;
    }

    .header-notifications-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .header-notifications-close {
        display: inline-flex;
    }

    .header-notifications-menu.dropdown-menu.show {
        position: fixed !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        transform: none !important;
        inset: auto 12px auto 12px !important;
        z-index: 1065 !important;
    }

    .header-notifications-item {
        align-items: flex-start;
    }

    .header-notifications-item__body {
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        padding: 12px 0;
    }

    .nav-pill {
        font-size: 16px;
        min-height: 42px;
        padding: 9px 16px;
    }

    .header-user-btn,
    .header-login-btn {
        width: 40px;
        min-width: 40px;
        justify-content: center;
        gap: 0;
        padding: 8px !important;
    }

    .header-user-btn span,
    .header-login-btn span {
        display: none;
    }

    .header-user-btn::after {
        display: none;
    }

    .header-notifications-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }

    .header-notifications-menu.dropdown-menu.show {
        left: 10px !important;
        right: 10px !important;
        inset: auto 10px auto 10px !important;
    }

    .site-brand__img {
        height: clamp(18px, 6.5vw, 28px);
        max-width: min(145px, calc(100vw - 108px));
    }

    .logo-box img {
        height: clamp(18px, 6.5vw, 28px);
        max-width: min(145px, calc(100vw - 108px));
    }
}

@media (max-width: 767px) {
    .footer-section {
        display: none;
    }
}




/* ================= MOBILE FOOTER CSS START ================= */

.mobile-icon-nav {
    display: none !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    max-width: 420px;
    background: #0f1b2a;
    border-radius: 16px 16px 0 0;
    padding: 10px 6px;
    display: flex;
    justify-content: space-between;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

/* Item */
.mobile-icon-nav a {
    flex: 1;
    text-align: center;
    color: #cfd8e3;
    font-size: 11px;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
}

/* Icon */
.mobile-icon-nav i {
    font-size: 18px;
    display: block;
    margin-bottom: 4px;
}

/* Active state */
.mobile-icon-nav a.active {
    color: #ffffff;
}

/* Active icon glow */
.mobile-icon-nav a.active i {
    color: #ffffff;
}

@media (max-width: 991px) {

    .mobile-icon-nav {
        display: flex !important;
        max-width: 100%;
        margin: 0 auto !important;
        padding-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    }

    /* Legacy strip + pill nav on the same page would stack; prefer pill only */
    body:has(.mobile-bottom-nav) .mobile-icon-nav {
        display: none !important;
    }

    body {
        padding-bottom: max(86px, calc(70px + env(safe-area-inset-bottom, 0px)));
    }

    .mobile-bottom-nav {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        width: 100% !important;
        z-index: 1080 !important;
        padding: 0 0 env(safe-area-inset-bottom, 0px);
        margin: 0 !important;
    }

    .mobile-bottom-nav .nav-pill-wrapper {
        margin: 0 auto;
        width: min(100%, 760px);
        padding-bottom: 0;
    }
}

/* ================= MOBILE FOOTER CSS END ================= */

/* ================= GLOBAL RESPONSIVE BASELINE ================= */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

img,
video,
canvas,
svg,
iframe {
    max-width: 100%;
    height: auto;
}

/* Prevent long content from forcing horizontal scroll */
p,
h1,
h2,
h3,
h4,
h5,
h6,
li,
td,
th,
.btn,
a {
    overflow-wrap: anywhere;
    word-break: normal;
}

/* Tables should remain usable on narrow screens */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Generic content tables (outside .table-responsive) */
table {
    max-width: 100%;
}

/* Keep form controls flexible on small devices */
input,
select,
textarea,
button {
    max-width: 100%;
}

@media (max-width: 767px) {
    .container,
    .container-sm,
    .container-md,
    .container-lg,
    .container-xl,
    .container-xxl {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

@media (min-width: 1600px) {
    .container-xxl,
    .container-xl,
    .container-lg {
        max-width: 1480px;
    }
}

/* Completed practice / exam attempt pill (gaming, exam, level-up, test series, course pickers) */
.practice-attempted-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 26px;
    padding: 4px 12px 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f2fffb;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.38) 0%, rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #7fe3b8 0%, #3cb87c 38%, #26965f 72%, #1a6b45 100%);
    border: 1px solid rgba(200, 255, 225, 0.75);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -3px 10px rgba(0, 70, 45, 0.22),
        0 3px 10px rgba(25, 120, 80, 0.35),
        0 0 0 1px rgba(0, 90, 55, 0.12);
    text-shadow: 0 1px 1px rgba(0, 55, 35, 0.45);
}

.practice-attempted-badge i {
    font-size: 13px;
    line-height: 1;
    opacity: 0.95;
    filter: drop-shadow(0 1px 1px rgba(0, 40, 25, 0.35));
}

.practice-attempted-badge--inline-end {
    margin-left: auto;
}

/* Rich HTML from admin TinyMCE (units, courses, materials descriptions) */
.unit-description-body p,
.lms-rich-html p {
    margin: 0 0 0.75em;
}

.unit-description-body p:last-child,
.lms-rich-html p:last-child {
    margin-bottom: 0;
}

.unit-description-body p.lms-p-indent,
.lms-rich-html p.lms-p-indent {
    text-indent: 2.5em;
}

.unit-description-body h1,
.unit-description-body h2,
.unit-description-body h3,
.unit-description-body h4,
.unit-description-body h5,
.unit-description-body h6,
.lms-rich-html h1,
.lms-rich-html h2,
.lms-rich-html h3,
.lms-rich-html h4,
.lms-rich-html h5,
.lms-rich-html h6 {
    font-weight: 700;
    line-height: 1.3;
    margin: 1em 0 0.5em;
    color: #0f172a;
}

.unit-description-body h1:first-child,
.unit-description-body h2:first-child,
.unit-description-body h3:first-child,
.unit-description-body p:first-child,
.lms-rich-html h1:first-child,
.lms-rich-html h2:first-child,
.lms-rich-html h3:first-child,
.lms-rich-html p:first-child {
    margin-top: 0;
}