/* Course Archive Styles */
.nx-courses-archive-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.nx-course-card {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nx-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.nx-course-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.nx-course-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nx-course-card:hover .nx-course-thumbnail img {
    transform: scale(1.05);
}

.nx-course-content {
    padding: 15px;
}

.nx-course-title {
    font-size: 18px;
    margin: 0 0 10px;
}

.nx-course-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.nx-course-excerpt {
    font-size: 14px;
    margin-bottom: 15px;
    color: #666;
}

.nx-course-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.nx-course-price {
    font-weight: bold;
    color: #333;
}

.nx-course-action .button {
    background-color: #2271b1;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.nx-course-action .button:hover {
    background-color: #135e96;
}

/* Single Course Page Styles */
.course-header {
    margin-bottom: 30px;
}

.course-title {
    font-size: 32px;
    margin-bottom: 10px;
}

.course-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    color: #666;
}

.course-info {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.course-description {
    margin-bottom: 20px;
}

.course-features {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
}

.features-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.features-list li {
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
}

.features-list li:last-child {
    border-bottom: none;
}

/* Single Course Page Styles - Syllabus */
.course-syllabus {
    margin-top: 30px;
    border: 1px solid #e0e0e0; /* Add a border around the whole syllabus */
    border-radius: 5px;
    overflow: hidden; /* Ensures border-radius is applied correctly */
}

.course-syllabus h2 {
    /* Style for the main "Course Content" heading */
    padding: 15px 20px;
    margin: 0;
    background-color: #f2f2f2;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1.3em;
    color: #333;
}

.course-section-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-section {
    margin: 0; /* Remove default list item margin */
    border-bottom: 1px solid #eee; /* Separator between sections */
}

.course-section:last-child {
    border-bottom: none; /* No border after the last section */
}

/* --- Section Title (h3) --- */
.course-section > h3.c-section-title { /* Target direct child h3 */
    margin: 0;
    padding: 12px 20px; /* Padding inside section title */
    font-size: 1.1em;
    font-weight: 600;
    color: #444;
    background-color: #f9f9f9; /* Slightly different background */
    cursor: pointer; /* Indicate it's clickable (if using JS for collapse) */
    position: relative;
}

/* Optional: Add icon to section title */
.course-section > h3.c-section-title::before {
    content: "\25B6"; /* Right-pointing triangle */
    display: inline-block;
    margin-right: 10px;
    font-size: 0.8em;
    color: #777;
    transition: transform 0.2s ease;
}

.course-section > h3.c-section-title.open::before {
    transform: rotate(90deg); /* Rotate icon when open */
}


/* --- Lesson List within a Section --- */
.section-lesson-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #fff; /* White background for lessons */
}

.course-lesson {
    margin: 0;
    padding: 0; /* Remove default list item padding */
    border-bottom: 1px dashed #eee; /* Dashed separator between lessons */
    position: relative; /* Needed for pseudo-elements */
}

.section-lesson-list .course-lesson:last-child {
    border-bottom: none; /* No border after the last lesson in a list */
}

.course-lesson a {
    display: block; /* Make the whole list item clickable */
    padding: 10px 20px; /* Padding inside lesson link */
    text-decoration: none;
    color: #555;
    font-size: 0.95em;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative; /* Needed for pseudo-elements */
}

.course-lesson a:hover {
    background-color: #f5f5f5; /* Subtle hover effect */
    color: #2271b1; /* WP Blue on hover */
}

/* Optional: Add icon to lesson link */
.course-lesson a::before {
    content: "\2022"; /* Bullet point */
    display: inline-block;
    margin-right: 10px;
    color: #999;
}

/* --- Nested Child Sections Container --- */
.child-sections {
    list-style: none;
    padding: 0;
    margin: 0; /* Remove default margin */
    border-left: 2px solid #e0e0e0; /* Visual indicator for nesting */
    margin-left: 20px; /* Indent nested sections */
}

/* --- Nested Section Levels --- */
.course-section.section-level-1 > h3.c-section-title {
    font-size: 1.05em; /* Slightly smaller than top level */
    padding-left: 15px; /* Adjust padding due to parent indent */
    background-color: #fcfcfc; /* Lighter background */
}

.child-sections.level-2 {
    border-left-color: #eee; /* Lighter border for deeper nesting */
    margin-left: 20px; /* Further indent */
}

