/* ============================================
   ThinkReview Docs Portal - Modern Design
   Inspired by CodeRabbit's intuitive design
   ============================================ */

/* CSS Variables for consistent theming */
:root {
    /* Primary Colors */
    --docs-primary: #2563eb;
    --docs-primary-dark: #1d4ed8;
    --docs-primary-light: #3b82f6;
    
    /* Text Colors - Refined for better readability */
    --docs-text: #1a1a1a;
    --docs-text-secondary: #666666;
    --docs-text-muted: #999999;
    
    /* Background Colors - Softer grays */
    --docs-bg: #ffffff;
    --docs-bg-secondary: #f8f9fa;
    --docs-bg-tertiary: #f5f5f5;
    --docs-bg-code: #fafafa;
    
    /* Border Colors - More subtle */
    --docs-border: #e6e6e6;
    --docs-border-light: #f0f0f0;
    --docs-border-medium: #d0d0d0;
    
    /* Interactive States */
    --docs-hover: #fafafa;
    --docs-active: #eff6ff;
    
    /* Shadows - Enhanced depth */
    --docs-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
    --docs-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --docs-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --docs-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.08);
    
    /* Border Radius */
    --docs-radius: 8px;
    --docs-radius-sm: 6px;
    --docs-radius-lg: 12px;
    
    /* Spacing Scale (4px base unit) */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    --spacing-2xl: 32px;
    --spacing-3xl: 48px;
    --spacing-4xl: 64px;
    
    /* Typography */
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-xs: 13px;
    --line-height-base: 1.7;
    --line-height-heading: 1.3;
    
    /* Layout */
    --docs-sidebar-width: 280px;
    --docs-content-max-width: 1400px;
    --docs-footer-height: 300px;
}

/* ============================================
   Docs Portal Container
   ============================================ */

.docs-portal-container {
    display: flex;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    position: relative;
    background: var(--docs-bg);
    align-items: flex-start;
}

/* ============================================
   Sidebar Styles
   ============================================ */

.docs-sidebar {
    width: var(--docs-sidebar-width);
    min-width: var(--docs-sidebar-width);
    background: var(--docs-bg);
    border-right: 1px solid var(--docs-border);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: sticky;
    top: 70px;
    align-self: flex-start;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: transform 0.3s ease;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--docs-border);
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--docs-text-muted);
}

/* Sidebar Header */
.docs-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--docs-border);
    background: var(--docs-bg);
    position: sticky;
    top: 0;
    z-index: 10;
}

.docs-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--docs-text);
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.2s ease;
}

.docs-sidebar-logo:hover {
    opacity: 0.8;
}

.docs-sidebar-logo img {
    width: 24px;
    height: 24px;
    border-radius: var(--docs-radius-sm);
}

.docs-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--docs-text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--docs-radius-sm);
    transition: all 0.2s ease;
}

.docs-sidebar-close:hover {
    background: var(--docs-bg-tertiary);
    color: var(--docs-text);
}

/* Sidebar Search */
.docs-sidebar-search {
    position: relative;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--docs-border);
}

.docs-sidebar-search input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.5rem;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius-sm);
    font-size: 0.875rem;
    color: var(--docs-text);
    background: var(--docs-bg);
    transition: all 0.2s ease;
}

.docs-sidebar-search input:focus {
    outline: none;
    border-color: var(--docs-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.docs-sidebar-search i {
    position: absolute;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--docs-text-muted);
    font-size: 0.875rem;
}

/* Sidebar Navigation */
.docs-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0 1rem 0;
    min-height: 0; /* Allows flex child to shrink */
}

.docs-sidebar-section {
    margin-bottom: 0.5rem;
}

.docs-sidebar-section-label {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--docs-text-muted);
    margin-top: 0.5rem;
}

.docs-sidebar-section:first-child .docs-sidebar-section-label {
    margin-top: 0;
}

.docs-sidebar-section-content {
    padding: 0.25rem 0;
}

