/* ========================================
   EOQ Educational Resource - Stylesheet
   Professional Design with RGB Colors
   ======================================== */

/* ===== GENERAL RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, rgb(236, 240, 245) 0%, rgb(209, 219, 231) 100%);
    color: rgb(33, 37, 41);
    line-height: 1.6;
    padding: 20px;
}

/* ===== NAVIGATION PANEL ===== */
.navigation-panel {
    background: rgb(44, 90, 160);
    border: 3px solid rgb(26, 58, 107);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 10px;
    z-index: 1000;
}

.navigation-panel h2 {
    color: rgb(255, 255, 255);
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.nav-buttons button {
    background: rgb(76, 132, 207);
    color: rgb(255, 255, 255);
    border: 2px solid rgb(255, 255, 255);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-buttons button:hover {
    background: rgb(255, 255, 255);
    color: rgb(44, 90, 160);
    border-color: rgb(44, 90, 160);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.print-btn {
    background: rgb(46, 125, 50) !important;
    border-color: rgb(27, 94, 32) !important;
}

.print-btn:hover {
    background: rgb(27, 94, 32) !important;
    color: rgb(255, 255, 255) !important;
}

/* ===== MAIN CONTAINER ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgb(255, 255, 255);
    border: 4px solid rgb(44, 90, 160);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ===== HEADER ===== */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    background: linear-gradient(135deg, rgb(44, 90, 160) 0%, rgb(76, 132, 207) 100%);
    border: 3px solid rgb(26, 58, 107);
    border-radius: 12px;
    color: rgb(255, 255, 255);
}

header h1 {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 20px;
    font-weight: bold;
    font-style: italic;
}

/* ===== DISCLAIMER ===== */
.disclaimer {
    background: rgb(255, 243, 205);
    border: 3px solid rgb(255, 193, 7);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    font-weight: bold;
    color: rgb(102, 77, 3);
    text-align: center;
    font-size: 16px;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    margin-bottom: 40px;
    padding: 30px;
    background: rgb(248, 249, 250);
    border: 3px solid rgb(206, 212, 218);
    border-radius: 10px;
}

.content-section h2 {
    font-size: 32px;
    font-weight: bold;
    color: rgb(44, 90, 160);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 4px solid rgb(44, 90, 160);
}

.content-section h3 {
    font-size: 24px;
    font-weight: bold;
    color: rgb(76, 132, 207);
    margin-top: 25px;
    margin-bottom: 15px;
}

.content-section p {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: justify;
}

.content-section ul, .content-section ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.content-section li {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* ===== DEFINITION BOX ===== */
.definition-box {
    background: rgb(232, 245, 233);
    border: 3px solid rgb(76, 175, 80);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}

.definition-box h3 {
    color: rgb(27, 94, 32);
    font-weight: bold;
    margin-top: 0;
}

.definition-box p {
    color: rgb(27, 94, 32);
    font-weight: bold;
}

/* ===== FORMULA BOX ===== */
.formula-box {
    background: rgb(227, 242, 253);
    border: 3px solid rgb(33, 150, 243);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}

.formula-box h3 {
    color: rgb(13, 71, 161);
    font-weight: bold;
    margin-top: 0;
}

.formula {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    color: rgb(198, 40, 40);
    background: rgb(255, 255, 255);
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 2px solid rgb(198, 40, 40);
}

.formula-detailed {
    margin-bottom: 25px;
}

.formula-display {
    background: rgb(255, 248, 225);
    border: 3px solid rgb(255, 193, 7);
    border-radius: 10px;
    padding: 20px;
}

.main-formula {
    font-size: 32px;
    font-weight: bold;
    color: rgb(230, 81, 0);
    text-align: center;
}

.formula-highlight {
    background: rgb(255, 243, 205);
    border: 2px solid rgb(255, 152, 0);
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    display: inline-block;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgb(255, 255, 255);
    border: 3px solid rgb(44, 90, 160);
    border-radius: 8px;
    overflow: hidden;
}

table caption {
    font-size: 18px;
    font-weight: bold;
    color: rgb(44, 90, 160);
    padding: 10px;
    background: rgb(227, 242, 253);
}

table thead {
    background: rgb(44, 90, 160);
    color: rgb(255, 255, 255);
}

table th {
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    text-align: left;
    border: 2px solid rgb(255, 255, 255);
}

table td {
    padding: 12px 15px;
    font-size: 15px;
    font-weight: bold;
    border: 2px solid rgb(206, 212, 218);
}

table tbody tr:nth-child(even) {
    background: rgb(248, 249, 250);
}

table tbody tr:hover {
    background: rgb(227, 242, 253);
}

.highlight-row {
    background: rgb(255, 248, 225) !important;
    font-weight: bold;
}

/* ===== ADVANTAGES GRID ===== */
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.advantage-card {
    background: rgb(240, 248, 255);
    border: 3px solid rgb(100, 181, 246);
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-color: rgb(44, 90, 160);
}

.advantage-card h3 {
    color: rgb(13, 71, 161);
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 10px;
}

.advantage-card p {
    color: rgb(33, 37, 41);
    font-weight: bold;
}

/* ===== EXAMPLE BOXES ===== */
.example-box {
    background: rgb(255, 252, 245);
    border: 3px solid rgb(255, 152, 0);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.example-box h3 {
    color: rgb(230, 81, 0);
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
}

.example-content {
    font-weight: bold;
}

.solution-steps {
    background: rgb(255, 255, 255);
    border: 2px solid rgb(206, 212, 218);
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.solution-steps p {
    margin-bottom: 10px;
}

.answer {
    background: rgb(232, 245, 233);
    border: 3px solid rgb(76, 175, 80);
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    font-size: 18px;
    font-weight: bold;
    color: rgb(27, 94, 32);
}

.interpretation {
    background: rgb(227, 242, 253);
    border: 2px solid rgb(33, 150, 243);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.interpretation p {
    color: rgb(13, 71, 161);
    font-weight: bold;
}

/* ===== FLOWCHART ===== */
.flowchart-container {
    background: rgb(255, 255, 255);
    border: 3px solid rgb(44, 90, 160);
    border-radius: 10px;
    padding: 30px;
    margin: 25px 0;
    overflow-x: auto;
}

.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 400px;
}

.flow-item {
    padding: 15px 25px;
    margin: 5px 0;
    border-radius: 8px;
    font-weight: bold;
    text-align: center;
    min-width: 250px;
    max-width: 350px;
}

.flow-item.start, .flow-item.end {
    background: rgb(76, 175, 80);
    color: rgb(255, 255, 255);
    border: 3px solid rgb(27, 94, 32);
    border-radius: 50px;
}

.flow-item.process {
    background: rgb(100, 181, 246);
    color: rgb(255, 255, 255);
    border: 3px solid rgb(13, 71, 161);
}

.flow-item.decision {
    background: rgb(255, 193, 7);
    color: rgb(51, 51, 51);
    border: 3px solid rgb(255, 111, 0);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    padding: 25px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flow-item.calculation {
    background: rgb(156, 39, 176);
    color: rgb(255, 255, 255);
    border: 3px solid rgb(106, 27, 154);
}

.flow-item.output {
    background: rgb(255, 87, 34);
    color: rgb(255, 255, 255);
    border: 3px solid rgb(191, 54, 12);
}

.flow-arrow {
    font-size: 32px;
    font-weight: bold;
    color: rgb(44, 90, 160);
    margin: 5px 0;
}

.flow-split {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.flow-branch {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flow-arrow-side {
    font-size: 32px;
    font-weight: bold;
    color: rgb(44, 90, 160);
}

.flowchart-notes {
    background: rgb(248, 249, 250);
    border: 2px solid rgb(206, 212, 218);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.flowchart-notes h3 {
    color: rgb(44, 90, 160);
    font-weight: bold;
}

.flowchart-notes li {
    font-weight: bold;
}

/* ===== QUESTION BOXES ===== */
.question-box {
    background: rgb(255, 255, 255);
    border: 3px solid rgb(76, 132, 207);
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgb(44, 90, 160);
}

.q-number {
    font-size: 20px;
    font-weight: bold;
    color: rgb(44, 90, 160);
}

.marks {
    background: rgb(76, 175, 80);
    color: rgb(255, 255, 255);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    border: 2px solid rgb(27, 94, 32);
}

.question-content p {
    font-weight: bold;
    margin-bottom: 15px;
}

.answer-section {
    background: rgb(248, 249, 250);
    border: 2px solid rgb(206, 212, 218);
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.answer-highlight {
    background: rgb(255, 243, 205);
    border: 2px solid rgb(255, 193, 7);
    padding: 15px;
    border-radius: 8px;
    font-weight: bold;
    color: rgb(102, 77, 3);
    margin: 15px 0;
    font-size: 18px;
}

/* ===== MIND MAP ===== */
.mindmap-container {
    background: rgb(255, 255, 255);
    border: 3px solid rgb(44, 90, 160);
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
    overflow-x: auto;
}

.mindmap-container svg {
    width: 100%;
    height: auto;
    min-height: 800px;
}

.mindmap-legend {
    background: rgb(248, 249, 250);
    border: 2px solid rgb(206, 212, 218);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.mindmap-legend h3 {
    color: rgb(44, 90, 160);
    font-weight: bold;
    margin-bottom: 15px;
}

.mindmap-legend li {
    font-weight: bold;
    margin-bottom: 8px;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 30px;
    margin-top: 40px;
    background: rgb(44, 90, 160);
    border: 3px solid rgb(26, 58, 107);
    border-radius: 10px;
    color: rgb(255, 255, 255);
}

footer p {
    font-weight: bold;
    margin-bottom: 10px;
}

.disclaimer-footer {
    font-size: 14px;
    font-style: italic;
    margin-top: 15px;
}

/* ===== PRINT STYLES ===== */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .navigation-panel {
        display: none;
    }

    .container {
        border: none;
        box-shadow: none;
        max-width: 100%;
    }

    .content-section {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .example-box, .question-box {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    table {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .nav-buttons button:hover,
    .advantage-card:hover {
        transform: none;
        box-shadow: none;
    }

    /* Ensure all text remains bold in print */
    * {
        font-weight: bold !important;
    }

    /* Print-friendly colors */
    header {
        background: rgb(44, 90, 160) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .formula-box, .definition-box, .example-box, .answer-section {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 28px;
    }

    .content-section h2 {
        font-size: 24px;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-buttons button {
        width: 100%;
    }

    .advantages-grid {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 13px;
    }

    table th, table td {
        padding: 8px;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgb(240, 240, 240);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgb(44, 90, 160);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(26, 58, 107);
}

/* ===== SMOOTH SCROLLING ===== */
html {
    scroll-behavior: smooth;
}

/* ===== ADDITIONAL UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.text-bold {
    font-weight: bold;
}

.margin-top {
    margin-top: 25px;
}

.margin-bottom {
    margin-bottom: 25px;
}