.course-section.section-level-2 > h3.c-section-title {
    font-size: 1em; /* Even smaller */
    padding-left: 15px;
    background-color: #fff; /* White background */
    font-weight: 500; /* Less bold */
}

.child-sections.level-3 {
    border-left-color: #f5f5f5;
    margin-left: 20px;
}

.course-section.section-level-3 > h3.c-section-title {
    font-size: 0.95em;
    padding-left: 15px;
    background-color: #fff;
    font-weight: 400;
    color: #666;
}

/* Adjust lesson padding within nested sections */
.child-sections .section-lesson-list .course-lesson a {
    padding-left: 15px; /* Adjust padding to align with nested section titles */
}


/* Ensure preview badge aligns correctly */
.course-lesson .lesson-preview-badge {
    vertical-align: middle;
    margin-left: 5px;
    position: absolute; /* Position it relative to the lesson */
    right: 20px; /* Align to the right */
    top: 50%;
    transform: translateY(-50%); /* Center vertically */
}

/* Existing styles for collapsible sections (if still used elsewhere) */
/* Keep the original .c-section-title, .section-content, .lesson-item styles */
/* as they might be used for the sidebar or other elements. */
/* The new styles target the specific classes from single-course.php */
/* and use more specific selectors (e.g., > h3.c-section-title) */

.c-section-title {
    padding: 10px 15px;
    background-color: #f2f2f2;
    margin: 0;
    font-size: 18px;
    cursor: pointer;
    border: 1px solid #e0e0e0;
    position: relative;
}

.c-section-title:after {
    content: "+";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.c-section-title.open:after {
    content: "-";
}

.section-content {
    display: none;
    padding: 0;
    border: 1px solid #e0e0e0;
    border-top: none;
}

.c-section-title.open + .section-content {
    display: block;
}

.lesson-item {
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.lesson-title {
    flex-grow: 1;
}

.lesson-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-label {
    background-color: #e6f6ff;
    color: #0073aa;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.course-action {
    margin-top: 30px;
    text-align: center;
}

.course-action .button {
    background-color: #2271b1;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
}

.course-action .button:hover {
    background-color: #135e96;
}

/* Single Lesson Page Styles */
.nx-lesson-wrapper {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 0; /* Reduced gap 30px */
    min-height: 100vh;
}
.admin-bar .nx-lesson-wrapper {
    min-height: calc(100vh - 36px);
}

.nx-lesson-sidebar {
    background-color: #f7f7f7; /* Slightly lighter background */
    padding: 15px; /* Reduced padding */
    border-radius: 4px;
    border: 1px solid #e0e0e0; /* Added subtle border */
}
/* make custom thin scrollbar for sidebar  .nx-lesson-navigation */
.nx-lesson-navigation::-webkit-scrollbar {
    width: 6px;
}
.nx-lesson-navigation::-webkit-scrollbar-track {
    background: #f1f1f1; 
    border-radius: 3px;
}
.nx-lesson-navigation::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border-radius: 3px;
}
.nx-lesson-navigation::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}



/* Desktop: make sidebar collapsible and prettier */
@media (min-width: 769px) {
    .nx-lesson-wrapper { /* Use fixed sidebar width on desktop */
        grid-template-columns: 300px 1fr;
        transition: grid-template-columns 0.25s ease;
    }

    .nx-lesson-sidebar {
        position: relative;
        min-width: 260px;
        max-width: 320px;
        transition: width 0.25s ease, padding 0.25s ease;
        box-shadow: 0 1px 2px rgba(0,0,0,0.03);
        
    }
    .nx-lesson-navigation {
        overflow-y: auto;
        overflow-x: hidden;
        max-height: 90vh;
        padding-right: 10px;
    }

    /* Toggle button visible on desktop */
    .nx-lesson-sidebar .sidebar-toggle {
        display: block;
        position: absolute;
        right: -12px;
        top: 12px;
        width: 24px;
        height: 24px;
        border-radius: 12px;
        border: 1px solid #d0d0d0;
        background: #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
        cursor: pointer;
        text-indent: -9999px; /* hide text if any */
    }

    .nx-lesson-sidebar .sidebar-toggle:after {
        content: "\00AB"; /* « collapse icon */
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 14px;
        color: #555;
        text-indent: 0;
    }

    /* Collapsed state adjustments */
    .nx-lesson-wrapper.sidebar-collapsed {
        grid-template-columns: 48px 1fr;
    }

    .nx-lesson-wrapper.sidebar-collapsed .nx-lesson-sidebar {
        width: 48px;
        padding: 10px 6px; /* tighter padding when collapsed */
        max-width: 48px;
        min-width: 48px;
    }

    .nx-lesson-wrapper.sidebar-collapsed .nx-lesson-sidebar .nx-sidebar-inner {
        display: none; /* hide navigation content */
    }

    .nx-lesson-wrapper.sidebar-collapsed .nx-lesson-sidebar .sidebar-toggle {
        right: -12px; /* keep visible */
    }

    .nx-lesson-wrapper.sidebar-collapsed .nx-lesson-sidebar .sidebar-toggle:after {
        content: "\00BB"; /* » expand icon */
    }
}

