/* ==========================================================================
   MMP FRAMEWORK ACADEMIC DOCUMENTATION CSS
   Three-Color Meta-Modal-Platform System with Scientific Rigor
   For Joomla 5.3 Template Override
   ========================================================================== */
#sp-main-body {
    padding: 10px !important;
}
/* ROOT COLOR VARIABLES - Semantic Primary Color System */
:root {
    /* META Colors (WHERE - Domain/Environment) - Blue for Atmospheric/Spatial */
    --meta-primary: #1d4ed8;       /* Pure blue - Atmosphere/space/domain */
    --meta-secondary: #3b82f6;     /* Standard blue - Environmental context */
    --meta-light: #dbeafe;         /* Light blue background */
    --meta-dark: #1e3a8a;          /* Navy blue for emphasis */
    
    /* MODAL Colors (HOW - Movement/Motion) - Green for Go/Movement */
    --modal-primary: #16a34a;      /* Pure green - Motion/movement */
    --modal-secondary: #22c55e;    /* Standard green - Kinematic states */
    --modal-light: #dcfce7;        /* Light green background */
    --modal-dark: #15803d;         /* Dark green for emphasis */
    
    /* PLATFORM Colors (WHAT - Observable Thing) - Red for Essential Object */
    --platform-primary: #dc2626;   /* Pure red - The observable thing/shape */
    --platform-secondary: #ef4444; /* Standard red - Physical manifestation */
    --platform-light: #fef2f2;     /* Light red background */
    --platform-dark: #991b1b;      /* Dark red for emphasis */
    
    /* Neutral Academic Colors */
    --neutral-100: #f8fafc;
    --neutral-200: #e2e8f0;
    --neutral-300: #cbd5e1;
    --neutral-400: #94a3b8;
    --neutral-500: #64748b;
    --neutral-600: #475569;
    --neutral-700: #334155;
    --neutral-800: #1e293b;
    --neutral-900: #0f172a;
    
    /* Academic Typography */
    --font-academic: "Times New Roman", "Liberation Serif", Georgia, serif;
    --font-technical: "SF Mono", "Monaco", "Cascadia Code", "Courier New", monospace;
    --font-interface: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* APA Typography Specifications */
    --font-apa-body: "Times New Roman", serif;
    --font-apa-size: 12pt;
    --font-apa-alt: "Arial", sans-serif;
    --font-apa-alt-size: 11pt;
    --line-height-apa: 2.0; /* Double spacing */
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
}

/* BASE STYLES */
.mmp-framework {
    font-family: var(--font-interface);
    line-height: 1.7;
    color: var(--neutral-800);
}

/* ACADEMIC CONTAINER SYSTEM */
.mmp-framework .academic-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-lg);
    background: white;
    box-shadow: 0 10px 50px rgba(0,0,0,0.1);
    border-radius: 12px;
}

/* HERO SECTIONS */
.mmp-framework .hero-section {
    background: var(--meta-primary);
    color: white;
    padding: 80px 40px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.mmp-framework .hero-section.modal-hero {
    background: var(--modal-primary);
}

.mmp-framework .hero-section.platform-hero {
    background: var(--platform-primary);
}

/* TITLES AND HEADINGS */
.mmp-framework .academic-title {
    font-family: var(--font-academic);
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-lg);
    line-height: 1.2;
}

.mmp-framework .academic-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    font-style: italic;
    margin-bottom: var(--space-md);
}

.mmp-framework .academic-meta {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
}

.mmp-framework .section-title {
    font-family: var(--font-academic);
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: var(--space-lg);
}

/* THREE-COLOR KANBAN CARD SYSTEM */
.mmp-framework .kanban-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.mmp-framework .kanban-column {
    background: var(--neutral-100);
    border-radius: 12px;
    padding: var(--space-lg);
    min-height: 300px;
}

.mmp-framework .kanban-column.meta-column {
    border-top: 4px solid var(--meta-primary);
    background: var(--meta-light);
}

.mmp-framework .kanban-column.modal-column {
    border-top: 4px solid var(--modal-primary);
    background: var(--modal-light);
}

.mmp-framework .kanban-column.platform-column {
    border-top: 4px solid var(--platform-primary);
    background: var(--platform-light);
}

.mmp-framework .kanban-header {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid currentColor;
}

.mmp-framework .meta-column .kanban-header { color: var(--meta-primary); }
.mmp-framework .modal-column .kanban-header { color: var(--modal-primary); }
.mmp-framework .platform-column .kanban-header { color: var(--platform-primary); }

