/* Docs Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: calc(100vh - var(--nav-height));
}

.docs-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 2rem);
    align-self: start;
    max-height: calc(100vh - var(--nav-height) - 4rem);
    overflow-y: auto;
}

.docs-sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.docs-sidebar h3 {
    color: var(--clr-whitest);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.docs-sidebar a {
    color: var(--clr-olive-lighter);
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: color 0.2s ease, background 0.2s ease;
    border-left: 2px solid transparent;
    text-decoration: none;
}

.docs-sidebar a:hover {
    color: var(--clr-green-darker);
    background: var(--glass-bg);
    border-left-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.docs-sidebar a.active {
    color: var(--clr-green-darker);
    background: var(--glass-bg);
    border-left-color: var(--clr-green-darker);
    text-decoration: none;
}

/* Content */
.docs-content {
    color: var(--clr-olive-lighter);
    line-height: 1.8;
    max-width: 750px;
}

.docs-content h1 {
    color: var(--clr-whitest);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.docs-content h2 {
    color: var(--clr-whitest);
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    font-size: var(--font-size-small-title);
}

.docs-content h3 {
    color: var(--clr-whitest);
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

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

.docs-content a {
    color: var(--clr-green-darker);
    text-decoration: none;
    border-bottom: 1px solid rgba(45, 212, 140, 0.3);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.docs-content a:hover {
    color: var(--clr-terminal-green);
    border-bottom-color: var(--clr-terminal-green);
    text-decoration: none;
}

.docs-content code {
    font-family: var(--font-mono);
    background: rgba(0, 0, 0, 0.3);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--clr-terminal-green);
}

.docs-content pre {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    line-height: 1.5;
}

.docs-content pre code {
    background: none;
    padding: 0;
    font-size: 0.85rem;
}

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

.docs-content li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.docs-content ul {
    list-style: disc;
}

.docs-content ol {
    list-style: decimal;
}

.docs-content blockquote {
    border-left: 3px solid var(--clr-green-darker);
    padding: 0.5rem 1rem;
    margin: 1.5rem 0;
    color: var(--clr-grey);
    background: var(--glass-bg);
    border-radius: 0 8px 8px 0;
}

.docs-content strong {
    color: var(--clr-whitest);
}

.docs-content em {
    color: var(--clr-olive-lighter);
}

.docs-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1rem 0;
}

.docs-content hr {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 2rem 0;
}

/* Pagination */
.docs-pagination {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.docs-pagination a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    text-decoration: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    max-width: 45%;
    border-bottom: none;
}

.docs-pagination a:hover {
    border-color: var(--clr-green-darker);
    background: var(--glass-bg);
    border-bottom: none;
}

.docs-pagination .nav-dir {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--clr-grey);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.docs-pagination .nav-title {
    color: var(--clr-green-darker);
    font-size: 0.9rem;
    font-weight: 500;
}

.docs-pagination .next {
    margin-left: auto;
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
        max-height: none;
        border-bottom: 1px solid var(--glass-border);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .docs-sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .docs-sidebar a {
        border-left: none;
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .docs-sidebar a:hover,
    .docs-sidebar a.active {
        border-left: none;
    }

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

    .docs-pagination a {
        max-width: 100%;
    }

    .docs-pagination .next {
        margin-left: 0;
    }
}
