.heading-bar,
body:has(.heading-bar) .wp-site-blocks,
body:has(.heading-bar) .site,
body:has(.heading-bar) .site-content,
body:has(.heading-bar) .wp-block-post-content,
body:has(.heading-bar) .entry-content {
    margin-top: 0 !important;
}

body:has(.heading-bar) {
    padding-top: 0 !important;
}

body:has(.heading-bar) .wp-site-blocks,
body:has(.heading-bar) .site,
body:has(.heading-bar) .site-content,
body:has(.heading-bar) .wp-block-post-content,
body:has(.heading-bar) .entry-content {
    padding-top: 0 !important;
}

body:has(.heading-bar) .wp-site-blocks > *:first-child,
body:has(.heading-bar) .wp-block-post-content > *:first-child,
body:has(.heading-bar) .entry-content > *:first-child {
    margin-top: 0 !important;
}

.heading-bar {
    position:sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    width: 80%;
    max-width: none;
    min-height: 62px;
    padding: 8px 16px;
    box-sizing: border-box;

    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98) 0%, rgba(17, 24, 39, 0.96) 46%, rgba(5, 94, 100, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 0;
    border-radius: 0 0 18px 18px;
    box-shadow:
        0 18px 38px rgba(15, 23, 42, 0.18),
        inset 0 -1px 0 rgba(245, 158, 11, 0.42);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
}

/* LEFT SIDE TITLE */
.heading-title {
    min-width: 0;
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 1px 14px rgba(255, 255, 255, 0.18);
}

.heading-title::before {
    content: "";
    width: 10px;
    height: 28px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: linear-gradient(180deg, #f59e0b, #14b8a6);
    box-shadow: 0 0 18px rgba(20, 184, 166, 0.5);
}

body:has(.view-notes-page) .heading-title {
    display: grid;
    gap: 2px;
    align-content: center;
    min-height: 55px;
    padding-left: 50px;
    background: url("/wp-content/uploads/parikshaGyan.webp") left center / 42px 42px no-repeat;
    font-size: 0;
}

body:has(.view-notes-page) .heading-title::before {
    content: "परीक्षा ज्ञान";
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #fff;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.05;
}

body:has(.view-notes-page) .heading-title::after {
    content: "Exam Notes & Learning Platform";
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.1;
    white-space: nowrap;
}

/* RIGHT SIDE ACTIONS */
.heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

/* BUTTON STYLE (logout + reset links) */
.heading-actions a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: #fff;

    padding: 8px 13px;
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);

    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.heading-actions a.nav-btn {
    color: #111827;
    background: linear-gradient(135deg, #fbbf24, #f59e0b 48%, #14b8a6 100%);
    border-color: rgba(255, 255, 255, 0.34);
    box-shadow:
        0 8px 18px rgba(245, 158, 11, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.48);
}

/* HOVER EFFECT */
.heading-actions a:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.28);
    box-shadow:
        0 10px 20px rgba(15, 23, 42, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.heading-actions a.nav-btn:hover {
    background: linear-gradient(135deg, #fde68a, #f59e0b 46%, #2dd4bf 100%);
    box-shadow:
        0 12px 24px rgba(20, 184, 166, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

@media (max-width: 600px) {
    .heading-bar {
        width: 100%;
        min-height: 108px;
        padding: 54px 12px 10px;
        gap: 10px;
        border-radius: 0 0 14px 14px;
    }

    .heading-title {
        font-size: 14px;
        line-height: 1.25;
        gap: 8px;
    }

    body:has(.view-notes-page) .heading-title {
        flex: 1 1 auto;
        max-width: calc(100% - 142px);
        min-height: 34px;
        padding-left: 38px;
        background-size: 32px 32px;
    }

    .heading-title::before {
        width: 8px;
        height: 24px;
    }

    body:has(.view-notes-page) .heading-title::after {
        max-width: 184px;
        overflow: hidden;
        font-size: 10px;
        line-height: 1.1;
        text-overflow: ellipsis;
    }

    body:has(.view-notes-page) .heading-title::before {
        font-size: 14px;
        line-height: 1.05;
    }

    .heading-actions {
        flex: 0 0 auto;
        gap: 6px;
    }

    .heading-actions a {
        min-height: 32px;
        padding: 6px 9px;
        font-size: 12px;
        line-height: 1.2;
    }
}
