

/* --- 1. CẤU HÌNH & MÀU --- */
:root {
    --primary-blue: #0056b3;   
    --accent-orange: #E64A19;
    --text-color: #333;
    --bg-light: #f9f9f9;
}

main.container {
    padding: 40px 15px;
    max-width: 1140px;
    margin: 0 auto;
    min-height: 500px; 
}

/* Tiêu đề trang Tin Tức */
.page-title {
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 40px;
    font-size: 2.2rem;
    text-transform: uppercase;
    font-weight: 700;
    border-bottom: 3px solid var(--accent-orange);
    display: table;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 10px;
}

/* --- 2. LAYOUT DANH SÁCH BÀI VIẾT --- */
.news-list {
    display: flex;
    flex-direction: column; 
    gap: 30px; 
}

/* --- 3. STYLE TỪNG BÀI VIẾT  --- */
.news-item {
    display: flex; 
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
    border: 1px solid #e0e0e0;
    opacity: 1 !important; 
    transform: none !important;
    visibility: visible !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px) !important; 
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Cột Ảnh (Bên trái) */
.news-thumb-wrapper {
    flex: 0 0 300px;
    position: relative;
    overflow: hidden;
    border-right: 1px solid #eee;
}

.news-thumb {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.news-item:hover .news-thumb {
    transform: scale(1.05); 
}

/* Cột Nội dung (Bên phải) */
.news-content {
    flex: 1; 
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

/* Tiêu đề bài viết */
.news-title {
    margin: 0 0 12px 0;
    font-size: 1.4rem;
    line-height: 1.3;
}

.news-title a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: bold;
    transition: color 0.3s;
}

.news-title a:hover {
    color: var(--accent-orange);
}

/* Thông tin ngày tháng/tác giả */
.news-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.news-meta span {
    margin-right: 20px;
}
.news-meta i {
    color: var(--accent-orange);
    margin-right: 5px;
}

/* Đoạn mô tả ngắn */
.news-excerpt {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Nút Xem chi tiết */
.read-more {
    color: var(--primary-blue);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    width: fit-content;
}

.read-more:hover {
    color: var(--accent-orange);
    border-bottom-color: var(--accent-orange);
}

/* --- 4. RESPONSIVE (MOBILE) --- */
@media (max-width: 768px) {
    .news-item {
        flex-direction: column; 
        height: auto;
    }

    .news-thumb-wrapper {
        flex: none;
        width: 100%;
        height: 200px; 
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .news-content {
        padding: 20px;
    }

    .page-title {
        font-size: 1.8rem;
    }
}
/* Định nghĩa hiệu ứng FadeIn */
@keyframes fadeInText {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Áp dụng cho phần nội dung bài viết */
.news-content {
    animation: fadeInText 1s ease-out forwards; /* Chạy 1 lần khi load trang */
}
