/* Sequifi Delivery Framework Wiki - Styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

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

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

/* Navigation */
.nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.nav-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-logo {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

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

.nav-links a:hover {
    color: var(--primary-color);
}

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

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

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

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

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Phase Cards */
.phase-card {
    border-left: 4px solid var(--primary-color);
}

.phase-card.design {
    border-left-color: #8b5cf6;
}

.phase-card.prd {
    border-left-color: #06b6d4;
}

.phase-card.sprint {
    border-left-color: var(--success-color);
}

.phase-card.release {
    border-left-color: var(--warning-color);
}

.phase-card.support {
    border-left-color: var(--danger-color);
}

/* Section */
.section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

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

.section h3 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.section h4 {
    font-size: 1rem;
    margin: 1rem 0 0.5rem;
    color: var(--text-secondary);
}

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

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

th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-primary);
}

tr:hover {
    background: var(--bg-color);
}

/* Priority badges */
.priority {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.priority-p0 {
    background: #fef2f2;
    color: #dc2626;
}

.priority-p1 {
    background: #fff7ed;
    color: #ea580c;
}

.priority-p2 {
    background: #fefce8;
    color: #ca8a04;
}

.priority-p3 {
    background: #f0fdf4;
    color: #16a34a;
}

/* Lists */
ul, ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Flow Diagram */
.flow-diagram {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.flow-horizontal {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.flow-step {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    min-width: 120px;
}

.flow-step.alt {
    background: #8b5cf6;
}

.flow-step.success {
    background: var(--success-color);
}

.flow-step.warning {
    background: var(--warning-color);
}

.flow-step.danger {
    background: var(--danger-color);
}

.flow-arrow {
    color: var(--text-secondary);
    font-size: 1.5rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
    margin: 1rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.65rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--card-bg);
}

.timeline-item h4 {
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.timeline-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Checklist */
.checklist {
    list-style: none;
    padding-left: 0;
}

.checklist li {
    padding: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
}

.checklist li::before {
    content: '☐';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}

/* Template Box */
.template-box {
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* Alert Boxes */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-info {
    background: #eff6ff;
    border-color: var(--primary-color);
    color: #1e40af;
}

.alert-success {
    background: #f0fdf4;
    border-color: var(--success-color);
    color: #166534;
}

.alert-warning {
    background: #fffbeb;
    border-color: var(--warning-color);
    color: #92400e;
}

.alert-danger {
    background: #fef2f2;
    border-color: var(--danger-color);
    color: #991b1b;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .two-column {
        grid-template-columns: 1fr;
    }
}

/* RACI Table */
.raci-table td {
    text-align: center;
}

.raci-r {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

.raci-a {
    background: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.raci-c {
    background: #d1fae5;
    color: #166534;
}

.raci-i {
    background: #f1f5f9;
    color: #64748b;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* Page Index / Table of Contents */
.page-index {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.page-index h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.page-index ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.page-index li a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.page-index li a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Go to Top Button */
.go-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 99;
}
.go-to-top.visible { opacity: 1; visibility: visible; }
.go-to-top:hover { background: var(--primary-dark); }

/* Print Styles */
@media print {
    .nav {
        display: none;
    }
    .container {
        max-width: 100%;
    }
    .section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    .go-to-top {
        display: none;
    }
}
