/* ===================================================================
           TABLE OF CONTENTS
           ===================================================================
           0.  GLOBAL & GENERAL STYLES
           1.  NAVIGATION BAR
           2.  MAIN CONTENT & BLOG POST
           3.  SIDEBAR, CTA & TABLE OF CONTENTS
           4.  FOOTER
           5.  UTILITY & FLOATING ELEMENTS
           6.  RESPONSIVE DESIGN
           =================================================================== */

        /* ===================================================================
           0. GLOBAL & GENERAL STYLES
           =================================================================== */
        html {
            scroll-behavior: smooth;
            scroll-padding-top: 120px; /* Adjusted for sticky elements */
        }

        body {
            padding-top: 80px;
            background-color: #f7f9fc;
            font-family: 'Segoe UI', 'Roboto', sans-serif;
            color: #333;
        }

        .visually-hidden-focusable:active,
        .visually-hidden-focusable:focus {
            position: static;
            width: auto;
            height: auto;
            margin: 0;
            overflow: visible;
            clip: auto;
            white-space: normal;
        }

        /* ===================================================================
           1. NAVIGATION BAR
           =================================================================== */
        .navbar {
            backdrop-filter: blur(12px);
            background-color: rgba(255, 255, 255, 0.85);
            transition: all 0.3s ease-in-out;
            padding: 20px 0;
            border-bottom: none;
        }

        .navbar.scrolled {
            background-color: rgba(255, 255, 255, 0.95);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            padding: 10px 0;
        }

        .navbar-brand {
            font-weight: 750;
            font-size: 1.40rem;
            color: #274D76 !important;
            text-decoration: none;
        }

        .navbar-brand img {
            height: 40px;
            object-fit: contain;
        }

        .nav-link,
        .btn-rounded {
            font-weight: 500;
            transition: all 0.25s;
        }

        .nav-link {
            color: #333;
            margin: 0 10px;
            text-decoration: none;
        }

        .nav-link:hover,
        .nav-link:active,
        .nav-link:focus {
            color: #4661E6;
            transform: translateY(-2px);
            text-decoration: none;
        }

        .btn-rounded {
            border-radius: 50px;
            padding: 8px 22px;
            font-size: 1rem;
        }

        .btn-outline-primary.btn-rounded {
            color: #0d6efd;
            border-color: #0d6efd;
        }

        .btn-outline-primary.btn-rounded:hover {
            background-color: #0d6efd;
            color: #fff;
            box-shadow: 0 0 10px rgba(70, 97, 230, 0.4);
        }

        .navbar-toggler {
            border: none !important;
            box-shadow: none !important;
            padding: 0.25rem 0.5rem;
        }

        .navbar-toggler-icon-custom {
            display: inline-block;
            width: 24px;
            height: 18px;
            position: relative;
            cursor: pointer;
            transition: transform 0.3s ease-in-out;
        }

        .navbar-toggler-icon-custom span {
            position: absolute;
            height: 3px;
            width: 100%;
            background: #333;
            left: 0;
            transition: 0.3s ease;
            border-radius: 2px;
        }

        .navbar-toggler-icon-custom span:nth-child(1) { top: 0; }
        .navbar-toggler-icon-custom span:nth-child(2) { top: 7px; }
        .navbar-toggler-icon-custom span:nth-child(3) { top: 14px; }

        .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon-custom span:nth-child(1) {
            top: 7px;
            transform: rotate(45deg);
        }

        .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon-custom span:nth-child(2) {
            opacity: 0;
        }

        .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon-custom span:nth-child(3) {
            top: 7px;
            transform: rotate(-45deg);
        }

        .offcanvas-end {
            width: 260px;
            background-color: #fff;
            box-shadow: none;
        }

        .offcanvas a {
            font-weight: 500;
            padding: 10px 0;
            color: #333;
            text-decoration: none;
            display: block;
        }

        .offcanvas a:hover,
        .offcanvas a:active,
        .offcanvas a:focus {
            color: #4661E6;
            background-color: transparent;
            text-decoration: none;
        }

        /* ===================================================================
           2. MAIN CONTENT & BLOG POST
           =================================================================== */
        .blog-post-container {
            background-color: #ffffff;
        }
        
        .breadcrumb a {
            text-decoration: none;
        }

        .article-body {
            line-height: 1.8;
            color: #343a40;
        }

        .post-category a {
            text-transform: uppercase;
            font-size: 0.85rem;
            font-weight: 700;
            color: #0d6efd;
            text-decoration: none;
        }

        .post-title {
            font-size: 2.8rem;
            font-weight: 700;
            color: #212529;
            margin-bottom: 1.5rem;
        }

        .author-meta {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-bottom: 2rem;
            padding-bottom: 1rem;
            border-bottom: 1px solid #e9ecef;
        }

        .author-meta img {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            object-fit: cover;
        }

        .author-meta .author-info {
            font-size: 0.9rem;
            color: #6c757d;
        }

        .author-meta .author-name {
            font-weight: 600;
            color: #343a40;
            display: block;
        }

        .feature-image {
            border-radius: 8px;
            margin-bottom: 2.5rem;
        }

        .article-body h2,
        .article-body h3 {
            font-weight: 600;
            margin-top: 2.5rem;
            margin-bottom: 1rem;
            color: #212529;
        }

        .article-body h2 { font-size: 2rem; }
        .article-body h3 { font-size: 1.5rem; }

        .article-body p {
            margin-bottom: 1.25rem;
            font-size: 1.1rem;
        }

        /* ===================================================================
           3. SIDEBAR, CTA & TABLE OF CONTENTS
           =================================================================== */
        .cta-card {
            background-color: #f0f4f9;
            border: none;
            border-radius: 8px;
            text-align: center;
            padding: 2rem 1.5rem;
            margin-bottom: 2rem;
        }

        .cta-card img { max-width: 120px; margin-bottom: 1.5rem; }
        .cta-card h3 { font-size: 1.5rem; font-weight: 700; color: #1e293b; margin-top: 0; }
        .cta-card p { color: #475569; font-size: 1rem; line-height: 1.6; }

        .btn-cta {
            background-color: #1e293b;
            color: #fff;
            font-weight: 600;
            padding: 12px 24px;
            border-radius: 8px;
            text-decoration: none;
            display: inline-block;
            transition: background-color 0.3s, transform 0.3s;
        }

        .btn-cta:hover {
            background-color: #0f172a;
            color: #fff;
            transform: translateY(-2px);
        }

        .btn-cta .fa-arrow-right { margin-left: 8px; }

        .toc-sidebar {
            position: -webkit-sticky;
            position: sticky;
            top: 120px;
            align-self: flex-start;
        }

        /* === UPDATED TABLE OF CONTENTS STYLES START === */
        .toc-card {
            background-color: #fff;
            border: 1px solid #e9ecef;
            border-radius: 8px;
            padding: 24px;
        }

        .toc-card h5 { 
            font-size: 1.25rem;
            font-weight: 600;
            color: #212529;
            margin: 0 0 0.5rem 0;
        }

        .toc-card hr { 
            margin: 0 0 1rem 0;
            border: 0;
            border-top: 1px solid #e9ecef;
        }

        .toc-card a {
            text-decoration: none;
            transition: color 0.2s ease-in-out;
        }

        .toc-card a:hover {
            color: #0d6efd;
        }
        
        .toc-list, 
        .toc-submenu {
            margin: 0;
        }

        .toc-list {
            list-style-type: circle;
            padding-left: 20px;
        }
        
        .toc-list li {
            padding: 4px 0;
        }

        .toc-list > li > a {
            color: #212529; /* Black/dark grey as requested */
            font-weight: 500;
        }
        
        .toc-submenu {
            list-style: none; /* Removes bullets for sub-items */
            padding-left: 20px;
            margin-top: 12px;
            margin-bottom: 12px;
            border-left: 1px solid #dee2e6; /* Vertical line for indentation */
        }
        
        .toc-submenu li {
            padding: 5px 0;
        }
        
        .toc-submenu li a {
            color: #6c757d; /* Softer grey for sub-items */
            font-weight: 400;
        }
        /* === UPDATED TABLE OF CONTENTS STYLES END === */

        #tocOffcanvas .offcanvas-body a {
            padding: 1rem 1.5rem;
            font-weight: 500;
            color: #343a40;
            border-bottom: 1px solid #e9ecef;
        }

        #tocOffcanvas .offcanvas-body a:hover { background-color: #f8f9fa; color: #0d6efd; }
        #tocOffcanvas .offcanvas-body .toc-submenu a { padding-left: 2.5rem; font-weight: 400; color: #495057; }

        /* ===================================================================
           4. FOOTER
           =================================================================== */
        .rs-footer {
            padding: 60px 0 30px 0;
            font-family: system-ui, sans-serif;
            background-color: #1A222F;
            color: #ffffff;
        }

        .rs-footer a { text-decoration: none; color: #adb5bd; }
        .rs-footer a:hover { color: #ffffff; }

        .rs-footer-bottom {
            border-top: 1px solid #495057;
            margin-top: 40px;
            padding-top: 20px;
            font-size: 14px;
            color: #ffffff;
        }

        .rs-footer-bottom a { color: #ffffff; text-decoration: none;}
        .rs-footer-bottom a:hover { text-decoration: underline; }

        .accordion-item {
            background-color: #1A222F;
            border: none;
            margin-bottom: 5px;
            border-radius: 0.25rem;
            box-shadow: none !important;
        }

        .accordion-item:last-of-type { margin-bottom: 0; }
        .accordion-header { background-color: #1A222F; }

        .rs-accordion-button {
            position: relative;
            background-color: transparent !important;
            color: #ffffff !important;
            font-weight: 600;
            padding-left: 1.5rem;
            border: none !important;
            box-shadow: none !important;
            outline: none !important;
            transition: none !important;
        }

        .rs-accordion-button:hover,
        .rs-accordion-button:active,
        .rs-accordion-button:not(.collapsed) {
            background-color: transparent !important;
            color: #ffffff !important;
            border: none !important;
            box-shadow: none !important;
            outline: none !important;
        }

        .rs-accordion-button::after {
            content: "";
            position: absolute;
            right: 1rem;
            top: 50%;
            transform: translateY(-50%) rotate(45deg);
            width: 12px;
            height: 12px;
            border-style: solid;
            border-width: 2px 2px 0 0;
            border-color: #ffffff;
            transition: transform 0.3s ease;
            transform-origin: center;
            pointer-events: none;
        }

        .rs-accordion-button.collapsed::after { transform: translateY(-50%) rotate(45deg); }
        .rs-accordion-button:not(.collapsed)::after { transform: translateY(-50%) rotate(135deg); }
        .accordion-body { background-color: #1A222F; color: #adb5bd; padding-bottom: 0.5rem; }

        /* ===================================================================
           5. UTILITY & FLOATING ELEMENTS
           =================================================================== */
        #scrollToTopBtn {
            display: none; position: fixed; bottom: 30px; right: 30px; z-index: 99;
            border: none; outline: none; background-color: rgba(0, 0, 0, 0.7);
            color: white; cursor: pointer; width: 50px; height: 50px;
            border-radius: 50%; font-size: 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
            transition: background-color 0.3s, opacity 0.3s; opacity: 0;
            display: flex; justify-content: center; align-items: center;
        }
        #scrollToTopBtn:hover { background-color: rgba(0, 0, 0, 0.9); }

        #tocBtn {
            position: fixed; bottom: 30px; left: 30px; z-index: 1040;
            width: 50px; height: 50px; background-color: #1e293b;
            color: #fff; border-radius: 50%; border: none;
            box-shadow: 0 4px 12px rgba(0,0,0,0.2); font-size: 1.2rem;
            display: none; align-items: center; justify-content: center;
            opacity: 0; transition: opacity 0.3s ease-in-out;
        }

        /* ===================================================================
           6. RESPONSIVE DESIGN
           =================================================================== */
        @media (max-width: 991.98px) {
            .post-title { font-size: 2.2rem; }
            .article-body p { font-size: 1rem; }
            .article-body h2 { font-size: 1.75rem; }
            .article-body h3 { font-size: 1.35rem; }
            .breadcrumb { font-size: 0.9rem; }
            .author-meta .author-info { font-size: 0.85rem; }
            .sidebar { margin-top: 3rem; }
            .toc-sidebar { position: static; }

            /* === FIX: SHOW FLOATING TOC BUTTON ON MOBILE === */
            #tocBtn {
                display: flex; /* Change display to flex to make it visible */
                opacity: 1;    /* Make the button fully opaque */
            }
            /* === END OF FIX === */
        }

        @media (min-width: 768px) { .rs-mobile-footer { display: none; } }
        @media (max-width: 767.98px) { .rs-desktop-footer { display: none; } }