﻿

/* --- HEADER --- */
.news-header {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
}

    .news-header span, .link_tin {
        display: inline-block;
        border-radius: 30px;
        padding: 8px 25px;
        font-weight: bold;
        font-size: 18px;
        text-transform: uppercase;
        letter-spacing: 1px;
        background: #044aa3;
        color: white;
    }

/* --- GRID LAYOUT --- */
.news-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

/* --- ITEM CARD --- */
.news-item {
    background: #fff;
    flex: 0 0 calc(25% - 15px); /* FIX: không cho giãn */
    max-width: calc(25% - 15px); /* thêm để chắc chắn */
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

    .news-item:hover {
        transform: translateY(-5px);
    }

/* Hình ảnh */
.image-box {
    width: 100%;
    height: 180px;
    overflow: hidden;
    overflow: hidden;
    /* Thêm dòng dưới đây để đổ bóng */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

    .image-box img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
        border-radius: 0;
    }

.news-item:hover .image-box img {
    transform: scale(1.1);
}

/* Nội dung văn bản */
.content {
    padding: 15px 5px;
}

.title {
    font-size: 18px;
    font-weight: 400;
    color: #222;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Giới hạn 3 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 65px;
}

.meta {
    font-size: 12px;
    color: #044aa3;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.excerpt {
    font-size: 16px !important;
    color: #303030 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Giới hạn 3 dòng */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: justify;
    font-family: "Roboto",sans-serif !important;
}

/* --- RESPONSIVE BREAKPOINTS --- */

/* Tablet (Dưới 1024px) - Hiển thị 2 cột */
@media (max-width: 1024px) {
    .news-item {
        flex: 1 1 calc(50% - 10px);
    }
}

/* Mobile (Dưới 600px) - Hiển thị 1 cột */
@media (max-width: 600px) {
    .news-item {
        flex: 1 1 100%;
    }

    .news-header span {
        font-size: 15px;
    }

    .image-box {
        height: 220px; /* Tăng chiều cao ảnh trên mobile cho đẹp */
    }
}
