/* ====================== 基础样式 - 全局变量 ====================== */
:root {
    /* 主题色 */
    --primary-color: #1E88E5;
    --primary-dark: #1976D2;
    --secondary-color: #FF9800;
    --secondary-dark: #F57C00;
    --success-color: #4CAF50;
    --success-dark: #388E3C;
    
    /* 中性色 */
    --bg-light: #F5F7FA;
    --white: #FFFFFF;
    --text-main: #333;
    --text-secondary: #666;
    --text-light: rgba(255,255,255,0.9);
    
    /* 间距 */
    --gap-xs: 8px;
    --gap-sm: 10px;
    --gap-md: 20px;
    --gap-lg: 30px;
    --gap-xl: 50px;
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-card: 10px;
    
    /* 阴影 */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-md: 0 5px 15px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.1);
    --shadow-btn: 0 5px 15px rgba(255,152,0,0.3);
    
    /* 过渡 */
    --transition-base: all 0.3s ease;
}

/* ====================== 基础样式 - 样式重置 ====================== */
body, div, p, a, ul, ol, li, button, input, select, textarea, h1, h2, h3, h4, h5, h6, i {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "微软雅黑", "思源黑体", sans-serif;
}
body {
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    padding-top: 70px; /* 给固定头部留空间 */
}
a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
ul, ol, menu {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}
img {
    max-width: 100%;
    vertical-align: middle;
    border: 0;
}
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    outline: none;
}
button {
    cursor: pointer;
    border: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
/* 清除浮动备用 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ====================== 布局样式 ====================== */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 var(--gap-md);
}

/* ====================== 组件样式 - 顶部导航 ====================== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
}
.nav {
    display: flex;
    justify-content: space-between; /* 改为两端对齐，配合中间居中 */
    align-items: center;
    height: 70px;
    gap: var(--gap-md); /* 增加基础间距 */
}
.logo {
    font-size: 22px;
    font-weight: bold;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    flex-shrink: 0; /* 防止Logo被压缩 */
}
.logo i {
    margin-right: var(--gap-sm);
    font-size: 28px;
}
/* 新增：中间菜单容器，实现居中 */
.nav-center {
    display: flex;
    justify-content: center;
    flex: 1; /* 占满剩余空间，实现居中 */
}
.nav-list {
    display: flex;
    margin: 0;
    padding: 0;
}
.nav-list li {
    margin: 0 15px;
    position: relative;
}
.nav-list li a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-main);
    padding: 5px 0;
    transition: var(--transition-base);
}
.nav-list li a:hover {
    color: var(--primary-color);
}
/* 教学管理下拉菜单 */
.dropdown {
    position: relative;
    touch-action: none;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    width: 180px;
    border-radius: var(--radius-sm);
    display: none;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}
.dropdown-menu li {
    margin: 0;
    padding: 0 15px 0 16px;
}
.dropdown-menu li a {
    display: block;
    padding: 10px 0;
    font-size: 15px;
}
.dropdown:hover .dropdown-menu,
.dropdown.touched .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
}
.nav-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 15px;
}
/* 导航按钮通用样式 */
.nav-btn {
    padding: 8px 18px;
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    will-change: transform, background-color;
    color: var(--white) !important;
}
.login-btn {
    background-color: var(--primary-color); /* 使用主题色变量 */
    color: var(--white) !important;
    padding: 8px 18px !important;
    border-radius: var(--radius-lg); /* 统一使用变量，替代硬编码20px */
    transition: var(--transition-base); /* 统一过渡变量 */
}
.login-btn:hover {
    background-color: var(--primary-dark); /* 使用主题色深色变量 */
    transform: scale(1.05);
}
.consult-btn {
    background-color: var(--secondary-color); /* 使用次要色变量 */
    color: var(--white) !important;
    padding: 8px 18px !important;
    border-radius: var(--radius-lg); /* 统一使用变量，替代硬编码20px */
    transition: var(--transition-base); /* 统一过渡变量 */
    margin-left: 10px;
}
.consult-btn:hover {
    background-color: var(--secondary-dark); /* 使用次要色深色变量 */
    transform: scale(1.05);
}
/* 移动端导航按钮 */
.mobile-nav-btn {
    display: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 998;
}
.mobile-nav.active {
    display: block;
}
.mobile-nav-list {
    list-style: none;
}
.mobile-nav-list li {
    padding: 15px 20px;
    border-bottom: 1px solid var(--bg-light);
}
.mobile-dropdown-menu {
    display: none;
    background-color: #F9FAFB;
    padding-left: 30px;
}
.mobile-dropdown-menu.active {
    display: block;
}
.mobile-dropdown-menu li {
    border-bottom: none;
    padding: 10px 20px;
}

