/* ==========================================
   1. 基础重置 & Google 风格全局变量
   ========================================== */
:root {
    --google-blue: #1a73e8;
    --google-red: #ea4335;
    --google-yellow: #fbbc05;
    --google-green: #34a853;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --bg-light: #f8f9fa;
    --border-color: #dadce0;
    --radius: 8px;
    --transition: all 0.2s ease-in-out;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-primary);
    background-color: #ffffff;
    line-height: 1.6;
}

/* ==========================================
   2. 导航栏 (Google Clean Nav)
   ========================================== */
.google-nav {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
}

.logo {
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

/* 标志性的 Google 配色 */
.logo .blue { color: var(--google-blue); }
.logo .red { color: var(--google-red); }
.logo .yellow { color: var(--google-yellow); }
.logo .green { color: var(--google-green); }

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--google-blue);
}

/* ==========================================
   3. 核心布局 & 响应式项目信息 (左文右图 / 上文下图)
   ========================================== */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 24px;
}

.section-container {
    padding: 40px 0;
}

/* 重点：响应式 Flexbox 核心设计 */
.project-info-section {
    display: flex;
    flex-direction: row; /* 桌面端：左文右图 */
    align-items: center;
    gap: 48px;
}

.info-text {
    flex: 1;
}

.info-text h2 {
    font-size: 36px;
    font-weight: 400;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.info-text p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 16px;
}

.info-image {
    flex: 1;
}

.info-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Google 风格按钮 */
.google-btn {
    background-color: var(--google-blue);
    color: white;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.google-btn:hover {
    background-color: #1557b0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.google-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}

/* ==========================================
   4. 新闻卡片网格 (News Cards)
   ========================================== */
.section-title {
    font-size: 24px;
    font-weight: 400;
    margin-bottom: 24px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.news-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
    border-color: transparent;
}

.news-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.news-card-content {
    padding: 20px;
}

.news-date {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 8px;
}

.news-card-title {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.news-card-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==========================================
   5. 新闻详情页样式 (view.html)
   ========================================== */
.detail-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.back-btn {
    display: inline-block;
    color: var(--google-blue);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 24px;
}

.detail-title {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 12px;
}

.detail-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.detail-img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 32px;
}

.detail-body p {
    font-size: 16px;
    color: #3c4043;
    margin-bottom: 20px;
    letter-spacing: 0.2px;
}

.error-msg, .loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

/* ==========================================
   6. 页脚
   ========================================== */
.google-footer {
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-light);
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 60px;
}

/* ==========================================
   7. 响应式媒体查询 (Mobile Responsiveness)
   ========================================== */
@media (max-width: 768px) {
    /* 核心逻辑：移动端强制改变 Flex 方向，文本在上，图片在下 */
    .project-info-section {
        flex-direction: column; 
        gap: 24px;
        text-align: center;
    }
    
    .info-text h2 {
        font-size: 28px;
    }
    
    .detail-title {
        font-size: 24px;
    }
}