/* =========================================
   1. 全局重置与基础设置
   ========================================= */
html {
    color: #000;
    font: 12px Helvetica, Tahoma, Arial, "Hiragino Sans GB", "Microsoft YaHei", SimSun, Heiti, sans-serif;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* 重置所有元素的默认边距和边框 */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
}

body {
    background: #f6f7fb; /* 恢复页面背景色 */
    overflow-x: hidden;
    min-width: 320px;
}

ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; cursor: pointer; transition: all 0.3s; }
img { max-width: 100%; height: auto; display: block; }

/* 核心修复：定义全局容器，限制最大宽度并居中 */
.container {
    max-width: 1300px; /* 按照你的要求设置为 1380px */
    margin: 0 auto;
    padding: 0 15px; /* 在小屏幕上提供两侧边距 */
    box-sizing: border-box;
    background: #fff; /* 确保内容区域有白色背景 */
}

/* =========================================
   2. 头部与导航
   ========================================= */
.header {
    width: 100%;
    height: 90px;
    background-color: #fff;
    position: relative;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* 增加一点阴影，提升层次感 */
}

.header .logo {
    width: 258px;
    margin-top: 10px;
    float: left;
}

.header-nav {
    float: right;
}

.header-nav ul li {
    float: left;
    padding-left: 17px;
}

.header-nav ul li a {
    height: 90px;
    line-height: 90px;
    color: #919191;
    font-size: 14px;
    display: block;
}

.header-nav ul li a.active,
.header-nav ul li a:hover {
    color: #153060;
    border-bottom: 3px solid #153060;
}

/* 移动端菜单触发器 */
#cd-menu-trigger {
    display: none;
    position: absolute;
    right: 20px;
    top: 30px;
    width: 30px;
    height: 30px;
    background: #153060;
    border-radius: 4px;
}

#cd-menu-trigger .cd-menu-icon {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    margin: 14px auto;
    position: relative;
}

#cd-menu-trigger .cd-menu-icon::before,
#cd-menu-trigger .cd-menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: #fff;
    transition: 0.3s;
}

#cd-menu-trigger .cd-menu-icon::before { top: -6px; }
#cd-menu-trigger .cd-menu-icon::after { top: 6px; }

/* =========================================
   3. Banner 区域
   ========================================= */
.banner-box {
    width: 100%;
    text-align: center;
    background: #f0f0f0; /* 图片加载失败时的背景色 */
    overflow: hidden;
}

.banner-box .bj {
    width: 100%;
    height: 300px; /* 设定一个固定高度 */
    background: url(../images/banner-bj.jpg) no-repeat center center;
    background-size: cover; /* 确保背景图覆盖整个区域且不变形 */
}

/* =========================================
   4. 主体内容区域
   ========================================= */
.main {
    padding: 20px 0;
}

