/* =========================================
   1. 全局重置与变量 (Global Reset & Vars)
   ========================================= */
:root {
    /* 保持与列表页一致的团委红 */
    --primary-color: #D32F2F;
    --primary-dark: #B71C1C;
    --primary-light: #fff5f5; /* 浅红背景 */
    --text-main: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #f5f7fa;
    --white: #ffffff;
    --border-color: #eee;
    --gap: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

a:hover {
    color: var(--primary-color);
}

ul { list-style: none; }

/* 通用容器 */
.container {
    /* background-color: var(--primary-color); */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   2. 头部与导航 (保持与 List 页一致)
   ========================================= */
.top-nav {
    background-color: var(--primary-color);
    color: #fff;
    padding: 8px 0;
    font-size: 12px;
}

.top-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.top-nav-left a, .top-nav-right a {
    color: rgba(255, 255, 255, 0.9);
    margin: 0 10px;
}
.divider { margin: 0 5px; opacity: 0.5; }

.header {
    background: var(--white);
    padding: 25px 0;
    border-bottom: 3px solid var(--primary-color);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo-area { display: flex; align-items: center; gap: 15px; }

.school-logo {
    width: 60px; height: 60px;
    background: var(--primary-color);
    border-radius: 50%; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: bold;
    border: 2px solid #ffd700;
}

.school-title h1 { font-size: 22px; color: #333; line-height: 1.2; }
.school-title p { font-size: 14px; color: var(--primary-color); font-weight: bold; margin-top: 4px; }

.search-box {
    display: flex; border: 1px solid #ddd; border-radius: 20px;
    overflow: hidden; background: #fff;
}
.search-box input {
    border: none; padding: 8px 15px; outline: none; font-size: 13px; width: 200px;
}
.search-box button {
    background: var(--primary-color); color: #fff; border: none;
    padding: 0 15px; cursor: pointer; font-size: 13px;
}

.main-nav {
    background: linear-gradient(to right, #c8102e, #b71c1c);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-list { display: flex; flex-wrap: wrap; }
.nav-item a {
    display: block; padding: 14px 24px; color: #fff;
    font-size: 15px; font-weight: 500;
}
.nav-item a:hover, .nav-item a.active {
    background: rgba(0, 0, 0, 0.15); color: #ffd700;
}

/* =========================================
   3. 面包屑与布局 (Layout)
   ========================================= */
.breadcrumb {
    background: #f0f2f5; padding: 12px 0;
    border-bottom: 1px solid #e1e4e8; color: #666; font-size: 13px;
}
.breadcrumb .sep { margin: 0 8px; color: #ccc; }
.breadcrumb .current { color: var(--primary-color); font-weight: bold; }

.content-layout {
    display: flex;
    gap: 25px;
    margin-top: 25px;
    margin-bottom: 50px;
    align-items: flex-start;
}

/* =========================================
   4. 左侧侧边栏 (Sidebar)
   ========================================= */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.card-title {
    padding: 12px 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.vertical-menu a {
    display: block; padding: 12px 15px;
    border-bottom: 1px solid #f5f5f5;
    color: #555; position: relative;
}
.vertical-menu a:hover {
    color: var(--primary-color); background: var(--primary-light); padding-left: 20px;
}
.vertical-menu a.active {
    color: var(--primary-color); font-weight: bold;
    background: var(--primary-light); border-left: 3px solid var(--primary-color);
}

/* 热门推荐列表 */
.hot-list { padding: 10px 15px; }
.hot-item {
    display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start;
}
.hot-item:last-child { margin-bottom: 0; }
.hot-rank {
    width: 20px; height: 20px; background: #eee; color: #666;
    text-align: center; line-height: 20px; font-size: 12px;
    border-radius: 2px; flex-shrink: 0;
}
.hot-item:nth-child(1) .hot-rank { background: #ff4757; color: #fff; }
.hot-item:nth-child(2) .hot-rank { background: #ffa502; color: #fff; }
.hot-item:nth-child(3) .hot-rank { background: #2ed573; color: #fff; }

.hot-text {
    font-size: 13px; line-height: 1.4; color: #333;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.hot-item:hover .hot-text { color: var(--primary-color); }


/* =========================================
   5. 右侧内容区 (Main Content) - 核心部分
   ========================================= */
.main-content-area {
    flex: 1;
    background: var(--white);
    padding: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    min-width: 0; /* 防止内容撑开容器 */
}

/* 文章头部 */
.article-header {
    text-align: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.article-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.4;
}

.article-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.meta-item { display: flex; align-items: center; gap: 4px; }

/* 文章正文 */
.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.article-body p {
    margin-bottom: 20px;
    text-indent: 2em; /* 首行缩进 */
    text-align: justify;
}

/* 强调文字 */
.article-body strong {
    font-weight: bold;
    color: #000;
}

/* 图片容器 */
.article-img-box {
    margin: 20px 0;
    text-align: center;
}

.article-img-box img {
    max-width: 100%;
    height: auto;
    border: 1px solid #f0f0f0;
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.img-caption {
    font-size: 13px;
    color: #888;
    margin-top: 8px;
    text-indent: 0 !important;
}

/* 无图占位符 */
.no-img-placeholder {
    width: 100%;
    height: 300px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
    border-radius: 4px;
    flex-direction: column;
    gap: 10px;
}
.placeholder-icon { font-size: 30px; opacity: 0.5; }

/* 附件下载区 */
.attachment-box {
    background: #f9f9f9;
    border: 1px dashed #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-top: 40px;
}

.attach-title {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 10px;
    color: var(--text-main);
}

.attach-list li {
    margin-bottom: 8px;
    font-size: 14px;
}

.attach-list a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* 上下篇导航 */
.article-nav {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-link {
    font-size: 14px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.nav-link span { color: #333; font-weight: bold; }

/* =========================================
   6. 底部 (Footer)
   ========================================= */
.footer {
    background: #2d2d2d;
    color: #ccc;
    padding: 40px 0;
    margin-top: auto;
}

.footer-inner {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px;
}

.footer-info h4 { color: #ffd700; margin-bottom: 15px; font-size: 16px; }
.footer-info p { font-size: 13px; margin-bottom: 8px; color: #aaa; }
.footer-copy {
    text-align: center; border-top: 1px solid #444;
    padding-top: 20px; margin-top: 20px; font-size: 12px; width: 100%;
}

/* =========================================
   7. 响应式适配 (Responsive)
   ========================================= */

/* 平板端 (小于 992px) */
@media (max-width: 992px) {
    .content-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%; /* 侧边栏占满宽度 */
        order: 2; /* 放到内容下方 */
        flex-direction: row;
        flex-wrap: wrap;
    }
    .sidebar-card { flex: 1; min-width: 300px; }
    
    .main-list-area { width: 100%; }
}

/* 手机端 (小于 768px) */
@media (max-width: 768px) {
    .header-inner { flex-direction: column; align-items: flex-start; }
    .top-nav-inner { flex-direction: column; gap: 5px; text-align: center; }
    
    .search-box { width: 100%; margin-top: 10px; }
    .search-box input { width: 100%; flex: 1; }
    
    /* 导航横向滚动 */
    .nav-list { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; }
    .nav-item { flex: 0 0 auto; padding: 0 10px; }
    
    /* 内容区调整 */
    .main-list-area { padding: 20px; }
    .article-title { font-size: 20px; text-align: left; }
    .article-meta { flex-direction: column; align-items: flex-start; gap: 5px; }
    
    .sidebar { flex-direction: column; }
    
    /* 底部调整 */
    .footer-inner { flex-direction: column; }
}