/* ====================== 组件样式 - Banner轮播 ====================== */
.banner {
    height: 500px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0 !important;
}
.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    /* 临时背景色，替代缺失的图片 */
    background-color: var(--primary-color);
}
.banner-slide.active {
    opacity: 1;
}
.banner-content {
    text-align: center;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    max-width: 800px;
    padding: 0 var(--gap-md);
}
.banner-content h1 {
    font-size: 42px;
    margin-bottom: var(--gap-md);
}
.banner-content p {
    font-size: 18px;
    margin-bottom: var(--gap-lg);
    line-height: 1.8;
}
.banner-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: var(--white);
    border-radius: var(--radius-xl);
    font-size: 16px;
    font-weight: 500;
    margin: 0 10px;
    transition: var(--transition-base);
    will-change: transform, box-shadow, background-color;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.banner-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-btn);
}
.banner-btn.secondary {
    background-color: rgba(255,255,255,0.8);
    color: var(--primary-color);
}
.banner-btn.secondary:hover {
    background-color: var(--white);
}
.banner-dots {
    position: absolute;
    bottom: var(--gap-md);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}
.banner-dots li {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    margin: 0 8px;
    cursor: pointer;
    transition: var(--transition-base);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.banner-dots li.active {
    background-color: var(--white);
    transform: scale(1.2);
}

/* ====================== 组件样式 - 课程核心介绍卡片 ====================== */
.course-highlights {
    padding: 80px 0;
}
.section-title {
    text-align: center;
    margin-bottom: var(--gap-xl);
}
.section-title h2 {
    font-size: 32px;
    color: var(--text-main);
    margin-bottom: var(--gap-sm);
}
.section-title p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}
.highlights-cards {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--gap-lg);
}
.highlight-card {
    flex: 1;
    min-width: 280px;
    background-color: var(--white);
    border-radius: var(--radius-card);
    padding: var(--gap-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    text-align: center;
    will-change: transform, box-shadow;
}
.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}
.highlight-card i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: var(--gap-md);
}
.highlight-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--text-main);
}
.highlight-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ====================== 组件样式 - 教学管理入口 ====================== */
.teaching-management {
    padding: 80px 0;
    background-color: var(--white);
}
.management-container {
    display: flex;
    align-items: center;
    gap: var(--gap-xl);
    flex-wrap: wrap;
}
.management-left {
    flex: 1;
    min-width: 300px;
}
.management-left h2 {
    font-size: 30px;
    color: var(--text-main);
    margin-bottom: var(--gap-md);
}
.management-left p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: var(--gap-lg);
    line-height: 1.8;
}
.management-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-xl);
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition-base);
    will-change: transform, background-color;
}
.management-btn:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}
.management-right {
    flex: 1;
    min-width: 300px;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    /* 临时背景图替代 */
    background-color: var(--bg-light);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* ====================== 组件样式 - 课程详情入口 ====================== */
.course-entry {
    padding: 80px 0;
    background-color: var(--bg-light);
    text-align: center;
}
.course-entry h2 {
    font-size: 30px;
    color: var(--text-main);
    margin-bottom: var(--gap-md);
}
.course-entry p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--gap-lg);
    line-height: 1.8;
}
.course-entry-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--success-color);
    color: var(--white);
    border-radius: var(--radius-xl);
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition-base);
    will-change: transform, background-color;
}
.course-entry-btn:hover {
    background-color: var(--success-dark);
    transform: scale(1.05);
}

