/* MiFamilias Architecture Documentation Styles */

:root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --secondary: #f0f9ff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Navigation */
nav {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 1rem 0;
}

nav a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 0.5rem;
    white-space: nowrap;
    transition: all 0.2s;
}

nav a:hover {
    background: var(--border);
}

nav a.active {
    background: var(--primary);
    color: white;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

section p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Diagram Sections */
.diagram-section {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.diagram-section .mermaid {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

/* Info Sections */
.info-section {
    padding: 2rem;
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.link-card {
    display: block;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    transition: all 0.2s;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.link-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.link-card p {
    color: var(--text-light);
    margin: 0;
    font-size: 0.9rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-alt);
    font-weight: 600;
}

/* Code */
code {
    background: var(--bg-alt);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
}

pre {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

/* Footer */
footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }

    nav {
        padding: 0 1rem;
    }

    main {
        padding: 1rem;
    }

    .diagram-section {
        padding: 1rem;
    }

    .diagram-section .mermaid {
        padding: 1rem;
    }
}

/* Print */
@media print {
    nav, footer {
        display: none;
    }

    header {
        background: none;
        color: black;
    }

    .link-card {
        break-inside: avoid;
    }
}

/* =============================================
   Feature Tables & Capability Matrix
   ============================================= */

.feature-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-table th {
    background: var(--primary);
    color: white;
    padding: 1rem 0.75rem;
    font-weight: 600;
    text-align: center;
}

.feature-table th:first-child {
    text-align: left;
}

.feature-table td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.feature-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.feature-table tr:last-child td {
    border-bottom: none;
}

.feature-table tr:hover {
    background: var(--secondary);
}

/* Yes/No Indicators - Professional style without emojis */
.feature-table td.yes,
.feature-table td.no {
    font-weight: 700;
    font-size: 0.85rem;
}

.feature-table td.yes {
    color: #059669;
}

.feature-table td.yes::before {
    content: "Yes";
}

.feature-table td.no {
    color: #dc2626;
}

.feature-table td.no::before {
    content: "—";
}

/* Alternative: Circle indicators */
.feature-table.use-circles td.yes::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #059669;
    border-radius: 50%;
}

.feature-table.use-circles td.no::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #e5e7eb;
    border-radius: 50%;
}

/* Info Box */
.info-box {
    background: var(--secondary);
    border: 1px solid var(--primary);
    border-left: 4px solid var(--primary);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.info-box h3,
.info-box h4 {
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.info-box ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.info-box li {
    margin-bottom: 0.5rem;
}

/* Code Box */
.code-box {
    background: #1e293b;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
}

.code-box pre {
    background: transparent;
    color: #e2e8f0;
    margin: 0;
    padding: 0;
    font-family: 'Monaco', 'Menlo', 'Fira Code', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.summary-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
}

.summary-card .number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
}

.summary-card .label {
    font-size: 0.85rem;
    opacity: 0.9;
}

.summary-card.success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.summary-card.warning {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.ready {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}
