/* ==========================================================================
   经济管理学院网站 - 全局样式
   主色系: theme.jpg 蓝色系
   ========================================================================== */

/* CSS 变量 - 主题色系 */
:root {
    --primary: #0070c0;
    --primary-dark: #005a9e;
    --primary-light: #40a0d0;
    --primary-lighter: #e6f0fa;
    --primary-gradient: linear-gradient(135deg, #0070c0, #0080c0, #40a0d0);
    --accent: #1080c0;
    --text-dark: #1a1a2e;
    --text-body: #333;
    --text-muted: #666;
    --text-light: #999;
    --bg-white: #ffffff;
    --bg-light: #f5f7fa;
    --bg-lighter: #fafbfc;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0, 112, 192, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 112, 192, 0.12);
    --shadow-lg: 0 8px 30px rgba(0, 112, 192, 0.15);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 72px;
    --container-width: 1200px;
}

/* 全局重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-body);
    background: var(--bg-white);
    line-height: 1.7;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    display: block;
}

ul, ol {
    list-style: none;
}

/* 容器 */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   顶部导航
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    max-width: var(--container-width);
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.logo-img {
    max-height: 52px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
    mix-blend-mode: multiply;
    filter: contrast(1.05);
}

.logo-text {
    line-height: 1.3;
}

.logo-text small {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu > li > a {
    display: block;
    padding: 10px 22px;
    font-size: 1rem;
    color: var(--text-body);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-menu > li > a:hover {
    color: var(--primary);
    background: var(--primary-lighter);
}

.nav-menu > li > a.active {
    color: var(--primary);
    font-weight: 700;
}

.nav-menu > li > a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   页面横幅
   ========================================================================== */
.page-banner {
    margin-top: var(--header-height);
    height: 280px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 80 80"><path d="M0 40 L80 0 M20 60 L80 20 M40 80 L80 40" stroke="rgba(255,255,255,0.05)" stroke-width="1" fill="none"/></svg>');
}

.page-banner h1 {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    letter-spacing: 4px;
}

.page-banner p {
    margin-top: 12px;
    font-size: 1.1rem;
    opacity: 0.85;
    position: relative;
    letter-spacing: 2px;
}

/* ==========================================================================
   通用区块
   ========================================================================== */
.section {
    padding: 70px 0;
}

.section-alt {
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--text-dark);
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 16px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    opacity: 0.6;
}

.section-title p {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 112, 192, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 112, 192, 0.4);
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

/* ==========================================================================
   卡片
   ========================================================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* ==========================================================================
   网格
   ========================================================================== */
.grid {
    display: grid;
    gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ==========================================================================
   标签
   ========================================================================== */
.tag {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.8rem;
    border-radius: 20px;
    background: var(--primary-lighter);
    color: var(--primary);
    font-weight: 500;
}

.tag-outline {
    background: transparent;
    border: 1px solid var(--primary);
}

/* ==========================================================================
   Tab 组件
   ========================================================================== */

/* ===== 侧边栏导航 ===== */
.majors-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 50px;
    align-items: start;
}

.majors-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 12px;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    height: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.majors-sidebar .sidebar-title {
    display: none;
}

.majors-sidebar .tab-item {
    display: block;
    padding: 16px 20px;
    color: var(--text-dark);
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    position: relative;
    margin-bottom: 6px;
    background: #fafbfc;
}

.majors-sidebar .tab-item:last-child {
    margin-bottom: 0;
}

.majors-sidebar .tab-item:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 3px 8px rgba(0,112,192,0.25);
    transform: translateX(4px);
}

.majors-sidebar .tab-item.active {
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,112,192,0.3);
    transform: translateX(4px);
}

.majors-content {
    min-height: 400px;
}

.majors-content .tab-panel {
    margin-bottom: 48px;
    scroll-margin-top: 100px;
}

.majors-content .tab-panel:last-child {
    margin-bottom: 0;
}

/* 响应式：移动端侧边栏变为横向 */
/* ==========================================================================
   学院动态页面
   ========================================================================== */
.news-page-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.news-page-featured {
    width: 300px;
    flex-shrink: 0;
}

.news-page-list-wrap {
    flex: 1;
    min-width: 0;
}

.news-page-block-title {
    margin-bottom: 24px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 12px;
}

.news-page-block-title h2 {
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 700;
    display: inline-block;
}

/* 图片新闻卡片 */
.news-photo-item {
    margin-bottom: 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.news-photo-item:hover {
    box-shadow: var(--shadow-md);
}

.news-photo-item a {
    display: block;
    position: relative;
}

.news-photo-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-photo-item:hover img {
    transform: scale(1.05);
}

.news-photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 右侧列表 */
.news-page-list {
    display: flex;
    flex-direction: column;
}

.news-page-list li {
    border-bottom: 1px dashed var(--border-color);
}

.news-page-link {
    display: flex;
    align-items: center;
    padding: 14px 0;
    color: var(--text-body);
    transition: var(--transition);
}

.news-page-link:hover {
    color: var(--primary);
}

.news-page-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    margin-right: 12px;
    flex-shrink: 0;
}

.news-page-title {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 16px;
}

.news-page-date {
    font-size: 0.85rem;
    color: var(--text-light);
    flex-shrink: 0;
    font-family: "Segoe UI", Arial, sans-serif;
}

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

.article-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* 自定义属性表格 */
.article-extend {
    margin-bottom: 30px;
}

.extend-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.extend-row:first-child {
    border-top: 1px solid var(--border-color);
}

.extend-cell {
    padding: 12px 16px;
    font-size: 0.9rem;
}

.extend-label {
    width: 25%;
    background: var(--bg-lighter);
    color: var(--text-muted);
    font-weight: 500;
    border-right: 1px solid var(--border-color);
}

