/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* Top Navigation */
.top-nav {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 20px;
    height: 60px;
    gap: 20px;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    color: #2c5aa0;
    margin-left: auto;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    order: -1;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.back-btn:hover {
    background: #e8f0fe;
    border-color: #2c5aa0;
    color: #2c5aa0;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-icon {
    font-size: 16px;
    font-weight: bold;
}

.back-text {
    font-weight: 500;
}

.nav-search {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.nav-search input {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #f9f9f9;
}

.nav-search input:focus {
    outline: none;
    border-color: #2c5aa0;
    background: #fff;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 200;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.search-result-item:hover {
    background: #f9f9f9;
}

.search-result-title {
    font-weight: 500;
    color: #2c5aa0;
}

.search-result-path {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: #333;
    margin: 2px 0;
    transition: 0.3s;
}

/* Layout Container */
.layout-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* Full-width layout variant */
.layout-container.full-width {
    display: block;
}

/* Modern Sidebar - W3Schools Style */
.sidebar {
    width: 320px;
    background: #ffffff;
    border-right: 2px solid #f1f1f1;
    overflow-y: auto;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

/* CSS Reset for sidebar to prevent conflicts */
.sidebar *,
.sidebar *::before,
.sidebar *::after {
    box-sizing: border-box;
}

.sidebar-nav {
    padding: 0;
    height: 100%;
    overflow-y: auto;
}

.nav-section {
    margin: 0;
    border-bottom: 1px solid #f8f9fa;
}

.nav-section-header {
    background: #f8f9fa;
    padding: 16px 20px 12px 20px;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-title {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
    padding: 0;
}

/* Remove all icons from main menu */
.nav-section > a::before {
    display: none !important;
}

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

.nav-section li {
    margin: 0;
}

/* Main section links - these are the section headers, not submenu items */
.nav-section > a {
    display: block;
    padding: 8px 12px;
    color: #6c757d;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
    border-radius: 4px;
    position: relative;
    line-height: 1.4;
    border-left: 3px solid transparent;
}

.nav-section > a:hover {
    color: #495057;
    background: #f8f9fa;
    border-left-color: #dee2e6;
}

.nav-section > a.active {
    color: #495057;
    background: #e9ecef;
    border-left-color: #04AA6D;
    font-weight: 500;
}

.nav-section > a:active {
    background: #e8f0fe;
}

/* Submenu styling - always visible, no collapsible effects, single scroll */
.nav-submenu {
    display: block !important;
    max-height: none !important;
    overflow: visible !important;
    margin: 0;
    padding: 12px 0;
    background: #ffffff;
    border-radius: 0;
}

/* Ensure no individual scrolling on submenus */
.nav-submenu,
.nav-submenu ul,
.nav-submenu li {
    overflow: visible !important;
    max-height: none !important;
}

.nav-submenu li {
    margin: 0;
    border-bottom: 1px solid #f8f9fa;
}

.nav-submenu li:last-child {
    border-bottom: none;
}

.nav-submenu a {
    padding: 12px 20px 12px 40px;
    border-radius: 0;
    font-size: 14px;
    color: #6c757d;
    transition: all 0.2s ease;
    display: block;
    text-decoration: none;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-submenu a:hover {
    background: #f8f9fa;
    color: #495057;
    border-left-color: #2c5aa0;
}

.nav-submenu a.active {
    background: #e8f0fe;
    color: #2c5aa0;
    border-left-color: #2c5aa0;
    font-weight: 500;
}

.nav-submenu a:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: -2px;
}

/* Force single scrollbar for entire sidebar - override any conflicting rules */
.sidebar {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.sidebar-nav {
    overflow: visible !important;
}

/* Ensure submenus never have scrollbars */
.nav-section,
.nav-section ul,
.nav-section li,
.nav-submenu,
.nav-submenu ul,
.nav-submenu li {
    overflow: visible !important;
    max-height: none !important;
}

/* Single scrollbar for entire sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus styles for accessibility */
.nav-section > a:focus,
.nav-submenu a:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: calc(100% - 300px);
    overflow-x: hidden;
}

/* Full-width main content variant */
.main-content.full-width {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Breadcrumbs */
.breadcrumb {
    padding: 16px 40px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

.breadcrumb-item {
    color: #666;
}

.breadcrumb-item:not(:last-child)::after {
    content: ' › ';
    margin: 0 8px;
    color: #999;
}

.breadcrumb-item.current {
    color: #333;
    font-weight: 500;
}

.breadcrumb-item a {
    color: #2c5aa0;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Content Area */
.content {
    padding: 40px;
    max-width: 100%;
}

/* Full-width content variant */
.layout-container.full-width .content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.page-header {
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 16px;
    font-weight: 300;
}

.page-description {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.7;
}

/* Content Sections */
section {
    margin-bottom: 48px;
}

h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 400;
}

h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 16px;
    font-weight: 500;
}

p {
    margin-bottom: 16px;
    color: #555;
    line-height: 1.7;
}

/* Examples Section */
.examples-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 32px;
    border: 1px solid #e2e8f0;
    margin-top: 48px;
}

.examples-section h2 {
    color: #1e293b;
    margin-bottom: 16px;
    font-size: 2rem;
    font-weight: 600;
}

.examples-section > p {
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.example-tabs {
    margin-top: 32px;
}

.tab-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0;
}

.tab-btn {
    background: none;
    border: none;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px 8px 0 0;
    position: relative;
    min-width: 140px;
    text-align: center;
}

.tab-btn:hover {
    color: #1e40af;
    background: rgba(59, 130, 246, 0.05);
}

.tab-btn.active {
    color: #1e40af;
    background: #fff;
    border-bottom: 2px solid #3b82f6;
    margin-bottom: -2px;
}

.tab-content {
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    color: #1e293b;
    margin-bottom: 16px;
    font-size: 1.5rem;
    font-weight: 600;
}

.tab-pane p {
    color: #64748b;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 24px;
}

/* Flow Diagram */
.flow-diagram {
    margin-top: 32px;
}

.flow-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    padding: 32px;
    background: #f8fafc;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
}

.flow-step:last-child {
    margin-bottom: 0;
}

.flow-step:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.flow-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 16px 16px 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flow-step:hover::before {
    opacity: 1;
}

.step-number {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    margin-right: 28px;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    position: relative;
}

.step-number::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.flow-step:hover .step-number::after {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.3;
}

.step-content {
    flex: 1;
}

.step-content h4 {
    color: #1e293b;
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.step-content p {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.6;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

/* Engine Details */
.engine-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

.engine-item {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
}

.engine-item h3 {
    color: #2c5aa0;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.engine-item p {
    margin-bottom: 16px;
    color: #555;
}

.engine-item ul {
    list-style: none;
    padding-left: 0;
}

.engine-item li {
    padding: 4px 0;
    color: #666;
    position: relative;
    padding-left: 20px;
}

.engine-item li::before {
    content: '•';
    color: #2c5aa0;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.feature-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.2s ease;
}

.feature-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #2c5aa0;
}

.feature-card h3 {
    color: #2c5aa0;
    margin-bottom: 12px;
}

.feature-card p {
    margin-bottom: 20px;
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #2c5aa0;
    color: #fff;
}

.btn-primary:hover {
    background: #1e3f73;
}

/* Quick Start Steps */
.quick-start-steps {
    list-style: none;
    counter-reset: step-counter;
}

.quick-start-steps li {
    counter-increment: step-counter;
    margin-bottom: 24px;
    position: relative;
    padding-left: 60px;
}

.quick-start-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background: #2c5aa0;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
}

.quick-start-steps strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

/* Simple Steps */
.simple-steps {
    list-style: none;
    counter-reset: step-counter;
}

.simple-steps li {
    counter-increment: step-counter;
    margin-bottom: 16px;
    position: relative;
    padding-left: 40px;
}

.simple-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    background: #2c5aa0;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.simple-steps strong {
    color: #333;
}

/* Integration Section Styling */
.integration-overview {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem 0;
}

.integration-overview li {
    position: relative;
    padding: 0.5rem 0 0.5rem 2rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.integration-overview li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0.5rem;
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

.integration-steps {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    counter-reset: step-counter;
}

.integration-steps li {
    position: relative;
    padding: 1rem 0 1rem 3rem;
    margin-bottom: 1rem;
    border-left: 3px solid #e0e0e0;
    transition: all 0.3s ease;
    background: #f8f9fa;
    border-radius: 0 4px 4px 0;
}

.integration-steps li::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: -1.5rem;
    top: 1rem;
    width: 2rem;
    height: 2rem;
    background: #2c5aa0;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.integration-steps li:hover {
    border-left-color: #2c5aa0;
    background: #e3f2fd;
    transform: translateX(0.5rem);
}

.integration-steps li:hover::before {
    background: #1e3f6f;
    transform: scale(1.1);
}

.integration-steps strong {
    display: block;
    font-weight: 600;
    color: #2c5aa0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.key-points {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.key-points li {
    position: relative;
    padding: 0.75rem 0 0.75rem 2.5rem;
    margin-bottom: 0.75rem;
    border-left: 2px solid #ffc107;
    background: #fff8e1;
    border-radius: 0 4px 4px 0;
    transition: all 0.3s ease;
}

.key-points li::before {
    content: '💡';
    position: absolute;
    left: 0.5rem;
    top: 0.75rem;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.key-points li:hover {
    border-left-color: #ff9800;
    background: #fff3e0;
    transform: translateX(0.3rem);
}

.key-points strong {
    font-weight: 600;
    color: #e65100;
}

/* Diagram Container */
.diagram-container {
    margin: 24px 0;
    text-align: center;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.diagram-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Code Blocks */
.code-block {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
}

.code-block code {
    color: #1e293b;
    font-size: 14px;
    line-height: 1.6;
}

/* W3 Panel Variations */
.w3-panel {
    padding: 16px;
    margin: 16px 0;
    border-radius: 6px;
    border-left: 4px solid #ccc;
}

.w3-panel.w3-info {
    background-color: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

.w3-panel.w3-note {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.w3-panel.w3-warning {
    background-color: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.w3-panel.w3-success {
    background-color: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.w3-panel.w3-error {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.w3-panel.w3-important {
    background-color: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

/* W3 Panel Content Styling */
.w3-panel h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.w3-panel p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.w3-panel ul {
    margin-bottom: 10px;
}

.w3-panel li {
    margin-bottom: 5px;
    line-height: 1.5;
}

/* Syntax Highlighting for JSON */
.language-json {
    background: transparent;
    color: #1e293b;
}

/* Token classes for syntax highlighting */
.token.property {
    color: #3b82f6;
}

.token.string {
    color: #059669;
}

.token.number {
    color: #d97706;
}

.token.boolean {
    color: #dc2626;
}

.token.null {
    color: #6b7280;
}

.token.punctuation {
    color: #374151;
}

.token.operator {
    color: #7c3aed;
}

/* Custom JSON styling classes */
.json-key {
    color: #3b82f6;
    font-weight: 600;
}

.json-string {
    color: #059669;
}

.json-number {
    color: #d97706;
}

.json-boolean {
    color: #dc2626;
}

.json-null {
    color: #6b7280;
}

.json-punctuation {
    color: #374151;
}

.json-operator {
    color: #7c3aed;
}

/* Enhanced JSON styling */
.code-block.json-code {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #f1f5f9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.code-block.json-code code {
    color: #f1f5f9;
}

.copy-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #334155;
    border: 1px solid #475569;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn:hover {
    background: #475569;
    border-color: #64748b;
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: #059669;
    color: #fff;
    border-color: #059669;
}

/* Resource Links */
.resource-links {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.resource-link {
    display: block;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.resource-link:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #2c5aa0;
}

.resource-link strong {
    display: block;
    color: #2c5aa0;
    margin-bottom: 4px;
}

.resource-link span {
    color: #666;
    font-size: 14px;
}

/* Page Navigation */
.page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
}

.page-nav-item a {
    display: block;
    padding: 16px 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    min-width: 200px;
}

.page-nav-item a:hover {
    background: #e8f0fe;
    border-color: #2c5aa0;
}

.page-nav-item.next {
    margin-left: auto;
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.nav-title {
    display: block;
    font-weight: 500;
    color: #333;
}

/* Table of Contents */
.toc {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.toc h4 {
    margin-bottom: 12px;
    color: #333;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin: 4px 0;
}

.toc a {
    color: #2c5aa0;
    text-decoration: none;
    font-size: 14px;
}

.toc a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    padding: 24px 0;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-search {
        display: none;
    }

    .layout-container {
        flex-direction: column;
    }

    .sidebar {
        position: fixed;
        top: 60px;
        left: -300px;
        height: calc(100vh - 60px);
        z-index: 150;
        transition: left 0.3s ease;
        width: 300px;
    }

    .sidebar.open {
        left: 0;
    }

    .main-content {
        max-width: 100%;
        width: 100%;
    }

    .content {
        padding: 20px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .page-nav {
        flex-direction: column;
        gap: 16px;
    }

    .page-nav-item.next {
        margin-left: 0;
        text-align: left;
    }

    .quick-start-steps li {
        padding-left: 50px;
    }

    .quick-start-steps li::before {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .tab-buttons {
        flex-direction: column;
        gap: 4px;
    }

    .tab-btn {
        border-radius: 8px;
        text-align: left;
    }

    .tab-btn.active {
        border-bottom: none;
        margin-bottom: 0;
    }

    .flow-step {
        flex-direction: column;
        text-align: center;
    }

    .step-number {
        margin-right: 0;
        margin-bottom: 16px;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 16px;
    }

    .content {
        padding: 16px;
    }

    .breadcrumb {
        padding: 12px 16px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .feature-card {
        padding: 16px;
    }

    .examples-section {
        padding: 20px;
    }

    .tab-content {
        padding: 16px;
    }

    .flow-step {
        padding: 16px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .nav-submenu a:hover,
    .nav-submenu a.active {
        background: #000;
        color: #fff;
    }

    .feature-card:hover {
        border-color: #000;
    }

    .btn-primary {
        background: #000;
    }

    .btn-primary:hover {
        background: #333;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Schema Generator Styling */
.schema-generator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
    align-items: start;
}

.input-section, .output-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    min-height: 500px;
    height: 500px;
}

.input-section h3, .output-section h3 {
    margin-top: 0;
    color: #2c5aa0;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.output-section p {
    margin-bottom: 1rem;
}

.output-section pre {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    height: 100%;
    overflow: visible;
}

#api-payload-input {
    width: 100%;
    height: 300px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 1rem;
}

#api-payload-input:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 2px rgba(44, 90, 160, 0.2);
}

#generated-schema-output {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1rem;
    height: 400px;
    overflow: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    position: relative;
    color: #333;
    flex: 1;
    margin-bottom: 1rem;
}

#generated-schema-output code {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: inherit;
    word-wrap: inherit;
    color: inherit;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #2c5aa0;
    color: white;
}

.btn-primary:hover {
    background: #1e3f6f;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

#copy-schema-btn {
    margin-top: 1rem;
    align-self: flex-start;
}

#generate-schema-btn {
    margin-top: auto;
    align-self: flex-start;
}

.usage-instructions, .generator-features {
    margin: 2rem 0;
}

.usage-instructions h3, .generator-features h3 {
    color: #2c5aa0;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .schema-generator-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Responsive sidebar adjustments */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }
    
    .nav-section {
        padding: 0 12px;
    }
    
    .nav-submenu a {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        left: -100%;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }
    
    .sidebar.open {
        left: 0;
    }
    
    /* Body overlay when sidebar is open */
    body.sidebar-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
    }
    
    /* Prevent body scroll when sidebar is open */
    body.sidebar-open {
        overflow: hidden;
    }
    
    /* Adjust main content for mobile */
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Mobile menu toggle positioning */
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 8px;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

/* Modal Component Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1050;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal.show {
    opacity: 1;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 1.75rem auto;
    max-width: 500px;
    pointer-events: none;
    transform: translateY(-50px);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: translateY(0);
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    outline: 0;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    border-top-left-radius: calc(0.5rem - 1px);
    border-top-right-radius: calc(0.5rem - 1px);
    background-color: #f8f9fa;
}

.modal-header.border-light {
    border-bottom-color: #e9ecef;
    background-color: #fff;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c5aa0;
    line-height: 1.5;
}

.modal-close {
    padding: 0;
    background: transparent;
    border: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #6c757d;
    text-shadow: 0 1px 0 #fff;
    opacity: 0.75;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #495057;
    opacity: 1;
    transform: scale(1.1);
}

.modal-close:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
    border-radius: 4px;
}

.close-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    vertical-align: middle;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.5rem;
    color: #333;
    line-height: 1.6;
}

.modal-body.scrollbar-thin {
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
}

.modal-body.scrollbar-thin::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body.scrollbar-thin::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-body.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid #dee2e6;
    border-bottom-left-radius: calc(0.5rem - 1px);
    border-bottom-right-radius: calc(0.5rem - 1px);
    background-color: #f8f9fa;
    gap: 0.75rem;
}

.modal-footer.border-light {
    border-top-color: #e9ecef;
    background-color: #fff;
}

.modal-footer.gap3 {
    gap: 1rem;
}

/* Modal Sizes */
.modal-sm .modal-dialog {
    max-width: 300px;
}

.modal-lg .modal-dialog {
    max-width: 800px;
}

.modal-xl .modal-dialog {
    max-width: 1140px;
}

/* Modal Animation Variants */
.modal-fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.modal-slide .modal-dialog {
    transition: transform 0.3s ease-out;
}

.modal-slide .modal-dialog {
    transform: translateX(-100%);
}

.modal.show.modal-slide .modal-dialog {
    transform: translateX(0);
}

/* Modal Content Styling */
.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-info {
    color: #fff;
    background-color: #17a2b8;
}

.dynamic-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.content-section {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    background-color: #f8f9fa;
}

.content-section h4 {
    margin: 0 0 0.75rem 0;
    color: #2c5aa0;
    font-size: 1.1rem;
    font-weight: 600;
}

.nested-component {
    margin-top: 1rem;
    padding: 0.75rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

.component-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.component-content {
    color: #495057;
    font-size: 0.875rem;
}

.footer-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Form Elements in Modal */
.modal-body .form-group {
    margin-bottom: 1rem;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.modal-body .form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.modal-body .form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #2c5aa0;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.modal-body .form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Alert Styles in Modal */
.modal-body .alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.modal-body .alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.modal-body .alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

/* Row and Column Layout in Modal */
.modal-body .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.modal-body .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

/* Button Variants */
.btn-outline-primary {
    color: #2c5aa0;
    border-color: #2c5aa0;
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #2c5aa0;
    border-color: #2c5aa0;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
    background-color: transparent;
}

.btn-outline-warning:hover {
    color: #212529;
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-outline-info {
    color: #17a2b8;
    border-color: #17a2b8;
    background-color: transparent;
}

.btn-outline-info:hover {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
    background-color: transparent;
}

.btn-outline-success:hover {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

/* Modal Size Examples */
.modal-size-examples {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.backdrop-examples {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.animation-examples {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

/* Animation Demo Elements */
.animation-demo {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.fade-element, .slide-element {
    padding: 0.75rem;
    background-color: #e8f0fe;
    border: 1px solid #b3d9ff;
    border-radius: 0.375rem;
    color: #2c5aa0;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.fade-element:hover, .slide-element:hover {
    background-color: #d1e7ff;
    border-color: #80bdff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.15);
}

/* Responsive Modal Adjustments */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-lg .modal-dialog {
        max-width: calc(100% - 1rem);
    }
    
    .modal-xl .modal-dialog {
        max-width: calc(100% - 1rem);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    .modal-size-examples,
    .backdrop-examples,
    .animation-examples {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .footer-actions .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .footer-actions .btn:last-child {
        margin-bottom: 0;
    }
    
    .modal-body .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }
    
    .modal-body .col-md-6:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 480px) {
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.75rem;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .modal-content {
        border-width: 2px;
        border-color: #000;
    }
    
    .modal-header,
    .modal-footer {
        border-color: #000;
    }
    
    .modal-close {
        color: #000;
        opacity: 1;
    }
    
    .modal-close:hover {
        color: #000;
        background-color: #fff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .modal,
    .modal-dialog,
    .modal-content {
        transition: none;
    }
    
    .modal.show .modal-dialog {
        transform: none;
    }
    
    .fade-element:hover,
    .slide-element:hover {
        transform: none;
    }
}

/* Form Elements */
.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #2c5aa0;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.form-control::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* Alert Styles */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Row and Column Layout */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

/* Component Table */
.component-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.component-table thead {
    background-color: #f8f9fa;
}

.component-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #2c5aa0;
    border-bottom: 2px solid #dee2e6;
}

.component-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.component-table tbody tr:hover {
    background-color: #f8f9fa;
}

.component-table tbody tr:last-child td {
    border-bottom: none;
}

.component-table code {
    background-color: #f1f3f4;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.875em;
    color: #e83e8c;
}

/* Table Container */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments for tables */
@media (max-width: 768px) {
    .component-table {
        font-size: 0.875rem;
    }
    
    .component-table th,
    .component-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .component-table code {
        font-size: 0.8em;
        padding: 0.15rem 0.3rem;
    }
}
