/* Shonshen - Psycopg-like Aesthetic */

:root {
    --primary-green: #1a5b3a;
    --primary-dark: #0f2e1e;
    --accent-blue: #2f5c8f;
    --bg-light: #f8f9fa;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #dddddd;
    --white: #ffffff;
    --cta-btn: #2d8a56;
    --cta-btn-hover: #1e613c;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
}

/* Header & Navigation */
header {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 1rem 0;
    border-bottom: 4px solid var(--primary-dark);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #a3d9b8;
}

.nav-links a.active {
    color: #ffffff;
    border-bottom: 2px solid #a3d9b8;
    padding-bottom: 2px;
}

.nav-sponsor {
    border: 1px solid var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
}

.nav-sponsor:hover {
    background-color: var(--white);
    color: var(--primary-green) !important;
}

/* Layout Containers */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

@media (max-width: 800px) {
    .container {
        grid-template-columns: 1fr;
    }
}

/* Content Blocks */
h1 {
    color: var(--primary-dark);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-size: 2.2rem;
}

h2 {
    color: var(--primary-green);
    font-size: 1.8rem;
    margin-top: 2rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.highlight-box {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 2rem;
}

/* Call to Action Button */
.cta-button {
    display: inline-block;
    background-color: var(--cta-btn);
    color: var(--white);
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.2s, transform 0.1s;
    text-align: center;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--cta-btn-hover);
    transform: translateY(-2px);
}

/* Cards & Lists */
.card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.card h3 {
    margin-top: 0;
    color: var(--accent-blue);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* Sponsors Grid */
.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.sponsor-box {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    border-radius: 4px;
    font-weight: bold;
    color: var(--primary-green);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* =========================================================
   Report Cards — Solutions Page
   ========================================================= */
.report-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    grid-column: 1 / -1;
}

.report-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}

.report-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
    border-color: var(--primary-green);
}

.report-card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
}

.report-icon-security  { background: #fef2f2; }
.report-icon-performance { background: #fffbeb; }
.report-icon-design    { background: #eff6ff; }
.report-icon-metering  { background: #f0fdf4; }

.report-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.report-card-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.report-card-summary {
    flex: 1;
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 1rem 0;
}

.report-card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-green);
}

/* =========================================================
   Report Page — Header Bar
   ========================================================= */
.report-page-header {
    margin-bottom: 1.5rem;
}

.report-back-link {
    display: inline-block;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    transition: color 0.2s;
}

.report-back-link:hover {
    color: var(--primary-dark);
}

.report-meta-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.report-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
}

.report-badge-security    { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.report-badge-performance { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.report-badge-design      { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.report-badge-metering    { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.report-source {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* =========================================================
   Report Page — Markdown Content (mirrors pgAdmin AIReport)
   ========================================================= */
.report-container {
    max-width: 900px;
    margin: 0 auto 3rem auto;
}

.report-markdown {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-main);
}

.report-markdown h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    color: var(--primary-dark);
}

.report-markdown h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.report-markdown h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
    color: var(--primary-dark);
}

.report-markdown p {
    margin-top: 0;
    margin-bottom: 0.9rem;
}

.report-markdown ul,
.report-markdown ol {
    margin-top: 0;
    margin-bottom: 0.9rem;
    padding-left: 1.6rem;
}

.report-markdown li {
    margin-bottom: 0.35rem;
}

.report-markdown code {
    background: rgba(0,0,0,0.05);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85em;
}

.report-markdown pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1.1rem 1.3rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0 1.2rem 0;
}

.report-markdown pre code {
    background: transparent;
    padding: 0;
    color: #d4d4d4;
    font-size: 0.88em;
}

.report-markdown blockquote {
    border-left: 4px solid var(--primary-green);
    margin: 1rem 0 1.2rem 0;
    padding: 0.75rem 1.1rem;
    background: #f0f7f4;
    border-radius: 0 4px 4px 0;
}

.report-markdown blockquote p:last-child {
    margin-bottom: 0;
}

.report-markdown hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 1.75rem 0;
}

.report-markdown table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
    overflow-x: auto;
    display: block;
}

.report-markdown th,
.report-markdown td {
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.9rem;
    text-align: left;
    vertical-align: top;
}

.report-markdown th {
    background: var(--bg-light);
    font-weight: 600;
}

.report-markdown tbody tr:hover {
    background: var(--bg-light);
}

.report-markdown strong {
    font-weight: 600;
}

.report-markdown em {
    font-style: italic;
    color: var(--text-muted);
}

@media (max-width: 700px) {
    .report-markdown {
        padding: 1.2rem;
    }
    .report-container {
        margin: 0;
    }
}
