/* Documents Page Specific Styles */

.documents-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.documents-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.documents-info {
    color: #666;
    font-size: 1.1rem;
}

.documents-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Sidebar Styles */
.documents-sidebar {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    position: sticky;
    top: 2rem;
}

.documents-sidebar h3 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

#documents-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.document-link {
    display: block;
    padding: 1rem 1.25rem;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.document-link:hover {
    background-color: var(--hover-bg);
    border-left-color: var(--secondary-color);
}

.document-link.active {
    background-color: rgba(225, 6, 0, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

#loading-nav {
    text-align: center;
    padding: 1rem;
    color: #999;
    font-size: 0.9rem;
}

/* Document Content Styles */
.document-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    min-height: 500px;
}

#loading {
    text-align: center;
    padding: 4rem;
    color: #999;
    font-size: 1.1rem;
}

#error {
    text-align: center;
    padding: 2.5rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(225, 6, 0, 0.1) 0%, rgba(255, 69, 0, 0.1) 100%);
    border-radius: 8px;
    margin: 1rem 0;
    border: 2px solid rgba(225, 6, 0, 0.3);
    font-weight: 500;
}

/* Markdown Content Styling */
#document-viewer {
    line-height: 1.8;
    color: var(--text-dark);
}

#document-viewer h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--racing-red);
    font-weight: 700;
}

#document-viewer h2 {
    font-size: 1.8rem;
    color: var(--electric-blue);
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(30, 144, 255, 0.3);
    font-weight: 600;
}

#document-viewer h3 {
    font-size: 1.4rem;
    color: var(--jet-black);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

#document-viewer h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

#document-viewer p {
    margin-bottom: 1rem;
}

#document-viewer ul,
#document-viewer ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

#document-viewer li {
    margin-bottom: 0.5rem;
}

#document-viewer strong {
    color: var(--primary-color);
    font-weight: 600;
}

#document-viewer em {
    font-style: italic;
    color: #555;
}

#document-viewer code {
    background-color: #f5f5f5;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d32f2f;
}

#document-viewer pre {
    background-color: #f5f5f5;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

#document-viewer pre code {
    background: none;
    padding: 0;
    color: var(--text-dark);
}

#document-viewer blockquote {
    border-left: 4px solid var(--secondary-color);
    padding-left: 1rem;
    margin-left: 0;
    margin-bottom: 1rem;
    color: #555;
    font-style: italic;
}

#document-viewer table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
}

#document-viewer table thead {
    background: linear-gradient(135deg, var(--racing-red) 0%, var(--jet-black) 100%);
    color: white;
}

#document-viewer table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 600;
}

#document-viewer table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e0e0e0;
}

#document-viewer table tbody tr:hover {
    background-color: var(--hover-bg);
}

#document-viewer hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 2rem 0;
}

#document-viewer a {
    color: var(--secondary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

#document-viewer a:hover {
    border-bottom-color: var(--secondary-color);
}

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

    .documents-sidebar {
        position: static;
    }

    .document-content {
        padding: 1.5rem;
    }

    #document-viewer h1 {
        font-size: 2rem;
    }

    #document-viewer h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .documents-header h2 {
        font-size: 1.8rem;
    }

    .document-content {
        padding: 1rem;
    }

    #document-viewer h1 {
        font-size: 1.75rem;
    }

    #document-viewer h2 {
        font-size: 1.35rem;
    }

    #document-viewer h3 {
        font-size: 1.15rem;
    }
}
