/* --- RESET & CHỦ ĐỀ CHUNG --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f8fafc;
    color: #1e293b;
    overflow: hidden;
}

/* --- HEADER --- */
header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 100; /* Tăng z-index để luôn nằm trên cùng */
}

.header-left {
    display: flex;
    align-items: center;
}

/* Nút Hamburger cho Mobile (Mặc định ẩn trên Desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    margin-right: 15px;
    padding: 0 5px;
    line-height: 1;
}

.logo {
    background-color: #38bdf8;
    color: #0f172a;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    margin-right: 15px;
    box-shadow: 0 2px 4px rgba(56, 189, 248, 0.2);
}

.document-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.header-right {
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- KHUNG CHÍNH (CONTAINER) --- */
.container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Lớp phủ mờ nền khi mở Menu trên Mobile */
.sidebar-overlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.5);
    z-index: 80;
    backdrop-filter: blur(2px);
}

/* --- SIDEBAR (KHUNG MENU BÊN TRÁI) --- */
nav {
    width: 320px;
    background-color: #ffffff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    z-index: 90;
    transition: transform 0.3s ease; /* Hiệu ứng trượt mượt mà */
}

.sidebar-header {
    padding: 20px 20px 10px 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #64748b;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 10px;
}

.menu-container {
    flex: 1;
    overflow-y: auto;
    padding: 0 15px 20px 15px;
}

/* Đầu mục lớn (Accordion Header) */
.menu-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e293b;
    padding: 12px 14px;
    background-color: #f1f5f9;
    border: none;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu-category:hover {
    background-color: #e2e8f0;
    color: #0284c7;
}

.menu-category.active-cat {
    background-color: #f0f9ff;
    color: #0284c7;
}

.menu-category::after {
    content: '➔';
    font-size: 0.75rem;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
    color: #64748b;
}

.menu-category.active-cat::after {
    transform: rotate(90deg);
    color: #0284c7;
}

/* Khối chứa các mục con */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
    padding-left: 8px;
    border-left: 2px solid #e2e8f0;
    margin-left: 8px;
}

/* Các nút mục con bên trong */
.menu-item {
    display: block;
    width: 100%;
    padding: 9px 12px;
    margin-top: 4px;
    margin-bottom: 2px;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.9rem;
    color: #475569;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.menu-item:hover {
    background-color: #f8fafc;
    color: #0f172a;
}

.menu-item.active {
    background-color: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
    padding-left: 12px;
}

/* --- MAIN WINDOW (NỘI DUNG CHI TIẾT BÊN PHẢI) --- */
main {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background-color: #ffffff;
    margin: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
}

.content-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.content-section.active {
    display: block;
}

.content-section h2 {
    font-size: 1.8rem;
    color: #0f172a;
    margin-bottom: 5px;
}

.category-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    background-color: #f1f5f9;
    color: #64748b;
    border-radius: 4px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin-bottom: 25px;
}

.desc-box {
    background-color: #f8fafc;
    border-left: 4px solid #cbd5e1;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 25px;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #334155;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.feature-card {
    background-color: #fff;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 8px;
}

.feature-card strong {
    color: #0284c7;
    display: block;
    margin-bottom: 5px;
}

/* KHUNG VIDEO */
.center-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 25px auto;
    width: 100%;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16 / 9;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    background-color: #0284c7;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
}

.btn-link:hover { background-color: #0369a1; }
.btn-link.web-link { background-color: #2563eb; }
.btn-link.web-link:hover { background-color: #1d4ed8; }
.btn-link svg { margin-right: 8px; fill: currentColor; }
.no-link { color: #94a3b8; font-style: italic; font-size: 0.9rem; text-align: center; margin: 20px 0; }

.hotline-footer {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px dashed #cbd5e1;
    color: #64748b;
    font-size: 0.95rem;
}

.hotline-highlight { color: #dc2626; font-weight: bold; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   ⚡ ĐOẠN CSS ĐÁP ỨNG ĐỘC QUYỀN CHO MOBILE & TABLET (RESPONSIVE) ⚡
   ========================================================================== */
@media (max-width: 992px) {
    /* 1. Hiển thị nút bấm Menu trên Header */
    .menu-toggle {
        display: block;
    }

    .document-title {
        font-size: 1.1rem;
    }

    .header-right {
        display: none; /* Ẩn bớt text phụ trên mobile cho thoáng */
    }

    /* 2. Biến đổi Menu bên trái thành dạng Drawer ẩn khuất */
    nav {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        width: 290px;
        transform: translateX(-100%); /* Đẩy toàn bộ menu ra rìa trái màn hình */
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }

    /* Class kích hoạt trượt Menu ra ngoài */
    nav.mobile-open {
        transform: translateX(0);
    }

    /* 3. Khung nội dung chính tràn rộng hết màn hình */
    main {
        margin: 10px;
        padding: 20px;
    }

    .content-section h2 {
        font-size: 1.4rem;
    }

    /* Chuyển grid tính năng thành 1 cột dọc */
    .feature-grid {
        grid-template-columns: 1fr;
    }
}

.two-columns{
    display: flex;
    gap: 20px;
}

.two-columns .column{
    flex: 1;
}