.docs-sidebar-item {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--docs-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.docs-sidebar-item:hover {
    color: var(--docs-text);
    background: var(--docs-hover);
    border-left-color: var(--docs-border);
}

.docs-sidebar-item.active {
    color: var(--docs-primary);
    background: var(--docs-active);
    border-left-color: var(--docs-primary);
    font-weight: 500;
}

/* ============================================
   Main Content Area
   ============================================ */

.docs-main-content {
    flex: 1;
    min-width: 0; /* Allows flex item to shrink below content size */
    background: var(--docs-bg);
    position: relative;
}

.docs-page-content {
    max-width: var(--docs-content-max-width);
    margin: 0 auto;
    padding: var(--spacing-3xl) var(--spacing-2xl);
}

/* ============================================
   Docs Header (Listing Page)
   ============================================ */

.docs-header {
    padding: var(--spacing-3xl) 0 var(--spacing-2xl);
    border-bottom: 1px solid var(--docs-border);
    margin-bottom: var(--spacing-2xl);
}

.docs-header-content h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--docs-text);
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-heading);
    letter-spacing: -0.02em;
}

.docs-header-content p {
    font-size: 18px;
    color: var(--docs-text-secondary);
    line-height: 1.6;
    max-width: 700px;
}

/* ============================================
   Docs Content (Listing Page)
   ============================================ */

.docs-content {
    padding: 0;
}

.docs-filters {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.tag-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.tag-filter {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 1px solid var(--docs-border);
    background: var(--docs-bg);
    color: var(--docs-text-secondary);
    border-radius: var(--docs-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-filter:hover {
    border-color: var(--docs-primary);
    color: var(--docs-primary);
    background: var(--docs-active);
}

.tag-filter.active {
    background: var(--docs-primary);
    color: white;
    border-color: var(--docs-primary);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.search-box {
    position: relative;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-md) 44px;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    font-size: 15px;
    color: var(--docs-text);
    background: var(--docs-bg);
    transition: all 0.2s ease;
}

.search-box input::placeholder {
    color: var(--docs-text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: var(--docs-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--docs-bg);
}

.search-box i {
    position: absolute;
    left: var(--spacing-lg);
    top: 50%;
    transform: translateY(-50%);
    color: var(--docs-text-muted);
    pointer-events: none;
}

/* Docs Grid */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

/* Doc Card */
.blog-card {
    background: var(--docs-bg);
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius-lg);
    padding: var(--spacing-xl);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.blog-card:hover {
    border-color: var(--docs-primary);
    box-shadow: var(--docs-shadow-hover);
    transform: translateY(-4px);
}

.blog-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    margin-bottom: var(--spacing-md);
}

.blog-card-date {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 13px;
    color: var(--docs-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card-date i {
    font-size: 12px;
}

.blog-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--docs-text);
    margin-bottom: var(--spacing-md);
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.blog-card p {
    color: var(--docs-text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    flex: 1;
}

.blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--docs-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
    margin-top: auto;
}

.blog-card-link:hover {
    gap: var(--spacing-md);
    color: var(--docs-primary-dark);
}

.blog-card-link i {
    transition: transform 0.2s ease;
}

.blog-card-link:hover i {
    transform: translateX(2px);
}

/* ============================================
   Individual Doc Page Styles
   ============================================ */

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    font-size: 14px;
    color: var(--docs-text-secondary);
}

.breadcrumb a {
    color: var(--docs-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--docs-primary);
}

.breadcrumb i {
    font-size: 12px;
    color: var(--docs-text-muted);
}

.breadcrumb span {
    color: var(--docs-text);
    font-weight: 500;
}

/* Post Header */
.post-header {
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--docs-border);
}

.post-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--docs-text);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-heading);
    letter-spacing: -0.02em;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 14px;
    color: var(--docs-text-secondary);
}

.post-meta-item i {
    font-size: 14px;
    color: var(--docs-text-muted);
}

/* Post Body */
.post-body,
.doc-body {
    color: var(--docs-text);
    line-height: var(--line-height-base);
    font-size: var(--font-size-base);
    position: relative;
}

/* Add subtle decoration to the start */
.post-body::before,
.doc-body::before {
    content: "";
    position: absolute;
    top: 0;
    left: -32px;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, 
        var(--docs-primary) 0%, 
        transparent 50%
    );
    border-radius: 2px;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6,
.doc-body h1,
.doc-body h2,
.doc-body h3,
.doc-body h4,
.doc-body h5,
.doc-body h6 {
    color: var(--docs-text);
    font-weight: 600;
    margin-top: var(--spacing-3xl);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-heading);
    letter-spacing: -0.01em;
}

