/* ===============================
   CSS CHUNG CHO TIN TỨC / SỰ KIỆN
   Dùng cho: index.php, /tintuc, /sukien, file chi tiết
   =============================== */

/* --------- KHỐI TIN TỨC + SỰ KIỆN Ở TRANG CHỦ (TAB + FEATURE) --------- */

.home-news-wrapper {
    margin: 20px auto 30px;
    max-width: 1000px;
    background: #f7f3e8;
    border: 1px solid #c89a3f;
    box-shadow: 0 0 5px rgba(0,0,0,.2);
    font-size: 13px;
}

/* Thanh tab phía trên */
.home-news-tabs {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid #c89a3f;
    background: #e9d3a4;
}

.home-news-tabs-left {
    display: flex;
    align-items: center;
}

.home-news-tab-link {
    display: inline-block;
    margin-right: 18px;
    padding: 3px 12px;
    border-radius: 14px;
    font-weight: bold;
    color: #ffffff;
    background: #b88a2f;
    text-decoration: none;
}

.home-news-tab-link.active {
    background: #ff9933;
    color: #ffffff;
}

.home-news-more-link {
    margin-left: auto;
    font-weight: bold;
    color: #333333;
    text-decoration: none;
}

.home-news-more-link:hover {
    color: #ff6600;
    text-decoration: underline;
}

/* Khung nội dung bên dưới */
.home-news-box {
    background: #ffffff;
    padding: 8px 10px 10px;
}

.home-news-tab {
    display: none;
}

.home-news-tab.active {
    display: block;
}

/* Bài mới nhất (feature) */
.home-news-feature {
    display: block;
    padding: 6px 4px 8px;
    margin-bottom: 4px;
    text-decoration: none;
    color: #333333;
    background: #fffdf7;
    border-bottom: 1px solid #d4c099;
}

.home-news-feature:hover {
    background: #fdf3df;
    color: #ff6600;
}