/* KANBAN CARDS */
.mmp-framework .kanban-card {
    background: white;
    border-radius: 8px;
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-left: 4px solid;
    transition: all 0.3s ease;
}

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

.mmp-framework .kanban-card.meta-card { border-left-color: var(--meta-primary); }
.mmp-framework .kanban-card.modal-card { border-left-color: var(--modal-primary); }
.mmp-framework .kanban-card.platform-card { border-left-color: var(--platform-primary); }

.mmp-framework .card-title {
    font-weight: 600;
    margin-bottom: var(--space-sm);
    font-size: 1.05rem;
}

.mmp-framework .meta-card .card-title { color: var(--meta-dark); }
.mmp-framework .modal-card .card-title { color: var(--modal-dark); }
.mmp-framework .platform-card .card-title { color: var(--platform-dark); }

/* NESTED CONTENT BOXES */
.mmp-framework .nested-box {
    background: var(--neutral-100);
    border-radius: 6px;
    padding: var(--space-md);
    margin: var(--space-sm) 0;
    border-left: 3px solid var(--neutral-300);
}

.mmp-framework .nested-box.highlight {
    background: var(--meta-light);
    border-left-color: var(--meta-primary);
}

.mmp-framework .nested-box.process {
    background: var(--modal-light);
    border-left-color: var(--modal-primary);
}

.mmp-framework .nested-box.foundation {
    background: var(--platform-light);
    border-left-color: var(--platform-primary);
}

/* DARK MODE CODE EDITOR STYLING */
.mmp-framework .code-container {
    background: #212121;
    border-radius: 8px;
    overflow: hidden;
    margin: var(--space-lg) 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.mmp-framework .code-header {
    background: #1a1a1a;
    color: #e0e0e0;
    padding: var(--space-sm) var(--space-lg);
    font-family: var(--font-technical);
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.mmp-framework .code-title {
    font-weight: 600;
}

.mmp-framework .code-content {
    background: #263238;
    color: #eeffff;
    padding: var(--space-lg);
    font-family: var(--font-technical);
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

/* Syntax Highlighting */
.mmp-framework .code-content .keyword { color: #c792ea; }
.mmp-framework .code-content .string { color: #c3e88d; }
.mmp-framework .code-content .number { color: #f78c6c; }
.mmp-framework .code-content .comment { color: #546e7a; font-style: italic; }
.mmp-framework .code-content .function { color: #82aaff; }
.mmp-framework .code-content .variable { color: #eeffff; }

/* CODE EXPLANATION */
.mmp-framework .code-explanation {
    background: var(--neutral-100);
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    padding: var(--space-lg);
    margin-top: var(--space-md);
}

.mmp-framework .code-explanation h5 {
    color: var(--modal-primary);
    margin-bottom: var(--space-md);
    font-weight: 600;
}

.mmp-framework .explanation-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--space-md);
    padding: var(--space-sm);
    border-radius: 6px;
    background: white;
}

.mmp-framework .step-number {
    background: var(--modal-primary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: var(--space-md);
    flex-shrink: 0;
}

/* ACTION BUTTONS */
.mmp-framework .action-button {
    background: var(--modal-primary);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    text-decoration: none;
}

.mmp-framework .action-button:hover {
    background: var(--modal-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
    color: white;
    text-decoration: none;
}

.mmp-framework .action-button.hero {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.1rem;
    border-radius: 8px;
}

.mmp-framework .action-button.secondary {
    background: var(--neutral-600);
    color: white;
}

.mmp-framework .action-button.secondary:hover {
    background: var(--neutral-700);
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.3);
}

/* STATISTICS CARDS */
.mmp-framework .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
}

.mmp-framework .stat-card {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: 8px;
    padding: var(--space-lg);
    text-align: center;
}

.mmp-framework .stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.mmp-framework .stat-label {
    color: var(--neutral-600);
    font-size: 0.9rem;
}

/* CTA SECTIONS */
.mmp-framework .cta-section {
    background: var(--modal-primary);
    color: white;
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
}

/* ACADEMIC TABLES */
.mmp-framework .academic-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-xl) 0;
    font-family: var(--font-apa-body);
    font-size: 10pt;
    background: white;
}

.mmp-framework .academic-table caption {
    caption-side: top;
    text-align: left;
    font-weight: bold;
    padding: var(--space-md) 0;
    font-size: 10pt;
}

.mmp-framework .academic-table .table-number {
    font-weight: bold;
}

.mmp-framework .academic-table .table-title {
    font-weight: normal;
    font-style: italic;
    margin-left: var(--space-sm);
}

.mmp-framework .academic-table th {
    border-top: 2px solid #000;
    border-bottom: 1px solid #000;
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    font-weight: bold;
    background: none;
    color: inherit;
}

.mmp-framework .academic-table td {
    border: none;
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    vertical-align: top;
}

.mmp-framework .academic-table .numeric {
    text-align: right;
}

.mmp-framework .academic-table tbody tr:last-child td {
    border-bottom: 2px solid #000;
}

.mmp-framework .academic-table .table-note {
    font-size: 9pt;
    font-style: italic;
    margin-top: var(--space-sm);
    text-align: left;
}

/* ACADEMIC FIGURES */
.mmp-framework .academic-figure {
    margin: var(--space-xl) 0;
    text-align: center;
}

.mmp-framework .academic-figure svg {
    max-width: 100%;
    height: auto;
}

.mmp-framework .figure-caption {
    text-align: left;
    font-size: 10pt;
    margin-top: var(--space-md);
    padding: 0;
}

.mmp-framework .figure-number {
    font-weight: bold;
    font-style: italic;
}

.mmp-framework .figure-title {
    font-weight: normal;
    margin-left: var(--space-sm);
}

/* CHART CONTAINERS */
.mmp-framework .chart-container {
    background: white;
    border: 1px solid var(--neutral-300);
    border-radius: 4px;
    padding: var(--space-lg);
    margin: var(--space-xl) 0;
    position: relative;
}

.mmp-framework .chart-title {
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: var(--space-lg);
    color: var(--neutral-800);
}

.mmp-framework .axis-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--neutral-700);
}

.mmp-framework .chart-legend {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--neutral-300);
    border-radius: 4px;
    padding: var(--space-sm);
    font-size: 0.85rem;
}

.mmp-framework .legend-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-xs);
}