.post-body h1:first-child,
.post-body h2:first-child,
.post-body h3:first-child,
.doc-body h1:first-child,
.doc-body h2:first-child,
.doc-body h3:first-child {
    margin-top: 0;
}

/* Lead paragraph styling */
.post-body > h2 + p,
.post-body > h3 + p,
.doc-body > h2 + p,
.doc-body > h3 + p {
    font-size: 17px;
    color: var(--docs-text-secondary);
    margin-bottom: var(--spacing-xl);
}

/* Section dividers */
.post-body > h2,
.doc-body > h2 {
    margin-top: var(--spacing-4xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid var(--docs-border-light);
}

.post-body > h2:first-of-type,
.doc-body > h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.post-body h1,
.doc-body h1 {
    font-size: 28px;
    font-weight: 700;
}

.post-body h2,
.doc-body h2 {
    font-size: 24px;
    font-weight: 600;
    border-bottom: 2px solid var(--docs-border);
    padding-bottom: var(--spacing-md);
    margin-top: var(--spacing-4xl);
    position: relative;
    padding-left: var(--spacing-lg);
}

.post-body h2::before,
.doc-body h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: var(--spacing-md);
    width: 4px;
    background: linear-gradient(to bottom, var(--docs-primary), var(--docs-primary-light));
    border-radius: 2px;
}

.post-body h3,
.doc-body h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--docs-primary);
    padding-left: var(--spacing-md);
    position: relative;
}

.post-body h3::before,
.doc-body h3::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--docs-primary);
    font-weight: bold;
}

.post-body h4,
.doc-body h4 {
    font-size: 18px;
    font-weight: 600;
}

.post-body h5,
.doc-body h5 {
    font-size: 16px;
    font-weight: 600;
}

.post-body h6,
.doc-body h6 {
    font-size: 15px;
    font-weight: 600;
    color: var(--docs-text-secondary);
}

.post-body p,
.doc-body p {
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: justify;
}

.post-body p:first-of-type,
.doc-body p:first-of-type {
    font-size: 18px;
    color: var(--docs-text-secondary);
    line-height: 1.8;
}

.post-body p + p,
.doc-body p + p {
    text-indent: 0;
}

.post-body ul,
.post-body ol,
.doc-body ul,
.doc-body ol {
    margin-bottom: var(--spacing-xl);
    padding-left: var(--spacing-xl);
}

.post-body ul,
.doc-body ul {
    list-style-type: none;
    padding-left: 0;
}

