﻿/* ==================================================
   MNEWS - MOBILE FIRST
================================================== */

.news-page,
.news-detail-page {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 16px 14px 48px;
}


/* ==================================================
   BREADCRUMB
================================================== */

.news-breadcrumb {
    margin-bottom: 16px;
}

    .news-breadcrumb ol {
        display: flex;
        align-items: center;
        flex-wrap: nowrap;
        gap: 6px;
        margin: 0;
        padding: 0;
        overflow: hidden;
        list-style: none;
        color: #94A3B8;
        font-size: 11px;
    }

    .news-breadcrumb li {
        flex-shrink: 0;
    }

        .news-breadcrumb li:last-child {
            min-width: 0;
            flex-shrink: 1;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        .news-breadcrumb li:not(:last-child)::after {
            content: "/";
            margin-left: 6px;
            color: #CBD5E1;
        }

    .news-breadcrumb a {
        color: #64748B;
        text-decoration: none;
    }


/* ==================================================
   PAGE HEADER
================================================== */

.news-page-header {
    margin-bottom: 22px;
}

.news-page-header__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: #16A34A;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.news-page-header h1 {
    margin: 0;
    color: #0F172A;
    font-size: 25px;
    font-weight: 850;
    line-height: 1.22;
    letter-spacing: -.025em;
}

.news-page-header p {
    margin: 8px 0 0;
    color: #64748B;
    font-size: 13px;
    line-height: 1.6;
}


/* ==================================================
   FEATURED
================================================== */

.news-featured {
    overflow: hidden;
    margin-bottom: 30px;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    background: #FFF;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
}


/* ==================================================
   FEATURED IMAGE
================================================== */

.news-featured__media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #E2E8F0;
}

    .news-featured__media img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
        object-fit: contain;
        object-position: center;
    }


/* ==================================================
   FEATURED BODY
================================================== */

.news-featured__content {
    padding: 15px 15px 16px;
}

.news-category {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #F0FDF4;
    color: #15803D;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.news-featured__content h2 {
    margin: 10px 0 0;
    color: #0F172A;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.38;
    letter-spacing: -.02em;
}

    .news-featured__content h2 a {
        color: inherit;
        text-decoration: none;
    }

.news-featured__content p {
    display: -webkit-box;
    margin: 8px 0 0;
    overflow: hidden;
    color: #64748B;
    font-size: 12px;
    line-height: 1.6;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/* ==================================================
   META
================================================== */

.news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 9px;
    color: #94A3B8;
    font-size: 10px;
    line-height: 1.4;
}

.news-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    color: #15803D;
    font-size: 11px;
    font-weight: 750;
    text-decoration: none;
}


/* ==================================================
   SECTION
================================================== */

.news-section {
    margin-top: 0;
}

.news-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #E2E8F0;
}

    .news-section-heading span {
        display: block;
        margin-bottom: 3px;
        color: #16A34A;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .news-section-heading h2 {
        margin: 0;
        color: #0F172A;
        font-size: 18px;
        font-weight: 800;
    }


/* ==================================================
   NEWS LIST
================================================== */

.news-grid {
    display: block;
}


/* ==================================================
   NEWS CARD
================================================== */

.news-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #EEF2F7;
    background: transparent;
}

    .news-card:last-child {
        border-bottom: 0;
    }


/* ==================================================
   THUMBNAIL
================================================== */

.news-card__media {
    position: relative;
    width: 112px;
    aspect-ratio: 4 / 3;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: #E2E8F0;
}

    .news-card__media img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: center;
    }


/* ==================================================
   NEWS CARD BODY
================================================== */

.news-card__body {
    min-width: 0;
    padding: 0;
}

    .news-card__body
    .news-meta {
        margin-top: 0;
        font-size: 9px;
    }

.news-card__title {
    display: -webkit-box;
    margin: 5px 0 0;
    overflow: hidden;
    color: #0F172A;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.45;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

    .news-card__title a {
        color: inherit;
        text-decoration: none;
    }


/*
 * Mobile không cần description dài.
 * Tiêu đề + ngày + thumbnail là đủ.
 */
.news-card__body p {
    display: none;
}

.news-card__link {
    display: none;
}


/* ==================================================
   IMAGE PLACEHOLDER
================================================== */

.news-image-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient( 135deg, #DCFCE7, #F0FDF4 );
    color: #16A34A;
    font-size: 18px;
    font-weight: 900;
}


/* ==================================================
   EMPTY
================================================== */

.news-empty {
    padding: 38px 18px;
    border: 1px dashed #CBD5E1;
    border-radius: 14px;
    background: #F8FAFC;
    text-align: center;
}

    .news-empty strong {
        display: block;
        color: #334155;
        font-size: 14px;
    }

    .news-empty p {
        margin: 5px 0 0;
        color: #94A3B8;
        font-size: 11px;
    }


/* ==================================================
   DETAIL HEADER
================================================== */

.news-detail {
    width: 100%;
}

.news-detail-header {
    margin-top: 4px;
}

    .news-detail-header h1 {
        margin: 11px 0 0;
        color: #0F172A;
        font-size: 27px;
        font-weight: 850;
        line-height: 1.28;
        letter-spacing: -.03em;
    }

.news-detail-lead {
    margin: 12px 0 0;
    color: #64748B;
    font-size: 14px;
    line-height: 1.7;
}

.news-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
    color: #94A3B8;
    font-size: 10px;
}


