/* static/css/style.css */

/* --- 全局重置 --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif; background-color: #f6f6f6; color: #333; font-size: 14px; line-height: 1.6; }
ul, li { list-style: none; }
a { text-decoration: none; color: #333; transition: all 0.3s; }
a:hover { color: #e60012; }
img { max-width: 100%; vertical-align: middle; }
.fl { float: left; } .fr { float: right; }
.clearfix::after { content: ""; display: block; clear: both; }

/* 容器宽与响应式 */
.container { width: 1200px; margin: 0 auto; position: relative; }
@media (max-width: 1200px) { .container { width: 100%; padding: 0 10px; } }

/* --- 顶部 Header --- */
.header-top { background: #f5f5f5; height: 35px; line-height: 35px; border-bottom: 1px solid #eee; color: #666; font-size: 12px; }
.header-main { background: #fff; padding: 25px 0; height: 100px; }
.logo { width: 220px; float: left; }
.logo h1 { font-size: 24px; color: #0091e6; line-height: 50px; }

/* 搜索框 */
.search-box { float: left; margin-left: 100px; margin-top: 5px; position: relative; }
.search-box input { border: 2px solid #0091e6; width: 400px; height: 40px; padding: 0 10px; outline: none; float: left; }
.search-box button { background: #0091e6; color: #fff; width: 80px; height: 40px; border: none; cursor: pointer; float: left; font-size: 16px; }

/* 联系方式 */
.header-contact { float: right; text-align: right; }
.header-contact .tel { font-size: 22px; color: #e60012; font-weight: bold; font-family: Arial; }
.header-contact p { font-size: 12px; color: #999; }

/* --- 导航栏 --- */
.nav-bar { background: #0091e6; height: 45px; line-height: 45px; }
.nav-bar li { float: left; }
.nav-bar a { display: block; padding: 0 25px; color: #fff; font-size: 16px; font-weight: 500; }
.nav-bar a:hover, .nav-bar a.active { background: #007bbd; }

/* --- 首页布局 (三栏: 左210 中730 右240) --- */
.home-section { margin-top: 15px; display: flex; justify-content: space-between; gap: 10px; }

/* 左侧快捷分类 */
.side-cat { width: 210px; background: #fff; border: 1px solid #eee; height: 100%; }
.side-cat h3 { background: #0091e6; color: #fff; padding: 10px 15px; font-size: 16px; font-weight: normal; }
.side-cat ul { padding: 5px 0; }
.side-cat li a { display: block; padding: 8px 20px; border-left: 3px solid transparent; font-size: 14px; }
.side-cat li a:hover { border-left-color: #e60012; background: #f9f9f9; color: #e60012; padding-left: 25px; }

/* 中间内容区 */
.main-content { width: 730px; }
.slide-box { height: 300px; width: 100%; overflow: hidden; position: relative; margin-bottom: 15px; }
.slide-box img { width: 100%; height: 100%; object-fit: cover; }

.floor-box { background: #fff; border: 1px solid #eee; margin-bottom: 15px; }
.floor-head { border-bottom: 1px solid #eee; padding: 10px 15px; position: relative; }
.floor-head h2 { font-size: 18px; border-left: 4px solid #0091e6; padding-left: 10px; line-height: 1; }
.floor-head .more { position: absolute; right: 15px; top: 12px; font-size: 12px; color: #999; }
.floor-body { padding: 15px; display: flex; flex-wrap: wrap; gap: 15px; }
/* 首页期刊小卡片 */
.mini-journal { width: 48%; display: flex; margin-bottom: 10px; border-bottom: 1px dashed #eee; padding-bottom: 10px; }
.mini-journal img { width: 80px; height: 110px; border: 1px solid #eee; margin-right: 10px; }
.mini-journal .info h4 { font-size: 14px; margin-bottom: 5px; height: 40px; overflow: hidden; }
.mini-journal .info span { font-size: 12px; color: #999; display: block; }

/* 右侧侧栏 */
.side-right { width: 240px; }
.side-box { background: #fff; border: 1px solid #eee; padding: 15px; margin-bottom: 15px; }
.side-box h4 { font-size: 16px; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.rank-list li { margin-bottom: 8px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-list i { display: inline-block; width: 18px; height: 18px; background: #ddd; color: #fff; text-align: center; line-height: 18px; margin-right: 5px; font-style: normal; font-size: 12px; }
.rank-list li:nth-child(1) i { background: #e60012; }
.rank-list li:nth-child(2) i { background: #f39800; }
.rank-list li:nth-child(3) i { background: #8fc31f; }

/* --- 列表页样式 --- */
.filter-box { background: #fff; padding: 20px; border: 1px solid #eee; margin-top: 15px; }
.list-item { background: #fff; padding: 20px; border: 1px solid #eee; margin-top: 15px; display: flex; transition: all 0.3s; }
.list-item:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.1); border-color: #0091e6; }
.list-img { width: 140px; height: 190px; border: 1px solid #eee; margin-right: 25px; flex-shrink: 0; }
.list-img img { width: 100%; height: 100%; object-fit: cover; }
.list-info { flex: 1; }
.list-info h2 { font-size: 20px; margin-bottom: 10px; }
.list-info .meta { color: #666; font-size: 13px; line-height: 24px; margin-bottom: 15px; }
.list-info .meta span { margin-right: 20px; }
.list-info .tags span { border: 1px solid #ddd; padding: 2px 6px; font-size: 12px; color: #666; margin-right: 5px; border-radius: 2px; }
.list-btn { margin-top: 15px; }
.btn-primary { background: #e60012; color: #fff; padding: 8px 25px; border-radius: 3px; border: none; cursor: pointer; }
.btn-default { background: #fff; color: #333; border: 1px solid #ddd; padding: 8px 25px; border-radius: 3px; cursor: pointer; }

/* --- 详情页样式 --- */
.detail-top { background: #fff; padding: 25px; border: 1px solid #eee; margin-top: 15px; display: flex; }
.d-cover { width: 220px; text-align: center; margin-right: 30px; }
.d-cover img { width: 180px; height: 250px; border: 1px solid #eee; padding: 3px; }
.d-info { flex: 1; }
.d-info h1 { font-size: 24px; margin-bottom: 15px; color: #333; }
.d-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.d-table td { border: 1px solid #f0f0f0; padding: 10px; }
.d-table .label { background: #f9f9f9; width: 100px; color: #666; font-weight: bold; }

.detail-content { background: #fff; border: 1px solid #eee; margin-top: 15px; padding: 0; }
.tab-nav { border-bottom: 1px solid #eee; background: #f9f9f9; height: 50px; }
.tab-nav span { display: inline-block; padding: 0 30px; line-height: 50px; font-size: 16px; cursor: pointer; border-right: 1px solid #eee; }
.tab-nav span.active { background: #fff; border-top: 3px solid #0091e6; color: #0091e6; font-weight: bold; margin-top: -1px; }
.tab-body { padding: 30px; line-height: 1.8; font-size: 15px; color: #444; min-height: 300px; }

/* 底部 */
.footer { background: #333; color: #999; padding: 40px 0; margin-top: 30px; text-align: center; }
.footer p { margin-bottom: 10px; }

/* --- 移动端适配 (Max 768px) --- */
@media (max-width: 768px) {
    .header-main { height: auto; padding: 15px; text-align: center; }
    .logo, .search-box, .header-contact { float: none; width: 100%; margin: 0 0 10px 0; text-align: center; }
    .search-box input { width: 70%; }
    .nav-bar { height: auto; }
    .nav-bar li { float: none; display: inline-block; }
    
    .home-section { flex-direction: column; }
    .side-cat, .side-right { display: none; } /* 手机端隐藏侧边栏 */
    .main-content { width: 100%; }
    
    .list-item { flex-direction: column; text-align: center; }
    .list-img { margin: 0 auto 15px; }
    
    .detail-top { flex-direction: column; }
    .d-cover { margin: 0 auto 20px; width: 100%; }
}