/* ==================== TIN TỨC & CHIA SẺ ==================== */
:root {
    --primary-color: #2d5a27;
}

.news-section {
    padding: 60px 0;
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-badge {
    text-align: center;
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 40px;
}

/* News Grid - Tự động co giãn */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding: 20px;
}

.news-item {
    display: flex;
    flex-direction: column; /* Quan trọng: Ảnh trên, nội dung dưới */
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    height: 100%;
}

.news-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.15);
}

/* Hình ảnh Responsive */
.news-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10; /* Giữ tỉ lệ vàng cho ảnh bài viết */
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Đảm bảo ảnh không bị méo */
    display: block;
    transition: transform 0.6s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.08);
}

.news-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

/* Nội dung bài viết - Bỏ position absolute để tránh đè ảnh */
.news-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: white;
    color: #333;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Giới hạn tiêu đề 2 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 12px;
}

.news-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Giới hạn mô tả 3 dòng cho đẹp grid */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-read-more {
    margin-top: auto; /* Đẩy nút xuống dưới cùng */
    align-self: flex-start;
    padding: 10px 22px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: 0.3s;
}

.news-read-more:hover {
    background: #1e3d1a;
    transform: scale(1.05);
}

/* ==================== RESPONSIVE ==================== */

/* Tablet & Mobile nhỏ */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr; /* 1 cột trên điện thoại */
        padding: 15px;
    }

    .page-title {
        font-size: 2rem;
    }

    .news-image {
        aspect-ratio: 16 / 9; /* Ảnh rộng hơn chút trên mobile */
    }

    .news-content {
        padding: 20px;
    }
}

/* Mobile siêu nhỏ */
@media (max-width: 480px) {
    .news-title {
        font-size: 1.15rem;
    }
}