.post-body ul > li,
.doc-body ul > li {
    position: relative;
    padding-left: 28px;
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.post-body ul > li::before,
.doc-body ul > li::before {
    content: "●";
    position: absolute;
    left: 8px;
    color: var(--docs-primary);
    font-size: 12px;
}

.post-body ol,
.doc-body ol {
    list-style-type: none;
    counter-reset: item;
    padding-left: 0;
}

.post-body ol > li,
.doc-body ol > li {
    position: relative;
    padding-left: 32px;
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
    counter-increment: item;
}

.post-body ol > li::before,
.doc-body ol > li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    width: 24px;
    height: 24px;
    background: var(--docs-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.post-body li > ul,
.post-body li > ol,
.doc-body li > ul,
.doc-body li > ol {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.post-body a,
.doc-body a {
    color: var(--docs-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

.post-body a:hover,
.doc-body a:hover {
    border-bottom-color: var(--docs-primary);
    color: var(--docs-primary-dark);
}

.post-body code,
.doc-body code {
    background: linear-gradient(to bottom, #fff5f7, #ffe8ef);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    color: #d63384;
    border: 1px solid rgba(230, 62, 140, 0.2);
    font-weight: 500;
}

.post-body pre,
.doc-body pre {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: var(--docs-radius);
    padding: var(--spacing-xl);
    overflow-x: auto;
    margin: var(--spacing-xl) 0;
    font-size: 14px;
    line-height: 1.6;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.25);
    position: relative;
}

.post-body pre::before,
.doc-body pre::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.85);
    border-radius: var(--docs-radius);
    z-index: 0;
}

.post-body pre code {
    position: relative;
    z-index: 1;
    color: #f8f8f2;
    background: none;
    border: none;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: var(--docs-text);
    border-radius: 0;
    border: none;
    font-size: 14px;
}

.post-body blockquote {
    border-left: 4px solid var(--docs-primary);
    background: linear-gradient(to right, rgba(37, 99, 235, 0.05), var(--docs-bg-secondary));
    padding: var(--spacing-lg) var(--spacing-xl);
    margin: var(--spacing-xl) 0;
    color: var(--docs-text);
    border-radius: 0 var(--docs-radius) var(--docs-radius) 0;
    font-size: 15px;
    line-height: 1.7;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.post-body blockquote::before,
.doc-body blockquote::before {
    content: "";
    display: none;
}

.post-body blockquote p,
.doc-body blockquote p {
    padding-left: 0;
}

.post-body blockquote p:last-child,
.doc-body blockquote p:last-child {
    margin-bottom: 0;
}

.post-body blockquote strong,
.doc-body blockquote strong {
    color: var(--docs-primary);
    font-weight: 600;
}

/* Callout boxes for important content */
.post-body > p > strong:first-child,
.doc-body > p > strong:first-child {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.post-body img,
.doc-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--docs-radius);
    margin: var(--spacing-2xl) 0;
    box-shadow: var(--docs-shadow-md);
    border: 1px solid var(--docs-border-light);
}

.post-body table,
.doc-body table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius);
    margin: var(--spacing-xl) 0;
    overflow: hidden;
    box-shadow: var(--docs-shadow);
}

.post-body table th,
.doc-body table th {
    background: linear-gradient(to bottom, var(--docs-primary), var(--docs-primary-dark));
    font-weight: 600;
    color: white;
    padding: 16px;
    text-align: left;
    border-bottom: 2px solid var(--docs-primary-dark);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 15px;
}

.post-body table th:last-child,
.doc-body table th:last-child {
    border-right: none;
}

.post-body table td,
.doc-body table td {
    padding: 16px;
    border-bottom: 1px solid var(--docs-border-light);
    border-right: 1px solid var(--docs-border-light);
    color: var(--docs-text);
    font-size: 15px;
    line-height: 1.6;
}

.post-body table td:last-child,
.doc-body table td:last-child {
    border-right: none;
}

.post-body table tbody tr:last-child td,
.doc-body table tbody tr:last-child td {
    border-bottom: none;
}

.post-body table tbody tr:hover,
.doc-body table tbody tr:hover {
    background: linear-gradient(to right, rgba(37, 99, 235, 0.05), var(--docs-hover));
    transform: translateX(2px);
    transition: all 0.2s ease;
}

.post-body table tbody tr,
.doc-body table tbody tr {
    transition: all 0.2s ease;
}

/* Responsive table wrapper */
.post-body table-wrapper,
.doc-body table-wrapper {
    overflow-x: auto;
    margin: var(--spacing-xl) 0;
}

@media (max-width: 768px) {
    .post-body table,
    .doc-body table {
        font-size: 14px;
    }
    
    .post-body table th,
    .post-body table td,
    .doc-body table th,
    .doc-body table td {
        padding: 12px;
    }
}

.post-body hr,
.doc-body hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--docs-border), transparent);
    margin: var(--spacing-3xl) 0;
    position: relative;
}

.post-body hr::after,
.doc-body hr::after {
    content: "◆";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--docs-bg);
    padding: 0 var(--spacing-md);
    color: var(--docs-text-muted);
    font-size: 12px;
}

/* Strong and emphasis text */
.post-body strong,
.doc-body strong {
    font-weight: 600;
    color: var(--docs-text);
}

.post-body em,
.doc-body em {
    font-style: italic;
    color: var(--docs-text-secondary);
}

/* Keyboard input styling */
.post-body kbd,
.doc-body kbd {
    background: var(--docs-bg-tertiary);
    border: 1px solid var(--docs-border);
    border-radius: 4px;
    box-shadow: 0 2px 0 var(--docs-border);
    padding: 2px 6px;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.875em;
    color: var(--docs-text);
}

