/* Base styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    overflow-x: hidden;
}

/* Layout */
.page-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* Sidebar toggle for mobile */
#sidebar-toggle {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    display: none;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 20px;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Search and filters */
.search-container {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #34495e;
    border-radius: 5px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 16px;
}

.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.filter-btn {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-btn.active {
    background-color: #2ecc71;
}

.filter-btn:hover {
    background-color: #2980b9;
}

/* Navigation */
.nav-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #546e7a;
}

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

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    color: #ecf0f1;
    text-decoration: none;
    display: block;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: #34495e;
}

.nav-link.active {
    background-color: #3498db;
}

.sub-nav {
    list-style: none;
    padding-left: 20px;
    margin-top: 5px;
    display: none;
}

.sub-nav.active {
    display: block;
}

.sub-nav-item {
    margin-bottom: 5px;
}

.sub-nav-link {
    color: #bdc3c7;
    text-decoration: none;
    display: block;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s;
    font-size: 0.9rem;
}

.sub-nav-link:hover {
    background-color: #34495e;
    color: #ecf0f1;
}

.sub-nav-link.active {
    background-color: #2980b9;
    color: white;
}

/* Main content styling */
h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
}

.section {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
    scroll-margin-top: 20px; /* For smooth scrolling to anchors */
}

h2 {
    color: #3498db;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
    scroll-margin-top: 20px;
}

h3 {
    color: #2980b9;
    scroll-margin-top: 20px;
}

code {
    background-color: #f7f7f7;
    border: 1px solid #e1e1e8;
    border-radius: 3px;
    padding: 2px 4px;
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
}

pre {
    background-color: #f7f7f7;
    border: 1px solid #e1e1e8;
    border-radius: 3px;
    padding: 10px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Highlight for search results */
.highlight {
    background-color: #ffeb3b;
    padding: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    #sidebar-toggle {
        display: block;
    }
}

/* Section visibility for filtering */
.section.hidden {
    display: none;
}
