/* =====================================================
   COPYRIGHT ACT 1957 - CHAPTER IV EDUCATIONAL RESOURCE
   Professional Legal Education Stylesheet
   ===================================================== */

/* CSS Variables for Consistent Theming */
:root {
    --primary-bg: rgb(26, 35, 50);
    --secondary-bg: rgb(36, 48, 68);
    --tertiary-bg: rgb(45, 60, 85);
    --accent-color: rgb(218, 165, 32);
    --accent-light: rgb(255, 215, 100);
    --text-primary: rgb(245, 245, 245);
    --text-secondary: rgb(200, 210, 225);
    --border-color: rgb(70, 90, 120);
    --border-accent: rgb(218, 165, 32);
    --success-color: rgb(46, 204, 113);
    --info-color: rgb(52, 152, 219);
    --warning-color: rgb(241, 196, 15);
    --card-bg: rgb(40, 55, 78);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --flowchart-line: rgb(218, 165, 32);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    color: var(--text-primary);
    line-height: 1.8;
    font-weight: 500;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
}

/* Header Styles */
.main-header {
    background: linear-gradient(180deg, var(--secondary-bg) 0%, var(--tertiary-bg) 100%);
    border-bottom: 4px solid var(--accent-color);
    padding: 30px 0;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.main-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.main-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.main-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Disclaimer Banner */
.disclaimer-banner {
    background: linear-gradient(90deg, rgb(180, 50, 50) 0%, rgb(150, 40, 40) 100%);
    color: var(--text-primary);
    padding: 15px 20px;
    text-align: center;
    font-weight: 700;
    border: 2px solid rgb(200, 70, 70);
    margin: 20px 0;
    border-radius: 8px;
    font-size: 1rem;
}

.disclaimer-banner span {
    color: var(--accent-light);
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding: 25px 0;
    background: var(--secondary-bg);
    border-radius: 12px;
    margin: 20px 0;
    border: 2px solid var(--border-color);
}

.nav-btn {
    background: linear-gradient(180deg, var(--tertiary-bg) 0%, var(--secondary-bg) 100%);
    color: var(--text-primary);
    border: 2px solid var(--accent-color);
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.nav-btn:hover {
    background: var(--accent-color);
    color: var(--primary-bg);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.4);
}

.nav-btn.active {
    background: var(--accent-color);
    color: var(--primary-bg);
}

/* Print Button */
.print-btn {
    background: linear-gradient(180deg, rgb(46, 134, 193) 0%, rgb(36, 104, 153) 100%);
    color: white;
    border: 2px solid rgb(66, 154, 213);
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px auto;
}

.print-btn:hover {
    background: linear-gradient(180deg, rgb(66, 154, 213) 0%, rgb(46, 134, 193) 100%);
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(46, 134, 193, 0.5);
}

.print-icon {
    font-size: 1.3rem;
}

/* Section Styles */
.section {
    background: var(--card-bg);
    border: 3px solid var(--border-color);
    border-radius: 15px;
    margin: 30px 0;
    padding: 30px;
    box-shadow: 0 8px 30px var(--shadow-color);
}

.section:hover {
    border-color: var(--accent-color);
    transition: border-color 0.3s ease;
}

.section-header {
    background: linear-gradient(90deg, var(--tertiary-bg) 0%, var(--secondary-bg) 100%);
    margin: -30px -30px 25px -30px;
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
    border-bottom: 3px solid var(--accent-color);
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.section-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Subsection Styles */
.subsection {
    margin: 25px 0;
    padding: 20px;
    background: rgba(45, 60, 85, 0.5);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 10px 10px 0;
}

.subsection-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subsection-title::before {
    content: "►";
    color: var(--accent-color);
}

/* Content Text */
.content-text {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.9;
    margin-bottom: 15px;
}

.highlight {
    color: var(--accent-light);
    font-weight: 700;
}

/* Bullet Points */
.bullet-list {
    list-style: none;
    padding-left: 20px;
    margin: 15px 0;
}

.bullet-list li {
    position: relative;
    padding: 12px 0 12px 35px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(70, 90, 120, 0.5);
}

.bullet-list li:last-child {
    border-bottom: none;
}

.bullet-list li::before {
    content: "●";
    color: var(--accent-color);
    font-size: 1.2rem;
    position: absolute;
    left: 0;
    top: 12px;
}

.sub-bullet-list {
    list-style: none;
    margin: 10px 0 0 20px;
}

.sub-bullet-list li::before {
    content: "○";
    color: var(--info-color);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-weight: 600;
}

.info-table thead {
    background: linear-gradient(90deg, var(--tertiary-bg) 0%, var(--secondary-bg) 100%);
}

.info-table th {
    padding: 18px 15px;
    text-align: left;
    color: var(--accent-color);
    font-weight: 800;
    font-size: 1.05rem;
    border-bottom: 3px solid var(--accent-color);
}

.info-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 500;
}

.info-table tbody tr:hover {
    background: rgba(218, 165, 32, 0.1);
}

.info-table tbody tr:nth-child(even) {
    background: rgba(45, 60, 85, 0.3);
}

/* Case Law Box */
.case-law-box {
    background: linear-gradient(135deg, rgb(40, 60, 45) 0%, rgb(30, 50, 35) 100%);
    border: 2px solid rgb(46, 204, 113);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.case-law-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: rgb(46, 204, 113);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.case-law-title::before {
    content: "⚖";
    font-size: 1.5rem;
}

.case-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 10px;
}

.case-citation {
    font-size: 1rem;
    font-weight: 600;
    color: rgb(150, 230, 170);
    font-style: italic;
    margin-bottom: 15px;
}

.case-summary {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.8;
}

/* Example Box */
.example-box {
    background: linear-gradient(135deg, rgb(50, 45, 70) 0%, rgb(40, 35, 60) 100%);
    border: 2px solid rgb(155, 89, 182);
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
}

.example-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: rgb(187, 143, 206);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.example-title::before {
    content: "💡";
    font-size: 1.3rem;
}

.example-content {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.8;
}

/* Flowchart Styles */
.flowchart-container {
    padding: 40px 20px;
    overflow-x: auto;
}

.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-width: 600px;
}

