/* Basic Reset & Body */
body {
    font-family: sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

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

/* Header & Footer */
header {
    background-color: #00446e; /* Example color */
    color: #fff;
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header h1 a {
    color: #fff;
    text-decoration: none;
}
header h1 {
    margin-bottom: 0;
}

header p {
    margin-top: 0.2rem;
    font-size: 0.9rem;
    opacity: 0.9;
}


footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    margin-top: 3rem;
    font-size: 0.9em;
}

.preserve-newlines {
    /* white-space: pre-line; /* This preserves line breaks but collapses multiple spaces */
    /* Or use: */
    white-space: pre-wrap; /* This preserves line breaks AND spaces */
}

/* Main Content */
main {
    padding-bottom: 2rem;
}

h2, h3 {
    color: #00446e; /* Match header */
    margin-bottom: 0.8rem;
}

hr {
    border: 0;
    height: 1px;
    background: #ccc;
    margin: 2rem 0;
}

a {
    color: #0066cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Buttons */
.button {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.button:hover {
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
}

/* Project List (Homepage) */
.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive grid */
    gap: 1.5rem;
}

.project-card {
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.project-card h3 {
    margin-top: 0;
}

/* Project Detail Page */
.project-detail section {
    margin-bottom: 2rem;
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.project-downloads ul {
    list-style: none;
    padding: 0;
}

.project-downloads li {
    margin-bottom: 0.5rem;
    padding: 8px;
    background-color: #eef;
    border-radius: 3px;
}
.project-downloads li a {
    font-weight: bold;
}

/* Documentation Section */
.documentation-container {
    border: 1px solid #ccc;
    padding: 1.5rem;
    margin-top: 1rem;
    background-color: #fdfdfd;
    border-radius: 4px;
    max-height: 600px; /* Limit height */
    overflow-y: auto; /* Add scrollbar if needed */
    transition: all 0.5s ease-in-out; /* Smooth transition */
}

.documentation-container.hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-width: 0;
    overflow: hidden;
    opacity: 0;
}

/* Markdown Styles (Basic) */
.documentation-container h1,
.documentation-container h2,
.documentation-container h3,
.documentation-container h4 {
    margin-top: 1.5em;
    margin-bottom: 0.6em;
    color: #333;
}
.documentation-container h1 { font-size: 1.8em; border-bottom: 1px solid #eee; padding-bottom: 0.3em;}
.documentation-container h2 { font-size: 1.5em; border-bottom: 1px solid #eee; padding-bottom: 0.3em;}
.documentation-container h3 { font-size: 1.3em; }
.documentation-container h4 { font-size: 1.1em; }

.documentation-container p {
    margin-bottom: 1em;
}

.documentation-container ul,
.documentation-container ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.documentation-container li {
    margin-bottom: 0.4em;
}

.documentation-container code {
    background-color: #eee;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}

.documentation-container pre {
    background-color: #eee;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto; /* Horizontal scroll for long code lines */
}

.documentation-container pre code {
    background-color: transparent;
    padding: 0;
}

.documentation-container blockquote {
    border-left: 4px solid #ccc;
    padding-left: 1em;
    margin-left: 0;
    color: #666;
}

.documentation-container table {
    border-collapse: collapse;
    margin-bottom: 1em;
    width: auto; /* Or 100% */
}

.documentation-container th,
.documentation-container td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
}

.documentation-container th {
    background-color: #f0f0f0;
}