/* =========================================
   1. 全局重置与变量 (Global Reset & Vars)
   ========================================= */
:root {
    --primary-color: #c8102e; /* 保持红色主调，匹配侧边栏图片风格 */
    --primary-light: #fff0f0; /* 选中态浅红背景 */
    --text-main: #333;
    --text-light: #666;
    --bg-color: #f5f7fa;
    --white: #ffffff;
    --border-color: #eee;
}

* {
    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: all 0.3s;
}

a:hover {
    color: var(--primary-color);
}

ul {
    list-style: none;
}

/* 通用容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   2. 头部区域 (Header)
   ========================================= */
.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;
}

.top-links a {
    color: rgba(255, 255, 255, 0.9);
    margin-left: 15px;
}

.header {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 2px solid #ddd;
}

.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;
}

/* 纯CSS Logo */
.school-logo {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    border: 3px solid #f8f8f8;
}

.school-title h1 {
    font-size: 24px;
    color: var(--primary-color);
    line-height: 1.2;
    font-weight: bold;
}

.school-title p {
    font-size: 14px;
    color: #555;
    letter-spacing: 1px;
}

/* 搜索框 */
.search-box {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.search-box input {
    border: none;
    padding: 8px 10px;
    outline: none;
    font-size: 13px;
    width: 200px;
}

.search-box button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0 15px;
    cursor: pointer;
}

/* =========================================
   3. 导航栏 (Navigation) - 适配图片一
   ========================================= */
.main-nav {
    background: var(--primary-color); /* 采用科技蓝深色背景 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-list {
    display: flex;
    flex-wrap: wrap;
}

.nav-item {
    flex: 1; /* 等宽分布 */
    text-align: center;
    min-width: 80px;
}

.nav-item a {
    display: block;
    padding: 15px 0;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
}

.nav-item a:hover,
.nav-item a.active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* =========================================
   4. 面包屑与主体布局 (Main Layout)
   ========================================= */
.breadcrumb {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    color: #666;
    font-size: 13px;
    margin-bottom: 20px;
}

.breadcrumb .sep { margin: 0 8px; color: #ccc; }
.breadcrumb .current { color: var(--primary-color); font-weight: bold; }

/* 核心布局：左侧边栏 + 右侧内容 */
.content-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 50px;
    align-items: flex-start; /* 顶部对齐 */
}

/* =========================================
   5. 左侧侧边栏 (Sidebar) - 适配图片二
   ========================================= */
.sidebar {
    width: 260px; /* 固定宽度 */
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-card {
    background: var(--white);
    border: 1px solid #eee;
    /* 顶部红线装饰 (参考图片) */
    border-top: 3px solid var(--primary-color);
}

.card-title {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    color: var(--primary-color);
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    /* 左侧红线装饰 (参考图片) */
    border-left: 4px solid var(--primary-color); 
}

/* 垂直菜单 */
.vertical-menu a {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid #f5f5f5;
    color: #555;
    font-size: 14px;
    transition: all 0.2s;
}

.vertical-menu a:hover {
    color: var(--primary-color);
    padding-left: 25px;
}

/* 选中状态 (参考图片：浅红背景) */
.vertical-menu a.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
    font-weight: bold;
    border-left: 3px solid var(--primary-color);
}

/* 热门推荐列表 */
.hot-list {
    padding: 15px;
}

.hot-item {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.hot-item:last-child { margin-bottom: 0; }

.hot-img-box {
    width: 80px;
    height: 60px;
    background: #eee;
    flex-shrink: 0;
}

.hot-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hot-text {
    font-size: 13px;
    line-height: 1.4;
}

.hot-text a {
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-text a:hover { color: var(--primary-color); }

/* =========================================
   6. 右侧主内容区 (Main List Area)
   ========================================= */
.main-list-area {
    flex: 1; /* 占据剩余宽度 */
    background: var(--white);
    padding: 20px;
    border: 1px solid #eee;
    border-top: 3px solid var(--primary-color); /* 顶部蓝线呼应导航 */
}

/* 筛选条 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.list-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    position: relative;
    padding-left: 12px;
}

.list-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 4px;
    background: var(--primary-color);
}

.filter-options select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
}

/* 新闻列表 */
.news-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px dashed #eee;
}

.news-item:hover { background-color: #fafafa; }

.news-thumb {
    width: 220px;
    height: 140px;
    flex-shrink: 0;
    overflow: hidden;
    background: #eee;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.news-item:hover .news-thumb img { transform: scale(1.05); }

/* 无图占位 */
.no-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: #e9ecef; color: #999; font-size: 12px;
}

.news-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
}

.news-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    font-size: 12px;
    color: #999;
}

.news-meta span { margin-right: 15px; }

/* 分页 */
.pagination {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.page-link {
    padding: 6px 12px;
    border: 1px solid #ddd;
    color: #666;
    background: #fff;
}

.page-link:hover, .page-link.active {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* =========================================
   7. 底部 (Footer)
   ========================================= */
.footer {
    background: #2d2d2d;
    color: #999;
    padding: 30px 0;
    text-align: center;
    font-size: 13px;
}

.footer p { margin-bottom: 5px; }

/* =========================================
   8. 响应式适配 (Responsive)
   ========================================= */

/* 平板 (小于 992px) */
@media (max-width: 992px) {
    .sidebar { width: 220px; }
    .news-thumb { width: 180px; height: 120px; }
}

/* 手机 (小于 768px) */
@media (max-width: 768px) {
    .header-inner { flex-direction: column; gap: 15px; }
    .search-box { width: 100%; }
    .search-box input { width: 100%; }
    
    /* 导航栏横向滚动 */
    .nav-list { flex-wrap: nowrap; overflow-x: auto; }
    .nav-item { flex: 0 0 auto; padding: 0 10px; }
    
    /* 核心布局变为单列 */
    .content-layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .main-list-area { width: 100%; }
    
    /* 列表项改为上下结构 */
    .news-item { flex-direction: column; }
    .news-thumb { width: 100%; height: 180px; }
    .news-title { font-size: 16px; }
}