/* Post Footer */
.post-footer {
    margin-top: var(--spacing-4xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid var(--docs-border);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--docs-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.back-to-blog:hover {
    gap: var(--spacing-md);
    color: var(--docs-primary-dark);
}

.back-to-blog i {
    transition: transform 0.2s ease;
}

.back-to-blog:hover i {
    transform: translateX(-2px);
}

/* ============================================
   Loading & Error States
   ============================================ */

.blog-loading,
.blog-error {
    text-align: center;
    padding: var(--spacing-4xl) var(--spacing-2xl);
    color: var(--docs-text-secondary);
}

.blog-loading i,
.blog-error i {
    font-size: 32px;
    margin-bottom: var(--spacing-lg);
    color: var(--docs-text-muted);
}

.blog-loading p,
.blog-error p {
    font-size: 18px;
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.no-posts {
    text-align: center;
    padding: var(--spacing-4xl) var(--spacing-2xl);
    color: var(--docs-text-secondary);
}

.no-posts i {
    font-size: 48px;
    margin-bottom: var(--spacing-lg);
    color: var(--docs-text-muted);
}

.no-posts h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--docs-text);
    margin-bottom: var(--spacing-sm);
}

.no-posts p {
    font-size: 16px;
    color: var(--docs-text-secondary);
    line-height: 1.6;
}

/* ============================================
   Pagination
   ============================================ */

.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-3xl);
    padding-top: var(--spacing-2xl);
    border-top: 1px solid var(--docs-border);
}

.pagination {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.pagination-btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 1px solid var(--docs-border);
    background: var(--docs-bg);
    color: var(--docs-text-secondary);
    border-radius: var(--docs-radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    min-width: 40px;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--docs-primary);
    color: var(--docs-primary);
    background: var(--docs-active);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: var(--docs-primary);
    color: white;
    border-color: var(--docs-primary);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

#page-info {
    color: var(--docs-text-secondary);
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   Mobile Menu Toggle
   ============================================ */

.docs-sidebar-toggle {
    display: none;
    position: fixed;
    left: 1rem;
    top: 80px;
    z-index: 200;
    background: var(--docs-bg);
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius-sm);
    padding: 0.75rem;
    color: var(--docs-text);
    cursor: pointer;
    box-shadow: var(--docs-shadow-md);
    transition: all 0.2s ease;
}

.docs-sidebar-toggle:hover {
    background: var(--docs-bg-secondary);
}

.docs-sidebar-overlay {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.docs-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   Footer Separation
   ============================================ */

/* Footer naturally flows below the flex container */
.docs-portal-container ~ .footer {
    position: relative;
    z-index: 10;
    width: 100%;
    clear: both;
    border-top: 1px solid var(--docs-border);
    margin-top: 0;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .docs-portal-container {
        flex-direction: column;
    }

    .docs-sidebar {
        position: fixed;
        left: 0;
        top: 70px;
        bottom: 0;
        width: var(--docs-sidebar-width);
        max-width: 85vw;
        transform: translateX(-100%);
        z-index: 200;
        box-shadow: var(--docs-shadow-lg);
        max-height: calc(100vh - 70px);
    }

    .docs-sidebar.mobile-open {
        transform: translateX(0);
    }

    .docs-main-content {
        width: 100%;
        flex: 1 1 100%;
    }

    .docs-sidebar-toggle {
        display: block;
    }

    .docs-sidebar-close {
        display: block;
    }

    .docs-page-content {
        padding: var(--spacing-2xl) var(--spacing-lg);
    }

    .docs-header {
        padding: var(--spacing-2xl) 0 var(--spacing-xl);
    }

    .docs-header-content h1 {
        font-size: 30px;
    }

    .docs-header-content p {
        font-size: 16px;
    }
    
    .blog-card {
        padding: var(--spacing-lg);
    }
}

@media (max-width: 768px) {
    .docs-page-content {
        padding: var(--spacing-xl) var(--spacing-md);
    }

    .docs-header-content h1 {
        font-size: 28px;
    }

    .post-header h1 {
        font-size: 28px;
    }

    .docs-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .docs-filters {
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
    }

    .post-meta {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .post-body h1 {
        font-size: 26px;
    }

    .post-body h2 {
        font-size: 22px;
    }

    .post-body h3 {
        font-size: 19px;
    }
    
    .post-body h4 {
        font-size: 17px;
    }
    
    .blog-card h3 {
        font-size: 18px;
    }
    
    .blog-card p {
        font-size: 14px;
    }
    
    /* Make tables scrollable on mobile */
    .post-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 480px) {
    .docs-page-content {
        padding: var(--spacing-lg) var(--spacing-md);
    }
    
    .docs-header-content h1 {
        font-size: 24px;
    }

    .post-header h1 {
        font-size: 24px;
    }

    .post-body {
        font-size: 15px;
    }
    
    .post-body h1 {
        font-size: 22px;
    }

    .post-body h2 {
        font-size: 20px;
    }

    .post-body h3 {
        font-size: 18px;
    }

    .blog-pagination {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .blog-card {
        padding: var(--spacing-lg);
    }
    
    .blog-card h3 {
        font-size: 17px;
    }
    
    .docs-grid {
        gap: var(--spacing-md);
    }
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .docs-sidebar,
    .docs-sidebar-toggle,
    .docs-sidebar-overlay {
        display: none;
    }

    .docs-main-content {
        margin-left: 0;
    }

    .docs-page-content {
        max-width: 100%;
        padding: 0;
    }
}


/* ============================================
   Docs Home Page - Get Started Layout
   ============================================ */

/* Hero Section */
.docs-hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--docs-radius-lg);
    margin-bottom: var(--spacing-2xl);
}

.docs-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: white;
}

