/* Base Documentation Styles - Shared across all docs */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #e2e8f0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background: var(--light);
    margin: 0; /* No margin needed, header padding handles navbar spacing */
    padding: 0;
}

/* Header with gradient */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 5rem 0 3rem 0; /* Extra top padding to account for fixed navbar */
    margin-top: 0; /* No margin needed with fixed navbar */
    margin-bottom: 2rem;
    text-align: center;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.header h3 {
    color: white;
    opacity: 0.9;
    font-weight: normal;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

/* Buttons */
.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid white;
}

/* Main Container with Grid Layout */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: minmax(200px, 250px) 1fr;
    gap: 2rem;
    align-items: start;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Table of Contents */
.toc {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
    max-height: 80vh;
    overflow-y: auto;
}

.toc h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 0.5rem;
}

.toc a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    padding: 0.25rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
    transition: all 0.2s;
}

.toc a:hover {
    color: var(--primary);
    border-left-color: var(--primary);
}

.toc .toc-2 {
    padding-left: 1rem;
}

.toc .toc-3 {
    padding-left: 1.5rem;
}

/* Content */
.content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    min-height: 80vh;
    overflow-x: hidden;
    max-width: 100%;
}

.content img,
.content table,
.content pre {
    max-width: 100%;
    overflow-x: auto;
}

.content h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 0.5rem;
}

.content h2 {
    color: var(--primary-dark);
    font-size: 2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
}

.content h3 {
    color: var(--dark);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content h4 {
    color: var(--gray);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.content p {
    margin-bottom: 1rem;
}

.content ul,
.content ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.card-header h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin: 0;
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.alert-info {
    background: #e0f2fe;
    border-left: 4px solid #0284c7;
    color: #075985;
}

.alert-success {
    background: #dcfce7;
    border-left: 4px solid #16a34a;
    color: #14532d;
}

.alert-warning {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #78350f;
}

.alert-danger {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    color: #7f1d1d;
}

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

.feature-card {
    background: linear-gradient(135deg, #f0f0ff 0%, #e0e0ff 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Sections */
.section {
    margin-bottom: 3rem;
}

/* Container */
.container {
    max-width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .toc {
        position: static;
        order: 2;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .content h1 {
        font-size: 1.8rem;
    }
    
    .content h2 {
        font-size: 1.5rem;
    }
}