/* ============================================
   SHARED STYLES - Blade Generation System Docs
   ============================================ */

:root {
    --primary: #1e3a5f;
    --secondary: #3498db;
    --accent: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --light: #f5f7fa;
    --dark: #0d1b2a;
    --text: #2c3e50;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--light);
}

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

/* ===== HEADER ===== */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: white;
    padding: 25px 20px;
    text-align: center;
}

header h1 { font-size: 1.6em; margin-bottom: 5px; }
header .subtitle { font-size: 0.95em; opacity: 0.9; }

/* ===== NAVIGATION ===== */
nav {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

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

nav .nav-brand {
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    font-weight: bold;
    font-size: 1em;
}

nav .nav-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5em;
    padding: 12px 15px;
    cursor: pointer;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

nav li { position: relative; }

nav a {
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    display: block;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    font-size: 0.9em;
}

nav a:hover, nav a.active {
    background: var(--primary);
    border-bottom-color: var(--secondary);
}

/* Dropdown */
nav .dropdown { position: relative; }

nav .dropdown-toggle::after {
    content: ' ▼';
    font-size: 0.65em;
    opacity: 0.7;
}

nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dark);
    min-width: 220px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    border-radius: 0 0 8px 8px;
}

nav .dropdown:hover .dropdown-menu,
nav .dropdown-menu:hover {
    display: block;
}

nav .dropdown-menu a {
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85em;
}

nav .dropdown-menu a:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

/* Sub-category headers in dropdown */
nav .dropdown-menu .menu-category {
    padding: 8px 15px 4px 15px;
    color: var(--secondary);
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.2);
    cursor: default;
}

nav .dropdown-menu .menu-category:first-child {
    border-radius: 0;
}

/* Nested submenu */
nav .dropdown-menu .submenu {
    position: relative;
}

nav .dropdown-menu .submenu > a::after {
    content: ' ▶';
    font-size: 0.6em;
    float: right;
    opacity: 0.7;
}

nav .dropdown-menu .submenu-content {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: var(--dark);
    min-width: 200px;
    box-shadow: 4px 4px 15px rgba(0,0,0,0.3);
    border-radius: 0 8px 8px 0;
}

nav .dropdown-menu .submenu:hover .submenu-content {
    display: block;
}

nav .dropdown-menu .submenu-content a {
    border-radius: 0;
}

nav .dropdown-menu .submenu-content a:last-child {
    border-radius: 0 0 8px 0;
}

/* ===== SECTIONS ===== */
section {
    background: white;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

section h2 {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    color: white;
    padding: 15px 20px;
    font-size: 1.2em;
    cursor: pointer;
    user-select: none;
}

section h2::after {
    content: ' ▼';
    font-size: 0.65em;
    opacity: 0.7;
    float: right;
}

section.collapsed h2::after { content: ' ▶'; }
section.collapsed .content { display: none; }

section .content { padding: 18px 20px; }

/* ===== FEATURE CARDS ===== */
.feature-card {
    background: var(--light);
    padding: 18px;
    border-radius: 8px;
    margin: 12px 0;
    border-left: 4px solid var(--secondary);
}

.feature-card h4 { color: var(--primary); margin-bottom: 10px; font-size: 1em; }

/* ===== DIAGRAMS ===== */
.diagram {
    background: #1a1a2e;
    color: #a0ffa0;
    font-family: 'Consolas', 'Courier New', monospace;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    white-space: pre;
    font-size: 0.75em;
    line-height: 1.35;
    margin: 12px 0;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 0.9em;
}

th, td { 
    padding: 10px 12px; 
    text-align: left; 
    border-bottom: 1px solid #e0e0e0; 
}

th { 
    background: var(--primary); 
    color: white; 
    font-size: 0.9em;
}

tr:hover { background: #f8f9fa; }

/* ===== TASK LISTS ===== */
.task-list { list-style: none; margin-top: 12px; }

.task-list li {
    padding: 8px 12px;
    margin: 6px 0;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    font-size: 0.9em;
}

.task-list .check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    flex-shrink: 0;
}

.task-list .check.done { background: var(--success); color: white; }
.task-list .check.wip { background: var(--warning); color: white; }
.task-list .check.todo { background: #e0e0e0; color: #999; }

/* ===== DELIVERABLES ===== */
.deliverables {
    margin-top: 15px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
}

.deliverables h4 {
    color: var(--secondary);
    margin-bottom: 8px;
    font-size: 0.9em;
}

.deliverables code {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
}

/* ===== NOTES ===== */
.critical-note {
    background: #fff3cd;
    border-left: 4px solid var(--warning);
    padding: 12px;
    margin: 12px 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.9em;
}

.critical-note h4 { color: #856404; margin-bottom: 6px; font-size: 0.95em; }

.new-item {
    background: #d4edda;
    border-left: 4px solid var(--success);
    padding: 12px;
    margin: 12px 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.9em;
}

.new-item h4 { color: #155724; margin-bottom: 6px; font-size: 0.95em; }

/* ===== STATUS BADGES ===== */
.status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.done { background: var(--success); color: white; }
.status.wip { background: var(--warning); color: white; }
.status.todo { background: #95a5a6; color: white; }

.priority-high { color: var(--accent); font-weight: bold; }
.priority-med { color: var(--warning); }
.priority-low { color: #95a5a6; }

.new-badge {
    display: inline-block;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
}

/* ===== QUICK LINKS GRID ===== */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.quick-link {
    background: white;
    border-radius: 8px;
    padding: 15px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    border-left: 4px solid var(--secondary);
}

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

.quick-link h4 {
    color: var(--primary);
    margin-bottom: 5px;
    font-size: 1em;
}

.quick-link p {
    font-size: 0.85em;
    color: #666;
    margin: 0;
}

/* ===== FOOTER ===== */
footer {
    background: var(--dark);
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: 25px;
    font-size: 0.9em;
}

footer a { color: var(--secondary); }

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 12px 15px;
    background: #e9ecef;
    font-size: 0.85em;
}

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

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb span { color: #666; }

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 768px) {
    header { padding: 18px 15px; }
    header h1 { font-size: 1.3em; }
    header .subtitle { font-size: 0.85em; }
    
    nav .nav-toggle { display: block; }
    
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--dark);
    }
    
    nav ul.active { display: flex; }
    
    nav li { width: 100%; }
    
    nav a {
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    nav .dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(0,0,0,0.2);
        border-radius: 0;
        display: none;
    }
    
    nav .dropdown.open .dropdown-menu {
        display: block;
    }
    
    nav .dropdown-menu a {
        padding-left: 30px;
    }
    
    .container { padding: 12px; }
    
    section { margin: 12px 0; }
    section h2 { padding: 12px 15px; font-size: 1.05em; }
    section .content { padding: 12px 15px; }
    
    .feature-card { padding: 12px; }
    
    table { font-size: 0.8em; }
    
    .new-badge { font-size: 0.65em; padding: 1px 4px; }
    th, td { padding: 6px 8px; }
    
    .diagram {
        font-size: 0.65em;
        padding: 10px;
    }
    
    .quick-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    header h1 { font-size: 1.15em; }
    
    nav a { padding: 10px 12px; font-size: 0.85em; }
    
    .task-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .diagram { font-size: 0.6em; }
}
