/* ==========================================================================
   1. 全局变量与重置 (Global & Reset)
   ========================================================================== */
:root {
    /* 核心配色：沉稳的高校蓝 + 活力红 */
    --primary-color: #003366; 
    --primary-light: #004080;
    --accent-color: #b30000;
    
    /* 文字颜色 */
    --text-main: #333333;
    --text-sub: #555555;
    --text-light: #999999;
    
    /* 背景与边框 */
    --bg-body: #f4f7fa;
    --bg-white: #ffffff;
    --border-color: #e8e8e8;
    
    /* 布局参数 */
    --container-width: 1200px;
    --card-radius: 6px;
    --card-height: 340px; /* 首页卡片统一高度 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
}

a { text-decoration: none; color: inherit; transition: color 0.3s ease; }
a:hover { color: var(--primary-color); }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
input, button { font-family: inherit; outline: none; }

/* 布局容器 */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* ==========================================================================
   2. 统一头部与导航 (Header & Navigation)
   ========================================================================== */
.header {
    background: var(--bg-white);
    padding: 25px 0;
    border-bottom: 4px solid var(--primary-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 28px;
    font-weight: bold;
    color: var(--primary-color);
    letter-spacing: 1px;
}
.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #00509e);
    color: #fff;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-style: normal;
    box-shadow: 0 4px 6px rgba(0,51,102,0.3);
}
.logo small {
    font-size: 16px;
    color: #666;
    font-weight: normal;
    margin-left: 5px;
}

/* 顶部搜索框 */
.search-box {
    display: flex;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    overflow: hidden;
    height: 42px;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0,51,102,0.2);
}
.search-input {
    border: none;
    padding: 0 20px;
    width: 240px;
    font-size: 14px;
    background: transparent;
}
.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    border-radius: 0 30px 30px 0;
    transition: background 0.3s;
}
.search-btn:hover { background-color: #002244; }

/* 主导航条 */
.nav {
    background-color: var(--primary-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.nav-list { display: flex; flex-wrap: wrap; }
.nav-item { flex: 1; text-align: center; min-width: 100px; }
.nav-item a {
    display: block;
    padding: 16px 0;
    color: rgba(255,255,255,0.9);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}
.nav-item a:hover,
.nav-item.active a { /* 选中或悬停状态 */
    background-color: rgba(255,255,255,0.15);
    color: #fff;
}

/* ==========================================================================
   3. 首页专用组件 (Homepage Components)
   ========================================================================== */
.main-content { padding: 30px 0; }

.top-section {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
    height: 360px;
}

/* 轮播图 */
.carousel-container {
    flex: 5;
    background-color: #ddd;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.carousel-slides {
    display: flex;
    height: 100%;
    transition: transform 0.6s ease-in-out;
}
.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
    position: relative;
    background: linear-gradient(45deg, #1e3c72, #2a5298);
}
.slide >.img{
width:100%;
height:100%;
}
.slide:nth-child(2) { background: linear-gradient(45deg, #8e44ad, #c0392b); }
.slide:nth-child(3) { background: linear-gradient(45deg, #134e5e, #71b280); }
.slide-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 15px;
    font-size: 16px;
    text-align: left;
}

.notice-wrapper { flex: 7; height: 100%; }
.notice-wrapper .card { height: 100%; }

/* 卡片通用 */
.card {
    background: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    height: var(--card-height);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s;
}
.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fafafa;
    border-radius: 8px 8px 0 0;
}
.card-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    padding-left: 12px;
    border-left: 5px solid var(--primary-color);
    line-height: 1;
}
.more-link { font-size: 14px; color: #999; }
.more-link:hover { color: var(--accent-color); }
.card-body { padding: 15px 20px; flex: 1; overflow-y: auto; }
.card-body::-webkit-scrollbar { width: 6px; }
.card-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

.info-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
}
.info-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
}
.info-date { color: #999; font-size: 13px; font-family: monospace; }

.grid-section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* 招聘按钮 */
.recruit-box { display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.recruit-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    color: white;
    padding: 20px;
    border-radius: 6px;
    transition: background 0.3s;
    text-align: center;
}
.recruit-btn:hover { background-color: #900000; color: white; }
.recruit-title { font-size: 18px; font-weight: bold; margin-bottom: 5px; }
.recruit-sub { font-size: 13px; opacity: 0.8; font-weight: normal; }
.recruit-desc { font-size: 13px; color: #666; text-align: center; margin-top: 10px; }

/* ==========================================================================
   4. 内页通用布局 (Inner Layout)
   ========================================================================== */
.inner-layout {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    margin-bottom: 50px;
    min-height: 600px;
}

/* 侧边栏 */
.sidebar { width: 260px; flex-shrink: 0; }
.sidebar-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-top: 3px solid var(--primary-color);
    overflow: hidden;
    margin-bottom: 20px;
}
.sidebar-title {
    background: #fafafa;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    border-bottom: 1px solid #eee;
}
.sidebar-menu { list-style: none; padding: 10px 0; }
.sidebar-menu li a {
    display: block;
    padding: 12px 25px;
    color: #555;
    font-size: 15px;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}
.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background-color: #eef4fa;
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: bold;
}
.contact-widget {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.contact-widget h4 { margin-bottom: 10px; color: #333; }
.contact-widget p { font-size: 14px; color: #666; margin-bottom: 5px; }

/* 右侧主体 */
.main-body {
    flex: 1;
    background: #fff;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.breadcrumb {
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
    font-size: 14px;
    color: #888;
}
.breadcrumb a { color: #555; }
.breadcrumb-current { color: var(--primary-color); font-weight: bold; }

.page-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 25px;
    padding-left: 10px;
    border-left: 4px solid var(--primary-color);
    line-height: 1;
}

/* 列表页元素 */
.news-list li {
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.news-list li:hover { background-color: #fcfcfc; }
.news-title { font-size: 16px; color: #333; flex: 1; margin-right: 20px; }
.news-title:hover { color: var(--primary-color); }
.news-date { color: #999; font-family: monospace; }

.pagination {
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}
.page-btn {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #ddd;
    color: #666;
    border-radius: 4px;
    font-size: 14px;
}
.page-btn.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* 详情页元素 */
.article-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #eee;
}
.article-title { font-size: 26px; color: #333; margin-bottom: 15px; }
.article-meta { font-size: 14px; color: #999; }
.article-meta span { margin: 0 10px; }
.article-content { font-size: 16px; line-height: 1.8; color: #444; }
.article-content p { margin-bottom: 20px; text-indent: 2em; text-align: justify; }
.attachment-box {
    margin-top: 40px;
    background: #f8f8f8;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
}
.attachment-link { color: var(--primary-color); text-decoration: underline; }

/* 搜索页元素 */
.search-bar-inner { display: flex; margin-bottom: 30px; max-width: 600px; }
.search-bar-inner input { flex: 1; padding: 10px; border: 1px solid #ddd; outline: none; }
.search-bar-inner button { padding: 10px 25px; background: var(--primary-color); color: #fff; border: none; cursor: pointer; }
.result-item { padding: 20px 0; border-bottom: 1px solid #eee; }
.result-title { font-size: 18px; color: var(--primary-color); font-weight: bold; margin-bottom: 8px; display: block; }
.result-desc { font-size: 14px; color: #666; margin-bottom: 8px; }
.keyword { color: #c0392b; font-weight: bold; }

/* 简介页元素 (组织架构) */
.intro-text { font-size: 16px; line-height: 2; color: #444; margin-bottom: 30px; }
.org-chart { border: 1px solid #eee; padding: 30px; background: #fafafa; text-align: center; border-radius: 8px; }
.org-box { display: inline-block; padding: 10px 20px; background: #fff; border: 2px solid var(--primary-color); color: var(--primary-color); border-radius: 4px; font-weight: bold; margin-bottom: 20px; }
.org-line { width: 2px; height: 20px; background: #ccc; margin: 0 auto; }
.org-row { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-top: 10px; }
.org-child { background: #fff; padding: 8px 15px; border: 1px solid #ccc; border-radius: 4px; font-size: 14px; color: #555; }

/* ==========================================================================
   5. 页脚与响应式 (Footer & Responsive)
   ========================================================================== */
.footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    text-align: center;
    padding: 40px 0;
    margin-top: 40px;
}
.footer p { margin: 5px 0; }

@media (max-width: 768px) {
    .header-inner, .nav-list, .top-section, .grid-section, .inner-layout { flex-direction: column; height: auto; }
    .search-box { width: 100%; margin-top: 15px; }
    .search-input { width: 100%; }
    .nav-item { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .sidebar { width: 100%; }
    .carousel-container { height: 200px; }
    .notice-wrapper { height: 320px; }
    :root { --card-height: auto; }
}