/* --- KHUNG BAO NGOÃ€I --- */
.SimilarArticleControl {
    background: #ffffff;
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #e5e5e5; /* ThÃªm viá»n nháº¹ cho khung */
    border-radius: 4px;
}

/* --- TIÃŠU Äá»€ MODULE (áº¨n vÃ¬ HTML Ä‘á»ƒ trá»‘ng, náº¿u cÃ³ ná»™i dung sáº½ hiá»‡n) --- */
.SimilarArticleControl .ModuleTitle {
    color: #0868b2;
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 20px;
     font-family: arial;
}

/* --- DANH SÃCH BÃ€I VIáº¾T (GRID) --- */
.SimilarArticleControl ul.ArticleList {
    display: grid;
    /* Chia 3 cá»™t Ä‘á»u nhau trÃªn Desktop */
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- Tá»ªNG BÃ€I VIáº¾T (ITEM) --- */
.SimilarArticleControl .ArticleList .GridItem {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.SimilarArticleControl .ArticleList .GridItem:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-3px);
    border-color: #0868b2; /* Viá»n Ä‘á» khi hover */
}

/* HÃ¬nh áº£nh */
.SimilarArticleControl .ArticleList .GridItem .ArticleImage {
    width: 100%;
    height: 180px; /* Chiá»u cao cá»‘ Ä‘á»‹nh */
    object-fit: cover; /* Cáº¯t áº£nh Ä‘áº¹p */
    display: block;
}

/* TiÃªu Ä‘á» bÃ i viáº¿t */
.SimilarArticleControl .ArticleList .GridItem .ArticleTitle {
    padding: 10px 15px;
    font-family: Arial, serif;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    line-height: 1.4;
    text-align: left;
    overflow: hidden;
}

/* Link bao ngoÃ i */
.SimilarArticleControl a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.SimilarArticleControl .ArticleList .GridItem:hover .ArticleTitle {
    color: #0868b2; /* Chá»¯ Ä‘á» khi hover */
}

/* --- PHÃ‚N TRANG (PAGING) --- */
/* Target Ä‘Ãºng class .paging trong HTML cá»§a báº¡n */
.SimilarArticleControl .paging {
    margin-top: 30px;
    text-align: center; /* CÄƒn giá»¯a ná»™i dung text */
    width: 100%;
    float: none !important; /* Ghi Ä‘Ã¨ float: right cÅ© */
    display: flex;
    justify-content: center; /* CÄƒn giá»¯a flex items */
    padding-top: 20px;
    border-top: 1px solid #eee; /* ÄÆ°á»ng káº» phÃ¢n cÃ¡ch */
}

/* Container chá»©a cÃ¡c nÃºt sá»‘ (span id="..._pager") */
.SimilarArticleControl .paging > span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px; /* Khoáº£ng cÃ¡ch giá»¯a cÃ¡c nÃºt */
}

/* Style chung cho nÃºt trang (Tháº» a vÃ  span con) */
.SimilarArticleControl .paging .ButtonPage,
.SimilarArticleControl .paging .CurrentPage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;  /* KÃ­ch thÆ°á»›c nÃºt */
    height: 35px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

/* NÃºt bÃ¬nh thÆ°á»ng (ButtonPage) */
.SimilarArticleControl .paging .ButtonPage {
    background-color: #f1f3f5; /* Ná»n xÃ¡m nháº¡t */
    color: #333;
    border: 1px solid #dee2e6;
}

.SimilarArticleControl .paging .ButtonPage:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #000;
}

/* Trang hiá»‡n táº¡i (CurrentPage) */
.SimilarArticleControl .paging .CurrentPage {
    background-color: #0868b2; /* Ná»n Ä‘á» chá»§ Ä‘áº¡o */
    color: #fff;
    border: 1px solid #0868b2;
}

/* --- RESPONSIVE --- */

/* Tablet (DÆ°á»›i 1024px) */
@media only screen and (max-width: 1024px) {
    .SimilarArticleControl ul.ArticleList {
        grid-template-columns: repeat(2, 1fr); /* 2 cá»™t */
    }
}

/* Mobile (DÆ°á»›i 768px) */
@media only screen and (max-width: 768px) {
    .SimilarArticleControl ul.ArticleList {
        grid-template-columns: 1fr; /* 1 cá»™t */
    }
    
    .SimilarArticleControl .ArticleList .GridItem {
        flex-direction: row; /* áº¢nh trÃ¡i, chá»¯ pháº£i */
        height: auto;
        align-items: center;
    }
    
    .SimilarArticleControl .ArticleList .GridItem .ArticleImage {
        width: 120px;
        height: 90px;
        flex-shrink: 0;
    }
    
    .SimilarArticleControl .ArticleList .GridItem .ArticleTitle {
        font-size: 14px;
        padding: 10px;
        -webkit-line-clamp: 2; /* Chá»‰ hiá»‡n 2 dÃ²ng */
    }
}