/* ... Previous Styles ... */
/* Existing styles preserved, just adding/modifying off-canvas */

/* Navigation Container */
.nav-wrapper {
    position: -webkit-sticky;
    /* Safari */
    position: sticky;
    top: 0;
    z-index: 99999;
    /* Ultra high to stay above everything */
    width: 100%;
    background-color: var(--primary-color);
    /* Ensure it has background when stuck */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}


/* Fix sticky context */
body,
html {
    overflow-x: clip;
    overflow-y: visible;
}

.site-header {
    overflow: visible;
}

.nagarikpana-navbar {

    background-color: var(--primary-color);

    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 999;
}

.nagarikpana-navbar .container {
    display: flex;
    align-items: center;
    height: 50px;
    padding: 0 15px;
}

.home-icon {
    color: #fff;
    padding: 0 15px;
    height: 50px;
    display: flex;
    align-items: center;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    margin-right: 0;
}

.home-icon .dashicons {
    font-size: 20px;
}

.home-icon:hover,
.home-icon.active-home {
    background: var(--secondary-color);
    color: #fff;
}

.menu-container {
    flex-grow: 1;
    height: 100%;
}

.menu-container.hide-on-mobile {
    display: block;
}

.nagarikpana-navbar .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    height: 100%;
}

.nagarikpana-navbar .menu>li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nagarikpana-navbar .menu>li>a {
    color: #fff;
    padding: 0 15px;
    font-weight: 500;
    font-size: 16px;
    text-decoration: none;
    height: 100%;
    display: flex;
    align-items: center;
    transition: background 0.3s;
}

.nagarikpana-navbar .menu>li>a:hover,
.nagarikpana-navbar .menu>li.current-menu-item>a,
.nagarikpana-navbar .menu>li.current-menu-ancestor>a,
.nagarikpana-navbar .menu>li.current_page_item>a {
    background: rgba(255, 255, 255, 0.1);
}

.nagarikpana-navbar .menu-item-has-children>a,
.nagarikpana-navbar .page_item_has_children>a {
    padding-right: 32px !important;
}

.nagarikpana-navbar .menu-item-has-children>a::after,
.nagarikpana-navbar .page_item_has_children>a::after {
    content: "\f347";
    font-family: "dashicons";
    font-size: 14px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

.nagarikpana-navbar .sub-menu,
.nagarikpana-navbar .children {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0;
    list-style: none;
    z-index: 1000;
}

.nagarikpana-navbar .menu>li:hover .sub-menu,
.nagarikpana-navbar .menu>li:hover .children {
    display: block;
}

.nagarikpana-navbar .sub-menu li a,
.nagarikpana-navbar .children li a {
    color: #1a1a1a;
    padding: 12px 20px;
    display: block;
    border-bottom: 1px solid #f0f0f0;
    height: auto;
}

.nagarikpana-navbar .sub-menu li a:hover,
.nagarikpana-navbar .children li a:hover {
    background: #f9f9f9;
    color: var(--primary-color);
    padding-left: 25px;
}

.nav-right-icons {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.nav-right-icons .nav-icon-link,
.nav-right-icons .menu-toggle-desktop {
    color: #fff;
    background: none;
    border: none;
    padding: 0 15px;
    height: 50px;
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
}

.nav-right-icons .nav-icon-link:hover,
.nav-right-icons .menu-toggle-desktop:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-right-icons .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.menu-toggle {
    display: none;
}

.trending-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.trending-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trending-left {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.trending-label {
    font-weight: 700;
    color: var(--primary-color);
    margin-right: 15px;
    font-size: 18px;
    white-space: nowrap;
}

.trending-tags a {
    color: #666;
    margin-right: 15px;
    font-size: 14px;
    font-weight: 500;
}

.trending-tags a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.trending-right-search {
    width: 250px;
    position: relative;
}

.header-search-form {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.header-search-form .search-field {
    border: none;
    padding: 8px 10px;
    width: 100%;
    font-size: 14px;
    outline: none;
}

.header-search-form .search-submit {
    background: #fff;
    border: none;
    color: #999;
    padding: 0 10px;
    cursor: pointer;
}

.header-search-form .search-submit:hover {
    color: var(--primary-color);
}

/* --- OFF-CANVAS / DRAWERS --- */

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

/* Generic Side Drawer Class */
.side-drawer {
    position: fixed;
    top: 0;
    right: -350px;
    /* Hidden off-screen */
    width: 320px;
    max-width: 80%;
    height: 100%;

    background: #fff;
    z-index: 9999;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.side-drawer.active {
    right: 0;
}

/* Main Menu Drawer Specifics */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 2px solid var(--primary-color);
    background: #fff;
}

.mobile-logo img {
    max-height: 40px;
    width: auto;
}

.side-drawer-close {
    background: var(--primary-color);
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-list li {
    border-bottom: 1px solid #f5f5f5;
}

.mobile-menu-list li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
}

.mobile-menu-list li a:hover {
    background: #f9f9f9;
    color: var(--primary-color);
}

.mobile-menu-list li a::before {
    content: "\f115";
    font-family: "dashicons";
    margin-right: 10px;
    color: #999;
}

.mobile-menu-list .menu-item-has-children>a::after {
    content: "\f347";
    font-family: "dashicons";
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

.mobile-menu-list .sub-menu,
.mobile-menu-list .children {
    display: none;
    background: #f9f9f9;
    padding-left: 0;
    list-style: none;
}

.mobile-menu-list .sub-menu li a {
    padding-left: 40px;
    font-size: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-menu-list li.submenu-open>.sub-menu {
    display: block;
}

/* Updates Drawer Specifics (For Latest Posts) */
.updates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 0;
    border-bottom: 1px solid #ddd;
}

.updates-tabs {
    display: flex;
    flex-grow: 1;
}

.tab-btn {
    flex: 1;
    background: #f1f1f1;
    border: none;
    padding: 15px 0;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    color: #666;
    border-bottom: 3px solid transparent;
}

.tab-btn.active {
    background: #fff;
    color: #e67817;
    /* Reddish color for active tab as per screenshot */
    border-bottom-color: #e67817;
}

.side-drawer-close.from-updates {
    background: #e67817;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    margin: 0 10px;
}

.updates-body {
    padding: 0;
    flex-grow: 1;
    overflow-y: auto;
    background: #f9f9f9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.updates-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.updates-list li {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
    position: relative;
    padding-left: 35px;
}

.updates-list li::before {
    content: "•";
    color: #e67817;
    font-size: 24px;
    position: absolute;
    left: 15px;
    top: 10px;
}

.updates-list li a {
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
}

.updates-list li a:hover {
    color: var(--primary-color);
}


/* Responsive Adjustments */
@media (max-width: 991px) {
    .menu-container.hide-on-mobile {
        display: none;
    }

    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 24px;
        margin-left: auto;
    }

    .nav-right-icons {
        display: flex;
        margin-left: auto;
    }


    .trending-bar .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .trending-right-search {
        width: 100%;
        margin-top: 10px;
    }

    .trending-left {
        display: none;
    }

    /* Full width drawer on mobile */
    .side-drawer {
        width: 100%;
        max-width: 100%;
        right: -100%;
        /* Fully hide off screen */
    }
}