.docs-hero-content p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-2xl);
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.docs-hero-actions {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.docs-hero-actions .primary-button,
.docs-hero-actions .secondary-button {
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: var(--docs-radius);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.docs-hero-actions .primary-button {
    background: white;
    color: var(--docs-primary);
    font-weight: 600;
}

.docs-hero-actions .primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.docs-hero-actions .secondary-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    font-weight: 600;
}

.docs-hero-actions .secondary-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Docs Section */
.docs-section {
    margin-bottom: 60px;
}

.docs-section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.docs-section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--docs-text);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.docs-section-header h2 i {
    color: var(--docs-primary);
}

.docs-section-header p {
    font-size: 1.125rem;
    color: var(--docs-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards Grid */
.docs-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-2xl);
}

/* Quick Start Cards */
.docs-quick-start-card {
    background: white;
    border: 2px solid var(--docs-border);
    border-radius: var(--docs-radius-lg);
    padding: var(--spacing-2xl);
    position: relative;
    transition: all 0.3s ease;
}

.docs-quick-start-card:hover {
    border-color: var(--docs-primary);
    box-shadow: var(--docs-shadow-hover);
    transform: translateY(-4px);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--docs-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    box-shadow: var(--docs-shadow-md);
}

.docs-quick-start-card h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--docs-text);
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.docs-quick-start-card p {
    color: var(--docs-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.docs-card-link {
    color: var(--docs-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease;
}

.docs-card-link:hover {
    gap: 10px;
}

.docs-card-link i {
    font-size: 0.875rem;
}

/* Feature Cards */
.docs-feature-card {
    background: white;
    border: 1px solid var(--docs-border);
    border-radius: var(--docs-radius-lg);
    padding: var(--spacing-xl);
    transition: all 0.3s ease;
    text-align: center;
}

.docs-feature-card:hover {
    border-color: var(--docs-primary);
    box-shadow: var(--docs-shadow-hover);
    transform: translateY(-4px);
}

.docs-feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--docs-primary-light), var(--docs-primary));
    border-radius: var(--docs-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
}

.docs-feature-icon i {
    font-size: 1.75rem;
    color: white;
}

.docs-feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--docs-text);
    margin-bottom: var(--spacing-md);
}

.docs-feature-card p {
    color: var(--docs-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

/* Search Box Large */
.search-box-large {
    max-width: 600px;
    margin: var(--spacing-2xl) auto;
    position: relative;
}

.search-box-large input {
    width: 100%;
    padding: 16px 50px 16px 20px;
    border: 2px solid var(--docs-border);
    border-radius: var(--docs-radius-lg);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box-large input:focus {
    outline: none;
    border-color: var(--docs-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box-large i {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--docs-text-muted);
    font-size: 1.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .docs-hero-content h1 {
        font-size: 2rem;
    }
    
    .docs-hero-content p {
        font-size: 1.125rem;
    }
    
    .docs-section-header h2 {
        font-size: 1.75rem;
    }
    
    .docs-cards-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .docs-quick-start-card {
        padding: var(--spacing-xl);
    }
}