.mmp-framework .legend-color {
    width: 12px;
    height: 12px;
    margin-right: var(--space-sm);
    border-radius: 2px;
}

/* EQUATION FORMATTING */
.mmp-framework .equation-container {
    margin: var(--space-xl) 0;
    text-align: center;
    position: relative;
}

.mmp-framework .equation {
    font-family: var(--font-technical);
    font-size: 1.1rem;
    padding: var(--space-lg);
    background: var(--neutral-100);
    border-radius: 4px;
    display: inline-block;
    margin: 0 auto;
}

.mmp-framework .equation-number {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    background: white;
    padding: var(--space-xs) var(--space-sm);
}

/* REFERENCES SECTION */
.mmp-framework .references-section {
    background: var(--neutral-100);
    border-radius: 8px;
    padding: var(--space-xl);
    margin-top: var(--space-2xl);
}

.mmp-framework .references-title {
    font-family: var(--font-academic);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--neutral-800);
    margin-bottom: var(--space-xl);
    text-align: center;
}

.mmp-framework .reference-entry {
    margin-bottom: var(--space-lg);
    padding-left: var(--space-xl);
    text-indent: calc(-1 * var(--space-xl));
    line-height: 1.8;
    font-size: 0.95rem;
}

/* MULTI-PANEL FIGURES */
.mmp-framework .multi-panel-figure {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin: var(--space-xl) 0;
}

.mmp-framework .panel {
    border: 1px solid var(--neutral-300);
    border-radius: 4px;
    padding: var(--space-md);
    position: relative;
}

.mmp-framework .panel-label {
    position: absolute;
    top: var(--space-sm);
    left: var(--space-sm);
    font-weight: bold;
    font-size: 1.1rem;
    background: white;
    padding: var(--space-xs);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .mmp-framework .academic-container {
        padding: var(--space-md);
    }
    
    .mmp-framework .kanban-container {
        grid-template-columns: 1fr;
    }
    
    .mmp-framework .academic-title {
        font-size: 2rem;
    }
    
    .mmp-framework .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .mmp-framework .hero-section {
        padding: 40px 20px;
    }
}

/* JOOMLA 5.3 SPECIFIC COMPATIBILITY */
.mmp-framework.joomla-article {
    margin: var(--space-lg) 0;
}

/* ACCESSIBILITY */
.mmp-framework .kanban-card:focus,
.mmp-framework .action-button:focus {
    outline: 2px solid var(--modal-primary);
    outline-offset: 2px;
}

/* PRINT STYLES */
@media print {
    .mmp-framework .academic-container {
        box-shadow: none;
        margin: 0;
        padding: 0;
    }
    
    .mmp-framework .action-button,
    .mmp-framework .code-container {
        display: none;
    }
    
    .mmp-framework .academic-table,
    .mmp-framework .academic-figure {
        page-break-inside: avoid;
    }
}