/* Thiết lập cơ bản cho toàn bộ khu vực Tab Video */
.VideoTab_Default {
    font-family: Arial, Helvetica, sans-serif;
    max-width: 1200px; /* Độ rộng tối đa của khu vực */
    margin: 0 auto;    /* Căn giữa trang */
    color: #333;
    box-sizing: border-box;
}

.VideoTab_Default * {
    box-sizing: border-box; /* Đảm bảo padding không làm tăng kích thước phần tử */
}

/* 1. ĐỊNH DẠNG THANH TAB */
.VideoTabControl .TabList {
    list-style-type: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    border-bottom: 2px solid #da251d; /* Đường viền dưới màu đỏ */
}

.VideoTabControl .TabList li {
    padding: 12px 24px;
    background-color: #f1f1f1;
    margin-right: 5px;
    border-radius: 8px 8px 0 0; /* Bo tròn 2 góc trên */
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.VideoTabControl .TabList li:hover {
    background-color: #e2e2e2;
}

/* Làm nổi bật Tab đang được chọn */
.VideoTabControl .TabList li.TabActive {
    background: linear-gradient(90deg, #da251d 0%, #b71c1c 100%);
    color: #ffffff;
}

.VideoTabControl .TabList li a {
    color: inherit;
    text-decoration: none;
}

/* 2. ĐỊNH DẠNG BẢNG LƯỚI VIDEO (GRID) */
.TableContainer {
    border-collapse: collapse;
    width: 100%;
    table-layout: fixed; /* Ép các cột có chiều rộng bằng nhau */
}

.TableContainer td.VideoItem {
    padding: 10px;
    vertical-align: top;
}

/* 3. TRANG TRÍ TỪNG THẺ VIDEO (CARD) */
.VideoItem .ItemWrap {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Hiệu ứng nổi lên khi di chuột vào video */
.VideoItem .ItemWrap:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.VideoItem .Link {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
}

/* Ảnh thu nhỏ của video */
.VideoItem .image {
    width: 100%;
    height: 200px; /* Chiều cao cố định để các khối đều nhau */
    object-fit: cover; /* Cắt cúp ảnh cho vừa vặn, không bị méo */
    border-bottom: 1px solid #eeeeee;
}

/* Tiêu đề video */
.VideoItem .Title {
    padding: 15px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 500;
    text-align: justify;
    
    /* Giới hạn tiêu đề tối đa 4 dòng, phần thừa sẽ biến thành dấu ... */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hiệu ứng đổi màu tiêu đề khi hover */
.VideoItem .ItemWrap:hover .Title {
    color: #0056b3;
}

/* 4. ĐỊNH DẠNG PHÂN TRANG (PAGINATION) */
.PageWrap {
    list-style-type: none;
    padding: 0;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    display: none;
}

.PageWrap .PageTitle {
    font-weight: bold;
    font-size: 16px;
}

.PageWrap .Pager span {
    padding: 8px 15px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: background-color 0.3s;
}

.PageWrap .Pager span:hover {
    background-color: #eaeaea;
}

/* Đánh dấu trang hiện tại */
.PageWrap .Pager span.CurrenPage {
    background-color: #da251d;
    color: white;
    border-color: #da251d;
    font-weight: bold;
}

/* 5. THÍCH ỨNG THIẾT BỊ DI ĐỘNG (RESPONSIVE) */
@media (max-width: 768px) {
    .TableContainer, 
    .TableContainer tbody, 
    .TableContainer tr, 
    .TableContainer td {
        display: block;
        width: 100%;
    }
    .VideoItem .image {
        height: auto;
        aspect-ratio: 16 / 9; /* Giữ tỷ lệ chuẩn của video trên mobile */
    }
}