/* Add or update at the top of the file for global consistency */
:root {
    --primary: #4a6fa5;
    --secondary: #6b8cb2;
    --accent: #ff9e3d;
    --background: #f5f7fa;
    --text: #333;
    --light-text: #666;
    --code-bg: #f0f2f5;
    --border: #ddd;
    --success: #4CAF50;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    --line-height-body: 1.6;
    --line-height-heading: 1.2;
}

body {
    font-family: var(--font-sans);
    line-height: var(--line-height-body);
    color: var(--text);
    background-color: var(--background);
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    padding-top: 100px !important; /* Reduced from 110px */
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    line-height: var(--line-height-heading);
    margin-top: 1.25em;
    margin-bottom: 0.75em;
    color: var(--text);
    font-weight: 600;
}

h1 {
    font-size: 2.25rem;
    text-align: center;
    color: var(--primary);
    border-bottom: 3px solid var(--accent);
    padding-bottom: 0.3em;
    margin-top: 0.75em;
}

h2 {
    font-size: 1.75rem;
    color: var(--primary);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.2em;
    margin-top: 1.25em;
}

h3 {
    font-size: 1.35rem;
    color: var(--secondary);
    margin-top: 1em;
}

h4 {
    font-size: 1.15rem;
    color: var(--text);
    margin-top: 0.75em;
}

p {
    margin-bottom: 1em;
    font-size: 1rem;
}

main {
    padding: 20px 0;
}

section {
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    padding-top: 12px; /* Reduced top padding */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    scroll-margin-top: 60px;
}

/* Adjust first element margins in sections */
section > h1:first-child,
section > h2:first-child,
section > h3:first-child,
section > h4:first-child {
    margin-top: 0;
}

section > .course-description:first-child {
    margin-top: 0;
}

#introduction,
header,
.course-description {
    scroll-margin-top: 60px !important;
}

/* Course Index Styles */
.nav-index {
    position: fixed;
    top: 70px;
    left: 0;
    width: 260px;
    height: calc(100vh - 70px);
    z-index: 999;
    background: white;
    border-right: 1px solid #eee;
    box-shadow: 2px 0 8px rgba(0,0,0,0.04);
    padding-top: 0;
    transition: none;
}

.nav-content {
    width: 100%;
    max-height: none;
    box-shadow: none;
    border-radius: 0;
    margin-top: 0;
    height: 100%;
    overflow-y: auto;
    padding: 20px 15px;
}

/* Remove or comment out the toggle button styles */
.nav-toggle {
    display: none;
}

/* Remove the global body margin-left to avoid layout issues */
body {
    margin-left: 0;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Shift all main content containers to the right of the sidebar */
main, .container {
    margin-left: 260px !important;
    max-width: calc(100% - 260px) !important;
    width: auto !important;
    box-sizing: border-box;
    margin-right: 0 !important;
    padding-right: 24px;
    padding-left: 0;
}

/* You may want to adjust responsive styles for mobile */
@media (max-width: 900px) {
    .nav-index {
        width: 200px;
    }
    main, .container, .module-container {
        margin-left: 200px !important;
        max-width: calc(100% - 200px) !important;
    }
    .container {
        margin-left: 200px !important;
        max-width: calc(100% - 200px) !important;
    }
}

@media (max-width: 768px) {
    .nav-index {
        position: fixed;
        top: 56px;
        left: 0;
        width: 80vw;
        min-width: 180px;
        max-width: 300px;
        height: calc(100vh - 56px);
        z-index: 1010;
        box-shadow: 2px 0 8px rgba(0,0,0,0.08);
    }
    main, .container, .module-container {
        margin-left: 0 !important;
        max-width: 100% !important;
        padding: 0 8px !important;
    }
    .container {
        margin-left: 0 !important;
        max-width: 100% !important;
    }
    .nav-toggle {
        display: none;
    }
}

.nav-content h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border, #ddd);
    color: var(--primary, #4a6fa5);
}

.nav-content ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.nav-content li {
    margin-bottom: 5px;
}

.nav-link {
    display: block;
    padding: 8px;
    color: var(--text, #333);
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: var(--background, #f5f7fa);
}

.nav-link.active {
    background-color: var(--primary, #4a6fa5);
    color: white;
}

.nav-subsection {
    margin-left: 15px;
    font-size: 0.9em;
    padding-left: 10px !important;
}

.nav-sublist {
    padding-left: 20px;
    list-style-type: none;
    margin-top: 5px;
    margin-bottom: 5px;
}

.nav-sublist li {
    margin-bottom: 5px;
    font-size: 0.9em;
}

.nav-sublist a {
    color: #555;
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 4px 8px;
}

.nav-sublist a:hover {
    color: #3498db;
    background-color: #f5f7fa;
    border-radius: 4px;
}

/* Adjust header spacing for all pages */
h1, h2, h3, h4, h5, h6 {
    scroll-margin-top: 70px !important;
}

h1 {
    margin-top: 40px !important;
    padding-top: 20px !important;
}

/* Fix for pages with centered .container and max-width on body */
.container {
    margin-left: 260px !important;
    max-width: calc(100% - 260px) !important;
    width: auto !important;
    box-sizing: border-box;
    margin-right: 0 !important;
}

/* Remove extra padding from .content-inner and ensure content starts below both navs */
.content-inner {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}
/* Ensure anchor targets are visible below the fixed navs */
#genai-section, #ai-evolution, #course-structure, #module-container, #welcome {
    scroll-margin-top: 110px;
}

.navigation {
    position: fixed;
    top: 50px;
    left: 0;
    width: 100%;
    z-index: 900;
    background-color: #f0f7ff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    margin: 0 !important;
    padding: 10px 0 6px 0;
    line-height: normal;
}

.navigation .nav-buttons {
    height: auto;
    align-items: center;
}

.nav-button {
    background: transparent;
    color: #2980b9;
    padding: 10px 24px;
    font-size: 1.1rem;
    border-radius: 6px;
    margin: 0 8px;
    min-width: 120px;
    min-height: 0;
    box-sizing: border-box;
    font-weight: bold;
    border: none;
    transition: background 0.2s, color 0.2s;
}

.nav-button.active {
    background: #2980b9;
    color: #fff;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(41,128,185,0.08);
}

.nav-button:hover {
    background: #eaf2f8;
    color: #2980b9;
}

.content-inner > h1 {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.course-description {
    background: linear-gradient(135deg, #eaf2f8 0%, #f0f7ff 100%);
    padding: 1.25rem;
    padding-top: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    margin-top: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(74, 111, 165, 0.1);
}

@media (max-width: 768px) {
    .course-description {
        padding: 1.25rem;
    }
}

/* Improved blockquote styling for course modules */
blockquote {
    background: linear-gradient(90deg, #f0f7ff 80%, #eaf2f8 100%);
    border-left: 4px solid var(--primary, #4a6fa5);
    margin: 1.5em 0;
    padding: 1.1em 1.5em 1.1em 1.3em;
    border-radius: 8px;
    color: var(--light-text, #555);
    font-size: 1.05em;
    box-shadow: 0 2px 8px rgba(74, 111, 165, 0.04);
    position: relative;
}
blockquote strong {
    color: var(--primary, #4a6fa5);
}
blockquote::before {
    content: '\201C';
    color: var(--accent, #ff9e3d);
    font-size: 2.2em;
    position: absolute;
    left: 12px;
    top: 8px;
    opacity: 0.18;
    pointer-events: none;
}