/* Sidebar Modern & Global Page Styles - Moved from body to head */
.sidebar-back-btn { display: flex; align-items: center; gap: 8px; padding: 10px 16px; margin-bottom: 8px; color: #64748b; font-size: 13px; font-weight: 500 !important; text-decoration: none !important; border-radius: 8px; transition: all 0.2s ease; cursor: pointer; border: none; background: none; width: 100%; text-align: left; }
.sidebar-back-btn:hover { background: #f1f5f9; color: #1e293b; text-decoration: none !important; }
.sidebar-back-btn svg { flex-shrink: 0; transition: transform 0.2s ease; }
.sidebar-back-btn:hover svg { transform: translateX(-3px); }
.sidebar-back-btn span { font-weight: 500 !important; }
.single-post-sidebar .active-cat-header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 4px; border-radius: 10px; background: #dbeafe2b; border: none; cursor: pointer; transition: background 0.2s ease; user-select: none; }
.single-post-sidebar .active-cat-header:hover { background: #dbeafe55; }
.single-post-sidebar .active-cat-header .cat-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.single-post-sidebar .active-cat-header .cat-icon img { width: 22px; height: 22px; border: none !important; }
.single-post-sidebar .active-cat-header .cat-title { flex: 1; font-size: 14px; color: #161c52 !important; font-weight: 500 !important; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.single-post-sidebar .active-cat-header .cat-toggle { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #94a3b8; transition: transform 0.3s ease, color 0.2s ease; transform: rotate(180deg); }
.single-post-sidebar .active-cat-header .cat-toggle.open { transform: rotate(270deg); color: #1e40af; }
.single-post-sidebar .cat-articles { padding: 4px 0 0 0; max-height: 2500px; overflow: hidden; transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease; opacity: 1; }
.single-post-sidebar .cat-articles.collapsed { max-height: 0; opacity: 0; padding: 0; }
.single-post-sidebar .cat-article-item { position: relative; padding: 8px 12px 8px 20px; border-left: 2px solid transparent; transition: all 0.2s ease; margin-left: 16px; }
.single-post-sidebar .cat-article-item:hover { border-left-color: #93c5fd; background: #f8fafc; border-radius: 0 6px 6px 0; }
.single-post-sidebar .cat-article-item.active-article { border-left: 3px solid #3b82f6 !important; background: #dbeafe2b; border-radius: 0 6px 6px 0 !important; }
.single-post-sidebar .cat-article-item a { display: block; font-size: 13px; font-weight: 400 !important; color: #64748b; text-decoration: none !important; line-height: 1.5; transition: color 0.2s ease; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.single-post-sidebar .cat-article-item:hover a { color: #1e293b; }
.single-post-sidebar .cat-article-item.active-article a { color: #007bff !important; }
.sidebar-subcat-post-item, .sidebar-sub-subcat-item { transition: background-color 0.2s ease, color 0.2s ease !important; border-radius: 6px !important; }
.sidebar-subcat-post-item:hover, .sidebar-sub-subcat-item:hover { background-color: #f1f5f9 !important; }
.sidebar-subcat-post-item:hover a, .sidebar-subcat-post-item:hover a span, .sidebar-sub-subcat-item:hover a, .sidebar-sub-subcat-item:hover a span { color: #1d4ed8 !important; }
.sidebar-subcat-post-item.active-article:hover a, .sidebar-subcat-post-item.active-article:hover a span { color: #3B82F6 !important; }
.subsection-item { padding-top: 10px !important; padding-bottom: 10px !important; }
.sidebar-divider { height: 1px; background: #e2e8f0; margin: 12px 16px; }
.cmgalaxy-sortable-top > .sidebar-section, .cmgalaxy-sortable-sub > .cmgalaxy-subcat-wrapper, .cmgalaxy-sortable-sub-sub > .sidebar-sub-subcat-item { cursor: grab !important; }
.cmgalaxy-sortable-top > .sidebar-section:active, .cmgalaxy-sortable-sub > .cmgalaxy-subcat-wrapper:active, .cmgalaxy-sortable-sub-sub > .sidebar-sub-subcat-item:active { cursor: grabbing !important; }
.sortable-ghost { opacity: 0.4; }

section:first-of-type {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Container Width & Layout Styles Across All Pages */
@media (min-width: 992px) {
    body.archive .container,
    body.archive.category .container,
    body.category .container,
    body.home .container,
    body.front-page .container,
    body.single .container,
    body.single-post .container,
    body.page .container,
    .single .tip_doc_area .container,
    .single-post .tip_doc_area .container,
    body.archive .container-xxl,
    body.archive.category .container-xxl,
    body.category .container-xxl,
    body.home .container-xxl,
    body.front-page .container-xxl,
    body.single .container-xxl,
    body.single-post .container-xxl,
    body.page .container-xxl,
    footer .container,
    footer .container-lg,
    footer .container-md,
    footer .container-sm,
    footer .container-xl,
    footer .container-xxl {
        max-width: 100% !important;
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
}
@media (min-width: 768px) {
    .category-left-sidebar-col { -ms-flex: 0 0 20% !important; flex: 0 0 20% !important; max-width: 20% !important; width: 20% !important; float: left; }
    .category-main-col, #category-posts-container, .category-main-with-right, .blog_single_info { position: relative; border-left: 1px solid #e2e8f0 !important; border-top: none !important; border-right: none !important; border-bottom: none !important; padding-left: 30px !important; padding-right: 30px !important; padding-top: 20px !important; padding-bottom: 0 !important; box-sizing: border-box !important; }
    .category-main-col::before { content: '' !important; display: block !important; position: absolute !important; left: -1px !important; top: -300px !important; width: 1px !important; height: 300px !important; background-color: #e2e8f0 !important; z-index: 1 !important; }
    .category-main-col:not(.category-main-with-right):not(.has-toc-sidebar) { -ms-flex: 0 0 80% !important; flex: 0 0 80% !important; max-width: 80% !important; width: 80% !important; float: left; }
    .category-main-col.category-main-with-right { -ms-flex: 0 0 55% !important; flex: 0 0 55% !important; max-width: 55% !important; width: 55% !important; float: left; }
    .category-main-col.has-toc-sidebar { -ms-flex: 0 0 60% !important; flex: 0 0 60% !important; max-width: 60% !important; width: 60% !important; float: left; }
    .category-right-sidebar-col { -ms-flex: 0 0 25% !important; flex: 0 0 25% !important; max-width: 25% !important; width: 25% !important; float: left; padding-left: 15px !important; }
    .doc-sidebar { -ms-flex: 0 0 20% !important; flex: 0 0 20% !important; max-width: 20% !important; width: 20% !important; float: left; }
}
@media (max-width: 1024px) {
    .category-left-sidebar-col, .category-main-col, .category-right-sidebar-col { -ms-flex: 0 0 100% !important; flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; float: none !important; }
    .category-left-sidebar-col.col-lg-3, .category-main-col.col-lg-6, .category-main-col.category-main-with-right, .category-right-sidebar-col.col-lg-3 { -ms-flex: 0 0 100% !important; flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; float: none !important; }
    .category-left-sidebar-col { margin-bottom: 1.5rem; border-right: none !important; }
    .category-left-sidebar-col, .category-right-sidebar-col { display: none !important; }
    .category-main-col { -ms-flex: 0 0 100% !important; flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }
    /* Breadcrumb Single-Line No-Wrap with Ellipsis (Mobile) */
    nav[aria-label="breadcrumb"],
    .blog_single_item nav[aria-label="breadcrumb"] {
        display: block !important;
        visibility: visible !important;
        padding: 0 !important;
        margin-bottom: 16px !important;
        width: 100% !important;
    }
    .breadcrumb,
    .blog_single_item .breadcrumb {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
        white-space: nowrap !important;
        font-size: 12px !important;
        gap: 0 !important;
        padding-left: 0 !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }
    .breadcrumb .breadcrumb-item:not(.active),
    .breadcrumb li:not(.active),
    .custom-breadcrumb li:not(.active),
    .blog_single_item .breadcrumb .breadcrumb-item:not(.active),
    .blog_single_item .breadcrumb li:not(.active) {
        display: inline-flex !important;
        align-items: center !important;
        visibility: visible !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }
    .breadcrumb .breadcrumb-item a,
    .custom-breadcrumb li a,
    .blog_single_item .breadcrumb .breadcrumb-item a {
        color: #1E2B5B !important;
        text-decoration: none !important;
        font-size: 12px !important;
    }
    .breadcrumb .breadcrumb-item+.breadcrumb-item,
    .blog_single_item .breadcrumb .breadcrumb-item+.breadcrumb-item {
        padding-left: 0 !important;
    }
    .breadcrumb .breadcrumb-item+.breadcrumb-item::before,
    .blog_single_item .breadcrumb .breadcrumb-item+.breadcrumb-item::before {
        content: "/" !important;
        padding: 0 6px !important;
        color: #3B82F6 !important;
        font-size: 12px !important;
        flex-shrink: 0 !important;
    }
    .breadcrumb .breadcrumb-item.active,
    .breadcrumb li.active,
    .custom-breadcrumb li.active,
    .blog_single_item .breadcrumb .breadcrumb-item.active,
    .blog_single_item .breadcrumb li.active {
        display: block !important;
        color: #5B6B8C !important;
        font-size: 12px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        flex: 0 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

/* Modern Sidebar & Left/Right Columns Sticky Styles */
.modern-sidebar { background: #ffffff; border: none !important; border-radius: 8px; padding: 0; margin-bottom: 2rem; position: sticky; top: 110px; max-height: calc(100vh - 120px); overflow-y: scroll; scrollbar-width: thin !important; scrollbar-color: #e2e8f0 transparent !important; }
.modern-sidebar::-webkit-scrollbar { width: 4px !important; background: transparent !important; }
.modern-sidebar::-webkit-scrollbar-track { background: transparent !important; }
.modern-sidebar::-webkit-scrollbar-thumb { background: #e2e8f0 !important; border-radius: 4px !important; }
.modern-sidebar::-webkit-scrollbar-thumb:hover { background: #94a3b8 !important; }
.modern-sidebar::-webkit-scrollbar-button { display: none !important; }

.cat-title { color: #161c52 !important; font-weight: 500 !important; }
.category-left-sidebar-col .modern-sidebar { width: 100%; max-width: 100%; margin-top: 5px; margin-left: 0; margin-right: 0; background: #ffffff; border: none !important; border-radius: 8px; padding: 0; max-height: calc(100vh - 140px); overflow-y: auto; }
.body_wrapper { overflow: visible !important; }
.category-main-col { position: relative; }
.category-left-sidebar-col { padding-left: 0 !important; padding-right: 0 !important; position: sticky; top: 130px; align-self: flex-start; }
.category-header-card, .category-main-col .card:first-child, .category-main-col>.card, .category-main-col>.row { margin-top: 0 !important; }

#category-posts-container { overflow-anchor: none !important; }
html.no-smooth-scroll { scroll-behavior: auto !important; }
.infinite-item-hidden { visibility: hidden !important; }

.category-right-sidebar-col { position: sticky; top: 70px; align-self: flex-start; max-height: calc(100vh - 170px); overflow-y: auto; margin-top: 0px; }
.cat-3-right-sidebar { background: #ffffff; border-radius: 8px; padding: 0; max-width: 240px; }
.category-right-sidebar-col::-webkit-scrollbar { width: 6px; }
.category-right-sidebar-col::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }
.category-right-sidebar-col::-webkit-scrollbar-thumb { background: #888; border-radius: 3px; }
.sidebar-widget { margin-top: 20px; padding: 0px; border-bottom: 1px solid #f1f5f9; }
.sidebar-widget:last-child { border-bottom: none; }
.widget-title { font-size: 1.125rem; font-weight: 600; color: #1e293b; margin-bottom: 1rem; }
.random-image-container { text-align: center; }
.random-image-container a { display: block; text-decoration: none; transition: opacity 0.2s ease, transform 0.2s ease; }
.random-image-container a:hover { opacity: 0.92; transform: translateY(-1px); }
.random-image-container img { max-width: 100%; height: auto; border-radius: 8px; }
.quick-info-content p { color: #64748b; font-size: 0.9375rem; line-height: 1.6; margin-bottom: 1rem; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; color: #475569; font-size: 0.875rem; }
.info-list li i { color: #10b981; font-size: 0.75rem; }

/* Single Post TOC Anchor Scrolling & Layout */
html { scroll-padding-top: 85px !important; }
.admin-bar html { scroll-padding-top: 117px !important; }
@media (max-width: 1024px) {
    html { scroll-padding-top: 70px !important; }
    .admin-bar html { scroll-padding-top: 116px !important; }
}
/* Related Articles Section */
.related-articles-section h5,
#related-articles {
    color: #484A61 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
}
.related-articles-section ul.list-unstyled {
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}
.related-articles-section .list-unstyled li {
    border-bottom: 1px solid #e5e7eb !important;
    margin: 0 !important;
    padding: 0 !important;
}
.related-articles-section .list-unstyled li:last-child {
    border-bottom: none !important;
}
.related-article-link {
    padding: 12px 16px !important;
    color: #484A61 !important;
    font-size: 14px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    width: 100% !important;
    min-width: 0 !important;
}
.related-article-link span {
    color: #484A61 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    transition: color 0.2s ease !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    display: block !important;
}
.related-article-link .related-article-icon,
.related-article-icon {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    max-width: 16px !important;
    min-height: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #3A7DFF !important;
    stroke: #3A7DFF !important;
    transition: all 0.2s ease !important;
}
.related-article-link .related-article-icon path {
    stroke: currentColor !important;
    transition: stroke 0.2s ease !important;
}
.related-article-link:hover {
    background-color: rgba(58, 125, 255, 0.06) !important;
    color: #3A7DFF !important;
}
.related-article-link:hover span {
    color: #3A7DFF !important;
}
.related-article-link:hover .related-article-icon {
    color: #3A7DFF !important;
    stroke: #3A7DFF !important;
    transform: translateX(3px) !important;
}
.related-article-link:hover .related-article-icon path {
    stroke: #3A7DFF !important;
}
.cmgalaxy-engagement-block a:hover { border-color: #3b82f6 !important; }
/* Post Navigation Cards (Previous / Next Post) */
.post-navigation-cards {
    display: flex !important;
    gap: 16px !important;
    margin-top: 2rem !important;
    width: 100% !important;
}

.nav-card {
    border: 1px solid #e5e7eb !important;
    border-radius: 16px !important;
    text-decoration: none !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
    flex: 1 1 45% !important;
    max-width: 48% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 24px !important;
}

.nav-card.next-card {
    margin-left: auto !important;
}

.nav-card:hover {
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.12) !important;
    transform: translateY(-2px) !important;
    border-color: #3b82f6 !important;
}

.nav-card h5,
.nav-card .nav-card-content h5 {
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
    transition: color 0.2s ease !important;
    color: #1f2937 !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
}

.nav-card:hover h5,
.nav-card:hover .nav-card-content h5 {
    color: #3b82f6 !important;
}

.nav-direction {
    color: #3b82f6 !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
}
.doc-sidebar { position: sticky; top: 100px; align-self: flex-start; margin-top: 20px; padding: 0 !important; transition: all 0.3s ease; }
.doc-sidebar .toc-title { padding-left: 24px !important; }
.doc-sidebar .toc-sidebar-image { padding-top: 20px; }

/* Apply scrolling to the TOC nav instead of the whole sidebar so the banner stays visible */
#docy-toc { max-height: calc(100vh - 300px); overflow-y: auto; }

/* Hide scrollbar for TOC on Desktop while keeping scroll functionality */
#docy-toc {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}
#docy-toc::-webkit-scrollbar {
    display: none !important;
    width: 0px !important;
    height: 0px !important;
    background: transparent !important;
}
#docy-toc::-webkit-scrollbar-track,
#docy-toc::-webkit-scrollbar-thumb {
    display: none !important;
    background: transparent !important;
}
#docy-toc .nav-link, #docy-toc a, #docy-tocs-mobile .nav-link, #docy-tocs-mobile a { position: relative !important; display: block !important; transition: color 0.3s ease !important; }
#docy-toc .nav-item.active > .nav-link::before, #docy-toc .nav-link.active::before, #docy-toc a.active::before, #docy-toc li.active > a::before, #docy-toc li.active > .nav-link::before, #docy-toc .toc-h1.active > .nav-link::before, #docy-toc .toc-h2.active > .nav-link::before, #docy-toc .toc-h3.active > .nav-link::before, #docy-tocs-mobile .nav-item.active > .nav-link::before, #docy-tocs-mobile .nav-link.active::before, #docy-tocs-mobile a.active::before, #docy-tocs-mobile li.active > a::before, #docy-tocs-mobile li.active > .nav-link::before { display: block !important; content: "" !important; width: 3px !important; background: #3B82F6 !important; position: absolute !important; left: 0 !important; top: 4px !important; bottom: 4px !important; border-radius: 3px !important; z-index: 10 !important; }

/* Mobile Menu & Drawer Styles */
.mobile-post-item.active-post { color: #007bff; font-weight: 600; }
.side_menu.dark_menu, .side_menu { position: fixed !important; top: 0 !important; left: -320px !important; width: 300px !important; height: 100% !important; background: #ffffff !important; z-index: 100002 !important; transition: left 0.3s ease !important; box-shadow: 2px 0 10px rgba(0,0,0,0.1) !important; overflow-y: auto !important; padding: 0 !important; }
.side_menu.dark_menu.menu-opened, .side_menu.menu-opened { left: 0 !important; box-shadow: 5px 0 25px rgba(0,0,0,0.15) !important; padding: 0 !important; }
.side_menu .mobile_nav_wrapper, .side_menu .mobile_nav_bottom, .side_menu .mobile-sidebar-container, .side_menu.menu-opened .mobile_nav_wrapper, .side_menu.menu-opened .mobile_nav_bottom, .side_menu.menu-opened .mobile-sidebar-container { padding: 0 !important; margin: 0 !important; }
.side_menu .mobile_menu_header { position: sticky !important; top: 0 !important; background: #ffffff !important; z-index: 1000 !important; display: flex !important; justify-content: space-between !important; align-items: center !important; padding: 14px 20px !important; border-bottom: 1px solid #e5e7eb !important; margin: 0 !important; }
.side_menu .mobile_menu_header img { height: 28px !important; width: 28px !important; object-fit: contain !important; display: block !important; flex-shrink: 0 !important; }
.cmgalaxy-mobile-logo img { height: 32px !important; width: 32px !important; object-fit: contain !important; display: block !important; flex-shrink: 0 !important; }
.cmgalaxy-mobile-logo-text { font-family: 'Instrument Sans', -apple-system, sans-serif !important; font-weight: 700 !important; color: #111827 !important; font-size: 16px !important; }
.expand-icon, .expand-icon-subcat { margin-left: 14px !important; margin-right: 0 !important; flex-shrink: 0 !important; }
.section-title { padding-right: 8px !important; }
.modern_sidebar_btn { display: flex !important; align-items: center; justify-content: center; background: transparent !important; border: none !important; padding: 8px !important; cursor: pointer !important; }
.modern_sidebar_drawer { position: fixed; top: 0; right: -320px; width: 300px; height: 100%; background: #ffffff; z-index: 100002; transition: right 0.3s ease; box-shadow: -2px 0 10px rgba(0,0,0,0.1); overflow-y: auto; }
.modern_sidebar_drawer.open { right: 0; }
.modern_sidebar_drawer .mobile_menu_header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; background: #fff; z-index: 10; }
.close_modern_sidebar { font-size: 20px; cursor: pointer; color: #374151; }
.modern_sidebar_drawer_content { padding: 10px; }
.mobile-category-accordion { margin-bottom: 5px; border-radius: 8px; overflow: hidden; }
.mobile-category-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: #ffffff; cursor: pointer; transition: all 0.2s ease; border-radius: 10px; margin-bottom: 2px; }
.mobile-category-header:hover { background: #f8fafc; }
.mobile-category-header.active { background: #f0f7ff; position: relative; border-radius: 10px; }
.mobile-category-header.active::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background-color: #007bff; border-radius: 0 2px 2px 0; }
.mobile-category-header.active .category-name { color: #007bff; font-weight: 600; }
.category-name { font-weight: 500; font-size: 0.95rem; color: #1e293b; flex: 1; }
.category-toggle { display: flex; align-items: center; gap: 8px; }
.category-count { background: #e2e8f0; color: #64748b; font-size: 11px; padding: 2px 8px; border-radius: 12px; font-weight: 600; }
.mobile-category-header.active .category-count { background: #dbeafe; color: #3b82f6; }
.toggle-arrow { transition: transform 0.2s ease; color: #9ca3af; }
.mobile-category-header.active .toggle-arrow { transform: rotate(90deg); color: #3b82f6; }
.mobile-category-posts { display: none; background: #ffffff; padding: 5px 0; }
.mobile-category-posts.open { display: block; }
.mobile-post-item { display: block; padding: 12px 20px 12px 35px; color: #475569; text-decoration: none; font-size: 0.9rem; border-bottom: none; transition: all 0.2s ease; border-left: 2px solid transparent; }
.mobile-post-item:hover { color: #007bff; background: #f8fafc; border-left-color: #007bff; padding-left: 35px; }
.no-posts { display: block; padding: 12px 15px 12px 35px; color: #9ca3af; font-size: 13px; font-style: italic; }

/* CMGalaxy Footer Styles */
footer { background-color: #041543 !important; color: rgba(250, 250, 250, 0.5) !important; padding: 40px 0px !important; font-family: Arial, sans-serif !important; width: 100% !important; }
footer .container,
footer .container-fluid {
    max-width: 100% !important;
    padding-left: 30px !important;
    padding-right: 30px !important;
    box-sizing: border-box !important;
}
.footer-content { width: 100% !important; }
.footer-row { display: flex !important; justify-content: space-between !important; align-items: top !important; flex-wrap: wrap !important; margin-bottom: 20px !important; }
.footer-logo img { max-height: 50px !important; }
.footer-links { display: flex !important; gap: 30px !important; }
.footer-links a { color: #ffffff !important; text-decoration: none !important; transition: color 0.3s ease, opacity 0.3s ease !important; opacity: 0.5 !important; }
.footer-links a:hover { color: #60A5FA !important; opacity: 1 !important; }
.footer-social p { margin-bottom: 10px !important; text-align: left !important; padding-left: 10px !important; }
.social-icons { display: flex !important; gap: 15px !important; }
.social-icon { color: #ffffff !important; font-size: 18px !important; transition: color 0.3s ease !important; background: #16168b38; }
.social-icon:hover { color: #00c2ff !important; }
.footer-copyright { text-align: start !important; border-top: 1px solid rgba(255, 255, 255, 0.1) !important; padding-top: 20px !important; }
.footer-copyright p { color: #ffffff !important; }
.footer-copyright a { color: #ffffff !important; text-decoration: none !important; }
.footer-copyright a:hover { color: #00c2ff !important; }
@media (max-width: 768px) {
    .footer-row { flex-direction: column !important; text-align: center !important; gap: 20px !important; }
    .footer-links, .footer-social { width: 100% !important; justify-content: center !important; }
    .cm-feedback-top { flex-direction: column !important; align-items: flex-start !important; text-align: left !important; gap: 14px !important; }
    .cm-feedback-title { text-align: left !important; width: 100% !important; }
    .cm-feedback-buttons { width: 100% !important; gap: 12px !important; }
    .cm-btn-vote { flex: 1 !important; justify-content: center !important; }
}
.pagination { margin-top: 0 !important; }

/* Category Detail Layout Styles */
.category-posts-row { margin-left: 0 !important; margin-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; width: 100% !important; }
.tw-cat-detail-container { width: 100% !important; max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
.tw-cat-articles-card { background: #ffffff; border: 1px solid #e1e4e8; border-radius: 12px; margin-bottom: 24px; overflow: hidden; box-shadow: 0 1px 3px rgba(27, 31, 35, 0.04); }
.tw-article-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #e1e4e8; text-decoration: none !important; transition: background-color 0.2s ease; }
.tw-article-row:last-child { border-bottom: none; }
.tw-article-row:hover { background-color: rgba(59, 130, 246, 0.04); }
.tw-article-title { font-weight: 600 !important; margin-bottom: 4px; color: #1f2937; transition: color 0.2s ease !important; }
.tw-article-row:hover .tw-article-title, .tw-article-title:hover { color: #3B82F6 !important; }
.tw-article-row:hover .tw-article-arrow, .tw-article-row:hover .tw-article-arrow svg { color: #3B82F6 !important; stroke: #3B82F6 !important; }

/* Author Avatar 18px x 18px & Flex Alignment */
.post-author-meta-box, .tw-category-meta { display: flex !important; align-items: center !important; gap: 8px !important; }
.author-avatar, .tw-author-avatar { width: 18px !important; height: 18px !important; min-width: 18px !important; max-width: 18px !important; flex-shrink: 0 !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; }
.author-avatar img, .tw-author-avatar img { width: 18px !important; height: 18px !important; object-fit: contain !important; display: block !important; border: none !important; vertical-align: middle !important; }
.author-info { display: flex !important; align-items: center !important; line-height: 1.4 !important; }

/* All Categories Page Styles */
.tw-category-container { width: 100%; margin: 20px 0; padding: 0 20px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif; }
.tw-category-card { display: flex; align-items: flex-start; background: #ffffff; border: 1px solid #e1e4e8; border-radius: 12px; padding: 24px; margin-bottom: 20px; text-decoration: none !important; color: inherit !important; transition: all 0.2s ease; box-shadow: 0 1px 3px rgba(27, 31, 35, 0.04); }
.tw-category-card:hover { box-shadow: 0 4px 12px rgba(27, 31, 35, 0.1); border-color: #0d6efd !important; transform: translateY(-2px); color: inherit !important; }
.tw-category-card:hover .tw-category-title { color: #0d6efd !important; }
.tw-category-icon { width: 56px; height: 56px; min-width: 56px; background: #ffffff; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-right: 24px; }

/* Single Post Specific Styles */
.blog_single_item .breadcrumb, .breadcrumb, .custom-breadcrumb { list-style: none !important; padding-left: 0 !important; display: flex !important; align-items: center !important; flex-wrap: nowrap !important; overflow: hidden !important; white-space: nowrap !important; font-size: 12px !important; margin-bottom: 20px !important; background: transparent !important; width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
.blog_single_item .breadcrumb li:not(.active), .blog_single_item .breadcrumb .breadcrumb-item:not(.active), .breadcrumb li:not(.active), .breadcrumb .breadcrumb-item:not(.active), .custom-breadcrumb li:not(.active) { list-style: none !important; font-size: 12px !important; font-weight: 400 !important; white-space: nowrap !important; flex-shrink: 0 !important; display: inline-flex !important; align-items: center !important; }
.blog_single_item .breadcrumb li a, .blog_single_item .breadcrumb .breadcrumb-item a, .breadcrumb .breadcrumb-item a, .custom-breadcrumb li a { color: #1E2B5B !important; text-decoration: none !important; font-size: 12px !important; font-weight: 400 !important; }
.blog_single_item .breadcrumb li a:hover, .blog_single_item .breadcrumb .breadcrumb-item a:hover, .breadcrumb .breadcrumb-item a:hover, .custom-breadcrumb li a:hover { text-decoration: underline !important; color: #3b82f6 !important; }
.blog_single_item .breadcrumb li.active, .blog_single_item .breadcrumb .breadcrumb-item.active, .breadcrumb li.active, .breadcrumb .breadcrumb-item.active, .custom-breadcrumb li.active { display: block !important; color: #5B6B8C !important; font-size: 12px !important; font-weight: 400 !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; flex: 0 1 auto !important; min-width: 0 !important; max-width: 100% !important; }
.blog_single_item .breadcrumb .breadcrumb-item+.breadcrumb-item::before, .breadcrumb .breadcrumb-item+.breadcrumb-item::before { content: "/" !important; padding: 0 6px !important; color: #3B82F6 !important; font-weight: 400 !important; font-size: 12px !important; flex-shrink: 0 !important; }
#docy-toc .nav-link, #docy-toc a, #docy-tocs-mobile .nav-link, #docy-tocs-mobile a,
#docy-toc .toc-h1 > .nav-link, #docy-tocs-mobile .toc-h1 > .nav-link,
#docy-toc .toc-h2 > .nav-link, #docy-tocs-mobile .toc-h2 > .nav-link,
#docy-toc .toc-h3 > .nav-link, #docy-tocs-mobile .toc-h3 > .nav-link,
.doc-nav .nav-link, .doc-nav a, .nav-sidebar.doc-nav .nav-link, .nav-sidebar.doc-nav a {
    position: relative !important;
    display: block !important;
    color: #111827 !important;
    transition: color 0.3s ease !important;
}
#docy-toc, #docy-tocs-mobile { padding-left: 0 !important; }
#docy-toc ul,
#docy-tocs-mobile ul,
.doc-nav ul,
.nav-sidebar.doc-nav ul,
.bottom_table_content nav ul,
aside.bottom_table_content nav ul {
    border-left: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    list-style: none !important;
}
#docy-toc .nav-link, #docy-tocs-mobile .nav-link { font-weight: 400 !important; font-size: 14px !important; color: #4B5563 !important; }
#docy-toc .toc-h1 > .nav-link, #docy-tocs-mobile .toc-h1 > .nav-link,
#docy-toc .toc-h2 > .nav-link, #docy-tocs-mobile .toc-h2 > .nav-link { font-weight: 400 !important; font-size: 14px !important; color: #4B5563 !important; padding-left: 20px !important; }
#docy-toc .toc-h3 > .nav-link, #docy-tocs-mobile .toc-h3 > .nav-link { font-weight: 400 !important; font-size: 14px !important; color: #4B5563 !important; padding-left: 32px !important; }
#docy-toc .toc-h1.active > .nav-link, #docy-toc .toc-h2.active > .nav-link, #docy-toc .nav-link.active, #docy-toc a.active, #docy-toc li.active > a, #docy-tocs-mobile .toc-h1.active > .nav-link, #docy-tocs-mobile .toc-h2.active > .nav-link, #docy-tocs-mobile .nav-link.active, #docy-tocs-mobile a.active, #docy-tocs-mobile li.active > a { color: #2563eb !important; font-weight: 500 !important; border-left: none !important; margin-left: 0 !important; }

/* Prevent CSS smooth-scroll conflict with JS scrolling */
html { scroll-behavior: auto !important; }

/* Heading Scroll Margin Offset for Sticky Header */
.blog_single_item h1, .blog_single_item h2, .blog_single_item h3, .blog_single_item h4, .blog_single_item h5, .blog_single_item h6,
.main-post h1, .main-post h2, .main-post h3, .main-post h4, .main-post h5, .main-post h6,
.editor-content h1, .editor-content h2, .editor-content h3, .editor-content h4,
article h1, article h2, article h3,
[id^="toc-section-"] {
    scroll-margin-top: 140px !important;
}

/* Remove margin from main-post, blog_single_item and editor-content */
.main-post,
.main-post.anchor-enabled,
.single-post .main-post,
.single .main-post,
.blog_single_info .main-post {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.blog_single_item,
.editor-content,
.blog_single_item.editor-content,
.main-post .blog_single_item,
.blog_single_info .blog_single_item {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.home-cta-banner {
    padding-bottom: 0 !important;
}

/* Layout CMGalaxy Header Styles */

.cmgalaxy-search-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cmgalaxy-search-backdrop.active {
    display: block;
    opacity: 1;
}

.cmgalaxy-search-section {
    position: relative;
    z-index: 1001; /* Must be above backdrop */
}
/* =============================================
   LEX DRAWER STYLES
   ============================================= */

/* Drawer container â€” hidden by default, covers the full viewport when open */
.lex-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    pointer-events: none;
}

.lex-drawer.open {
    display: block;
    /* Do not set pointer-events: auto; here so background remains interactive */
}

/* Semi-transparent backdrop */
.lex-drawer-overlay {
    position: absolute;
    top: 117px;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
    animation: lex-fade-in 0.3s ease forwards;
    pointer-events: none; /* Never block background in sidebar mode */
}

.lex-drawer-panel.expanded ~ .lex-drawer-overlay {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto; /* Blocking interaction only when expanded */
}

.lex-drawer.closing .lex-drawer-overlay {
    animation: lex-fade-out 0.28s ease forwards;
}

/* Sliding panel */
.lex-drawer-panel {
    position: absolute;
    top: 117px; /* Reduced to match the navigation menu line */
    right: 0;
    height: calc(100vh - 117px); /* Adjusted for the new top offset */
    width: 390px;
    max-width: 95vw;
    overflow: visible;
    display: flex;
    flex-direction: column;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                right 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-radius 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: lex-slide-in 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform: translateX(100%);
    z-index: 999999;
    pointer-events: auto; /* Ensure panel is always interactive */
}

.lex-drawer-body {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ffffff;
    box-shadow: -12px 0 48px rgba(58, 125, 255, 0.18);
    border-left: 1.5px solid #e0e9f9;
    border-radius: 0; /* Removed radius to match the straight line of header */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Suppress initial animation for persistence */
.lex-drawer.lex-no-animation .lex-drawer-panel,
.lex-drawer.lex-no-animation .lex-drawer-overlay {
    animation: none !important;
    transition: none !important;
}

.lex-drawer-panel.expanded {
    width: 1000px; /* Increased width */
    height: calc(100vh - 117px);
    max-width: 95vw;
    max-height: calc(100vh - 117px);
    top: 117px;
    right: 0;
    transform: none !important;
}

.lex-drawer-panel.expanded .lex-drawer-body {
    border-radius: 0;
}

@media (max-width: 1024px) {
    .lex-drawer-panel, 
    .lex-drawer-overlay,
    .lex-drawer-panel.expanded {
        top: 60px; /* Reduced for mobile/tablet header */
        height: calc(100vh - 60px);
        max-height: calc(100vh - 60px);
    }
}

/* Removed redundant parent header */

/* Removed redundant parent styles */

.lex-drawer-expand {
    position: absolute;
    top: 50%;
    left: -18px; /* Half of width to sit on the line */
    transform: translateY(-50%);
    background: #ffffff;
    border: 1.5px solid #e0e9f9;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 101;
    transition: background 0.2s ease, transform 0.25s ease, left 0.3s ease;
    flex-shrink: 0;
}

.lex-drawer-expand svg {
    transition: transform 0.3s ease;
}

.lex-icon-collapse {
    display: none;
}

.lex-drawer-panel.expanded .lex-icon-expand {
    display: none;
}

.lex-drawer-panel.expanded .lex-icon-collapse {
    display: flex;
}

.lex-drawer-expand:hover {
    background: #f8fafc;
    transform: translateY(-50%) scale(1.1);
}

.lex-drawer.closing .lex-drawer-panel {
    animation: lex-slide-out 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Side Trigger Button - Minimalist Circular */
.lex-side-trigger {
    position: fixed;
    right: -18px; /* Sit halfway off the screen edge */
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    background: #ffffff;
    border: 1.5px solid #f1f5f9;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 6px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lex-side-trigger:hover {
    right: -10px;
    background: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Vertical line behind the button */
.lex-side-trigger::before {
    content: '';
    position: absolute;
    right: 17px;
    top: -100vh;
    height: 200vh;
    width: 2px;
    background: #e2e8f0;
    z-index: -1;
    pointer-events: none;
}

.lex-side-trigger svg {
    transition: transform 0.3s ease;
}

.lex-side-trigger:hover svg {
    transform: translateX(-2px);
}

/* Hide side trigger when drawer is open */
body.lex-drawer-open .lex-side-trigger {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(100%);
}

/* Keyframe animations */
@keyframes lex-slide-in {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
}

@keyframes lex-slide-out {
    from { transform: translateX(0); }
    to   { transform: translateX(100%); }
}

@keyframes lex-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes lex-fade-out {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Close button */
/* Removed redundant parent close button styles */

.lex-drawer-content {
    flex: 1;
    display: block;
    overflow: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

.lex-drawer-content iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    margin: 0;
    padding: 0;
}

.lex-drawer-img {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    pointer-events: none;
}

/* Prevent body scroll while drawer is open - Commented out to allow background scrolling as requested */
/* body.lex-drawer-open {
    overflow: hidden !important;
} */

/* =============================================
   CSS Fixes for Mobile Menu Visibility and Interaction
   ============================================= */
@media (max-width: 1024px) {
    /* Ensure the mobile bar is ALWAYS on top */
    .mobile_main_menu {
        z-index: 100000 !important;
        background: #ffffff !important;
    }
    
    /* Ensure the hamburger button is clickable */
    .mobile_menu_btn {
        position: relative !important;
        z-index: 100001 !important;
        cursor: pointer !important;
        background: transparent !important;
        border: none !important;
        padding: 10px !important;
    }
    
    /* Hide desktop items absolutely */
    #sticky, .header, .cmgalaxy-header {
        display: none !important;
    }
    
    /* Show the mobile menu bar if theme hid it */
    .mobile_main_menu.display_none {
        display: block !important;
    }
}

/* Side Menu and Overlay z-index */
.side_menu {
    z-index: 100002 !important;
}

.click_capture {
    z-index: 100001 !important;
    background: rgba(0,0,0,0.5) !important;
}

/* Ensure body doesn't scroll when menu is open - Restrict to mobile only */
@media (max-width: 991px) {
    body.menu-is-opened {
        overflow: hidden !important;
    }
}


/* CMGALAXY Header Styles */
.cmgalaxy-header {
    flex-direction: column !important;
    padding: 1rem 0;
}

/* Search input â€” taller only when popup is open */
.cmgalaxy-search-section.popup-active .cmgalaxy-search-input {
    height: 50px !important;
    line-height: 50px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}




.cmgalaxy-logo-section {
    min-width: 200px;
}

.cmgalaxy-logo-img {
    max-height: 50px;
    height: auto;
    width: auto;
    max-width: 300px;
    object-fit: contain;
}

.cmgalaxy-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    text-decoration: none;
    line-height: 1.2;
}

.cmgalaxy-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    display: block;
    margin-top: -2px;
}

.cmgalaxy-search-section {
    max-width: 500px;
    width: 100%;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cmgalaxy-search-section.popup-active {
    max-width: 750px;
}

.cmgalaxy-search-section.popup-active .cmgalaxy-ask-lex-btn {
    display: none !important;
}

.cmgalaxy-search-form {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.cmgalaxy-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background-color: #f9fafb;
    transition: all 0.2s ease;
}

.cmgalaxy-search-loader {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid #d1d5db;
    border-top-color: #3b82f6;
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cmgalaxy-search-loader.active {
    opacity: 1;
    visibility: visible;
    animation: cmgalaxy-search-spin 0.75s linear infinite;
}

.cmgalaxy-search-input.is-loading::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

@keyframes cmgalaxy-search-spin {
    to {
        transform: rotate(360deg);
    }
}

.cmgalaxy-search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* --- Improved Search Suggestions --- */
.cmgalaxy-search-suggestions {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.12), 0 10px 15px -5px rgba(0, 0, 0, 0.05);
    z-index: 1002;
    overflow: hidden;
    display: none;
    text-align: left !important; /* Force left alignment against banner centering */
    max-height: 480px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f8fafc;
}

.suggestion-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.suggestion-item:hover .suggestion-icon {
    background: #e2e8f0;
    color: #475569;
}

.suggestion-content {
    flex: 1;
    min-width: 0;
    text-align: left !important;
}

.suggestion-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827 !important;
    margin-bottom: 3px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-meta {
    font-size: 12px;
    color: #6b7280 !important;
    line-height: 1;
}

/* Ask Lex Suggestion (AI) */
.ask-ai-suggestion {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #f8fafc; /* Subtle light blue/gray background */
}

.ask-ai-item {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ask-ai-item:hover {
    background: #eff6ff; /* Light blue on hover */
}

.ask-ai-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ask-ai-text {
    font-size: 15px;
    font-weight: 600;
    color: #1e40af !important; /* Brand Blue */
}

.ask-ai-query {
    color: #3b82f6;
    font-style: italic;
}

.search-highlight {
    background: #fef08a; /* Soft yellow highlight */
    color: #854d0e;
    padding: 0 2px;
    border-radius: 2px;
}
.search-icon-left {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.875rem;
}

.cmgalaxy-actions {
    min-width: 250px;
    justify-content: flex-end;
}

.cmgalaxy-ask-lex-btn {
    background: white;
    color: #484A61;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.cmgalaxy-ask-lex-logo {
    width: 20px;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

.cmgalaxy-ask-lex-btn:hover {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.cmgalaxy-nav-link {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.cmgalaxy-nav-link:hover {
    color: #1f2937;
    text-decoration: none;
}

.cmgalaxy-community-icon {
    width: 24px;
    height: auto;
    display: inline-block;
}

.cmgalaxy-signin-icon {
    width: 24px;
    height: auto;
    display: inline-block;
}

.cmgalaxy-nav-menu {
    padding-top: 0px;
    margin-top: 0px !important;
    padding-bottom: 0rem !important;
}

.menu-is-opened .navbar-collapse.cmgalaxy-header,
.menu-is-opened .cmgalaxy-nav-menu {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

.cmgalaxy-main-nav {
    gap: 2rem;
}

.cmgalaxy-main-nav .nav-item {
    margin: 0;
}

.cmgalaxy-main-nav .nav-link {
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0;
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.cmgalaxy-main-nav .nav-link:hover,
.cmgalaxy-main-nav .nav-item.active .nav-link {
    color: #1f2937;
    border-bottom-color: #3b82f6;
}

/* Desktop Header Main Padding */
@media (min-width: 1025px) {
    #sticky .container {
        padding-left: 30px !important;
        padding-right: 30px !important;
        max-width: 100% !important;
    }

    /* Target single post page specifically for 40px header padding */
    body.single-post #sticky .container {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }

    .cmgalaxy-header {
        padding-bottom: 0 !important;
    }

    .cmgalaxy-header-main {
        padding-left: 0px;
        padding-right: 0px; /* Removed individual padding */
    }
    
    .cmgalaxy-nav-menu {
        padding-left: 0px;
        padding-right: 0px; /* Removed individual padding */
    }
}

/* Mobile & Tablet Responsive Styles */
@media (max-width: 768px) {
    /* Navbar adjustments for mobile */
    .header .navbar,
    .navbar.sticky-nav,
    nav.menu_one,
    #sticky {
        padding: 0.5rem 0 !important;
    }

    /* Removed conflicting styles - now controlled by cmgalaxy-header.css */

    .cmgalaxy-header-container {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    .cmgalaxy-logo-section {
        width: 100%;
        min-width: auto;
        justify-content: center;
    }

    .cmgalaxy-logo-img {
        max-height: 40px;
    }

    .cmgalaxy-search-section {
        width: 100%;
        max-width: 100%;
    }

    .cmgalaxy-actions {
        width: 100%;
        min-width: auto;
        justify-content: center;
        gap: 1rem;
    }

    /* Removed conflicting nav-menu styles */

    .cmgalaxy-main-nav {
        flex-wrap: nowrap;
        gap: 1rem;
        padding: 0 1rem;
    }

    .cmgalaxy-main-nav .nav-item {
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    /* Mobile-specific navbar adjustments */
    .header .navbar,
    .navbar.sticky-nav,
    nav.menu_one,
    #sticky {
        padding: 0.25rem 0 !important;
    }

    .cmgalaxy-header-container {
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }

    .cmgalaxy-logo-img {
        max-height: 35px;
    }

    .cmgalaxy-search-input {
        padding: 0.5rem 0.75rem 0.5rem 2rem;
        font-size: 0.8125rem;
    }

    .search-icon-left {
        left: 0.5rem;
        font-size: 0.75rem;
    }

    .cmgalaxy-ask-lex-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    .cmgalaxy-ask-lex-logo {
        width: 16px;
    }

    .cmgalaxy-nav-link {
        font-size: 0.8125rem;
    }

    .cmgalaxy-main-nav {
        gap: 0.75rem;
        padding: 0 0.75rem;
    }

    .cmgalaxy-main-nav .nav-link {
        font-size: 0.8125rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 480px) {
    /* Extra small mobile devices */
    .cmgalaxy-header-container {
        padding: 0.5rem;
    }

    .cmgalaxy-logo-img {
        max-height: 30px;
    }

    .cmgalaxy-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cmgalaxy-ask-lex-btn,
    .cmgalaxy-nav-link {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 1024px) {
    /* NUCLEAR HIDE: Ensure desktop header layout NEVER shows on mobile */
    #sticky,
    .header,
    .navbar-collapse.cmgalaxy-header,
    .cmgalaxy-header-main,
    .cmgalaxy-nav-menu,
    #navbarSupportedContent {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
    }
}

/* Desktop Header Visibility */
@media (min-width: 1025px) {
    .navbar-collapse.cmgalaxy-header {
        display: flex !important;
    }
}

/* Sticky/Fixed Navbar - Using position: fixed for better browser support */
.header {
    position: relative;
}

.header .navbar,
.navbar.sticky-nav,
nav.menu_one,
#sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 0px !important;
    margin: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
}

/* Super aggressive override for inline styles */
nav#sticky[style] {
    top: 0 !important;
    position: fixed !important;
    display: block !important;
}

.header .navbar.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

/* Desktop body padding to prevent content from hiding under fixed navbar */
@media (min-width: 768px) {
    body {
        padding-top: 140px !important; /* Logged OUT default */
    }
    body.home,
    body.front-page {
        padding-top: 117px !important; /* Home screen only */
    }
    body.single-post,
    body.single,
    body.category,
    body.archive {
        padding-top: 117px !important; /* Single post and category pages */
    }
    body.admin-bar {
        padding-top: 117px !important; /* Logged IN: admin bar already adds 32px */
    }

}
@media (min-width: 1025px) {
    body {
        padding-top: 140px !important; /* Logged OUT default */
    }
    body.home,
    body.front-page {
        padding-top: 117px !important; /* Home screen only */
    }
    body.single-post,
    body.single,
    body.category,
    body.archive {
        padding-top: 117px !important; /* Single post and category pages */
    }
    body.admin-bar {
        padding-top: 117px !important; /* Logged IN: admin bar already adds 32px */
    }
}

/* Adjust for mobile & tablets (max-width: 1024px) */
@media (max-width: 1024px) {
    body,
    body.home,
    body.front-page,
    body.single,
    body.single-post,
    body.category,
    body.archive {
        padding-top: 60px !important; /* Clear mobile header */
    }
    body.admin-bar,
    body.admin-bar.home,
    body.admin-bar.front-page,
    body.admin-bar.single,
    body.admin-bar.single-post,
    body.admin-bar.category,
    body.admin-bar.archive {
        padding-top: 136px !important; /* Mobile header (90px) + Mobile WP Admin bar (46px) */
    }
    
    .body_wrapper {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Unified content top spacing on mobile */
    .doc_banner_area,
    .doc_banner_area.search-banner-light,
    .doc_banner_area.banner_creative1,
    .banner-bg .doc_banner_area {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .doc_banner_area .container {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .category .blog_area,
    .archive .blog_area,
    body.category:not(.admin-bar) .blog_area,
    body.archive:not(.admin-bar) .blog_area,
    .single .blog_area,
    .single .tip_doc_area,
    .single-post .blog_area,
    .single-post .tip_doc_area,
    section.blog_area.tip_doc_area,
    body:not(.admin-bar).single .blog_area,
    body:not(.admin-bar).single .tip_doc_area,
    body:not(.admin-bar).single-post .blog_area,
    body:not(.admin-bar).single-post .tip_doc_area,
    body:not(.admin-bar) section.blog_area.tip_doc_area {
        padding-top: 20px !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
    }

    /* Main Post Container: 0 Padding on Mobile */
    .main-post,
    .single-post .main-post,
    .blog_single_info .main-post {
        padding: 0 !important;
    }

    /* Single Post & Category Page Title on Mobile */
    h1.post-title,
    .blog_single_item h1.post-title,
    .category-main-col h1.post-title {
        font-size: 26px !important;
        line-height: 1.25 !important;
        margin-top: 10px !important;
    }

    /* Post Navigation Cards on Mobile & Tablet */
    .post-navigation-cards {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .nav-card,
    .nav-card.prev-card,
    .nav-card.next-card {
        flex: 1 1 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        padding: 16px 18px !important;
    }

    .nav-card h5,
    .nav-card .nav-card-content h5 {
        font-size: 0.95rem !important;
        margin-bottom: 0.5rem !important;
        text-align: left !important;
    }

    .nav-card.next-card .nav-card-content,
    .nav-card-content.text-end {
        text-align: left !important;
    }

    .nav-card.next-card .nav-direction,
    .nav-direction.justify-content-end {
        justify-content: flex-start !important;
    }
}


/* Logo is now visible in navbar */

/* Keyboard shortcut styling */
.cmgalaxy-search-input::placeholder {
    color: #9ca3af;
}


/* Additional Single Post Styles */
.blog_single_item nav[aria-label="breadcrumb"] {
    display: block !important;
    visibility: visible !important;
    margin-bottom: 16px !important;
    padding: 0 !important;
    width: 100% !important;
}
                            

/* =============================================
   MODERN SIDEBAR & SINGLE POST SIDEBAR STYLES
   ============================================= */

/* Back button styling */
.sidebar-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 500 !important;
    text-decoration: none !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}
.sidebar-back-btn:hover {
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none !important;
}
.sidebar-back-btn svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.sidebar-back-btn:hover svg {
    transform: translateX(-3px);
}
.sidebar-back-btn span {
    font-weight: 500 !important;
}

/* Single post sidebar - active category header */
.single-post-sidebar .active-cat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-radius: 10px;
    background: #dbeafe2b;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
}
.single-post-sidebar .active-cat-header:hover {
    background: #dbeafe55;
}
.single-post-sidebar .active-cat-header .cat-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.single-post-sidebar .active-cat-header .cat-icon img {
    width: 22px;
    height: 22px;
    border: none !important;
}
.single-post-sidebar .active-cat-header .cat-title {
    flex: 1;
    font-size: 14px;
    color: #161c52 !important;
    font-weight: 500 !important;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.single-post-sidebar .active-cat-header .cat-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #94a3b8;
    transition: transform 0.3s ease, color 0.2s ease;
    transform: rotate(180deg);
}
.single-post-sidebar .active-cat-header .cat-toggle.open {
    transform: rotate(270deg);
    color: #1e40af;
}

/* Active category article list */
.single-post-sidebar .cat-articles {
    padding: 4px 0 0 0;
    max-height: 2500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 1;
}
.single-post-sidebar .cat-articles.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
}
.single-post-sidebar .cat-article-item {
    position: relative;
    padding: 8px 12px 8px 20px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    margin-left: 16px;
}
.single-post-sidebar .cat-article-item:hover {
    border-left-color: #93c5fd;
    background: #f8fafc;
    border-radius: 0 6px 6px 0;
}
.single-post-sidebar .cat-article-item.active-article {
    border-left-color: transparent;
    background: #dbeafe2b;
    border-radius: 6px;
}
.single-post-sidebar .cat-article-item a {
    display: block;
    font-size: 13px;
    font-weight: 400 !important;
    color: #64748b;
    text-decoration: none !important;
    line-height: 1.5;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.single-post-sidebar .cat-article-item:hover a {
    color: #1e293b;
}
.single-post-sidebar .cat-article-item.active-article a {
    color: #007bff !important;
}

/* Divider */
.sidebar-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 12px 16px;
}

/* Drag & Drop Sortable Styles */
.cmgalaxy-sortable-top > .sidebar-section,
.cmgalaxy-sortable-sub > .cmgalaxy-subcat-wrapper,
.cmgalaxy-sortable-sub-sub > .sidebar-sub-subcat-item {
    cursor: grab !important;
}
.cmgalaxy-sortable-top > .sidebar-section:active,
.cmgalaxy-sortable-sub > .cmgalaxy-subcat-wrapper:active,
.cmgalaxy-sortable-sub-sub > .sidebar-sub-subcat-item:active {
    cursor: grabbing !important;
}
.sortable-ghost { opacity: 0.4; }


/* Category 3 Column Layout */
@media (min-width: 992px) {
  .category-left-sidebar-col { flex: 0 0 20% !important; max-width: 20% !important; }
  .category-main-with-right, .category-main-col.category-main-with-right { flex: 0 0 55% !important; max-width: 55% !important; }
  .category-right-sidebar-col { flex: 0 0 25% !important; max-width: 25% !important; }
}
@media (max-width: 991px) {
  .category-left-sidebar-col, .category-main-with-right, .category-right-sidebar-col { flex: 0 0 100% !important; max-width: 100% !important; }
}

/* Single Post TOC Layout Fix */
@media (min-width: 992px) {
  .category-main-col.has-toc-sidebar { flex: 0 0 60% !important; max-width: 60% !important; width: 60% !important; }
  .doc-sidebar { flex: 0 0 20% !important; max-width: 20% !important; width: 20% !important; padding: 0 !important; }
}
/* Fix TOC double padding and track alignment */
.doc-sidebar .left_sidebarlist .nav-sidebar:before { display: none !important; }
#docy-toc { position: relative; margin-bottom: 0 !important; padding-bottom: 0 !important; }
#docy-toc > ul { position: relative; margin-bottom: 0 !important; padding-bottom: 0 !important; }
#docy-toc::before { content: "" !important; width: 2px !important; background: #E5E7EB !important; position: absolute !important; top: 0 !important; bottom: 0 !important; left: 0 !important; z-index: 1 !important; display: block !important; }
#docy-toc .nav-item.active > .nav-link::before { left: 0 !important; width: 2px !important; z-index: 2 !important; }
@media (max-width: 991px) {
  .category-main-col.has-toc-sidebar, .doc-sidebar { flex: 0 0 100% !important; max-width: 100% !important; width: 100% !important; }
}

/* Breadcrumb Styles Global Override */
.breadcrumb, .breadcrumb li, .breadcrumb .breadcrumb-item, .breadcrumb .breadcrumb-item a, 
.blog_single_item .breadcrumb, .blog_single_item .breadcrumb li, .blog_single_item .breadcrumb .breadcrumb-item, 
.blog_single_item .breadcrumb li a, .breadcrumb .breadcrumb-item.active, .blog_single_item .breadcrumb li.active, .blog_single_item .breadcrumb .breadcrumb-item.active {
    font-size: 12px !important;
}

/* Specific Gap Adjustments */
.category .blog_area,
.archive .blog_area {
    padding-top: 0px !important;
    padding-bottom: 80px !important;
    margin-top: -20px !important;
}

/* Category & Archive grid area padding & gap - identical to single post */
.category .doc_blog_grid_area,
.archive .doc_blog_grid_area,
body.category .doc_blog_grid_area,
body.archive .doc_blog_grid_area,
section.doc_blog_grid_area {
    padding-top: 0 !important;
    padding-bottom: 80px !important;
    margin-top: -20px !important;
}

body.category:not(.admin-bar) .doc_blog_grid_area,
body.archive:not(.admin-bar) .doc_blog_grid_area,
body:not(.admin-bar).category .doc_blog_grid_area,
body:not(.admin-bar).archive .doc_blog_grid_area,
body:not(.admin-bar) section.doc_blog_grid_area,
body.category:not(.admin-bar) .blog_area,
body.archive:not(.admin-bar) .blog_area,
body:not(.admin-bar).category .blog_area,
body:not(.admin-bar).archive .blog_area {
    padding-top: 0 !important;
    padding-bottom: 80px !important;
    margin-top: 12px !important; /* Compensate for missing admin bar, matches single post */
}

.single .blog_area,
.single .tip_doc_area,
.single-post .blog_area,
.single-post .tip_doc_area,
section.blog_area.tip_doc_area {
    padding-top: 0px !important; 
    padding-bottom: 80px !important;
    margin-top: -20px !important; /* Reduce gap on blog detail (single post) */
}

/* When logged OUT on single post, add 32px extra gap to match logged-in appearance */
body:not(.admin-bar).single .blog_area,
body:not(.admin-bar).single .tip_doc_area,
body:not(.admin-bar).single-post .blog_area,
body:not(.admin-bar).single-post .tip_doc_area,
body:not(.admin-bar) section.blog_area.tip_doc_area {
    padding-top: 0px !important;
    padding-bottom: 80px !important;
    margin-top: 12px !important; /* Compensate for missing admin bar */
}

/* Related Articles Hover Effects */
.related-article-link {
    color: #484a61;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.related-article-link:hover,
.related-article-link:hover span {
    color: #3b82f6 !important;
}

.related-article-icon {
    color: #3b82f6;
    transition: all 0.3s ease;
}

.related-article-link:hover .related-article-icon {
    transform: translateX(3px);
}

/* Force H3 font-size to 18px for all */
h3, .editor-content h3, .blog_single_item h3, .entry-content h3 {
    font-size: 18px !important;
}

/* Removed duplicate/corrupted tooltip class */
.single-post-sidebar .active-cat-header .cat-toggle.open {
    transform: rotate(270deg);
    color: #1e40af;
}

/* Active category article list */
.single-post-sidebar .cat-articles {
    padding: 4px 0 0 0;
    max-height: 2500px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 1;
}
.single-post-sidebar .cat-articles.collapsed {
    max-height: 0;
    opacity: 0;
    padding: 0;
}
.single-post-sidebar .cat-article-item {
    position: relative;
    padding: 8px 12px 8px 20px;
    border-left: 2px solid transparent;
    transition: all 0.2s ease;
    margin-left: 16px;
}
.single-post-sidebar .cat-article-item:hover {
    border-left-color: #93c5fd;
    background: #f8fafc;
    border-radius: 0 6px 6px 0;
}
.single-post-sidebar .cat-article-item.active-article {
    border-left-color: transparent;
    background: #dbeafe2b;
    border-radius: 6px;
}
.single-post-sidebar .cat-article-item a {
    display: block;
    font-size: 13px;
    font-weight: 400 !important;
    color: #64748b;
    text-decoration: none !important;
    line-height: 1.5;
    transition: color 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.single-post-sidebar .cat-article-item:hover a {
    color: #1e293b;
}
.single-post-sidebar .cat-article-item.active-article a {
    color: #007bff !important;
}

/* Divider */
.sidebar-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 12px 16px;
}

/* Drag & Drop Sortable Styles */
.cmgalaxy-sortable-top > .sidebar-section,
.cmgalaxy-sortable-sub > .cmgalaxy-subcat-wrapper,
.cmgalaxy-sortable-sub-sub > .sidebar-sub-subcat-item {
    cursor: grab !important;
}
.cmgalaxy-sortable-top > .sidebar-section:active,
.cmgalaxy-sortable-sub > .cmgalaxy-subcat-wrapper:active,
.cmgalaxy-sortable-sub-sub > .sidebar-sub-subcat-item:active {
    cursor: grabbing !important;
}
.sortable-ghost { opacity: 0.4; }

/* CM Custom Tooltip */
.cm-custom-tooltip {
    position: fixed;
    background: #ffffff;
    color: #111827;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 999999;
    pointer-events: none;
    border: 1px solid #e5e7eb;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    font-family: 'Instrument Sans', sans-serif;
}

.cm-custom-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px 6px 5px 0;
    border-style: solid;
    border-color: transparent #ffffff transparent transparent;
    filter: drop-shadow(-1px 0px 1px rgba(0,0,0,0.05));
}

@media (max-width: 1024px) {
    .cm-custom-tooltip,
    .cm-custom-tooltip.cm-tooltip-visible {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
}

/* Mobile-only fix for extra gap on right side & smooth touch scrolling (1024px and below) */
@media (max-width: 1024px) {
    html {
        overflow-x: hidden !important;
    }
    
    body {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .body_wrapper,
    #page,
    .doc_documentation_area,
    .documentation_info,
    .sec_pad,
    .container,
    .container-fluid,
    .main-content-area,
    .tw-category-container {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .tw-cat-detail-container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        overflow: visible !important;
        touch-action: pan-y !important;
    }

    .category-main-col,
    #category-posts-container,
    .category-main-with-right {
        border-left: none !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        padding-top: 8px !important;
        padding-bottom: 1.5rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .category-main-col::before {
        display: none !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .row > [class*="col-"] {
        padding-left: 8px !important;
        padding-right: 8px !important;
        max-width: 100% !important;
    }

    /* Mobile Table of Contents (TOC) - tall fixed sheet with scrollable inner list */
    .jrBzsJ .eYVFtH .bottom_table_content,
    aside.bottom_table_content,
    #docy-tocs,
    .bottom_table_content {
        position: fixed !important;
        top: 72px !important;
        bottom: 76px !important;
        left: 12px !important;
        right: 12px !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        min-height: 360px !important;
        max-height: calc(100vh - 148px) !important;
        max-height: calc(100dvh - 148px) !important;
        background-color: #ffffff !important;
        background: #ffffff !important;
        color: #000000 !important;
        padding: 20px 16px 16px 20px !important;
        border-radius: 14px !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
        z-index: 99999 !important;
        display: none;
        flex-direction: column !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    aside.bottom_table_content *,
    #docy-tocs *,
    .bottom_table_content *,
    #docy-tocs-mobile * {
        color: #000000 !important;
    }

    /* Absolute suppression of all ::before and ::after pseudo lines for Mobile TOC */
    aside.bottom_table_content::before,
    aside.bottom_table_content::after,
    #docy-tocs::before,
    #docy-tocs::after,
    .bottom_table_content::before,
    .bottom_table_content::after,
    #docy-tocs-mobile::before,
    #docy-tocs-mobile::after,
    .bottom_table_content nav::before,
    .bottom_table_content nav::after,
    aside.bottom_table_content nav::before,
    aside.bottom_table_content nav::after,
    .bottom_table_content ul::before,
    .bottom_table_content ul::after,
    .bottom_table_content li::before,
    .bottom_table_content li::after,
    .bottom_table_content a::before,
    .bottom_table_content a::after,
    .bottom_table_content .nav-link::before,
    .bottom_table_content .nav-link::after,
    #docy-tocs-mobile *::before,
    #docy-tocs-mobile *::after {
        display: none !important;
        content: none !important;
        background: transparent !important;
        background-color: transparent !important;
        width: 0 !important;
        height: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }

    .bottom_table_content .toc-title {
        margin-top: 0 !important;
        margin-bottom: 14px !important;
        padding-right: 32px !important;
        font-size: 17px !important;
        font-weight: 700 !important;
        line-height: 1.35 !important;
        color: #000000 !important;
        flex-shrink: 0 !important;
    }

    .bottom_table_content .close-toc {
        top: 14px !important;
        right: 14px !important;
        z-index: 5 !important;
        position: absolute !important;
        color: #000000 !important;
    }

    #docy-tocs-mobile,
    .bottom_table_content nav,
    aside.bottom_table_content nav {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: calc(100vh - 220px) !important;
        max-height: calc(100dvh - 220px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-right: 6px !important;
        padding-bottom: 10px !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(0, 0, 0, 0.25) rgba(0, 0, 0, 0.05) !important;
    }

    #docy-tocs-mobile ul,
    .bottom_table_content nav ul {
        max-height: none !important;
        overflow: visible !important;
        padding-left: 0 !important;
    }

    #docy-tocs-mobile a,
    #docy-tocs-mobile .nav-link,
    .bottom_table_content nav a,
    .bottom_table_content nav .nav-link {
        padding: 10px 12px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        line-height: 1.55 !important;
        color: #000000 !important;
        display: block !important;
        background: transparent !important;
        background-color: transparent !important;
        border: none !important;
    }

    #docy-tocs-mobile a:hover,
    #docy-tocs-mobile a.active,
    #docy-tocs-mobile .nav-link:hover,
    #docy-tocs-mobile .nav-link.active,
    #docy-tocs-mobile .nav-item.active > a,
    #docy-tocs-mobile .nav-item.active > .nav-link,
    .bottom_table_content nav a:hover,
    .bottom_table_content nav a.active,
    .bottom_table_content nav .nav-link:hover,
    .bottom_table_content nav .nav-link.active,
    .bottom_table_content nav .nav-item.active > a,
    .bottom_table_content nav .nav-item.active > .nav-link {
        color: #2563eb !important;
        background: #f1f5f9 !important;
        background-color: #f1f5f9 !important;
        border-radius: 6px !important;
        font-weight: 700 !important;
        border: none !important;
    }

    /* Custom visible scrollbar for Mobile TOC */
    #docy-tocs-mobile::-webkit-scrollbar,
    .bottom_table_content nav::-webkit-scrollbar {
        width: 6px !important;
    }

    #docy-tocs-mobile::-webkit-scrollbar-track,
    .bottom_table_content nav::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.08) !important;
        border-radius: 4px !important;
    }

    #docy-tocs-mobile::-webkit-scrollbar-thumb,
    .bottom_table_content nav::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.4) !important;
        border-radius: 4px !important;
    }

    #docy-tocs-mobile::-webkit-scrollbar-thumb:hover,
    .bottom_table_content nav::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 255, 255, 0.6) !important;
    }

    #docy-toc {
        max-height: calc(100vh - 160px) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
}

/* Mobile TOC Adjustments - font weight & size only, no max-height override */
@media (max-width: 1024px) {
    #docy-tocs-mobile .nav-link,
    .bottom_table_content nav .nav-link {
        font-weight: 600 !important;
        font-size: 15px !important;
        padding: 10px 12px !important;
        line-height: 1.5 !important;
    }
    #docy-tocs-mobile .nav-item.active > .nav-link,
    .bottom_table_content nav .nav-item.active > .nav-link {
        font-weight: 700 !important;
        color: #60a5fa !important;
    }
}

/* Desktop Modern Sidebar Vertical Line - full-height separator */
@media (min-width: 1025px) {
    .category-left-sidebar-col {
        position: sticky;
    }

    .category-left-sidebar-col .modern-sidebar,
    .modern-sidebar {
        border: none !important;
    }
}

/* Mobile Floating Bottom Action Bar & Share Modal */
@media (max-width: 1024px) {
    .jrBzsJ,
    .sc-jtXEFf.jrBzsJ,
    #cm-bottom-action-bar,
    div.jrBzsJ {
        background: #111827 !important;
        border-radius: 0 !important;
        -webkit-border-radius: 0 !important;
        -moz-border-radius: 0 !important;
        z-index: 9999 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 16px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25) !important;
        transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.25s ease !important;
    }

    .jrBzsJ.hidden-by-footer,
    #cm-bottom-action-bar.hidden-by-footer,
    .sc-jtXEFf.jrBzsJ.hidden-by-footer,
    div.jrBzsJ.hidden-by-footer {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: translateY(120%) !important;
    }

    .jrBzsJ .eYVFtH {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .jrBzsJ .eYVFtH .fqmceZ,
    .jrBzsJ .eYVFtH .table_content,
    .jrBzsJ .eYVFtH .table_share_btn,
    .sc-kiIyQV.fqmceZ {
        flex: 1 !important;
        background: #111827 !important;
        border: 1px solid #374151 !important;
        border-radius: 50px !important;
        -webkit-border-radius: 50px !important;
        -moz-border-radius: 50px !important;
        color: #ffffff !important;
        padding: 10px 16px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
        outline: none !important;
        text-decoration: none !important;
        line-height: 1.4 !important;
        box-sizing: border-box !important;
    }

    .jrBzsJ .eYVFtH .fqmceZ:hover,
    .jrBzsJ .eYVFtH .table_content:hover,
    .jrBzsJ .eYVFtH .table_share_btn:hover {
        background: #1f2937 !important;
        border-color: #6b7280 !important;
    }

    .jrBzsJ .eYVFtH .fqmceZ svg,
    .jrBzsJ .eYVFtH .table_content svg,
    .jrBzsJ .eYVFtH .table_share_btn svg {
        color: #ffffff !important;
        stroke: #ffffff !important;
        margin-right: 8px !important;
        display: inline-block !important;
    }

    /* Share Modal Popup */
    .jrBzsJ .eYVFtH .docy-modal-content,
    #share-modal {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: #ffffff !important;
        color: #1e293b !important;
        border-radius: 16px 16px 0 0 !important;
        padding: 24px 20px 24px 20px !important;
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.18) !important;
        border: none !important;
        z-index: 100000 !important;
        display: none;
        box-sizing: border-box !important;
    }

    #share-modal .docy-close {
        position: absolute !important;
        top: 14px !important;
        right: 14px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        color: #374151 !important;
        padding: 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
    }

    #share-modal .docy-close svg {
        stroke: #374151 !important;
        color: #374151 !important;
    }

    #share-modal .docy-close:hover svg {
        stroke: #111827 !important;
    }

    #share-modal .share-modal-title {
        margin-top: 4px !important;
        margin-bottom: 24px !important;
        font-size: 16px !important;
        font-weight: 700 !important;
        color: #111827 !important;
        text-align: center !important;
    }

    .share-social-icon {
        transition: transform 0.2s ease, opacity 0.2s ease !important;
    }

    .share-social-icon:hover {
        transform: translateY(-2px) !important;
        opacity: 0.9 !important;
    }
}