.home-news-feature-title-row {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.home-news-feature-title {
    flex: 1;
    font-weight: bold;
}

.home-news-feature-date {
    margin-left: 8px;
    color: #777777;
    flex-shrink: 0;
}

.home-news-feature-main {
    display: flex;
    align-items: flex-start;
}

.home-news-feature-thumb {
    flex-shrink: 0;
    margin-right: 8px;
}

.home-news-feature-thumb img {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border: 1px solid #d4c099;
}

.home-news-feature-text {
    font-size: 12px;
    line-height: 1.4;
    color: #444444;
    max-height: 65px;
    overflow: hidden;
}

/* Danh sách bài còn lại */
.home-news-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-news-item {
    border-bottom: 1px solid #eeeeee;
}

.home-news-item:last-child {
    border-bottom: none;
}

.home-news-item-link {
    display: flex;
    align-items: center;
    padding: 4px 2px;
    text-decoration: none;
    color: #333333;
}

.home-news-item-link:hover {
    background: #f5f5f5;
    color: #ff6600;
}

.home-news-bullet {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff9900;
    margin-right: 8px;
    flex-shrink: 0;
}

.home-news-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-news-date {
    margin-left: 8px;
    flex-shrink: 0;
    color: #777777;
}

.home-news-empty {
    padding: 6px 2px;
    color: #777777;
    font-style: italic;
}

/* Responsive nhẹ cho mobile */
@media (max-width: 600px) {
    .home-news-wrapper {
        max-width: 95%;
    }

    .home-news-feature-main {
        flex-direction: row;
    }

    .home-news-item-link {
        flex-wrap: wrap;
    }

    .home-news-date {
        width: 100%;
        text-align: right;
    }
}

/* --------- KHỐI BẢO TRÌ ĐỊNH KỲ Ở TRANG CHỦ (DÙNG ẢNH) --------- */

.home-maint-wrapper {
    margin: 10px auto 30px;
    max-width: 1000px;
    display: flex;
    justify-content: center;    /* CẢ CỤM 3 KHỐI CĂN GIỮA */
    gap: 8px;
    font-size: 13px;
}

/* GIF "TẢI NGAY" bên trái – ảnh 318x147 */
.home-maint-download {
    flex: 0 0 318px;
    height: 147px;
    background: url("/images/taingayfc99.gif") no-repeat 0 0;
    background-size: 100% 100%;
    display: block;
}

/* Ô bên trái: ảnh Bảo trì định kỳ (khoảng 223x134) */
.home-maint-left {
    flex: 0 0 243px;                    /* đúng theo width của ảnh */
    height: 147px;                      /* đúng theo height của ảnh */
    background: url("/images/maintenance.png") no-repeat 0 0;
    background-size: 100% 100%;
}

/* Ô bên phải: 4 icon, hiển thị 2 hàng 2 cột cố định */
.home-maint-right {
    flex: 0 0 308px;                    /* 2*150 + 8 khoảng cách */
    display: grid;
    grid-template-columns: repeat(2, 150px);
    grid-auto-rows: 70px;
    gap: 8px;
    padding-left: 8px;
    height: 148px;                      /* 70 + 70 + 8 ≈ 148, gần bằng 2 khối bên trái */
}

/* Box chung – đúng kích thước mỗi trạng thái: 130x61 */
.home-maint-item {
    display: block;
    width: 150px;
    height: 70px;
    background-repeat: no-repeat;
    background-position: 0 0;           /* trạng thái thường (nửa trên) */
    background-size: 150px 140px;       /* 2 * 70 = 140, scale từ 130x122 lên */
}

/* Mỗi loại dùng 1 sprite riêng (ảnh trên = normal, ảnh dưới = hover) */
.home-maint-hotro {
    background-image: url("/images/item-1.png");
}
.home-maint-hotro:hover {
    background-position: 0 -70px;
}

.home-maint-anti {
    background-image: url("/images/item-2.png");
}
.home-maint-anti:hover {
    background-position: 0 -70px;
}

.home-maint-feature {
    background-image: url("/images/item-3.png");
}
.home-maint-feature:hover {
    background-position: 0 -70px;
}

.home-maint-guide {
    background-image: url("/images/item-4.png");
}
.home-maint-guide:hover {
    background-position: 0 -70px;
}

/* Responsive nhẹ */
@media (max-width: 800px) {
    .home-maint-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .home-maint-left {
        flex: none;
    }

    .home-maint-right {
        width: 100%;
    }
}



/* --------- TRANG DANH SÁCH TIN TỨC / SỰ KIỆN --------- */
/* Khung bao ngoài cho trang /tintuc và /sukien */
.news-page-wrapper {
    margin: 15px auto;
    max-width: 1150px;       /* list rộng hơn detail */
}

/* Tiêu đề đầu trang (Tin tức mới nhất / Sự kiện mới nhất) */
.news-list-title {
    font-size: 22px;
    font-weight: bold;
    margin: 0 auto 15px auto;
    max-width: 1150px;
    color: #fff;
    background: #111;
    padding: 8px 15px;
    border-radius: 4px;
}

/* Grid 3 cột list */
.news-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.news-list-card {
    display: block;
    width: 32%;
    background: #1e1e1e;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
}
.news-list-thumb {
    width: 100%;
    height: 180px;
    overflow: hidden;
}
.news-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.news-list-body {
    padding: 8px 10px;
}
.news-list-date {
    font-size: 11px;
    opacity: .7;
    margin-bottom: 4px;
}
.news-list-card-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
}
.news-list-short {
    font-size: 12px;
    line-height: 1.3;
    height: 38px;
    overflow: hidden;
}

/* Phân trang */
.news-pagination {
    margin-top: 15px;
    text-align: center;
}
.news-pagination a,
.news-pagination span {
    display: inline-block;
    padding: 4px 8px;
    margin: 0 2px;
    border-radius: 4px;
    background: #222;
    color: #fff;
    text-decoration: none;
}
.news-pagination .current {
    background: #007bff;
}

/* Responsive list */
@media (max-width: 900px) {
    .news-list-card { width: 48%; }
}
@media (max-width: 600px) {
    .news-list-card { width: 100%; }
}

/* --------- TRANG CHI TIẾT BÀI VIẾT --------- */

.news-detail-title {
    font-size: 26px;
    font-weight: bold;
    margin: 0 auto 5px auto;
    max-width: 900px;
    color: #fff;
    background: #111;
    padding: 8px 15px;
    border-radius: 4px;
}

.news-detail-sub {
    font-size: 16px;
    margin: 0 auto 10px auto;
    max-width: 900px;
    color: #ddd;
    background: #222;
    padding: 6px 15px;
    border-radius: 4px;
}

/* banner trong bài */
.news-detail-banner img {
    width: 100%;
    max-width: 900px;
    display: block;
    margin: 0 auto 15px auto;
}

/* meta + nội dung */
.news-detail-meta {
    font-size: 12px;
    margin: 10px auto 15px auto;
    max-width: 900px;
    color: #555;
}

