/* ========================================
   DOCSIFY-STYLE DOCUMENTATION
   ======================================== */

/* Main Container */
.docs-container {
    display: flex;
    min-height: calc(100vh - 80px);
    background: #ffffff;
}

/* Scroll padding to account for fixed header */
html {
    scroll-padding-top: 100px;
}

/* Alternative method for anchor links */
.docs-article-content h1,
.docs-article-content h2,
.docs-article-content h3,
.docs-article-content h4,
.docs-article-content h5,
.docs-article-content h6 {
    scroll-margin-top: 100px;
}

/* ========================================
   SIDEBAR STYLES
   ======================================== */

.docs-sidebar {
    width: 320px;
    min-width: 320px;
    background: #fafafa;
    border-right: 1px solid #e2e8f0;
    position: fixed;
    top: 80px;
    left: 0;
    height: calc(100vh - 80px);
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.docs-sidebar-content {
    padding: 2rem 1.5rem;
}

.docs-sidebar-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
}

.docs-sidebar-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #2d3748;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.docs-home-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.docs-home-link:hover {
    color: #6f42c1;
}

.docs-sidebar-description {
    font-size: 0.9rem;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

/* Navigation Styles */
.docs-nav {
    margin-top: 1rem;
}

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

.docs-nav-item {
    margin-bottom: 0.25rem;
}

.docs-nav-item::before {
    display: none;
}

.docs-nav-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.docs-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
    flex: 1;
}

.docs-nav-link:hover {
    background: #f7fafc;
    color: #6f42c1;
    transform: translateX(4px);
}

.docs-nav-item-active .docs-nav-link {
    background: linear-gradient(90deg, #6f42c1, #fd7e14);
    color: white;
    font-weight: 600;
}

.docs-nav-item-active .docs-nav-link:hover {
    background: linear-gradient(90deg, #5a2d91, #e8590c);
    transform: translateX(2px);
}

.docs-nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    color: #718096;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
}

.docs-nav-toggle:hover {
    background: #f7fafc;
    color: #6f42c1;
}

.docs-nav-toggle-icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.docs-nav-item.expanded .docs-nav-toggle-icon {
    transform: rotate(180deg);
}

.docs-nav-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.docs-nav-text {
    flex: 1;
}

.docs-nav-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.docs-nav-badge-beginner {
    background: #c6f6d5;
    color: #22543d;
}

.docs-nav-badge-intermediate {
    background: #fed7aa;
    color: #9c2a00;
}

.docs-nav-badge-advanced {
    background: #fbb6ce;
    color: #97266d;
}

/* Table of Contents in Sidebar */
.docs-nav-toc {
    margin-top: 0.5rem;
    margin-left: 1rem;
    padding-left: 0.75rem;
    border-left: 2px solid #e9d8fd;
    display: none;
}

.docs-nav-item.expanded .docs-nav-toc,
.docs-nav-item-active .docs-nav-toc {
    display: block;
}

.docs-nav-toc-content {
    padding-bottom: 0.5rem;
}

.docs-nav-toc-content nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-nav-toc-content nav li {
    margin-bottom: 0.25rem;
    padding-left: 0;
}

.docs-nav-toc-content nav li::before {
    display: none;
}

.docs-nav-toc-content nav a {
    color: #718096;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 400;
    transition: all 0.3s ease;
    display: block;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    line-height: 1.3;
}

.docs-nav-toc-content nav a:hover {
    color: #6f42c1;
    background: rgba(111, 66, 193, 0.08);
    font-weight: 500;
}

.docs-nav-toc-content nav ul ul {
    margin-top: 0.25rem;
    padding-left: 0.75rem;
}

.docs-nav-toc-content nav ul ul a {
    font-size: 0.75rem;
    color: #a0aec0;
    padding: 0.15rem 0.5rem;
}

.docs-nav-toc-content nav ul ul a:hover {
    color: #6f42c1;
}

/* ========================================
   MAIN CONTENT STYLES
   ======================================== */

.docs-main {
    flex: 1;
    margin-left: 320px;
    background: #ffffff;
    min-height: calc(100vh - 80px);
}

.docs-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem 2rem;
    line-height: 1.7;
}

/* Ensure footer is visible in docs layout */
.docs-container + .footer {
    margin-left: 320px;
}

/* ========================================
   DOCUMENTATION LIST PAGE
   ======================================== */