/* 面包屑导航 */
.main-t p {
    padding: 10px 15px;
    color: #808080;
    font-size: 13px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* =========================================
   5. 项目分类筛选 (.xm-chose) - 重构版
   ========================================= */
.xm-list-chose {
    padding: 20px 0;
    background: #fff;
    border-top: 4px solid #153060;
    margin-bottom: 20px;
}

.xm-list-chose h4 {
    font-size: 18px;
    color: #990000;
    font-weight: bold;
    margin-bottom: 15px;
    padding: 0 15px;
}

/* 核心容器：使用 Flexbox 实现自动换行 */
.xm-chose {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 15px;
}

/* 分类链接的通用样式 */
.xm-chose a {
    display: inline-block;
    padding: 6px 14px;
    font-size: 14px;
    color: #5c5c5c;
    background-color: #f5f5f5;
    border-radius: 4px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.xm-chose a:hover {
    color: #e83632;
    background-color: #eaeaea;
}

/* 选中状态的样式 */
.xm-chose a.on {
    background-color: #af0c2b;
    color: #fff;
}
/* =========================================
   面包屑导航 (.breadcrumb)
   ========================================= */
.breadcrumb {
    padding: 12px 15px;
    font-size: 13px;
    color: #808080;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* 面包屑内的链接样式 */
.breadcrumb a {
    color: #153060; /* 使用你项目的主题色 */
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #e83632; /* 悬停时变为主题强调色 */
    text-decoration: underline;
}

/* 分隔符样式（如果你的面包屑是用 > 或 / 分隔的） */
.breadcrumb span {
    margin: 0 5px;
    color: #ccc;
}
/* =========================================
   6. 项目列表 (.xm-list)
   ========================================= */
.xm-list {
    background: #fff;
    padding: 10px;
}

.xm-list li {
    border: 1px solid #edeff3;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.xm-list li:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.xm-list-head {
    height: 50px;
    line-height: 50px;
    background: #fbfbfb;
    border-bottom: 1px solid #e5e5e5;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xm-list-head h5 {
    font-size: 18px;
    color: #333;
    font-weight: normal;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-left: 10px;
    border-left: 4px solid #003f88;
}
/* 项目列表标题样式 */
.list-title {
    cursor: pointer;
    text-decoration: none;
    /* 顺便把你之前的标题样式也整合进来 */
    font-size: 18px;
    color: #333;
    font-weight: normal;
}
/* 列表标签/价格样式 */
.list-tag {
    color: #ca2222;
    padding-right: 10px;
}
.xm-list-head p {
    font-size: 14px;
    color: #555;
    margin-left: 15px;
    white-space: nowrap;
}

.xm-list-head p span {
    color: #e83632;
}

.xm-list-con {
    padding: 15px;
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    border-bottom: 1px solid #eee;
}

.xm-list-foot {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.xm-list-foot dl {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    width: 60%;
}

.xm-list-foot dl dd {
    margin-bottom: 5px;
    font-size: 14px;
    color: #8e8d8d;
    width: 50%;
    box-sizing: border-box;
}

.xm-list-foot dl dd strong {
    color: #333;
    margin-right: 5px;
}
/* 核心：重置 dd 内部链接的样式 */
.xm-list-foot dl dd a {
    color: #8e8d8d;             /* 继承原有的灰色字体 */
    text-decoration: none;      /* 去除默认下划线 */
    outline: none;              /* 【新增】去除点击后的蓝色焦点外框 */
    transition: color 0.3s;     /* 颜色过渡动画 */
}

/* 鼠标悬停时的交互效果 */
.xm-list-foot dl dd a:hover {
    color: #e83632;             /* 悬停时变为主题强调色 */
    text-decoration: underline; /* 悬停时显示下划线 */
}

.xm-list-foot a {
    display: inline-block;
    padding: 0 20px;
    height: 36px;
    line-height: 36px;
    background: #003f88;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    
    /* 核心优化：去除蓝色焦点框和默认下划线 */
    outline: none;
    text-decoration: none;
    transition: background 0.3s ease; /* 增加背景色过渡，悬停更丝滑 */
}

/* 鼠标悬停效果 */
.xm-list-foot a:hover {
    background: #cfa253;
    color: #fff; /* 强制保持白色，防止被全局链接样式覆盖 */
}

/* 核心优化：去除点击激活时的蓝色边框 */
.xm-list-foot a:active,
.xm-list-foot a:focus {
    outline: none;
}

.btn-group {
    display: flex;             /* 核心：启用 Flex 弹性布局，强制子元素横向排列 */
    gap: 10px;                 /* 两个按钮之间留出 10px 的间距 */
    margin-top: 15px;          /* 与上方的内容保持一定距离 */
}

/* 按钮组内的链接样式 */
.btn-group a {
    flex: 1;                   /* 核心：让两个按钮平分可用宽度 */
    display: block;
    height: 36px;
    line-height: 36px;
    text-align: center;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
    box-sizing: border-box;    /* 防止 padding 撑破布局 */
}

/* 第一个按钮（查看详情） */
.btn-group a:first-child {
    background: #003f88;
    color: #fff;
}

.btn-group a:first-child:hover {
    background: #cfa253;
}

/* 第二个按钮（在线咨询） */
.btn-group a:last-child {
    background: #f5f5f5;
    color: #5c5c5c;
    border: 1px solid #ddd;
}

.btn-group a:last-child:hover {
    background: #eaeaea;
}
/* 课程预告 */
.jxyx {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    border-radius: 4px;
}

.jxyx .title {
    display: flex;             /* 核心：启用 Flex 布局 */
    justify-content: space-between; /* 核心：左右两端对齐 */
    align-items: center;       /* 垂直居中对齐 */
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* 左侧标题样式保持不变 */
.jxyx .title h4 {
    font-size: 20px;
    color: #e83632;
    font-weight: bold;
    position: relative;
    padding-left: 15px;
    margin: 0; /* 清除默认的 margin */
}

.jxyx .title h4:before {
    content: '';
    display: block;
    width: 4px;
    height: 20px;
    background: #e83632;
    position: absolute;
    left: 0;
    top: 2px;
}

/* 右侧“更多”链接样式 */
.jxyx .title .more-link {
    font-size: 14px;
    color: #9e9d9d;
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap; /* 防止文字被挤压换行 */
}

.jxyx .title .more-link:hover {
    color: #e83632; /* 悬停时与标题颜色呼应 */
}

.title a {
    float: right;
    font-size: 14px;
    color: #9e9d9d;
}

.jxyx ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;          /* 核心：启用 Flexbox 弹性布局 */
    flex-wrap: wrap;        /* 核心：允许子元素换行，形成多列 */
    gap: 10px 20px;         /* 行间距 10px，列间距 20px */
}

.jxyx ul li {
    position: relative;
    padding: 8px 0 8px 20px;
    border-bottom: 1px dotted #e8e7e7;
    font-size: 14px;
    width: calc(50% - 10px); /* 核心：每个列表项占据一半宽度（减去一半的列间距） */
    box-sizing: border-box;  /* 确保 padding 不会撑破宽度 */
}

/* 标题和链接样式保持不变 */
.jxyx ul li a {
    display: block;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 120px; 
    text-decoration: none;
}

.jxyx ul li a:hover { color: #e83632; }

.jxyx ul li span.time {
    color: #999;
    font-size: 13px;
    position: absolute;
    right: 0;
    top: 9px;
}

/* 分页 */
.page-box {
    text-align: center;
    padding: 20px 0;
}

.page-box dd {
    display: inline-block;
    margin: 0 2px;
}

.page-box dd a {
    display: block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    background: #eee;
    color: #333;
    border-radius: 2px;
}

.page-box dd a:hover,
.page-box dd a.page-cur {
    background: #af0c2b;
    color: #fff;
}

/* =========================================
   7. 底部
   ========================================= */
.footer {
    background: #333;
    color: #999;
    padding: 30px 0;
    text-align: center;
    font-size: 12px;
    margin-top: 40px;
}

.footer .container {
    background: transparent; /* 底部容器不需要白色背景 */
}

.footer p {
    margin: 5px 0;
}

/* =========================================
   8. 移动端适配 (max-width: 768px)
   ========================================= */
@media screen and (max-width: 768px) {
    .header {
        height: 60px;
    }
    
    .header .logo {
        margin-top: 10px;
        width: 160px;
    }
    
    .header-nav {
        display: none; /* 简化处理，实际需配合JS */
    }
    
    #cd-menu-trigger {
        display: block;
        top: 15px;
    }

    .banner-box .bj {
        height: 180px; /* 移动端减小 Banner 高度 */
    }

    .main {
        padding: 10px 0;
    }
    
    .main-t p {
        padding: 10px;
        font-size: 12px;
    }

    .xm-list-chose {
        padding: 15px 0;
        border-top-width: 3px;
    }

    .xm-list-chose h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .xm-chose {
        gap: 8px;
        padding: 0 15px;
    }

    .xm-chose a {
        padding: 5px 12px;
        font-size: 13px;
    }
    .breadcrumb {
        padding: 10px;
        font-size: 12px;
        margin-bottom: 10px;
        background: transparent; /* 手机端可以改为透明背景，更轻量 */
        border-bottom: 1px dashed #eee; /* 用虚线分隔 */
        border-radius: 0;
    }
    .xm-list {
        padding: 0;
        background: transparent;
    }
    
    .xm-list li {
        margin-bottom: 15px;
    }

    .xm-list-head {
        flex-direction: column;
        height: auto;
        padding: 15px;
        align-items: flex-start;
    }

    .xm-list-head h5 {
        border: none;
        padding: 0;
        margin-bottom: 10px;
        font-size: 18px;
        width: 100%;
    }

    .xm-list-head p {
        margin: 0;
        width: 100%;
        text-align: right;
        font-size: 14px;
    }

    .xm-list-con {
        padding: 15px;
        font-size: 14px;
    }

    .xm-list-foot {
        padding: 15px;
    }

    .xm-list-foot dl {
        width: 100%;
        margin-bottom: 15px;
    }

    .xm-list-foot dl dd {
        width: 50%;
        font-size: 14px;
    }

    .xm-list-foot a {
        width: 100%;
        box-sizing: border-box;
    }
    .btn-group {
        gap: 8px;              /* 手机端适当缩小间距 */
        margin-top: 10px;
    }
    
    .btn-group a {
        height: 40px;          /* 手机端稍微增大按钮高度，方便点击 */
        line-height: 40px;
        font-size: 13px;
    }
    .jxyx {
        padding: 15px;
        margin-top: 15px;
    }
    .jxyx ul {
        display: block; /* 手机端关闭 Flex 布局，恢复默认的块级流式布局 */
    }
    
    .jxyx ul li {
        width: 100%;    /* 手机端列表项占满整行 */
    }
    .jxyx .title h4 {
        font-size: 18px;
    }
    
    .jxyx .title .more-link {
        font-size: 13px;
    }
    
    .jxyx ul li a {
        margin-right: 80px;
        font-size: 13px;
    }
    
    .jxyx ul li span.time {
        font-size: 12px;
        top: 9px;
    }
}