/* --- BỐ CỤC CHUNG --- */
.YoutubeVideoList_default2 {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    box-sizing: border-box;
}

.YoutubeVideoList_default2 * {
    box-sizing: border-box;
    
}

/* --- TIÊU ĐỀ KHU VỰC --- */
.YoutubeVideoList .VideoHeader {
    list-style-type: none;
    margin: 0 0 20px 0;
    display: flex;
    border-bottom: 2px solid #da251d; /* ÄÆ°á»ng viá»n dÆ°á»›i mÃ u Ä‘á» */
    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;
    background: linear-gradient(90deg, #da251d 0%, #b71c1c 100%);
}

.YoutubeVideoList .VideoHeader .Text {
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    text-transform: uppercase;
}

/* --- DANH SÁCH LƯỚI VIDEO (GRID) --- */
.YoutubeVideoList .VideoList {
    display: grid;
    /* Tự động chia cột: mỗi cột tối thiểu 250px, tối đa 1 phần đều nhau */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px; /* Khoảng cách giữa các video */
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* --- TỪNG THẺ VIDEO --- */
.YoutubeVideoList .VideoItem {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hiệu ứng nổi lên khi di chuột (hover) */
.YoutubeVideoList .VideoItem:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Ảnh thu nhỏ video */
.YoutubeVideoList .VideoItem .image img {
    width: 100%;
    height: 200px;
    aspect-ratio: 16 / 9; /* Giữ tỷ lệ chuẩn của video Youtube */
    object-fit: cover;    /* Đảm bảo ảnh không bị méo */
    display: block;       /* Xóa khoảng trống thừa dưới đáy ảnh */
    border-bottom: 1px solid #f0f0f0;
}

/* Tiêu đề video */
.YoutubeVideoList .VideoItem .title {
    padding: 15px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    line-height: 1.5;
    
    /* Cắt ngắn tiêu đề nếu vượt quá 2 dòng */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Đổi màu tiêu đề khi hover vào cả khung video */
.YoutubeVideoList .VideoItem:hover .title {
    color: #da251d;
}

/* --- PHÂN TRANG (PAGINATION) --- */
/* Chọn thẻ span chứa các nút phân trang (sử dụng selector tìm ID có chứa chữ '_pageVideo') */
.YoutubeVideoList span[id*="_pageVideo"] {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

/* Định dạng chung cho các nút phân trang */
.YoutubeVideoList .CurrentPage,
.YoutubeVideoList .NumberPage {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    text-decoration: none;
    color: #333333;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s;
}

/* Nút trang hiện tại đang đứng */
.YoutubeVideoList .CurrentPage {
    background-color: #da251d;
    color: #ffffff;
    border-color: #da251d;
    font-weight: bold;
}

/* Hiệu ứng di chuột vào các trang khác */
.YoutubeVideoList .NumberPage:hover {
    background-color: #f0f0f0;
    color: #da251d;
    border-color: #da251d;
}