/* css/style.css - 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, 'Noto Sans', sans-serif;
    background-color: #f5f7fb;
    color: #1f2f3a;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    max-width: 1000px;
    width: 90%;
    margin: 2rem auto;
}

/* 头部导航 */
.site-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    justify-content: space-between;
}

.logo a {
    font-size: 1.7rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, #2b6e9e, #1b4f6e);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e4e;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: #2b6e9e;
    border-bottom: 2px solid #2b6e9e;
    padding-bottom: 4px;
}

/* 列表页样式 - 一行一个资讯 */
.list-header {
    margin-bottom: 1.5rem;
}

.list-header h2 {
    font-weight: 600;
    font-size: 1.8rem;
}

.list-header p {
    color: #5c6f7e;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 单条资讯卡片 - 横向布局 */
.news-item {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem;
}

.news-item:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* 缩略图区域 */
.news-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 80px;
    border-radius: 0.75rem;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* 内容区域 */
.news-info {
    flex: 1;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #1f2f3a;
    line-height: 1.4;
}

.news-summary {
    font-size: 0.85rem;
    color: #6c7f8b;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: #8e9eab;
}

/* 详情页样式 */
.detail-container {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem 2rem 2.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

.detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.detail-meta {
    display: flex;
    gap: 1.8rem;
    padding-bottom: 1rem;
    margin-bottom: 1.8rem;
    border-bottom: 1px solid #e9edf2;
    font-size: 0.85rem;
    color: #5b6f7c;
}

.detail-content {
    font-size: 1rem;
    line-height: 1.7;
    color: #2c3f4b;
}

.detail-content p {
    margin-bottom: 1.2rem;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: #2b6e9e;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* 底部样式 */
.site-footer {
    background: #eef2f6;
    margin-top: 3rem;
    padding: 1.5rem 2rem;
    text-align: center;
    color: #4f6f7f;
    font-size: 0.8rem;
    border-top: 1px solid #dce3e9;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
}

/* 加载指示器 */
.loader {
    text-align: center;
    padding: 3rem;
    color: #6c7f8b;
}

.no-data {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 1rem;
}

@media (max-width: 640px) {
    .header-container {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
    .news-item {
        padding: 0.8rem;
    }
    .news-thumb {
        width: 70px;
        height: 70px;
    }
    .detail-title {
        font-size: 1.4rem;
    }
    .main-content {
        width: 95%;
    }
}