/* Import main styles to keep branding consistency */
@import url('../css/style.css');

/* Override specific styles for the documentation layout */
body {
    background: #f5f7fa; /* Light background for readability */
    color: #333;
    overflow-x: hidden;
}

/* Adjust header for docs */
header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/*
   Match the header container width to the docs-container width (1100px)
   so the logo and nav links align with the content boundaries.
*/
header .container {
    max-width: 1100px;
}

.docs-container {
    display: flex;
    max-width: 1100px; /* Reduced from 1400px to reduce empty space on the right */
    margin: 0 auto;
    padding-top: 0; /* Removed extra padding as sticky header already occupies space */
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: 280px;
    position: fixed;
    top: 80px; /* Below header */
    bottom: 0;
    left: max(0px, calc((100vw - 1100px) / 2)); /* Center with container (updated for 1100px width) */
    overflow-y: auto;
    background: white;
    border-right: 1px solid #eee;
    padding: 2rem 1.5rem;
    z-index: 100;
}

.sidebar h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
}

.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: 0.8rem;
}

.toc-list a {
    text-decoration: none;
    color: #666;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: block;
    padding: 0.3rem 0;
}

.toc-list a:hover, .toc-list a.active {
    color: #667eea;
    padding-left: 5px;
    font-weight: 500;
}

.toc-sublist {
    list-style: none;
    padding-left: 1.2rem;
    margin-top: 0.5rem;
    border-left: 2px solid #f0f0f0;
}

/* Main Content Area */
.content {
    flex: 1;
    margin-left: 280px; /* Sidebar width */
    padding: 2rem 3rem 4rem;
    background: white;
    box-shadow: -5px 0 20px rgba(0,0,0,0.02);
}

/* Limit content width for better readability */
.content > * {
    max-width: 750px; /* Further reduced from 900px */
}

.content section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px; /* Header offset for anchor links */
}

.content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    color: #4a5568;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.content h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #2d3748;
}

.content p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #4a5568;
}

.content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #4a5568;
}

/* Note boxes */
.note {
    background: #ebf8ff;
    border-left: 4px solid #4299e1;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.note-title {
    font-weight: bold;
    color: #2b6cb0;
    margin-bottom: 0.5rem;
    display: block;
}

.warning {
    background: #fff5f5;
    border-left: 4px solid #f56565;
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

.warning-title {
    font-weight: bold;
    color: #c53030;
    margin-bottom: 0.5rem;
    display: block;
}

/* Keyboard shortcuts styling */
kbd {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
    color: #4a5568;
    font-family: monospace;
    font-size: 0.9em;
    padding: 0.2em 0.4em;
}

/* Responsive */
@media (max-width: 900px) {
    .docs-container {
        flex-direction: column;
        padding-top: 60px;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        top: 0;
        left: 0;
        border-right: none;
        border-bottom: 1px solid #eee;
        padding: 1rem 20px;
    }

    .content {
        margin-left: 0;
        padding: 2rem 20px;
    }
}