.docs-intro h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: #2d3748;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.docs-intro p {
    font-size: 1.1rem;
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.docs-getting-started {
    margin-top: 3rem;
    padding: 2rem;
    background: #faf5ff;
    border-radius: 12px;
    border: 1px solid #e9d8fd;
}

.docs-getting-started h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #6f42c1;
    margin: 0 0 1rem 0;
}

.docs-getting-started > p {
    color: #4a5568;
    margin-bottom: 1.5rem;
}

.docs-quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-quick-links li {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.docs-quick-links li::before {
    display: none;
}

.docs-quick-links li:hover {
    border-color: #6f42c1;
    box-shadow: 0 4px 12px rgba(111, 66, 193, 0.1);
    transform: translateY(-2px);
}

.docs-quick-link {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    text-decoration: none;
    transition: color 0.3s ease;
}

.docs-quick-link:hover {
    color: #6f42c1;
}

.docs-quick-links p {
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
    color: #718096;
    line-height: 1.5;
}

/* ========================================
   DOCUMENTATION SINGLE PAGE
   ======================================== */

.docs-page-header-simple {
    margin-bottom: 2rem;
    border-bottom: 3px solid #6f42c1;    
}

.docs-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: #6f42c1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #5a2d91;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #a0aec0;
}

.breadcrumb-current {
    color: #718096;
    font-weight: 500;
}

.docs-page-title-simple {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.75rem;
    font-weight: 800;
    color: #2d3748;
    margin: 0 0 0.75rem 0;
    line-height: 1.2;
}

.docs-page-subtitle-simple {
    font-size: 1.2rem;
    color: #4a5568;
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
    font-style: italic;
}

.docs-page-meta-simple {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.docs-reading-time,
.docs-last-updated {
    color: #718096;
    font-weight: 500;
}

/* Table of Contents */
.docs-toc-wrapper {
    margin: 2rem 0;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.docs-toc-details {
    padding: 0;
}

.docs-toc-summary {
    padding: 1rem 1.5rem;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #2d3748;
    cursor: pointer;
    list-style: none;
    border-bottom: 1px solid #e2e8f0;
    transition: color 0.3s ease;
}

.docs-toc-summary:hover {
    color: #6f42c1;
}

.docs-toc-summary::-webkit-details-marker {
    display: none;
}

.docs-toc-summary::before {
    content: "?";
    color: #6f42c1;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.docs-toc-details[open] .docs-toc-summary::before {
    transform: rotate(90deg);
}

.docs-toc-content {
    padding: 1rem 1.5rem 1.5rem;
}

.docs-toc-content nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.docs-toc-content nav li {
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.docs-toc-content nav li::before {
    display: none;
}

.docs-toc-content nav a {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
    display: block;
    padding: 0.25rem 0;
    line-height: 1.4;
}

.docs-toc-content nav a:hover {
    color: #6f42c1;
}

.docs-toc-content nav ul ul {
    margin-top: 0.25rem;
    padding-left: 1rem;
}

.docs-toc-content nav ul ul a {
    font-size: 0.85rem;
    color: #718096;
}

/* Article Content */
.docs-article-content {
    margin: 3rem 0;
}

.docs-article-content h1 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: #2d3748;
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #6f42c1;
}

.docs-article-content h1:first-child {
    margin-top: 0;
}

.docs-article-content h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.875rem;
    font-weight: 600;
    color: #2d3748;
    margin: 1.25rem 0 0 0;        
}

.docs-article-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin: 2rem 0 1rem 0;
    position: relative;
    padding-left: 1rem;
}

.docs-article-content h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(180deg, #6f42c1 0%, #fd7e14 100%);
    border-radius: 2px;
}

.docs-article-content h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #4a5568;
    margin: 1.5rem 0 0.75rem 0;
}

.docs-article-content p {
    font-size: 1rem;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 1.5rem;
}

.docs-article-content strong {
    color: #6f42c1;
    font-weight: 600;
}

.docs-article-content em {
    color: #2d3748;
    font-style: italic;
}

.docs-article-content code {
    background: #f7fafc;
    color: #6f42c1;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid #e2e8f0;
    font-family: 'SFMono-Regular', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.docs-article-content pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid #4a5568;
    font-size: 0.9rem;
}

.docs-article-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
}

.docs-article-content blockquote {
    background: #faf5ff;
    border-left: 4px solid #6f42c1;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.docs-article-content blockquote p {
    margin-bottom: 0;
    color: #4a5568;
}

