/*
 * templates/news.php (/tin-tuc/), UX feedback 2026-11-24 (s19, s21): each category block shows one large post and
 * two smaller ones, now with their excerpt, over the full width (the right column of banners was removed).
 */
@media (min-width: 768px) {
    section.news .news_wrap {
        grid-template-rows: 1fr 1fr;
    }

    section.news .news_item:first-child {
        grid-row: 1 / 3;
    }

    /* UX 2026-11-27 (s7): the large post's picture fills the space above its text (it was 254 px high with an empty
       grey band under it, the block being as tall as the two posts beside it). */
    section.news .news_item:first-child {
        flex-direction: column;
    }
    section.news .news_item:first-child .img_wrap {
        position: relative;
        flex: 1 1 auto;
        min-height: 254px;
    }
    section.news .news_item:first-child .img_wrap img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Phones: the large post across the row, the two others side by side under it (was a 2 x 2 grid of 4 posts). */
@media (max-width: 767px) {
    section.news .news_wrap {
        grid-template-rows: auto;
    }

    section.news .news_item:first-child {
        grid-row: auto;
        grid-column: 1 / 3;
    }
}

section.news .news_item:not(:first-child) .des {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 8px 0;
}
