
/* ===== NEWS SECTION ===== */

.mt-news-section {
    width: min(1180px, calc(100% - 40px));
    /*width: 100%;*/
    margin: 40px auto;
    color: #222;
    font-family: inherit;
}

.mt-news-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.mt-news-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #0b65c2;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.mt-news-title {
    margin: 0;
    font-size: 30px;
    line-height: 1.3;
    font-weight: 700;
}

/* ===== CATEGORY TABS ===== */

.mt-news-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 28px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.mt-news-tab {
    flex: 0 0 auto;
    padding: 10px 18px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #444;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.mt-news-tab:hover {
    color: #0b65c2;
    border-color: #0b65c2;
}

.mt-news-tab.is-active {
    color: #fff;
    background: #0b65c2;
    border-color: #0b65c2;
}

.mt-news-tab:focus-visible,
.mt-news-page:focus-visible {
    outline: 2px solid #0b65c2;
    outline-offset: 3px;
}

/* ===== NEWS GRID ===== */

.mt-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
}

.mt-news-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    transition: box-shadow .2s, transform .2s;
}

.mt-news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.mt-news-card__image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #f2f4f7;
}

.mt-news-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.mt-news-card:hover .mt-news-card__image img {
    transform: scale(1.04);
}

.mt-news-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #777;
    font-size: 13px;
}

.mt-news-card__body {
    padding: 18px;
}

.mt-news-card__category {
    margin-bottom: 10px;
    color: #0b65c2;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.mt-news-card__title {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.5;
    font-weight: 700;
}

.mt-news-card__title a {
    color: #222;
    text-decoration: none;
}

.mt-news-card__title a:hover {
    color: #0b65c2;
}

.mt-news-card__date {
    display: block;
    margin-bottom: 12px;
    color: #888;
    font-size: 12px;
}

.mt-news-card__excerpt {
    margin: 0 0 16px;
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

.mt-news-card__readmore {
    color: #0b65c2;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

/* ===== PAGINATION ===== */

.mt-news-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.mt-news-page {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #333;
    font: inherit;
    cursor: pointer;
}

.mt-news-page:hover,
.mt-news-page.is-current {
    border-color: #0b65c2;
    background: #0b65c2;
    color: #fff;
}

.mt-news-empty {
    padding: 40px 16px;
    text-align: center;
    color: #777;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ===== LOADING / ERROR ===== */

.mt-news-results-inner {
    min-height: 120px;
}

.mt-news-results-inner.is-loading {
    opacity: .5;
    pointer-events: none;
}

.mt-news-status {
    padding: 28px 12px;
    text-align: center;
    color: #666;
}

.mt-news-status.is-error {
    color: #b42318;
}

.mt-news-retry {
    margin-left: 8px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 1024px) {
    .mt-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .mt-news-title {
        font-size: 26px;
    }
}



/* ===== RESPONSIVE MOBILE NEWS ===== */
@media (max-width: 600px) {

    .mt-news-section {
        width: calc(100% - 30px);
        max-width: 100%;
        margin: 28px auto;
        box-sizing: border-box;
    }

    .mt-news-title {
        font-size: 25px;
    }

    /* Tabs danh mục cuộn ngang */
    .mt-news-tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 7px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        margin-bottom: 20px;
        padding: 5px 2px 12px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .mt-news-tabs::-webkit-scrollbar {
        display: none;
    }

    .mt-news-tab {
        flex: 0 0 auto;
        width: auto;
        min-width: max-content;
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* Grid một cột */
    .mt-news-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 20px;
        width: 100%;
    }

    /* Card: ảnh trên, nội dung dưới */
    .mt-news-card {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-width: 0;
        overflow: hidden;
        border: 1px solid #eee;
        border-radius: 10px;
        background: #fff;
        box-sizing: border-box;
    }

    /* Hình ảnh */
    .mt-news-card__image {
        display: block;
        width: 100%;
        height: auto;
        min-height: 0;
        aspect-ratio: 16 / 9;
        overflow: hidden;
        background: #f2f4f7;
    }

    .mt-news-card__image img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: cover;
        object-position: center;
    }

    .mt-news-no-image {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        min-height: 180px;
    }

    /* Nội dung */
    .mt-news-card__body {
        display: flex;
        flex-direction: column;
        width: 100%;
        min-width: 0;
        padding: 15px;
        box-sizing: border-box;
    }

    .mt-news-card__category {
        margin-bottom: 7px;
        font-size: 11px;
        line-height: 1.4;
    }

    .mt-news-card__title {
        margin: 0 0 8px;
        font-size: 17px;
        line-height: 1.45;
    }

    .mt-news-card__date {
        margin-bottom: 10px;
        font-size: 12px;
    }

    .mt-news-card__excerpt {
        margin: 0 0 12px;
        font-size: 13px;
        line-height: 1.6;

        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    .mt-news-card__readmore {
        display: inline-block;
        font-size: 13px;
    }

    /* Pagination */
    .mt-news-pagination {
        gap: 5px;
        margin-top: 24px;
    }

    .mt-news-page {
        min-width: 34px;
        min-height: 34px;
        padding: 6px 9px;
        font-size: 12px;
    }
}

/* Điện thoại nhỏ */
@media (max-width: 380px) {

    .mt-news-card__body {
        padding: 12px;
    }

    .mt-news-card__title {
        font-size: 16px;
    }

}