.nx-lesson-navigation h3 {
    margin-top: 0;
    margin-bottom: 15px; /* Increased bottom margin */
    padding-bottom: 8px; /* Reduced padding */
    border-bottom: 1px solid #dcdcdc; /* Slightly darker border */
    font-size: 1.1em; /* Slightly larger */
    color: #444;
}

.nx-course-sections {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.nx-course-section {
    margin-bottom: 10px; /* Slightly reduced spacing */
    padding-left: 0; /* Base padding */
}

.nx-course-section:last-child {
    margin-bottom: 0;
}

/* --- Base Section Title --- */
.nx-course-section > h4 { /* Target direct child h4 */
    margin: 0 0 8px;
    font-size: 1em;
    font-weight: 600;
    color: #555;
    padding: 5px 0;
}

/* --- Base Lesson List --- */
.nx-course-section > .nx-section-lessons { /* Target direct child lesson list */
    list-style-type: none;
    padding: 0 0 0 12px; /* Base indent for lessons */
    margin: 0 0 10px 0; /* Add bottom margin */
    border-left: 2px solid #e0e0e0;
}

/* --- Nested Child Sections Container --- */
.nx-child-sections {
    list-style-type: none;
    padding: 0;
    margin: 10px 0 10px 15px; /* Indent the whole sub-section block */
}

/* --- Level 1 Section --- */
.nx-course-section.level-1 > h4 {
    font-size: 0.95em; /* Slightly smaller */
    font-weight: 600; /* Keep bold */
    color: #666;
    margin-bottom: 6px; /* Tighter margin */
}

.nx-course-section.level-1 > .nx-section-lessons {
    padding-left: 12px; /* Keep lesson indent consistent relative to title */
    border-left-color: #e8e8e8; /* Slightly lighter border */
    margin-bottom: 8px;
}

/* --- Level 2 Section --- */
.nx-child-sections.level-2 {
     margin-left: 15px; /* Further indent level 2 block */
}

.nx-course-section.level-2 > h4 {
    font-size: 0.9em; /* Even smaller */
    font-weight: 500; /* Normal weight */
    color: #777;
    margin-bottom: 5px;
}

.nx-course-section.level-2 > .nx-section-lessons {
    padding-left: 12px;
    border-left-color: #f0f0f0; /* Even lighter border */
    margin-bottom: 6px;
}

/* --- Level 3 (if needed) --- */
.nx-child-sections.level-3 {
     margin-left: 15px; /* Further indent level 3 block */
}

.nx-course-section.level-3 > h4 {
    font-size: 0.85em;
    font-weight: 500;
    color: #888;
    margin-bottom: 4px;
}

.nx-course-section.level-3 > .nx-section-lessons {
    padding-left: 12px;
    border-left-style: dotted; /* Differentiate deeply nested lessons */
    border-left-color: #f0f0f0;
    margin-bottom: 5px;
}

/* Ensure lessons within nested sections still get correct styling */
/* Note: .nx-section-lessons .nx-lesson a inherits from .nx-lesson a defined below */

.nx-lesson {
    padding: 0; /* Remove default padding */
    margin-bottom: 2px; /* Small gap between lessons */
    position: relative;
}

.nx-lesson a {
    text-decoration: none;
    color: #444; /* Slightly darker default color */
    display: block;
    padding: 6px 10px; /* Consistent padding */
    font-size: 0.9em; /* Slightly smaller font */
    border-radius: 3px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nx-lesson.current-lesson a {
    font-weight: 600; /* Bolder */
    color: #ffffff; /* White text */
    background-color: #2271b1; /* WP Blue background */
}

.nx-lesson:not(.current-lesson) a:hover {
    color: #2271b1;
    background-color: #e9e9e9; /* Subtle hover background */
}

.lesson-preview-badge {
    position: absolute;
    right: 2px;
    bottom: -5px;
}
.lesson-preview-badge svg {
    width: 14px;
    height: 14px;
    fill: #0073aa; /* WP Blue */
}
 
/* Lesson Search Filter */
.nx-lesson-search-wrapper {
    position: sticky;
    bottom: 0;
    background: #F5F0E6;
    border-top: 1px solid #e0e0e0;
    padding: 12px;
    margin: 0 -15px -15px -15px; /* Extend to sidebar edges */
    z-index: 10;
}

.nx-lesson-search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.nx-lesson-search-input {
    width: 100%;
    padding: 8px 35px 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    background: #f9f9f9;
    transition: all 0.2s ease;
    outline: none;
}

.nx-lesson-search-input:focus {
    border-color: #007cba;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0, 124, 186, 0.2);
}

.nx-lesson-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.nx-lesson-search-clear:hover {
    background: #f0f0f0;
    color: #333;
}

.nx-lesson-search-clear svg {
    width: 12px;
    height: 12px;
}

.nx-search-results-info {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
    text-align: center;
}

/* Search highlighting */
.nx-lesson.search-match {
    background-color: rgba(255, 193, 7, 0.1);
    border-radius: 4px;
}

.nx-lesson.first-search-result {
    background-color: rgba(0, 124, 186, 0.15);
    border: 1px solid rgba(0, 124, 186, 0.3);
    animation: first-result-pulse 1.5s ease-in-out;
}

@keyframes first-result-pulse {
    0%, 100% {
        background-color: rgba(0, 124, 186, 0.15);
    }
    50% {
        background-color: rgba(0, 124, 186, 0.25);
    }
}

.nx-lesson.search-hidden {
    display: none !important;
}

.nx-course-section.section-no-matches {
    opacity: 0.3;
}

.nx-course-section.section-no-matches .c-section-title {
    color: #999;
}

/* Search term highlighting within lesson titles */
.search-highlight {
    background-color: #ffeb3b;
    color: #333;
    padding: 1px 2px;
    border-radius: 2px;
    font-weight: 600;
}

.nx-back-to-course {
    margin-top: 15px; /* Reduced margin */
    padding-top: 15px; /* Increased padding */
    border-top: 1px solid #dcdcdc; /* Match h3 border */
}

.nx-back-to-course a {
    text-decoration: none;
    color: #2271b1;
}

.nx-lesson-content {
    width: 100%;
}

.nx-lesson-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
}

.nx-prev-lesson,
.nx-next-lesson {
    flex: 1;
}

.nx-next-lesson {
    text-align: right;
}

.nx-prev-lesson a,
.nx-next-lesson a {
    text-decoration: none;
    color: #2271b1;
}

.nx-prev-lesson a:hover,
.nx-next-lesson a:hover {
    text-decoration: underline;
}

.nav-label {
    font-size: 14px;
    color: #666;
}

.nx-lesson-completion {
  
}

.nx-button {
    display: inline-block;
    background-color: #2271b1;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}
.nx-mark-btn {
    display: flex;
    justify-content: center;
    align-items: center;
}
.nx-mark-btn svg {
    width: 16px;
    margin-left: 10px;
}

.nx-button:hover {
    background-color: #135e96;
}

.nx-button-completed {
    background-color: #46b450;
}

.nx-button-completed:hover {
    background-color: #389e41;
}

/* My Licenses Styles */
.nx-licenses-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.nx-licenses-table th,
.nx-licenses-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.nx-licenses-table th {
    background-color: #f2f2f2;
}

.nx-license-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    text-align: center;
    font-size: 12px;
}

.nx-license-active {
    background-color: #e7f7e7;
    color: #2e7d32;
}

.nx-license-expired {
    background-color: #ffebee;
    color: #c62828;
}

.nx-license-pending {
    background-color: #fff8e1;
    color: #f57f17;
}

.nx-license-action {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    background-color: #2271b1;
    color: white;
    text-decoration: none;
    font-size: 12px;
}

.nx-license-action:hover {
    background-color: #135e96;
}

/* Progress Tracking Styles */
.nx-progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 15px 0 5px;
    overflow: hidden;
}

