/* M360 Latest News Component - v0.5.4.2
 * Scope: only .m360-latest-news and children.
 */

.m360-latest-news,
.m360-latest-news * { box-sizing: border-box; }

.m360-latest-news {
    width: 100%;
    background: #fff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(0,0,0,.06);
    overflow: hidden;
}

.m360-latest-news__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 3px solid #d71920;
}

.m360-latest-news__header h2 {
    margin: 0;
    color: #111;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
}

.m360-latest-news__items {
    display: grid;
    grid-template-columns: 1fr;
}

.m360-latest-news__item {
    display: grid;
    grid-template-columns: 96px minmax(0,1fr);
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(0,0,0,.07);
}

.m360-latest-news__item:last-child { border-bottom: 0; }

.m360-latest-news__item.is-featured {
    grid-template-columns: 130px minmax(0,1fr);
    background: #fffafa;
}

.m360-latest-news__thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    border-radius: 10px;
    background: #eceff3;
}

.m360-latest-news__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m360-latest-news__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.m360-latest-news__category {
    display: inline-flex;
    align-self: flex-start;
    margin-bottom: 6px;
    color: #d71920 !important;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1;
    text-decoration: none !important;
    text-transform: uppercase;
}

.m360-latest-news__title {
    margin: 0;
    color: #111;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.18;
}

.m360-latest-news__item.is-featured .m360-latest-news__title { font-size: 18px; }

.m360-latest-news__title a {
    color: #111 !important;
    text-decoration: none !important;
}

.m360-latest-news__title a:hover { color: #d71920 !important; }

.m360-latest-news__date {
    display: block;
    margin-top: 7px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 600;
}

.m360-latest-news__empty {
    margin: 0;
    padding: 18px;
    color: #6b7280;
}

/* List page: a strong lead story followed by a lighter news stream. */
.m360-latest-news--list .m360-latest-news__item:not(.is-featured) .m360-latest-news__title,
.m360-latest-news--list .m360-latest-news__item:not(.is-featured) .m360-latest-news__title a {
    font-weight: 400 !important;
}

.m360-latest-news--list .m360-latest-news__item.is-featured {
    grid-template-columns: minmax(220px,28%) minmax(0,1fr);
    gap: 22px;
    padding: 22px 24px;
    background: linear-gradient(90deg, #fff7f7 0%, #fff 70%);
}

.m360-latest-news--list .m360-latest-news__item.is-featured .m360-latest-news__thumb {
    aspect-ratio: 16/9;
    border-radius: 12px;
}

.m360-latest-news--list .m360-latest-news__item.is-featured .m360-latest-news__title {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
}

.m360-latest-news--list .m360-latest-news__item.is-featured .m360-latest-news__title a {
    font-weight: 800 !important;
}

.m360-latest-news__pagination {
    padding: 18px;
    border-top: 1px solid rgba(0,0,0,.07);
}

.m360-latest-news__pagination > .page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.m360-latest-news__pagination .page-numbers li { margin: 0; }

.m360-latest-news__pagination a.page-numbers,
.m360-latest-news__pagination span.page-numbers {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: 9px;
    color: #30343b !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
}

.m360-latest-news__pagination a.page-numbers:hover,
.m360-latest-news__pagination span.page-numbers.current {
    border-color: #d71920;
    background: #d71920;
    color: #fff !important;
}
.m360-latest-news--compact .m360-latest-news__item {
    grid-template-columns: 1fr;
    padding: 12px 16px;
}

.m360-latest-news--compact .m360-latest-news__thumb { display: none; }

/* Sidebar: dense, uniform news list without a featured first item. */
.m360-latest-news--sidebar {
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,.05);
}

.m360-latest-news--sidebar .m360-latest-news__header {
    padding: 13px 15px;
    border-bottom-width: 2px;
}

.m360-latest-news--sidebar .m360-latest-news__header h2 { font-size: 16px; }

.m360-latest-news--sidebar .m360-latest-news__item,
.m360-latest-news--sidebar .m360-latest-news__item.is-featured {
    grid-template-columns: 84px minmax(0,1fr);
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
}

.m360-latest-news--sidebar .m360-latest-news__thumb {
    aspect-ratio: 4/3;
    border-radius: 8px;
}

.m360-latest-news--sidebar .m360-latest-news__category {
    margin-bottom: 4px;
    font-size: 10px;
}

.m360-latest-news--sidebar .m360-latest-news__title,
.m360-latest-news--sidebar .m360-latest-news__item.is-featured .m360-latest-news__title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.m360-latest-news--sidebar .m360-latest-news__title a {
    font-weight: 400 !important;
}

.m360-latest-news--sidebar .m360-latest-news__date {
    margin-top: 5px;
    font-size: 11px;
}
@media (max-width: 640px) {
    .m360-latest-news__item,
    .m360-latest-news__item.is-featured {
        grid-template-columns: 88px minmax(0,1fr);
        padding: 13px 14px;
    }

    .m360-latest-news__header { padding: 14px; }
    .m360-latest-news__title,
    .m360-latest-news__item.is-featured .m360-latest-news__title { font-size: 15px; }
    .m360-latest-news--list .m360-latest-news__item.is-featured {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
    }

    .m360-latest-news--list .m360-latest-news__item.is-featured .m360-latest-news__title {
        font-size: 20px;
    }

    .m360-latest-news__pagination { padding: 14px 10px; }
    .m360-latest-news--sidebar .m360-latest-news__item,
    .m360-latest-news--sidebar .m360-latest-news__item.is-featured {
        grid-template-columns: 80px minmax(0,1fr);
        padding: 11px 12px;
    }

    .m360-latest-news--sidebar .m360-latest-news__title,
    .m360-latest-news--sidebar .m360-latest-news__item.is-featured .m360-latest-news__title {
        font-size: 14px;
    }
}
