/* ===========================================================
   最新消息列表 — 新版型（對齊圖文 / 一列無圖 / 一列有圖）
   原版（一般圖文）沿用 NewsPage_ItemBoxStyle.css，不在此檔
   標題沿用 .item-list-title（顏色由 WebColorSetting 控制），此檔覆寫字級與行數
   =========================================================== */

/* 共用：清單為空時的提示（任何版型通用）*/
.news-empty {
    padding: 48px 16px;
    text-align: center;
    color: #999;
    font-size: 1rem;
}

/* 共用：首字漸層色塊（新訊無 ImgUrl 時的圖位佔位，漸層/字色由 inline style 帶入）*/
.news-block-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1;
}

/* 標題：覆寫 .item-list-title 的字級與 4 行裁切（顏色仍由 item-list-title 控制）*/
.news-aligned-card__title,
.news-rows__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===================== 1 對齊圖文版（等高卡 16:9）===================== */
.news-aligned-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.news-aligned-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .3s ease, transform .3s ease;
}

.news-aligned-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.news-aligned-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f5f5;
}

.news-aligned-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-aligned-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
}

.news-aligned-card__title {
    /* 字級交由 .item-list-title（物件標題字大小）控制，對齊 AI 文章列表 */
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
}

.news-aligned-card__desc {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 991px) {
    .news-aligned-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .news-aligned-grid { grid-template-columns: 1fr; }
}

/* ===================== 2/3 一列（無圖 / 有圖）===================== */
.news-rows {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.news-rows__item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: inherit;
    transition: background .3s ease, padding-left .3s ease;
}

.news-rows__item:first-child {
    border-top: 1px solid #eee;
}

.news-rows__item:hover {
    background: #f8f9ff;
}

.news-rows__thumb {
    flex-shrink: 0;
    width: 120px;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
}

.news-rows__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-rows__thumb .news-block-placeholder {
    font-size: 1.5rem;
    border-radius: 6px;
}

.news-rows__content {
    flex: 1;
    min-width: 0;
}

.news-rows__title {
    /* 字級交由 .item-list-title（物件標題字大小）控制，對齊 AI 文章列表 */
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 4px;
}

.news-rows__desc {
    font-size: 15px;
    color: #888;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-rows__arrow {
    flex-shrink: 0;
    font-size: 1.25rem;
    color: #ccc;
    transition: color .3s ease, transform .3s ease;
}

.news-rows__item:hover .news-rows__arrow {
    color: #6DC2A5;
    transform: translateX(4px);
}

@media (max-width: 576px) {
    .news-rows__thumb { width: 90px; }
    .news-rows__desc { display: none; }
}
