/* --- Tổng thể và Background (ĐÃ FIX SÁNG HƠN) --- */
.news-page-content {
    padding-top: 150px; /* Đẩy nội dung xuống dưới Header */
    min-height: 100vh;
    /* --- PHẦN FIX SÁNG --- */
    /* Giảm opacity của lớp phủ đen (từ 0.9 xuống 0.6 và 0.7) */
    background: linear-gradient(rgba(18, 18, 18, 0.6), rgba(18, 18, 18, 0.7)), 
                url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=2072'); 
    /* -------------------- */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Tạo hiệu ứng cuộn trang ảnh đứng yên (Parallax) */
    position: relative;
    color: #fff;
    overflow: hidden; /* Đảm bảo hiệu ứng reveal không bị lỗi */
}

/* Thêm lớp giả để tạo hiệu ứng hạt liti (noise) cho sang trọng */
.news-page-content::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png'); /* Pattern hạt bụi nhẹ */
    opacity: 0.15; /* Tăng nhẹ độ rõ của hạt cho nền sáng */
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Hero Section (Đầu trang) --- */
.news-hero {
    padding: 60px 0 80px; /* Giảm padding vì header đã có padding-top */
    text-align: center;
}

.news-hero h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.news-hero h1 span {
    background: linear-gradient(90deg, #FFAD06 0%, #FF6600 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.news-hero p {
    color: #ccc; /* Làm chữ p sáng hơn một chút trên nền sáng */
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Grid bài viết --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px;
    margin-top: 20px; /* Điều chỉnh lại margin top cho phù hợp */
}

/* --- Thẻ bài viết (Card) --- */
.news-card {
    /* Nền thẻ vẫn giữ tối để nổi bật trên nền trang sáng hơn */
    background: rgba(29, 29, 29, 0.9);
    backdrop-filter: blur(10px); /* Hiệu ứng kính mờ (Glassmorphism) */
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Làm viền thẻ rõ hơn một chút */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

/* Hiệu ứng Reveal khi cuộn (đã có script ở archive.php) */
.news-card.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.news-card.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.news-card:hover {
    transform: translateY(-12px);
    border-color: #FF6600;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

/* --- Hình ảnh bài viết --- */
.news-thumb {
    width: 100%;
    height: 240px;
    overflow: hidden;
    display: block;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover .news-thumb img {
    transform: scale(1.1);
}

/* --- Nội dung bài viết --- */
.news-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    color: #FF6600;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
}

.news-title {
    margin: 0 0 15px 0;
    font-size: 22px;
    line-height: 1.4;
}

.news-title a {
    color: #FFFFFF;
    text-decoration: none;
    transition: 0.3s;
}

.news-title a:hover {
    color: #FFAD06;
}

.news-excerpt {
    color: #AAAAAA;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
}

/* --- Phân trang (Pagination) --- */
.news-pagination {
    margin-top: 80px;
    text-align: center;
}

.news-pagination .page-numbers {
    display: inline-block;
    width: 45px;
    height: 45px;
    line-height: 45px;
    background: #1D1D1D;
    color: #FFF;
    text-decoration: none;
    border-radius: 50%;
    margin: 0 5px;
    border: 1px solid #333;
    transition: 0.3s;
    font-weight: 600;
}

.news-pagination .page-numbers:hover,
.news-pagination .current {
    background: linear-gradient(90deg, #FFAD06 0%, #FF6600 100%);
    border-color: transparent;
    color: #FFF;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    .news-hero h1 { font-size: 38px; }
}

@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    .news-hero { padding: 80px 0 60px; }
    .news-grid { margin-top: 0; } /* Bỏ margin âm trên mobile */
}

/* 1. Đảm bảo thẻ card có position: relative */
.news-card {
    position: relative; /* Bắt buộc để stretched-link hoạt động đúng phạm vi thẻ */
    background: rgba(29, 29, 29, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

/* 2. Tạo lớp phủ click toàn bộ thẻ */
.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

