/* --- Cài đặt chung & Font chữ --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&family=Lora:wght@700&display=swap');

:root {
    --primary-color: #2c3e50; /* Xanh đen */
    --secondary-color: #3498db; /* Xanh dương */
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #333333;
    --heading-font: 'Lora', serif;
    --body-font: 'Roboto', sans-serif;
}

body {
    font-family: var(--body-font);
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    margin: 0;
}

/* --- Bố cục chính của Section --- */
.report-section {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px 40px;
    background-color: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* --- Tiêu đề & Header --- */
.report-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.report-header .subtitle {
    font-size: 1.8rem;
    color: var(--secondary-color);
    font-family: var(--heading-font);
    margin: 0;
}

.report-header .main-title {
    font-size: 2.8rem;
    color: var(--primary-color);
    font-family: var(--heading-font);
    margin: 10px 0;
}

.report-header .author {
    font-style: italic;
    color: #777;
}

/* --- Các phần nội dung --- */
.report-part {
    margin-bottom: 60px;
}

.report-part h4 {
    font-size: 1.8rem;
    font-family: var(--heading-font);
    color: var(--primary-color);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    margin-bottom: 25px;
}

/* --- Bảng dữ liệu (Responsive) --- */
.table-container {
    overflow-x: auto; /* Tạo thanh cuộn ngang trên màn hình nhỏ */
    border: 1px solid #ddd;
    border-radius: 8px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap; /* Ngăn text xuống dòng đột ngột */
}

.report-table th, .report-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.report-table thead th {
    background-color: #f2f2f2;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.report-table tbody tr:hover {
    background-color: #f9f9f9;
}

/* --- Các vụ án điển hình (Case Study) --- */
.case-study-grid {
    display: grid;
    grid-template-columns: 1fr; /* Mặc định 1 cột cho mobile */
    gap: 40px;
}

/* Trên màn hình lớn hơn, hiển thị 2 cột */
@media (min-width: 992px) {
    .case-study-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.case-study-item {
    background: #fdfdfd;
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.case-study-item .case-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.case-study-item .image-wrapper {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.case-study-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--secondary-color);
}

.case-study-item .case-header h5 {
    font-size: 1.5rem;
    font-family: var(--heading-font);
    margin: 0;
    color: var(--primary-color);
}

.case-study-item h6 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    margin: 15px 0 5px 0;
    border-left: 4px solid var(--secondary-color);
    padding-left: 10px;
}

.case-study-item ul {
    padding-left: 20px;
    margin: 0;
}

strong {
    color: var(--primary-color);
}

/* --- Phần khuyến nghị --- */
.recommendations ul {
    list-style-type: '✔ ';
    padding-left: 20px;
}

/* --- Nút nhấn & Popup nguồn trích dẫn --- */
.citation-container {
    text-align: center;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

#citation-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#citation-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

/* Style cho Popup (Modal) */
.modal-overlay {
    display: none; /* Ẩn mặc định */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.4s;
}

.modal-content h4 {
    margin-top: 0;
    color: var(--primary-color);
    font-family: var(--heading-font);
}

.modal-content ul {
    list-style: none;
    padding: 0;
}
.modal-content li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.modal-content a {
    color: var(--secondary-color);
    text-decoration: none;
}
.modal-content a:hover {
    text-decoration: underline;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* --- Responsive cho thiết bị nhỏ --- */
@media (max-width: 768px) {
    .report-section {
        padding: 15px;
        margin: 15px;
    }
    .report-header .main-title {
        font-size: 2rem;
    }
    .case-study-item .case-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}