/* Documentation Template */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #ecf0f1;
    --bg-color: #ffffff;
    --sidebar-bg: #f8f9fa;
    --code-bg: #f5f7f9;
    --code-border: #e1e4e8;
    --alert-info-bg: #e3f2fd;
    --alert-info-border: #bbdefb;
    --alert-info-text: #0d47a1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    height: 100vh;
    position: fixed;
    overflow-y: auto;
    padding: 1.5rem;
}

.sidebar-content {
    position: relative;
    height: 100%;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.search-box {
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.search-box input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-box button {
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-box button:hover {
    background-color: var(--primary-dark);
}

.nav-menu {
    list-style: none;
}

.nav-link {
    display: block;
    padding: 0.7rem 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s;
    margin-bottom: 0.2rem;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
    padding-left: 1rem;
}

/* Main Content */
.content {
    flex: 1;
    margin-left: 300px;
    padding: 2rem 3rem;
    max-width: 900px;
}

section {
    margin-bottom: 3rem;
    scroll-margin-top: 2rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

h2 {
    font-size: 2rem;
    margin: 2.5rem 0 1.5rem 0;
    color: var(--text-color);
}

h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem 0;
    color: var(--text-color);
}

h4 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.8rem 0;
    color: var(--text-color);
}

p, ul, ol {
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

ul, ol {
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Code Blocks */
pre {
    background-color: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 6px;
    padding: 1rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    position: relative;
}

code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    background-color: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    border: 1px solid var(--code-border);
}

pre code {
    padding: 0;
    border: none;
    background: transparent;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    border-left: 4px solid transparent;
}

.alert-info {
    background-color: var(--alert-info-bg);
    border-color: var(--alert-info-border);
    color: var(--alert-info-text);
}

/* API Method Blocks */
.api-method {
    background: var(--code-bg);
    border-radius: 6px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid var(--border-color);
}

.api-method h3 {
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.api-method h4 {
    font-size: 1rem;
    margin: 1.2rem 0 0.5rem 0;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content {
        padding: 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100;
        background-color: white;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .menu-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 101;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: 4px;
        padding: 0.5rem 1rem;
        cursor: pointer;
    }
    
    .content {
        padding-top: 4rem;
    }
}

/* Print styles */
@media print {
    .sidebar {
        display: none;
    }
    
    .content {
        margin-left: 0;
        padding: 1cm;
    }
    
    a {
        text-decoration: none;
        color: var(--text-color);
    }
    
    pre, code {
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}
