/* ============================================
   Aqarjia Documentation Styles
   ============================================ */

/* Layout */
.docs-container {
    display: flex;
    min-height: calc(100vh - 120px);
    margin: -1rem; /* offset parent container padding */
}

/* Sidebar */
.docs-sidebar {
    width: 260px;
    min-width: 260px;
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    height: calc(100vh - 60px);
    overflow-y: auto;
    scrollbar-width: thin;
}

.docs-sidebar-header {
    padding: 0 1.25rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
}

.docs-sidebar-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
}

.docs-section {
    margin-bottom: 0.5rem;
}

.docs-section-title {
    padding: 0.5rem 1.25rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin: 0;
}

.docs-section-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-section-items li a {
    display: block;
    padding: 0.35rem 1.25rem 0.35rem 1.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}

.docs-section-items li a:hover {
    color: #111827;
    background: #f3f4f6;
}

.docs-section-items li a.active {
    color: #2563eb;
    background: #eff6ff;
    border-left-color: #2563eb;
    font-weight: 500;
}

/* Content area */
.docs-content {
    flex: 1;
    max-width: 800px;
    padding: 2rem 3rem;
    min-width: 0;
}

/* Breadcrumb */
.docs-breadcrumb {
    font-size: 0.8125rem;
    color: #9ca3af;
    margin-bottom: 1.5rem;
}

.docs-breadcrumb a {
    color: #6b7280;
    text-decoration: none;
}

.docs-breadcrumb a:hover {
    color: #2563eb;
}

.docs-breadcrumb .separator {
    margin: 0 0.4rem;
    color: #d1d5db;
}

/* Article typography */
.docs-article h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.docs-article h2 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #1f2937;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.375rem;
    border-bottom: 1px solid #f3f4f6;
    letter-spacing: -0.01em;
}

.docs-article h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.docs-article p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 1rem;
}

.docs-article ul,
.docs-article ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.docs-article li {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 0.25rem;
}

.docs-article strong {
    font-weight: 600;
    color: #111827;
}

.docs-article a {
    color: #2563eb;
    text-decoration: none;
}

.docs-article a:hover {
    text-decoration: underline;
}

/* Code blocks */
.docs-article code {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8125rem;
    background: #f3f4f6;
    color: #e11d48;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
}

.docs-article pre {
    background: #1e293b;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.docs-article pre code {
    background: none;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* Tables */
.docs-article table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
}

.docs-article thead th {
    background: #f9fafb;
    padding: 0.625rem 0.875rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.docs-article tbody td {
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
}

.docs-article tbody tr:nth-child(even) {
    background: #f9fafb;
}

.docs-article tbody tr:hover {
    background: #f3f4f6;
}

/* Blockquotes / callouts */
.docs-article blockquote {
    border-left: 3px solid #2563eb;
    background: #eff6ff;
    margin: 1.25rem 0;
    padding: 0.875rem 1.25rem;
    border-radius: 0 6px 6px 0;
}

.docs-article blockquote p {
    color: #1e40af;
    margin-bottom: 0;
    font-size: 0.875rem;
}

.docs-article blockquote p:last-child {
    margin-bottom: 0;
}

/* Horizontal rules */
.docs-article hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

/* Images */
.docs-article img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .docs-container {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 1rem 0;
    }

    .docs-content {
        padding: 1.5rem 1rem;
    }

    .docs-article h1 {
        font-size: 1.5rem;
    }

    .docs-article h2 {
        font-size: 1.2rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .docs-sidebar {
        width: 220px;
        min-width: 220px;
    }

    .docs-content {
        padding: 2rem 2rem;
    }
}
