/* Materials Pricing Methods - Professional Stylesheet */

/* Color Scheme using RGB values */
:root {
    --primary-bg: rgb(245, 248, 250);
    --secondary-bg: rgb(255, 255, 255);
    --primary-border: rgb(52, 73, 94);
    --accent-color: rgb(41, 128, 185);
    --header-bg: rgb(44, 62, 80);
    --text-color: rgb(33, 33, 33);
    --table-header: rgb(52, 152, 219);
    --table-alt-row: rgb(236, 240, 241);
    --success-color: rgb(39, 174, 96);
    --warning-color: rgb(243, 156, 18);
    --danger-color: rgb(231, 76, 60);
    --info-color: rgb(142, 68, 173);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 16px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--secondary-bg);
    border: 3px solid var(--primary-border);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--header-bg), var(--accent-color));
    color: white;
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 2px solid var(--primary-border);
}

header h1 {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    opacity: 0.95;
}

.disclaimer {
    background-color: rgba(243, 156, 18, 0.2);
    padding: 15px;
    border-radius: 5px;
    border: 2px solid var(--warning-color);
    margin-top: 20px;
    font-weight: bold;
}

/* Print Button */
.print-section {
    text-align: center;
    margin: 20px 0;
}

.print-btn {
    background-color: var(--success-color);
    color: white;
    border: 2px solid rgb(30, 130, 76);
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.print-btn:hover {
    background-color: rgb(30, 130, 76);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Table of Contents */
.toc {
    background-color: rgb(236, 240, 241);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 3px solid var(--primary-border);
}

.toc h2 {
    font-size: 28px;
    font-weight: bold;
    color: var(--header-bg);
    margin-bottom: 20px;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 10px;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin: 12px 0;
}

.toc button {
    background-color: var(--accent-color);
    color: white;
    border: 2px solid rgb(31, 97, 141);
    padding: 12px 20px;
    width: 100%;
    text-align: left;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toc button:hover {
    background-color: rgb(31, 97, 141);
    transform: translateX(10px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Content Sections */
.content-section {
    margin: 40px 0;
    padding: 30px;
    background-color: var(--secondary-bg);
    border: 3px solid var(--primary-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
    font-size: 32px;
    font-weight: bold;
    color: var(--header-bg);
    margin-bottom: 25px;
    border-bottom: 4px solid var(--accent-color);
    padding-bottom: 10px;
}

.content-section h3 {
    font-size: 24px;
    font-weight: bold;
    color: var(--accent-color);
    margin: 25px 0 15px 0;
    border-left: 5px solid var(--accent-color);
    padding-left: 15px;
}

.content-section h4 {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-color);
    margin: 20px 0 10px 0;
}

.content-section h5 {
    font-size: 18px;
    font-weight: bold;
    color: var(--accent-color);
    margin: 15px 0 10px 0;
}

.content-section p {
    font-weight: 600;
    margin-bottom: 15px;
    text-align: justify;
}

.content-section ul, .content-section ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.content-section li {
    font-weight: 600;
    margin-bottom: 10px;
}

/* Info Box */
.info-box {
    background-color: rgb(232, 245, 253);
    padding: 20px;
    border-left: 5px solid var(--accent-color);
    border-radius: 5px;
    margin: 20px 0;
    border: 2px solid var(--accent-color);
}

.info-box ul {
    margin-left: 20px;
}

/* Formula Box */
.formula-box {
    background-color: rgb(255, 243, 224);
    padding: 20px;
    border: 3px solid var(--warning-color);
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

.formula-box p {
    font-size: 20px;
    font-weight: bold;
    color: var(--danger-color);
}

/* Flowchart */
.flowchart {
    background-color: rgb(240, 248, 255);
    padding: 20px;
    border: 3px solid var(--accent-color);
    border-radius: 8px;
    margin: 20px 0;
}

.flowchart h4 {
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.flow-item {
    background-color: white;
    padding: 15px;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    color: var(--header-bg);
}

/* Problem Box */
.problem-box {
    background-color: rgb(255, 250, 240);
    padding: 25px;
    border: 3px solid var(--warning-color);
    border-radius: 8px;
    margin: 25px 0;
}

.problem-box h4 {
    color: var(--danger-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.problem-box p {
    font-weight: bold;
}

.problem-box strong {
    color: var(--header-bg);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    border: 3px solid var(--primary-border);
    border-radius: 8px;
    overflow: hidden;
}

table thead {
    background-color: var(--table-header);
    color: white;
}

table th {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid rgb(31, 97, 141);
}

table td {
    padding: 12px;
    text-align: center;
    font-weight: bold;
    border: 1px solid rgb(189, 195, 199);
}

table tbody tr:nth-child(even) {
    background-color: var(--table-alt-row);
}

table tbody tr:hover {
    background-color: rgb(212, 239, 252);
    transition: background-color 0.3s ease;
}

.solution-table {
    font-size: 14px;
}

.comparison-table th {
    background-color: var(--info-color);
}

/* Advantages and Limitations */
.adv-limit-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

.advantages, .limitations {
    padding: 20px;
    border-radius: 8px;
    border: 3px solid;
}

.advantages {
    background-color: rgb(232, 248, 245);
    border-color: var(--success-color);
}

.advantages h4 {
    color: var(--success-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.limitations {
    background-color: rgb(254, 242, 242);
    border-color: var(--danger-color);
}

.limitations h4 {
    color: var(--danger-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.adv-limit-box ul {
    margin-left: 20px;
}

.adv-limit-box li {
    margin-bottom: 12px;
}

/* Q&A Section */
.qa-box {
    background-color: rgb(250, 250, 255);
    padding: 25px;
    border: 3px solid var(--accent-color);
    border-radius: 8px;
    margin: 25px 0;
}

.qa-box h4 {
    color: var(--header-bg);
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 18px;
}

.qa-box p {
    font-weight: bold;
    margin-bottom: 15px;
}

.answer {
    background-color: rgb(245, 255, 245);
    padding: 20px;
    border-left: 5px solid var(--success-color);
    border-radius: 5px;
    margin-top: 15px;
}

.answer h5 {
    color: var(--success-color);
    font-weight: bold;
    margin-bottom: 12px;
}

.answer p {
    font-weight: 600;
}

.answer ul {
    margin-left: 25px;
}

.answer li {
    font-weight: 600;
    margin-bottom: 10px;
}

/* Mind Map */
.mindmap-container {
    background-color: white;
    padding: 20px;
    border: 3px solid var(--primary-border);
    border-radius: 8px;
    margin: 25px 0;
    overflow-x: auto;
}

.mindmap-container svg {
    width: 100%;
    height: auto;
    display: block;
}

.mindmap-note {
    font-weight: bold;
    font-style: italic;
    color: var(--accent-color);
    margin-top: 15px;
    padding: 15px;
    background-color: rgb(232, 245, 253);
    border-left: 5px solid var(--accent-color);
    border-radius: 5px;
}

/* Footer */
footer {
    background-color: var(--header-bg);
    color: white;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    margin-top: 40px;
    border: 2px solid var(--primary-border);
}

footer p {
    font-weight: bold;
    margin-bottom: 15px;
    line-height: 1.8;
}

.copyright {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 15px;
}

/* Print Styles */
@media print {
    body {
        background-color: white;
    }

    .container {
        border: none;
        box-shadow: none;
    }

    .print-section {
        display: none;
    }

    .toc button {
        background-color: white;
        color: black;
        border: 2px solid black;
    }

    .content-section {
        page-break-inside: avoid;
    }

    table {
        page-break-inside: avoid;
    }

    .problem-box {
        page-break-inside: avoid;
    }

    .qa-box {
        page-break-inside: avoid;
    }

    header {
        background: var(--header-bg);
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .mindmap-container svg {
        max-height: 800px;
    }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 28px;
    }

    .subtitle {
        font-size: 16px;
    }

    .content-section h2 {
        font-size: 24px;
    }

    .content-section h3 {
        font-size: 20px;
    }

    .adv-limit-box {
        grid-template-columns: 1fr;
    }

    table {
        font-size: 12px;
    }

    table th, table td {
        padding: 8px;
    }

    .mindmap-container {
        overflow-x: scroll;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgb(236, 240, 241);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--header-bg);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background-color: var(--accent-color);
    color: white;
}