/* 科技感白底風格樣式 - 條列式優化版 */
:root {
    --primary-color: #0066cc;
    --secondary-color: #0099ff;
    --accent-color: #00ccff;
    --white-bg: #ffffff;
    --light-bg: #f8fbff;
    --card-bg: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-light: #999999;
    --border-color: #e0e8ff;
    --shadow-color: rgba(0, 102, 204, 0.08);
    --hover-shadow: rgba(0, 102, 204, 0.15);
}

/* 重置與基礎設定 */
.news-container * {
    box-sizing: border-box;
}

.news-container {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    background: linear-gradient(180deg, var(--white-bg) 0%, var(--light-bg) 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 背景裝飾 (維持原樣) */
.news-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(0, 153, 255, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 102, 204, 0.04) 0%, transparent 40%);
    pointer-events: none;
}

.geometric-decoration {
    position: absolute;
    top: 15%; right: 5%;
    width: 400px; height: 400px;
    background: linear-gradient(135deg, rgba(0, 153, 255, 0.05), transparent);
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.news-content-wrapper {
    max-width: 1000px; /* 列表式通常不需要像卡片那麼寬，改窄一點增加閱讀性 */
    margin: 0 auto;
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}

/* 標題區域 */
.news-header {
    text-align: center;
    margin-bottom: 60px;
}

.news-main-title {
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.news-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    opacity: 0.8;
}

/* --- 列表佈局核心樣式 --- */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 60px;
}

/* 列表項目 (List Item) */
.news-item {
    display: flex;
    align-items: center; /* 垂直置中 */
    background: var(--card-bg);
    padding: 25px 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* Hover 效果 */
.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--hover-shadow);
    border-color: var(--accent-color);
}

/* 左側裝飾條 (Hover時顯示) */
.news-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
    transform-origin: center;
}

.news-item:hover::before {
    transform: scaleY(1);
}

/* 日期區塊 */
.news-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    margin-right: 30px;
    padding-right: 30px;
    border-right: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.news-date-day {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 4px;
}

.news-date-ym {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--text-light);
}

/* 內容區塊 */
.news-info {
    flex: 1; /* 佔據剩餘空間 */
    padding-right: 20px;
}

.news-category {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--secondary-color);
    background: rgba(0, 153, 255, 0.08);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-weight: 600;
}

.news-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.news-item:hover .news-title {
    color: var(--primary-color);
}

.news-excerpt {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 只顯示兩行 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* 右側箭頭/縮圖區 */
.news-action {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
}

.arrow-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.news-item:hover .arrow-icon {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

/* 分頁導航 */
.news-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-numbers {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--white-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-numbers.current, .page-numbers:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 響應式設計 */
@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .news-date-box {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        margin-right: 0;
        padding-right: 0;
        margin-bottom: 15px;
        padding-bottom: 10px;
        min-width: auto;
    }

    .news-date-day { font-size: 1.2rem; margin-bottom: 0; }
    .news-date-ym { font-size: 0.9rem; }

    .news-info { padding-right: 0; margin-bottom: 15px; width: 100%; }
    .news-title { font-size: 1.25rem; }
    
    .news-action {
        width: 100%;
        justify-content: flex-end;
    }
    
    .news-excerpt {
        display: none; /* 手機版隱藏摘要，讓列表更緊湊 */
    }
}

/* 載入動畫 */
.news-item {
    animation: slideInUp 0.5s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes slideInUp {
    to { opacity: 1; transform: translateY(0); }
}

.news-item:nth-child(1) { animation-delay: 0.05s; }
.news-item:nth-child(2) { animation-delay: 0.1s; }
.news-item:nth-child(3) { animation-delay: 0.15s; }
.news-item:nth-child(4) { animation-delay: 0.2s; }
.news-item:nth-child(5) { animation-delay: 0.25s; }

/* 無文章樣式 */
.no-posts {
    text-align: center;
    padding: 60px;
    color: var(--text-light);
    width: 100%;
}