/* News Page Layout */
.news-page {
    padding: 140px 0 80px 0;
    background: #f8fafc;
    min-height: 80vh;
    position: relative; /* Quan trọng để chứa các shape trang trí */
    overflow: hidden;
}

/* Các khối tròn trang trí nền */
.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
}
.shape-1 { width: 400px; height: 400px; background: #6366f1; top: -100px; left: -100px; }
.shape-2 { width: 500px; height: 500px; background: #ec4899; bottom: -100px; right: -100px; }

.container {
    position: relative;
    z-index: 1;
}

/* Header & Watermark */
.section-header {
    position: relative;
    text-align: center;
    margin-bottom: 80px;
}

.section-header::before {
    content: "NEWS & INSIGHTS";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 6rem;
    font-weight: 900;
    color: rgba(99, 102, 241, 0.05);
    white-space: nowrap;
    z-index: -1;
}

.text-gradient {
    background: linear-gradient(135deg, #6366f1, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Grid & Card */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
}

.news-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.5);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(99, 102, 241, 0.15);
}

/* Thumbnail & Category Tag */
.news-thumb {
    height: 260px;
    overflow: hidden;
    position: relative;
}

.news-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 15px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 800;
    color: #6366f1;
    z-index: 2;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: 0.8s ease;
}

.news-card:hover .news-thumb img {
    transform: scale(1.15) rotate(2deg);
}

/* News Body */
.news-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
}

.news-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.news-title a {
    text-decoration: none; color: #0f172a;
    transition: 0.3s;
}

.news-card:hover .news-title a { color: #6366f1; }

.news-excerpt {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Link Hover Effect */
.news-link {
    margin-top: auto;
    font-weight: 800;
    color: #ec4899;
    text-decoration: none;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    transition: 0.3s;
}

.news-link i { margin-left: 8px; transition: 0.3s; }

.news-card:hover .news-link {
    letter-spacing: 1px;
    color: #6366f1;
}

.news-card:hover .news-link i { transform: translateX(5px); }

/* Pagination */
.pagination-wrapper .page-numbers {
    display: inline-block;
    padding: 12px 22px;
    margin: 0 6px;
    background: #fff;
    border-radius: 14px;
    text-decoration: none;
    color: #0f172a;
    font-weight: 700;
    transition: 0.3s;
    border: 1px solid #e2e8f0;
}

.pagination-wrapper .page-numbers.current {
    background: linear-gradient(135deg, #6366f1, #ec4899);
    color: #fff;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    border: none;
}

@media (max-width: 768px) {
    .news-grid { grid-template-columns: 1fr; }
    .section-header::before { font-size: 3rem; }
}

/* Khối bao phủ tiêu đề trên ảnh */
.news-thumb-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    /* Tăng padding bottom để tạo không gian cố định cho tiêu đề */
    padding: 80px 20px 25px; 
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    z-index: 3;
    pointer-events: none;
    /* Chỉ chuyển đổi opacity và vị trí, không thay đổi kích thước khối */
    transition: all 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}

.news-thumb-overlay .news-title {
    margin: 0;
    pointer-events: auto;
    /* Trạng thái bình thường: nằm đúng vị trí */
    transform: translateY(0);
    transition: transform 0.5s ease;
}

.news-thumb-overlay .news-title a {
    color: #ffffff !important;
    font-size: 1.25rem; /* Điều chỉnh kích thước vừa phải */
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    /* Đảm bảo hiển thị đầy đủ tiêu đề */
    display: block; 
    text-decoration: none;
}

/* HIỆU ỨNG HOVER */
/* Khi không hover, chữ sẽ tự động trả về vị trí cũ nhờ transition ở trên */

.news-card:hover .news-thumb-overlay .news-title {
    /* Khi hover, tiêu đề trượt lên nhẹ nhàng 8px */
    transform: translateY(-8px);
}

/* Loại bỏ hoàn toàn tiêu đề cũ ở news-body để tránh khoảng trống */
.news-body .news-title {
    display: none !important;
}

/* Đảm bảo news-body có padding ổn định */
.news-body {
    padding: 25px;
    flex-grow: 1;
    background: #fff; /* Đảm bảo nền trắng che đi các phần thừa nếu có */
}
.news-category {
    display: none !important;
}