.flow-box {
    background: linear-gradient(135deg, var(--tertiary-bg) 0%, var(--secondary-bg) 100%);
    border: 3px solid var(--accent-color);
    border-radius: 12px;
    padding: 20px 30px;
    text-align: center;
    min-width: 280px;
    max-width: 350px;
    font-weight: 700;
    color: var(--text-primary);
    box-shadow: 0 6px 20px var(--shadow-color);
    position: relative;
}

.flow-box.start {
    background: linear-gradient(135deg, rgb(39, 174, 96) 0%, rgb(30, 132, 73) 100%);
    border-color: rgb(46, 204, 113);
}

.flow-box.end {
    background: linear-gradient(135deg, rgb(192, 57, 43) 0%, rgb(142, 42, 32) 100%);
    border-color: rgb(231, 76, 60);
}

.flow-box.process {
    background: linear-gradient(135deg, rgb(41, 128, 185) 0%, rgb(31, 97, 141) 100%);
    border-color: rgb(52, 152, 219);
}

.flow-box.decision {
    background: linear-gradient(135deg, rgb(142, 68, 173) 0%, rgb(108, 52, 131) 100%);
    border-color: rgb(155, 89, 182);
    transform: rotate(0deg);
}

.flow-arrow {
    width: 4px;
    height: 40px;
    background: var(--accent-color);
    position: relative;
}

.flow-arrow::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-top: 15px solid var(--accent-color);
}

.flow-row {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 20px 0;
}

.horizontal-arrow {
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    position: relative;
}

.horizontal-arrow.right::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-left: 15px solid var(--accent-color);
}

.horizontal-arrow.left::after {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 15px solid var(--accent-color);
}

/* Mind Map Styles */
.mindmap-container {
    padding: 40px 20px;
    overflow-x: auto;
}

.mindmap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 900px;
    min-height: 600px;
    position: relative;
}

.mindmap-center {
    background: linear-gradient(135deg, var(--accent-color) 0%, rgb(180, 140, 20) 100%);
    color: var(--primary-bg);
    padding: 25px 35px;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 800;
    text-align: center;
    position: absolute;
    z-index: 10;
    box-shadow: 0 8px 30px rgba(218, 165, 32, 0.5);
    min-width: 180px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mindmap-branch {
    position: absolute;
    background: var(--card-bg);
    border: 3px solid;
    border-radius: 12px;
    padding: 15px 20px;
    font-weight: 700;
    text-align: center;
    min-width: 150px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.mindmap-branch.branch-1 {
    top: 10%;
    left: 5%;
    border-color: rgb(231, 76, 60);
    color: rgb(231, 76, 60);
}

.mindmap-branch.branch-2 {
    top: 10%;
    right: 5%;
    border-color: rgb(46, 204, 113);
    color: rgb(46, 204, 113);
}

.mindmap-branch.branch-3 {
    bottom: 35%;
    left: 2%;
    border-color: rgb(52, 152, 219);
    color: rgb(52, 152, 219);
}

.mindmap-branch.branch-4 {
    bottom: 35%;
    right: 2%;
    border-color: rgb(155, 89, 182);
    color: rgb(155, 89, 182);
}

.mindmap-branch.branch-5 {
    bottom: 10%;
    left: 15%;
    border-color: rgb(241, 196, 15);
    color: rgb(241, 196, 15);
}

.mindmap-branch.branch-6 {
    bottom: 10%;
    right: 15%;
    border-color: rgb(26, 188, 156);
    color: rgb(26, 188, 156);
}

.mindmap-line {
    position: absolute;
    background: var(--border-color);
    height: 3px;
    transform-origin: left center;
    z-index: 1;
}

/* Roadmap Styles */
.roadmap-container {
    padding: 40px 20px;
    overflow-x: auto;
}

.roadmap {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 60px;
}

.roadmap::before {
    content: "";
    position: absolute;
    left: 25px;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--accent-color) 0%, rgb(155, 89, 182) 50%, rgb(52, 152, 219) 100%);
    border-radius: 3px;
}