/* ====================== 组件样式 - 咨询预约 ====================== */
.consult {
    padding: 80px 0;
    background-color: var(--primary-color);
    color: var(--white);
}
.consult-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--gap-lg);
}
.consult-left {
    flex: 1;
    min-width: 300px;
}
.consult-left h2 {
    font-size: 30px;
    margin-bottom: var(--gap-md);
}
.consult-left p {
    font-size: 16px;
    margin-bottom: var(--gap-lg);
    line-height: 1.8;
    opacity: var(--text-light);
}
.consult-contact {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.consult-contact i {
    font-size: 20px;
    margin-right: var(--gap-sm);
}
.consult-right {
    flex: 1;
    min-width: 300px;
    background-color: var(--white);
    border-radius: var(--radius-card);
    padding: var(--gap-lg);
    box-shadow: var(--shadow-sm);
}
.consult-form {
    display: flex;
    flex-direction: column;
    gap: var(--gap-md);
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--gap-xs);
}
.form-group label {
    font-size: 15px;
    color: var(--text-main);
    font-weight: 500;
}
.form-group input, .form-group textarea {
    padding: 12px 15px;
    border: 1px solid #E0E0E0;
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    transition: var(--transition-base);
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30,136,229,0.1);
}
/* 移动端表单适配 */
@media (max-width: 576px) {
    .form-group input, .form-group textarea {
        padding: 10px 12px;
    }
}
.form-btn {
    padding: 12px 0;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}
.form-btn:hover {
    background-color: var(--primary-dark);
}