/* ==================================================
   DETAIL COVER
================================================== */

.news-detail-cover {
    position: relative;
    width: 100%;
    margin: 20px 0 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 13px;
    background: #E2E8F0;
}

    .news-detail-cover img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
        object-fit: contain;
        object-position: center;
    }


/* ==================================================
   ARTICLE CONTENT
================================================== */

.news-detail-content {
    margin-top: 24px;
    color: #334155;
    font-size: 15px;
    line-height: 1.8;
}

    .news-detail-content > :first-child {
        margin-top: 0;
    }

    .news-detail-content p {
        margin: 0 0 18px;
    }

    .news-detail-content h2 {
        margin: 30px 0 11px;
        color: #0F172A;
        font-size: 20px;
        font-weight: 800;
        line-height: 1.42;
    }

    .news-detail-content h3 {
        margin: 25px 0 10px;
        color: #0F172A;
        font-size: 17px;
        font-weight: 750;
        line-height: 1.45;
    }

    .news-detail-content strong {
        color: #1E293B;
    }

    .news-detail-content a {
        color: #15803D;
        text-decoration: underline;
        text-underline-offset: 2px;
    }


    /* ==================================================
   ARTICLE IMAGES
================================================== */

    .news-detail-content img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 22px auto;
        border-radius: 10px;
    }


    /* ==================================================
   LIST
================================================== */

    .news-detail-content ul,
    .news-detail-content ol {
        margin: 0 0 20px;
        padding-left: 20px;
    }

    .news-detail-content li {
        list-style: disc;
        margin-bottom: 7px;
    }


    /* ==================================================
   BLOCKQUOTE
================================================== */

    .news-detail-content blockquote {
        margin: 22px 0;
        padding: 14px 16px;
        border-left: 3px solid #22C55E;
        border-radius: 0 8px 8px 0;
        background: #F8FAFC;
        color: #475569;
        font-size: 14px;
        line-height: 1.7;
    }


    /* ==================================================
   TABLE
================================================== */

    .news-detail-content table {
        width: 100%;
        margin: 20px 0;
        border-collapse: collapse;
        font-size: 12px;
    }

    .news-detail-content th,
    .news-detail-content td {
        padding: 8px 9px;
        border: 1px solid #E2E8F0;
        text-align: left;
    }

    .news-detail-content th {
        background: #F8FAFC;
    }


/* ==================================================
   DETAIL FOOTER
================================================== */

.news-detail-footer {
    display: block;
    margin-top: 30px;
    padding: 16px;
    border: 1px solid #BBF7D0;
    border-radius: 13px;
    background: #F0FDF4;
}

    .news-detail-footer span {
        display: block;
        color: #16A34A;
        font-size: 9px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .news-detail-footer strong {
        display: block;
        margin-top: 4px;
        color: #166534;
        font-size: 12px;
        line-height: 1.5;
    }

    .news-detail-footer a {
        width: 100%;
        min-height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 12px;
        border-radius: 9px;
        background: #16A34A;
        color: #FFF;
        font-size: 11px;
        font-weight: 750;
        text-decoration: none;
    }


/* ==================================================
   BACK
================================================== */

.news-detail-back {
    margin-top: 20px;
}

    .news-detail-back a {
        color: #64748B;
        font-size: 11px;
        font-weight: 650;
        text-decoration: none;
    }


/* ==================================================
   VERY SMALL MOBILE
================================================== */

@media (max-width: 360px) {

    .news-page,
    .news-detail-page {
        padding-left: 11px;
        padding-right: 11px;
    }

    .news-card {
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 10px;
    }

    .news-card__media {
        width: 100px;
    }

    .news-card__title {
        font-size: 13px;
    }

    .news-detail-header h1 {
        font-size: 24px;
    }
}


/* ==================================================
   TABLET / DESKTOP

   Chỉ mở rộng nhẹ.
================================================== */

@media (min-width: 768px) {

    .news-page,
    .news-detail-page {
        max-width: 980px;
        padding: 5px 24px 70px;
    }

    .news-page-header h1 {
        font-size: 24px;
    }

    .news-featured {
        display: grid;
        /* grid-template-columns: 1.3fr 1fr; */
    }

    .news-featured__content {
        padding: 28px;
    }

    .news-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .news-card {
        display: block;
        padding: 0;
        border: 0;
    }

    .news-card__media {
        width: 100%;
        aspect-ratio: 16 / 9;
        border-radius: 13px;
    }

    .news-card__body {
        padding-top: 12px;
    }

        .news-card__body p {
            display: -webkit-box;
            margin: 7px 0 0;
            overflow: hidden;
            color: #64748B;
            font-size: 12px;
            line-height: 1.6;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

    .news-detail {
        max-width: 820px;
        margin: 0 auto;
    }

    .news-detail-header h1 {
        font-size: 24px;
    }

    .news-detail-content {
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
        font-size: 16px;
    }
}