.roadmap-item {
    position: relative;
    padding: 25px 30px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin: 15px 0;
    margin-left: 40px;
    transition: all 0.3s ease;
}

.roadmap-item:hover {
    border-color: var(--accent-color);
    transform: translateX(10px);
}

.roadmap-item::before {
    content: "";
    position: absolute;
    left: -52px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 4px solid var(--primary-bg);
    box-shadow: 0 0 0 4px var(--accent-color);
}

.roadmap-item:nth-child(odd)::before {
    background: rgb(155, 89, 182);
    box-shadow: 0 0 0 4px rgb(155, 89, 182);
}

.roadmap-item:nth-child(3n)::before {
    background: rgb(52, 152, 219);
    box-shadow: 0 0 0 4px rgb(52, 152, 219);
}

.roadmap-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.roadmap-content {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.7;
}

/* Footer */
.main-footer {
    background: var(--secondary-bg);
    border-top: 4px solid var(--accent-color);
    padding: 30px;
    text-align: center;
    margin-top: 50px;
}

.footer-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.footer-brand {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--accent-color);
    color: var(--primary-bg);
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: 800;
    box-shadow: 0 6px 20px rgba(218, 165, 32, 0.5);
    transition: all 0.3s ease;
    display: none;
    z-index: 999;
}

.back-to-top:hover {
    transform: scale(1.1);
    background: var(--accent-light);
}

.back-to-top.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .main-header {
        position: static;
        background: white;
        border-bottom: 2px solid black;
        box-shadow: none;
    }

    .main-header h1,
    .section-title,
    .subsection-title {
        color: black;
    }

    .nav-buttons,
    .print-btn,
    .back-to-top {
        display: none !important;
    }

    .section {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
        page-break-inside: avoid;
    }

    .section-header {
        background: #f5f5f5;
        border-bottom: 2px solid black;
    }

    .case-law-box,
    .example-box {
        background: #f9f9f9;
        border: 1px solid #333;
    }

    .info-table th,
    .info-table td {
        border: 1px solid #333;
        color: black;
    }

    .flowchart-container,
    .mindmap-container,
    .roadmap-container {
        page-break-inside: avoid;
    }

    .disclaimer-banner {
        background: #f5f5f5;
        color: black;
        border: 2px solid black;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        padding: 15px 20px;
    }

    .main-header h1 {
        font-size: 2rem;
    }

    .section {
        padding: 20px;
    }

    .section-header {
        margin: -20px -20px 20px -20px;
        padding: 20px;
    }

    .mindmap {
        min-width: 100%;
        flex-direction: column;
        gap: 20px;
    }

    .mindmap-center {
        position: relative;
    }

    .mindmap-branch {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
    }
}

@media (max-width: 768px) {
    .main-header h1 {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .main-header h2 {
        font-size: 1.2rem;
    }

    .nav-btn {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .flow-row {
        flex-direction: column;
    }

    .horizontal-arrow {
        width: 4px;
        height: 40px;
    }

    .horizontal-arrow.right::after,
    .horizontal-arrow.left::after {
        right: auto;
        left: 50%;
        top: auto;
        bottom: 0;
        transform: translateX(-50%);
        border-left: 12px solid transparent;
        border-right: 12px solid transparent;
        border-top: 15px solid var(--accent-color);
        border-bottom: none;
    }

    .roadmap {
        padding-left: 40px;
    }

    .roadmap-item {
        margin-left: 25px;
        padding: 20px;
    }

    .roadmap-item::before {
        left: -37px;
        width: 18px;
        height: 18px;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-light);
}