/* 全局设置 */

/* 1. 开启全局平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 2. 解决固定导航栏遮挡标题的问题 */
section {
    /* 你的导航栏高度是 80px，这里设置 100px 是为了留出一点呼吸感 */
    scroll-margin-top: 100px; 
}

:root {
    --primary-color: #003366; /* 深邃蓝：学术、稳重 */
    --secondary-color: #b89e68; /* 金色：点缀、尊贵（对应“玉君”的质感） */
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

h1, h2, h3, h4 {
    font-family: 'Noto Serif SC', serif; /* 标题使用衬线体，更具官方感 */
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* 导航栏 */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-text .sub-title {
    font-size: 0.8rem;
    color: var(--text-light);
}

.logo-text .main-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-size: 1rem;
    color: var(--text-dark);
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* Hero Section */
.hero {
    height: 60vh;
    background-image: url('/images/西南财经大学.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    margin-top: 80px; /* 避开固定导航栏 */
}

.hero-overlay {
    background: linear-gradient(rgba(0, 51, 102, 0.8), rgba(0, 51, 102, 0.6));
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.hero-content .en-title {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.btn {
    display: inline-block;
    padding: 10px 30px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: 4px;
    transition: background 0.3s;
}

.btn:hover {
    background-color: #a08855;
}

/* Section 通用样式 */
section {
    padding: 80px 0;
}

.section-white { background-color: var(--white); }
.section-gray { background-color: var(--bg-light); }
.section-dark { background-color: var(--primary-color); color: var(--white); }

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

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.section-header .subtitle {
    color: var(--text-light);
    font-size: 1rem;
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 15px auto;
}

.divider-light {
    width: 60px;
    height: 3px;
    background-color: var(--white);
    opacity: 0.5;
    margin: 15px auto;
}

/* Intro Section */
.intro-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.intro-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-align: justify;
}

.intro-highlight {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stat-item i {
    font-size: 2rem;
    color: var(--primary-color);
}

.stat-item span {
    font-weight: bold;
    color: var(--text-dark);
}

/* --- 这里改用 Flex 布局来实现居中 --- */

.function-grid {
    display: flex;           /* 从 grid 改为 flex */
    flex-wrap: wrap;         /* 允许换行 */
    justify-content: center; /* 关键：让所有卡片在行内居中对齐 */
    gap: 30px;               /* 卡片之间的间距 */
    margin-top: 20px;
}

.card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
    
    /* --- 新增宽度控制 --- */
    /* flex: 1 1 300px 意思是在空间不足时最小300px，空间大时可以拉伸 */
    flex: 1 1 300px; 
    
    /* 关键：限制最大宽度。
       防止第二行只有2个卡片时，它们自动拉伸得比第一行的卡片还要宽。
       保持和第一行卡片差不多的大小，只是位置居中。 */
    max-width: 380px; 
}

.card:hover {
    transform: translateY(-5px);
}

/* --- 保持原来的图标和文字样式不变 --- */
.icon-box {
    width: 70px;
    height: 70px;
    background-color: #e6eef5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.icon-box i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}
.icon-box {
    width: 70px;
    height: 70px;
    background-color: #e6eef5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.icon-box i {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Software & History Placeholders */
.qr-grid {
    display: flex;
    justify-content: center;
    gap: 50px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.qr-item {
    text-align: center;
}

.qr-box {
    width: 150px;
    height: 150px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    margin-bottom: 15px;
    border: 1px solid #ccc;
}

.qr-img{
    width: 150px;
    height: 150px;
    background-color: #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    margin-bottom: 15px;
    border: 1px solid #ccc;
}

.software-note {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

.history-placeholder {
    max-width: 800px;
    margin: 0 auto;
    border-left: 2px solid rgba(255,255,255,0.3);
    padding-left: 40px;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -46px;
    top: 5px;
    width: 10px;
    height: 10px;
    background-color: var(--secondary-color);
    border-radius: 50%;
}

.timeline-item .date {
    display: block;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.timeline-item h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #999;
    padding: 50px 0 20px;
}

.footer-content {
    text-align: center;
}

.footer-info h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-info p {
    margin-bottom: 10px;
}

.footer-copyright {
    margin-top: 40px;
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 0.8rem;
}

/* 定义后台按钮样式 */
.btn-backend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #0056b3; /* 初始颜色：深蓝 */
    color: #ffffff !important; /* 文字白色 */
    border-radius: 6px;        /* 圆角 */
    text-decoration: none !important; /* 去掉下划线 */
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    transition: all 0.3s ease; /* 动画过渡 */
}

/* 悬停效果：颜色变深 */
.btn-backend:hover {
    background-color: #003d80; /* 悬停颜色：更深的藏蓝 */
    transform: translateY(-2px); /* 微微上浮 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 禁用状态 */
.btn-backend.disabled {
    background-color: #e9ecef;
    color: #adb5bd !important;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .intro-highlight {
        gap: 20px;
    }

    .function-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none; 
    }


}
/* 新增：针对简介部分图标链接的样式 */
.stat-link {
    text-decoration: none; /* 去掉链接下划线 */
    color: inherit;        /* 继承原本的文字颜色，防止变成默认的蓝色 */
    transition: transform 0.3s ease;
    display: inline-block;
}

.stat-link:hover .stat-item {
    transform: translateY(-5px); /* 鼠标放上去有一个上浮的动画，提示可点击 */
    cursor: pointer;
}

/* 确保图标在hover时颜色也有变化，增加交互感 */
.stat-link:hover .stat-item i {
    color: var(--secondary-color); /* 变成金色 */
}