/* General Body & Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fdfdfd;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    margin-bottom: 30px;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header .site-title {
    font-size: 2rem;
    font-weight: 600;
    color: #333;
}

.site-header .site-title:hover {
    text-decoration: none;
}

.site-header .back-to-main-site {
    font-size: 0.9rem;
    font-weight: 400;
    color: #555;
}

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid #eee;
    padding: 20px 0;
    margin-top: 40px;
    font-size: 0.9em;
    color: #777;
    text-align: center;
}

/* Main Layout (Sidebar + Content) - Adapted for docs */
.wrapper {
    display: flex;
    flex-direction: row; /* Sidebar and main content side-by-side */
    flex-grow: 1; /* Allow wrapper to take available height */
}

.sidebar {
    width: 250px; /* Fixed width for the sidebar */
    background-color: #f8fafd; /* Light background for the sidebar */
    padding: 20px;
    border-right: 1px solid #eee;
    flex-shrink: 0; /* Prevent sidebar from shrinking */
    overflow-y: auto; /* Enable scrolling for long content */
}

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #0077b6;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    display: block;
    padding: 8px 10px;
    color: #007bff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.sidebar ul li a:hover {
    background-color: #e9ecef;
    text-decoration: none;
}

/* Main Content Area - Adapted for docs */
main.container {
    flex-grow: 1; /* Allow main content to grow and fill space */
    max-width: 900px; /* Consistent with news site */
    margin: 2rem auto; /* Center content */
    padding: 0 1rem;
}

/* Article List (Cards) - For docs section listings */
.article-list {
    display: grid;
    gap: 30px;
}

.article-card {
    background-color: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.2s ease-in-out;
}

.article-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.article-card h2 {
    margin-top: 0;
    font-size: 1.5rem;
}

.article-card h2 a {
    color: #333;
}

.article-card .meta {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 15px;
}

.article-card .summary {
    margin-bottom: 15px;
}

.article-card footer a {
    font-weight: 600;
}

.article-card-content {
    padding: 25px;
}

/* Single Article - For individual docs pages */
.single-article header {
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    padding-bottom: 20px;
}

.single-article h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.single-article .meta {
    font-size: 0.9em;
    color: #888;
}
.single-article .meta p {
    margin: 0;
}

.single-article .content {
    font-size: 1.1rem;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    main.container {
        padding-left: 20px;
        padding-right: 20px;
    }
}