/* Documentation-specific styles */

.docs-page {
    padding-top: 80px;
}

/* Navigation fixes */
.nav-brand {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    text-decoration: none !important;
}

.nav-brand .logo-image {
    display: inline-block !important;
    vertical-align: middle !important;
}

.nav-brand .logo-text {
    display: inline-block !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

/* Documentation Header */
.docs-header {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    padding: 4rem 0 3rem 0;
    text-align: center;
}

.docs-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.docs-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Search Box */
.search-box {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--dark-card);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-card);
    border: 2px solid rgba(0, 255, 136, 0.2);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-results.active {
    display: block;
}

.search-result-item {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
    text-decoration: none;
}

.search-result-item:hover {
    background: rgba(0, 255, 136, 0.1);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-name {
    display: block;
    color: var(--primary);
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.25rem;
}

.search-result-category {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Documentation Content Layout */
.docs-content {
    padding: 1.5rem 0;
}

.docs-content .container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

.docs-sidebar h3 {
    color: var(--text);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-left: 0.5rem;
}

.category-list {
    list-style: none;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.category-link:hover {
    background: rgba(0, 255, 136, 0.1);
    color: var(--primary);
}

.category-link .count {
    background: rgba(0, 255, 136, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--primary);
}

/* Main Content */
.docs-main {
    min-height: 600px;
}

.category-section {
    margin-bottom: 2rem;
    scroll-margin-top: 100px;
    padding: 0 !important;
}

.category-section h2 {
    color: var(--text);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(0, 255, 136, 0.2);
}

/* Function Grid */
.function-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.function-card {
    background: var(--dark-card);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.function-card:hover {
    border-color: var(--primary);
    background: rgba(0, 255, 136, 0.05);
    transform: translateY(-2px);
}

.function-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 0.95rem;
}

.function-arrow {
    color: var(--primary);
    font-size: 1.5rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.function-card:hover .function-arrow {
    opacity: 1;
    transform: translateX(5px);
}

/* Function View Page */
.function-header {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, rgba(0, 212, 255, 0.1) 100%);
    border-bottom: 1px solid rgba(0, 255, 136, 0.2);
    padding: 2rem 0;
}

.breadcrumb {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

.function-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.function-short-desc {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.function-meta {
    display: flex;
    gap: 1rem;
}

.badge {
    display: inline-block;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--primary);
}

.badge.return-type {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.3);
    color: var(--secondary);
}

/* Function Content */
.view-page .docs-content .container {
    grid-template-columns: 1fr;
    max-width: 900px;
}

.function-content {
    background: var(--dark-card);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.section {
    margin-bottom: 1.5rem;
    padding: 0 !important;
}

.section:last-child {
    margin-bottom: 0;
}

.section h2 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 136, 0.1);
}

.section h3 {
    color: var(--primary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.section h3:first-of-type {
    margin-top: 0;
}

/* Parameters */
.params-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.no-params {
    color: var(--text-secondary);
    font-style: italic;
    padding: 1rem;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 8px;
}

.param-item {
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.param-name {
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary);
    font-weight: 600;
}

.param-type {
    color: var(--secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
}

/* Description */
.description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Show More Button */
.show-more-btn {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.show-more-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--primary);
}


/* Metadata */
.metadata {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 136, 0.1);
}

.meta-item {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.status-stable {
    color: var(--primary);
}

.status-deprecated {
    color: #ff6b6b;
}

/* Footer */
.footer {
    background: var(--dark-card);
    border-top: 1px solid rgba(0, 255, 136, 0.1);
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

.footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

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

    .docs-sidebar {
        position: static;
        margin-bottom: 2rem;
    }

    .function-grid {
        grid-template-columns: 1fr;
    }

    .function-title {
        font-size: 2rem;
    }
}
