/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.8;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #1a1a1a;
    padding: 20px;
    font-weight: bold;
}

/* Print Button */
.print-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.print-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Navigation Bar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.navbar h2 {
    color: #667eea;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 24px;
}

.nav-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.nav-buttons button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.nav-buttons button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Cover Page */
.cover-page {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: 80px 40px;
    text-align: center;
    border-radius: 20px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    color: white;
}

.cover-page h1 {
    font-size: 32px;
    margin-bottom: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.cover-page h2 {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: bold;
}

.main-title {
    font-size: 42px;
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    font-weight: bold;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
}

.subject-info {
    margin-top: 40px;
    font-size: 18px;
    font-weight: bold;
}

.subject-info p {
    margin: 10px 0;
    font-weight: bold;
}

/* Section Styles */
.section {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    margin-bottom: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.section-title {
    color: #667eea;
    font-size: 32px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 4px solid #667eea;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.chapter-title {
    color: #764ba2;
    font-size: 32px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 4px solid #764ba2;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.sub-heading {
    color: #f5576c;
    font-size: 24px;
    margin: 25px 0 15px 0;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.content p {
    margin-bottom: 15px;
    text-align: justify;
    color: #2d3748;
    font-weight: bold;
    font-size: 16px;
    line-height: 1.9;
}

.content ul,
.content ol {
    margin-left: 30px;
    margin-bottom: 20px;
}

.content li {
    margin-bottom: 12px;
    color: #2d3748;
    font-weight: bold;
    line-height: 1.8;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid #764ba2;
}

td {
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    color: #2d3748;
    font-weight: bold;
    font-size: 15px;
}

tbody tr:nth-child(even) {
    background: #f7fafc;
}

tbody tr:hover {
    background: #edf2f7;
    transform: scale(1.01);
    transition: all 0.3s ease;
}

/* Key Points and Boxes */
.key-points,
.objectives,
.principle-box,
.analysis-box {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    border-left: 5px solid #f5576c;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.key-points h4,
.objectives h4,
.principle-box h4,
.analysis-box h4 {
    color: #c0392b;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 20px;
}

.convention-details {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    color: white;
}

.convention-details h4 {
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.convention-details ul li {
    color: white;
    font-weight: bold;
}

/* Case Law Boxes */
.case-law {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    padding: 25px;
    border-radius: 15px;
    margin: 25px 0;
    border-left: 6px solid #0984e3;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    color: white;
}

.case-law h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.case-law ul li {
    color: #ffffff;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Flowchart */
.flowchart-container {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.flowchart-container h4 {
    color: #2d3748;
    text-align: center;
    margin-bottom: 25px;
    font-weight: bold;
    font-size: 22px;
}

.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.flow-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flow-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    min-width: 300px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    font-size: 15px;
}

.flow-box-decision {
    background: linear-gradient(135deg, #f5576c 0%, #c0392b 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    min-width: 300px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    font-size: 15px;
}

.flow-box-success {
    background: linear-gradient(135deg, #55efc4 0%, #00b894 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    min-width: 250px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    font-size: 15px;
}

.flow-box-rejected {
    background: linear-gradient(135deg, #fab1a0 0%, #e17055 100%);
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    min-width: 250px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    font-size: 15px;
}

.arrow {
    font-size: 32px;
    color: #2d3748;
    font-weight: bold;
    margin: 5px 0;
}

.arrow-split {
    display: flex;
    gap: 100px;
    font-size: 32px;
    color: #2d3748;
    font-weight: bold;
    margin: 10px 0;
}

.flow-split {
    display: flex;
    gap: 50px;
    justify-content: center;
}

/* Mind Map */
.mindmap-container {
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.mindmap-container h4 {
    color: #2d3748;
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
    font-size: 24px;
}

.mindmap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.mindmap-center {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px 40px;
    border-radius: 50px;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.mindmap-branches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    width: 100%;
}

.branch {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 3px solid #764ba2;
}

.branch-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 18px;
}

.branch-items {
    color: #2d3748;
}

.branch-items div {
    padding: 8px;
    margin: 5px 0;
    border-left: 3px solid #667eea;
    padding-left: 15px;
    font-weight: bold;
    font-size: 14px;
}

/* Recommendations */
.recommendations {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.recommendations h4 {
    color: #c0392b;
    margin: 20px 0 10px 0;
    font-weight: bold;
    font-size: 20px;
}

/* Bibliography */
.bibliography-list {
    list-style-position: inside;
    margin-left: 0;
}

.bibliography-list li {
    margin-bottom: 15px;
    padding-left: 10px;
    color: #2d3748;
    font-weight: bold;
    line-height: 1.8;
}

/* Q&A Section */
.qa-section {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
}

.qa-intro {
    text-align: center;
    font-size: 18px;
    margin-bottom: 25px;
    color: #c0392b;
    font-weight: bold;
}

.qa-item {
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.qa-question {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 25px;
    text-align: left;
    cursor: pointer;
    font-size: 17px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.qa-question:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateX(5px);
}

.toggle-icon {
    font-size: 28px;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.qa-question.active .toggle-icon {
    transform: rotate(45deg);
}

.qa-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #f7fafc;
}

.qa-answer.show {
    max-height: 1000px;
    padding: 20px 25px;
}

.qa-answer p {
    color: #2d3748;
    font-weight: bold;
    line-height: 1.9;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    text-align: center;
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.footer p {
    margin: 10px 0;
    font-weight: bold;
    font-size: 16px;
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
        color: black;
    }

    .print-btn,
    .navbar {
        display: none;
    }

    .section {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
        background: white;
    }

    .cover-page {
        page-break-after: always;
        background: white;
        color: black;
        border: 2px solid black;
    }

    .section-title,
    .chapter-title {
        color: black;
        border-bottom-color: black;
    }

    .sub-heading {
        color: black;
    }

    table {
        page-break-inside: avoid;
    }

    thead {
        background: #ddd !important;
        color: black !important;
    }

    .qa-answer {
        max-height: none !important;
        display: block;
        padding: 15px;
    }

    .qa-question {
        background: #ddd;
        color: black;
    }

    .flow-box,
    .flow-box-decision,
    .flow-box-success,
    .flow-box-rejected {
        background: white;
        color: black;
        border: 2px solid black;
    }

    .mindmap-center,
    .branch-title {
        background: #ddd;
        color: black;
    }

    .case-law,
    .convention-details {
        background: white;
        color: black;
        border: 2px solid black;
    }

    .case-law h4,
    .case-law ul li,
    .convention-details h4,
    .convention-details ul li {
        color: black;
    }

    .key-points,
    .objectives,
    .principle-box,
    .analysis-box,
    .recommendations {
        background: white;
        color: black;
        border: 2px solid black;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .section {
        padding: 20px;
    }

    .cover-page {
        padding: 40px 20px;
    }

    .main-title {
        font-size: 28px;
    }

    .section-title,
    .chapter-title {
        font-size: 24px;
    }

    .sub-heading {
        font-size: 20px;
    }

    .nav-buttons {
        flex-direction: column;
    }

    .nav-buttons button {
        width: 100%;
    }

    table {
        font-size: 13px;
    }

    .flow-box,
    .flow-box-decision,
    .flow-box-success,
    .flow-box-rejected {
        min-width: 200px;
        font-size: 14px;
    }

    .mindmap-branches {
        grid-template-columns: 1fr;
    }

    .flow-split {
        flex-direction: column;
        gap: 20px;
    }

    .arrow-split {
        gap: 50px;
    }
}