.news-detail-content {
    font-size: 14px;
    line-height: 1.6;
    max-width: 900px;
    margin: 0 auto 20px auto;
    background: #fff;
    padding: 15px 20px;
    border-radius: 4px;
    color: #222;
}

/* nút quay lại */
.news-detail-back {
    text-align: center;
    margin: 20px 0;
}
.news-detail-back a {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    background: #007bff;
    color: #fff;
    text-decoration: none;
}
.news-detail-back a:hover {
    background: #0056b3;
}

/* =================== 2) CSS – DÁN VÀO CUỐI file news.css ===================
   Nếu đang có các class .monphai-* cũ thì xóa chúng đi rồi dán đoạn này
========================================================================= */

/* KHUNG NGOÀI – NỀN XANH ĐẬM */
.monphai-wrapper {
    width: 200px;          /* muốn rộng hơn / hẹp hơn chỉnh số này */
    max-width: 200px;
    margin: 30px auto 60px; /* auto 2 bên => căn GIỮA trang */
    background-color: #132b3a;
    border: 1px solid #285068;
    box-shadow: 0 0 6px rgba(0,0,0,.5);
    padding: 10px 10px;
}

/* KHUNG TRONG ĐỂ DỄ CĂN LỀ */
.monphai-inner {
    width: 200px;
}

/* --------- GIỚI THIỆU MÔN PHÁI Ở TRANG CHỦ --------- */
.monphai-wrapper {
    width: 1000px;
    height: 700px;
    max-width: 1000px;
    margin: 30px auto 30px;     /* auto 2 bên => CĂN GIỮA toàn trang */
    background-color: #DDDDDD;
    border: 0px solid;
    box-shadow: 0 0 0px rgba(0,0,0,0);
    padding: 0px 20px;
}

.monphai-inner {
    width: 100%;
}

/* Bố cục trái / phải */
.monphai-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.monphai-left {
    width: 420px;              /* phần avatar + text bên trái */
}

.monphai-right {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* KHUNG ẢNH NHÂN VẬT – GIỮ NGUYÊN KÍCH THƯỚC ĐANG DÙNG */
.monphai-image-frame {
    position: relative;        /* ĐỂ TAB NẰM ĐÈ LÊN ẢNH */
    width: 1430px;              /* NẾU đang ưng size ảnh thì KHÔNG cần đổi */
    max-width: 100%;
    top: -80px;
}

.monphai-image-frame img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== 4 TAB MÔN PHÁI – NẰM ĐÈ LÊN ẢNH ===== */
.monphai-class-list {
    position: absolute;
    top: 170px;                /* ĐẨY LÊN / XUỐNG: chỉnh số này (âm = cao hơn, dương = thấp hơn) */
    left: 18%;
    transform: translateX(-50%);
    width: 480px;              /* RỘNG CẢ CỤM 4 NÚT – muốn lệch trái/phải thì tăng/giảm */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 32px;            /* khoảng cách dọc / ngang giữa các nút */
    pointer-events: auto;
}

/* Nút tab (khung xanh nhạt) */
.monphai-class-btn {
    width: 209px;
    height: 71px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;

    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #305478;

    background: url("/images/monphai-tab.png") no-repeat center center;
    background-size: contain;
}

.monphai-class-btn span {
    transform: translateY(-2px);   /* chỉnh nhẹ vị trí chữ */
}

/* Hover + đang chọn: dùng ảnh hover */
.monphai-class-btn:hover,
.monphai-class-btn.active {
    background-image: url("/images/monphai-tab-hover.png");
    color: #000;
}

/* AVATAR 3 KHUÔN MẶT */
.monphai-avatars img {
    display: block;
    max-width: 100%;
}

/* Các dòng "Độ khó", "Kỹ năng" */
.monphai-row {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.monphai-label {
    color: #ffffff;
    font-size: 16px;
    min-width: 70px;
}

.monphai-stars {
    color: #ffcc33;
    font-size: 18px;
}

/* Icon kỹ năng */
.monphai-skills img {
    width: 40px;
    height: 40px;
    margin-right: 6px;
    border-radius: 4px;
}

/* Nút CHUYỂN SINH – giữ nguyên nếu đang xài, không xài thì bỏ */
.monphai-btn-wrap {
    margin-top: 30px;
}

.monphai-cs-btn {
    width: 260px;
    height: 64px;
    border: none;
    cursor: pointer;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #2b4b69;
    background: url("/images/monphai-chuyensinh.png") no-repeat center center;
    background-size: contain;
}


/* =================== HẾT PHẦN CSS =================== */