.nx-progress-bar {
    height: 100%;
    background-color: #46b450;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.nx-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* Progress Bar in Single Course */
.nx-course-progress-container {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.nx-course-progress-bar {
    width: 100%;
    height: 15px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 10px 0;
    overflow: hidden;
}

.nx-course-progress-fill {
    height: 100%;
    background-color: #46b450;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.nx-course-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 10px;
}

.nx-course-progress-percentage {
    font-weight: bold;
}

.nx-continue-course {
    margin-top: 15px;
    text-align: center;
}

/* Sequential Navigation Styles */
.nx-lesson-disabled a {
    color: #999 !important;
    cursor: not-allowed !important;
    text-decoration: none !important;
    pointer-events: none;
}

.nx-lesson-disabled:before {
    content: "🔒";
    display: inline-block;
    margin-right: 5px;
    font-size: 12px;
}

.nx-lesson-completed a::before { /* Apply to the link for better alignment */
    content: "✓";
    display: inline-block;
    margin-right: 6px; /* Slightly more space */
    color: #46b450;
    font-weight: bold;
}

/* Ensure current completed lesson retains checkmark */
.nx-lesson.current-lesson.nx-lesson-completed a::before {
    color: #ffffff; /* White checkmark on blue background */
}

.nx-next-lesson.disabled a {
    color: #999 !important;
    cursor: not-allowed !important;
    text-decoration: none !important;
    pointer-events: none;
}
.sidebar-toggle {
    display: none; /* Hide by default */
}
.nx-lesson-content {
    padding-right: 1rem;
}
.nx-lesson-content .entry-content, .nx-lesson-content .entry-content > .nx-section-block {
    height: 100%;
}

.nx-lesson-progress-wrapper {
    padding: .5rem 1rem; /* Adjust padding */
    background-color: #f7f7f7; /* Lighter background */
    border-radius: 4px; /* Rounded corners */
    margin-bottom: 1rem; /* Space below */
}


@media (min-width: 769px) {
    .nx-lesson-content {
        padding-right: 0;
        display: flex    ;
        flex-direction: column;
        justify-content: flex-start;
    }
    .nx-lesson-pagination-bottom{
        margin-top: auto;
        position: fixed;
        background: white;
        bottom: 0;
        z-index: 100;
        width: calc(100% - 300px); 
    }
}


@media (max-width: 768px) {
    .nx-advanced-header {
        text-shadow: rgb(255, 255, 255) 3px 0px 0px, rgb(255, 255, 255) 2.83487px 0.981584px 0px, rgb(255, 255, 255) 2.35766px 1.85511px 0px, rgb(255, 255, 255) 1.62091px 2.52441px 0px, rgb(255, 255, 255) 0.705713px 2.91581px 0px, rgb(255, 255, 255) -0.287171px 2.98622px 0px, rgb(255, 255, 255) -1.24844px 2.72789px 0px, rgb(255, 255, 255) -2.07227px 2.16926px 0px, rgb(255, 255, 255) -2.66798px 1.37182px 0px, rgb(255, 255, 255) -2.96998px 0.42336px 0px, rgb(255, 255, 255) -2.94502px -0.571704px 0px, rgb(255, 255, 255) -2.59586px -1.50383px 0px, rgb(255, 255, 255) -1.96093px -2.27041px 0px, rgb(255, 255, 255) -1.11013px -2.78704px 0px, rgb(255, 255, 255) -0.137119px -2.99686px 0px, rgb(255, 255, 255) 0.850987px -2.87677px 0px, rgb(255, 255, 255) 1.74541px -2.43999px 0px, rgb(255, 255, 255) 2.44769px -1.73459px 0px, rgb(255, 255, 255) 2.88051px -0.838247px 0px;
    }
    .nx-lesson-pagination-bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 2;
        background-color: var(--sidebar-bg-color, #f7f7f7);
    }
    .nx-lesson-sidebar:not(.open) {
        padding: 0;
    
    }
    .nx-lesson-sidebar {
        position: absolute;
    }
    .nx-section-block.has-background-overlay {
        background-position: center center !important;
    }

    .single-lesson .entry-content {
        margin-top: 0; /* Space for fixed progress bar */
        margin-bottom: 47px !important; /* Space for fixed pagination */
        padding: 0 !important; /* Remove side padding */
    }
    .nx-lesson-progress-wrapper {
        display: none;
        /*
        position: fixed;
        padding: 0 1rem; 
        top: 0;
        left: 0;
        width: 100%;
        z-index: 2;
          background-color: var(--sidebar-bg-color, #f7f7f7);
    */
    }
    .nx-lesson-progress-text {
        font-size: 12px;
        text-align: center;
    }

    .nx-courses-archive-wrapper {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }

    .nx-lesson-wrapper {
        grid-template-columns: 1fr; /* Stack sidebar and content */
        gap: 0; /* Remove gap */
        margin: 0; /* Remove margin */
    }

    .nx-lesson-navigation {
        flex-direction: column; /* Stack navigation items */
        align-items: center;
        padding: 10px;
    }

    .nx-prev-lesson,
    .nx-next-lesson {
        text-align: center; /* Center text on smaller screens */
    }

    /* sidebas in mobile slide in on click .sidebar-toggle */
    .nx-sidebar-inner {
        background-color: var(--sidebar-bg-color, #f7f7f7);
    }
    .nx-lesson-sidebar {
        background-color: transparent;
        padding: 0;
        border: none;
    }
    .nx-lesson-sidebar .nx-sidebar-inner{
        position: fixed;
        top: 0;
        left: -300px; /* Hide off-screen */
        width: 300px;
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        transition: left 0.3s ease;
        z-index: 1000; /* Ensure it appears above other content */
    }
    .nx-lesson-sidebar.open .nx-sidebar-inner{
        left: 0; /* Slide in */
    }
    .nx-lesson-sidebar .sidebar-toggle {
        position: fixed;
        top: 5px;
        right: 5px; /* Position outside the sidebar */
        background-color: #fffbf3;
        color: rgb(0, 0, 0);
        padding: 10px;
        border-radius: 45px;
        cursor: pointer;
        z-index: 1001; /* Ensure it appears above the sidebar */
        transition: background-color 0.3s ease;
        display: block; /* Show the toggle button */
        font-size: 20px;
        text-align: center;
        width: 40px; /* Fixed width for the toggle button */
        height: 40px; /* Fixed height for the toggle button */
    }
    .nx-lesson-sidebar .sidebar-toggle:hover {
        background-color: #ffffff;
    }
    .nx-lesson-sidebar .sidebar-toggle:after {
        content: "☰"; /* Hamburger icon */
        font-size: 20px;
        font-family: 'Courier New', Courier, monospace;
        color: rgb(0, 0, 0);
    }
    .nx-lesson-sidebar .sidebar-toggle.open:after {
        content: "✖"; /* Close icon */
    }
    .nx-lesson-content {
        padding: 0; /* Adjust padding */
    }
    .nx-lesson-content .entry-header, .nx-lesson-content .entry-content {
        padding: 1rem; /* Add padding to content */
    }
}




/* temporary test */
/* Add to your nx-courses-frontend.css */

/* Accordion Section Titles */
.nx-course-sections .c-section-title {
    font-size: 14px;
    font-weight: 400;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}
.nx-course-sections .accordion-icon {
    margin-right: 5px;
    display: inline-block;
}

.nx-course-sections .c-section-title:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.nx-course-sections .c-section-title.expanded {
    background: #007cba;
    color: white;
    border-color: #005a87;
}
 
 
/* Lesson Items */
.nx-lesson {
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.nx-lesson:last-child {
    border-bottom: none;
}

 

.nx-lesson a:hover {
    color: #007cba;
}

/* Current Lesson */
.nx-lesson.current-lesson a {
    background-color: #9addff;
    color: white;
    font-weight: 600;
}

.nx-lesson.current-lesson a::before {
    content: "▶";
    position: absolute;
    left: 8px;
    display: inline-block;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    margin-right: 5px;
    font-family: 'Courier New', Courier, monospace;
}

/* Visited Lessons */
.nx-lesson.nx-lesson-visited a {
    color: #28382c;
    position: relative;
}
/*
.nx-lesson.nx-lesson-visited a::after {
    content: "✓";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: bold;
    color: #28382c;
}
*/

/* Completed Lessons */
.nx-lesson.nx-lesson-completed a {
    background-color: #d4edda;
    color: #146326;
}

.nx-lesson.nx-lesson-completed a::after {
    content: "✓";
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: bold;
    color: #146326;
}

 

/* Highlight effect for scroll-to current lesson */
.nx-lesson.nx-lesson-highlighted {
    animation: highlight-pulse 2s ease-in-out;
}

@keyframes highlight-pulse {
    0%, 100% {
        background-color: transparent;
    }
    50% {
        background-color: rgba(0, 124, 186, 0.1);
    }
}

/* Smooth animations */
.nx-section-lessons {
    transition: all 1.3s ease;
}
 