/* ====================== 组件样式 - 底部信息 ====================== */
.footer {
    background-color: var(--text-main);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 0 !important;
}
.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--gap-lg);
    margin-bottom: var(--gap-lg);
}
.footer-col {
    flex: 1;
    min-width: 200px;
}
.footer-col h3 {
    font-size: 18px;
    margin-bottom: var(--gap-md);
    position: relative;
    padding-bottom: var(--gap-sm);
}
.footer-col h3::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}
.footer-col p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
    line-height: 1.7;
}
.footer-col ul li {
    margin-bottom: var(--gap-sm);
}
.footer-col ul li a {
    font-size: 14px;
    opacity: 0.8;
    transition: var(--transition-base);
}
.footer-col ul li a:hover {
    opacity: 1;
    color: var(--primary-color);
}
.footer-bottom {
    text-align: center;
    padding-top: var(--gap-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    opacity: 0.7;
}
.enterprise-link {
    color: var(--primary-color) !important;
    font-weight: 500;
}
.back-to-top {
    position: fixed;
    bottom: var(--gap-lg);
    right: var(--gap-lg);
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition-base);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

/* ====================== 交互样式 - 焦点与无障碍 ====================== */
a:focus, button:focus, .nav-btn:focus, .banner-btn:focus, .management-btn:focus, .course-entry-btn:focus, .form-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
/* 仅鼠标交互时隐藏焦点（保留键盘导航焦点） */
@media (hover: hover) and (pointer: fine) {
    a:focus:not(:focus-visible), 
    button:focus:not(:focus-visible),
    .nav-btn:focus:not(:focus-visible),
    .banner-btn:focus:not(:focus-visible),
    .management-btn:focus:not(:focus-visible),
    .course-entry-btn:focus:not(:focus-visible),
    .form-btn:focus:not(:focus-visible) {
        outline: none;
    }
}

/* ====================== 响应式适配 ====================== */
@media (max-width: 992px) {
    .nav-center {
        display: none; /* 隐藏PC端中间菜单 */
    }
    .nav-right {
        display: none; /* 隐藏PC端右侧按钮 */
    }
    .mobile-nav-btn {
        display: block;
    }
    .banner {
        height: 400px;
    }
    .banner-content h1 {
        font-size: 36px;
    }
    .banner-content p {
        font-size: 16px;
    }
    .management-container {
        gap: var(--gap-lg);
    }
    .management-left, .management-right {
        flex: 100%;
    }
}
@media (max-width: 768px) {
    .banner {
        height: 350px;
    }
    .banner-content h1 {
        font-size: 30px;
    }
    .banner-content p {
        font-size: 15px;
    }
    .banner-btn {
        padding: 10px 20px;
        font-size: 15px;
        margin: 0 5px;
    }
    .section-title h2 {
        font-size: 28px;
    }
    .highlights-cards {
        gap: var(--gap-md);
    }
    .highlight-card {
        flex: 100%;
    }
    .consult-container {
        gap: var(--gap-md);
    }
    .consult-left, .consult-right {
        flex: 100%;
    }
    .footer-col {
        flex: 100%;
    }
}
@media (max-width: 576px) {
    .banner {
        height: 300px;
    }
    .banner-content h1 {
        font-size: 24px;
    }
    .banner-content p {
        font-size: 14px;
        margin-bottom: var(--gap-md);
    }
    .banner-btn {
        padding: 8px 16px;
        font-size: 14px;
        display: block;
        margin: 10px auto;
        width: 80%;
    }
    .section-title h2 {
        font-size: 24px;
    }
    .section-title p {
        font-size: 15px;
    }
    .management-left h2, .course-entry h2, .consult-left h2 {
        font-size: 24px;
    }
    .management-left p, .course-entry p, .consult-left p {
        font-size: 15px;
    }
}
/* 水平流程图样式 */
.flowchart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px auto;
    max-width: 1000px;
    flex-wrap: wrap;
}
.flow-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease;
}
.flow-item:hover {
    transform: translateY(-5px);
}
.flow-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 8px;
    border: 2px solid rgba(255,255,255,0.5);
}
.flow-text {
    color: var(--white);
    font-size: 14px;
    line-height: 1.4;
}
.flow-arrow {
    color: rgba(255,255,255,0.8);
    font-size: 18px;
    margin: 0 15px;
}
@media (max-width: 768px) {
    .flowchart-container {
        flex-direction: column;
        gap: 10px;
    }
    .flow-arrow {
        transform: rotate(90deg);
        margin: 5px 0;
    }
}

/* ========== 文件清单样式 ========== */
.file-list {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.file-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    margin: 0.5rem 0;
    background: #f8f9fa;
    border-radius: 4px;
    transition: background 0.2s;
}
.file-item:hover {
    background: #e9ecef;
}
.file-icon {
    margin-right: 0.8rem;
    color: #4299e1;
    font-size: 1.2rem;
}
.file-name {
    flex: 1;
    font-size: 1rem;
    color: #333;
}
.file-link {
    color: #4299e1;
    text-decoration: none;
}
.file-link:hover {
    text-decoration: underline;
}
.empty-tip {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-size: 1rem;
}

/* 文件列表增强样式 */
.file-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    background: #f8f9fa;
    border-radius: 4px;
    gap: 10px;
}
.file-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}
.file-link {
    flex: 1;
    text-decoration: none;
    color: #2563eb;
}
.file-size {
    font-size: 13px;
    color: #666;
    min-width: 90px;
    text-align: right;
}
.file-time {
    font-size: 13px;
    color: #666;
    min-width: 150px;
    text-align: right;
}

/* 考题待发布：灰色不可点击 */
.disabled-item,
a.disabled-item,
li.disabled-item a {
    color: #999 !important; /* 灰色 */
    pointer-events: none !important; /* 禁止点击 */
    cursor: not-allowed !important; /* 禁止图标 */
    opacity: 0.6 !important;
}