.extend-value {
    width: 50%;
    color: var(--text-body);
}

/* 分页选择器 */
.article-page-select {
    margin-bottom: 30px;
    text-align: center;
}

.page-select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-body);
    font-size: 0.9rem;
    cursor: pointer;
}

/* 分页导航 */
.article-page-nav {
    text-align: center;
    margin: 40px 0 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.page-prev,
.page-next,
.page-num,
.page-current {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 4px;
    font-size: 0.9rem;
}

.page-num {
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.page-num:hover {
    background: var(--primary);
    color: #fff;
}

.page-current {
    color: #fff;
    background: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* 上一条/下一条 */
.article-neighbor {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px dashed var(--border-color);
}

.neighbor-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.neighbor-link {
    color: var(--primary);
    transition: var(--transition);
}

.neighbor-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 附件列表 */
.article-attach {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-lighter);
    border-radius: var(--radius-md);
}

.attach-list {
    list-style: none;
    padding: 0;
}

.attach-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 8px 0;
}

.attach-link {
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.attach-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 关闭按钮 */
.article-close {
    text-align: center;
    margin-top: 40px;
}

/* 响应式 */
@media (max-width: 768px) {
    .article-title {
        font-size: 1.4rem;
    }

    .article-page {
        padding: 30px 0 50px;
    }

    .article-body p {
        margin-bottom: 16px;
    }

    .extend-row {
        flex-direction: column;
    }

    .extend-label,
    .extend-value {
        width: 100%;
        border-right: none;
    }

    .extend-label {
        border-bottom: 1px solid var(--border-color);
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.breadcrumb {
    background: var(--bg-lighter);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb .sep {
    margin: 0 8px;
    color: var(--text-light);
}

.breadcrumb .current {
    color: var(--primary);
    font-weight: 500;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   文章详情页
   ========================================================================== */
.article-page {
    padding: 50px 0 70px;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    line-height: 1.4;
    margin-bottom: 16px;
}

.article-meta {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.article-meta .article-date {
    margin-right: 16px;
}

.article-body {
    line-height: 1.8;
    font-size: 1.1rem;
    color: var(--text-body);
}

.article-body p {
    margin-bottom: 20px;
    text-align: justify;
}

.article-body img {
    display: block;
    max-width: 100%;
    margin: 30px auto;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* 文章内表格默认样式 */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 1rem;
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-body table thead {
    background: var(--primary);
    color: #fff;
}

.article-body table th,
.article-body table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.article-body table th {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.article-body table tbody tr:nth-child(even) {
    background: var(--bg-lighter);
}

.article-body table tbody tr:hover {
    background: var(--primary-lighter);
}

.article-body table tbody tr:last-child td {
    border-bottom: none;
}

/* 文章内嵌套列表样式 */
.article-body ul,
.article-body ol {
    margin: 16px 0 24px 32px;
    padding-left: 16px;
}

.article-body ul li {
    list-style-type: disc;
    margin-bottom: 8px;
    line-height: 1.7;
}

.article-body ol li {
    list-style-type: decimal;
    margin-bottom: 8px;
    line-height: 1.7;
}

.article-body blockquote {
    margin: 24px 0;
    padding: 16px 24px;
    border-left: 4px solid var(--primary);
    background: var(--bg-lighter);
    color: var(--text-muted);
    font-style: italic;
}

.article-footer {
    margin-top: 50px;
    text-align: center;
}

.article-back {
    padding: 10px 28px;
    font-size: 0.9rem;
}

/* ==========================================================================
   博达CMS文章组件样式
   ========================================================================== */
.article-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0 40px;
}

.article-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 自定义属性表格 */
.article-extend {
    margin-bottom: 30px;
}

.extend-row {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.extend-row:first-child {
    border-top: 1px solid var(--border-color);
}

.extend-cell {
    padding: 12px 16px;
    font-size: 0.9rem;
}

.extend-label {
    width: 25%;
    background: var(--bg-lighter);
    color: var(--text-muted);
    font-weight: 500;
    border-right: 1px solid var(--border-color);
}

.extend-value {
    width: 50%;
    color: var(--text-body);
}

/* 分页选择器 */
.article-page-select {
    margin-bottom: 30px;
    text-align: center;
}

.page-select {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-body);
    font-size: 0.9rem;
    cursor: pointer;
}

/* 分页导航 */
.article-page-nav {
    text-align: center;
    margin: 40px 0 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.page-prev,
.page-next,
.page-num,
.page-current {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 4px;
    font-size: 0.9rem;
}

.page-num {
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.page-num:hover {
    background: var(--primary);
    color: #fff;
}

.page-current {
    color: #fff;
    background: var(--primary);
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* 上一条/下一条 */
.article-neighbor {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px dashed var(--border-color);
}

.neighbor-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.neighbor-link {
    color: var(--primary);
    transition: var(--transition);
}

.neighbor-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 附件列表 */
.article-attach {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-lighter);
    border-radius: var(--radius-md);
}

.attach-list {
    list-style: none;
    padding: 0;
}

.attach-item {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 8px 0;
}

.attach-link {
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.attach-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 关闭按钮 */
.article-close {
    text-align: center;
    margin-top: 40px;
}

/* 响应式 */
@media (max-width: 768px) {
    .article-title {
        font-size: 1.4rem;
    }

    .article-page {
        padding: 30px 0 50px;
    }

    .article-body p {
        margin-bottom: 16px;
    }

    .extend-row {
        flex-direction: column;
    }

    .extend-label,
    .extend-value {
        width: 100%;
        border-right: none;
    }

    .extend-label {
        border-bottom: 1px solid var(--border-color);
    }
}