.docs-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.docs-article-content th,
.docs-article-content td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.docs-article-content th {
    background: #6f42c1;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.docs-article-content tr:hover {
    background: #faf5ff;
}

.docs-article-content ul,
.docs-article-content ol {
    margin: 1.5rem 0;
    padding-left: 0;
}

.docs-article-content ul li,
.docs-article-content ol li {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

/* Page Footer Navigation */
.docs-page-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid #f7fafc;
}

.docs-navigation-simple {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.docs-nav-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #fafafa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    max-width: 300px;
}

.docs-nav-btn:hover {
    border-color: #6f42c1;
    background: #faf5ff;
    transform: translateY(-2px);
}

.docs-nav-arrow {
    font-size: 1.25rem;
    color: #6f42c1;
    font-weight: bold;
}

.docs-nav-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.docs-nav-label {
    font-size: 0.8rem;
    color: #718096;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.docs-nav-title {
    font-size: 0.95rem;
    color: #2d3748;
    font-weight: 600;
    line-height: 1.3;
}

.docs-nav-btn:hover .docs-nav-title {
    color: #6f42c1;
}

.docs-nav-next {
    margin-left: auto;
}

/* Table of Contents Section */
.docs-toc-main {
    margin-top: 3rem;
}

.docs-toc-main h2 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 2rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #6f42c1;
}

.docs-toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.docs-toc-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.docs-toc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6f42c1 0%, #fd7e14 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.docs-toc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(111, 66, 193, 0.15);
    border-color: #6f42c1;
}

.docs-toc-card:hover::before {
    transform: scaleX(1);
}

.docs-toc-card-link {
    display: block;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.docs-toc-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.docs-toc-card-icon {
    font-size: 1.5rem;
    color: #6f42c1;
    flex-shrink: 0;
}

.docs-toc-card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    line-height: 1.3;
    flex: 1;
    transition: color 0.3s ease;
}

.docs-toc-card:hover .docs-toc-card-title {
    color: #6f42c1;
}

.docs-toc-card-description {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex: 1;
}

.docs-toc-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #718096;
}

.docs-toc-card-time {
    font-weight: 500;
}

.docs-toc-card-arrow {
    color: #6f42c1;
    font-size: 1.25rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.docs-toc-card:hover .docs-toc-card-arrow {
    transform: translateX(4px);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .docs-sidebar {
        transform: translateX(-100%);
        position: fixed;
        width: 300px;
        min-width: 300px;
    }
    
    .docs-main {
        margin-left: 0;
    }
    
    .docs-container + .footer {
        margin-left: 0;
    }
    
    .docs-content {
        padding: 2rem 1.5rem 4rem 1.5rem;
    }
}

@media (max-width: 1024px) {
    .docs-sidebar {
        transform: translateX(-100%);
        position: fixed;
    }
    
    .docs-main {
        margin-left: 0;
    }
    
    .docs-container + .footer {
        margin-left: 0;
    }
    
    .docs-content {
        padding: 2rem 1.5rem 4rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .docs-content {
        padding: 1.5rem 1rem 3rem 1rem;
    }
    
    .docs-page-title-simple {
        font-size: 2.25rem;
    }
    
    .docs-page-meta-simple {
        gap: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .docs-toc-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .docs-toc-card-link {
        padding: 1.5rem;
    }
    
    .docs-toc-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .docs-navigation-simple {
        flex-direction: column;
        gap: 1rem;
    }
    
    .docs-nav-btn {
        max-width: none;
    }
    
    .docs-nav-next {
        margin-left: 0;
    }
    
    .docs-article-content h3::before {
        display: none;
    }
    
    .docs-article-content h3 {
        padding-left: 0;
    }
    
    .docs-article-content pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .docs-content {
        padding: 1rem 0.75rem 2rem 0.75rem;
    }
    
    .docs-page-title-simple {
        font-size: 1.875rem;
    }
    
    .docs-page-subtitle-simple {
        font-size: 1rem;
    }
    
    .docs-getting-started {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .docs-quick-links li {
        padding: 1rem;
    }
    
    .docs-toc-summary,
    .docs-toc-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.docs-img {
    display: block;
    width: 100%;
    margin: 0;
    padding: 1rem 0;
    background-color: transparent;
    text-align: center;
}

.docs-img img {
    max-width: 480px;
}

.docs-img-icon {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: transparent;
    text-align: center;
}

.docs-img-icon img {
    max-width: 48px;
    max-height: 48px;
}