﻿/* ==================== 基础重置 ==================== */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
body { font: 14px/1.6 "Microsoft YaHei", Arial, sans-serif; color: #333; background: #f5f7fa; }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
a:hover { color: #c11d1c; }
ul { list-style: none; }
img { max-width: 100%; display: block; border: 0; }
.clearfix::after { content: ""; display: block; clear: both; }

/* ==================== 核心容器 1200px ==================== */
.mainbody { 
    width: 1200px; 
    margin: 0 auto; 
    padding: 20px 0; 
    background: transparent; 
}

#top{ width: 100%; min-width: 1200px; height: 25px; overflow: hidden; background: url(/images/topbg.png) repeat-x; line-height: 24px; font-size: 12px; }
.topbd{ width: 1200px; margin: 0 auto;}
.link{ float: right;}
.link li{ /*display: inline-block; +display: inline;*/ float: left; height: 24px; background: url(../images/line.png) no-repeat right center;}
.link li a{ display: block; height: 24px; color: #b58146; padding: 0 13px 0 12px;}
.link li.ygdl a{ width: 79px; padding: 0 0 0 7px; height: 24px; color: #fff; }
.link li.eng a{ color: #666;}
.topbd span em{ color: #2d5682; padding-left: 5px;}
.fl{ float:left;}

/* Banner 优化 */
#banner2 { margin-bottom: 20px; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
#banner2 img { width: 100%; height: auto; min-height: 240px; object-fit: cover; }

/* 面包屑导航 */
.position { 
    padding: 12px 20px; 
    margin-bottom: 20px; 
    background: #fff; 
    border-radius: 6px; 
    font-size: 13px; 
    color: #888; 
    border-left: 4px solid #c11d1c;
}
.position a { color: #666; margin: 0 5px; }
.position a:hover { color: #c11d1c; }

/* ==================== 通用板块标题 ==================== */
.section-title { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    margin-bottom: 20px; 
    padding-bottom: 12px; 
    border-bottom: 2px solid #eee; 
}
.section-title h3 { 
    font-size: 20px; 
    font-weight: 700; 
    color: #222; 
    padding-left: 12px; 
    border-left: 4px solid #c11d1c; 
    line-height: 1; 
}
.section-title .more { 
    font-size: 13px; 
    color: #999; 
    background: url(../images/index_78.png) no-repeat right center; 
    padding-right: 15px; 
}
.section-title .more:hover { color: #c11d1c; }

/* ==================== 新闻区域重构 ==================== */
.xgxx { 
    display: flex; 
    gap: 30px; 
    background: #fff; 
    padding: 25px; 
    border-radius: 8px; 
    margin-bottom: 30px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); 
}
.xgxx_pic { flex: 0 0 480px; border-radius: 6px; overflow: hidden; }
.xgxx_pic img { width: 100%; height: 300px; object-fit: cover; transition: transform 0.5s; }
.xgxx_pic:hover img { transform: scale(1.03); }
.xgxx_news { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.xgxx_news li { 
    padding: 10px 15px; 
    border-bottom: 1px dashed #eee; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    cursor: pointer; 
    border-left: 3px solid transparent; 
    transition: all 0.2s; 
}
.xgxx_news li:last-child { border-bottom: none; }
.xgxx_news li.current, .xgxx_news li:hover { 
    background: #fdf5f5; 
    border-left-color: #c11d1c; 
}
.xgxx_news li span { color: #999; font-size: 13px; flex-shrink: 0; margin-left: 15px; }
.xgxx_news li a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }

/* ==================== 课程卡片网格系统 (4列+丰富信息版) ==================== */
.kbxx { margin-bottom: 40px; }

.card-grid { 
    display: grid; 
    /* 核心：改为4列，1200px下每列约280px，宽度更舒适 */
    grid-template-columns: repeat(4, 1fr); 
    gap: 24px; 
}

/* 卡片基础样式 */
.card-item { 
    background: #fff; 
    border-radius: 10px; 
    overflow: hidden; 
    border: 1px solid #f0f0f0; 
    display: flex;
    flex-direction: column; /* 保证底部按钮始终对齐 */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    text-decoration: none; /* 去除a标签默认下划线 */
    color: inherit;
}

.card-item:hover { 
    transform: translateY(-6px); 
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08); 
    border-color: #e8e8e8;
}

/* 图片区域：强制 16:9 比例 */
.card-img {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* 现代浏览器原生支持比例 */
    overflow: hidden;
    background: #f5f5f5;
}
.card-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.5s ease;
}
.card-item:hover .card-img img {
    transform: scale(1.05); /* 悬停时图片轻微放大 */
}

/* 内容区域 */
.card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex: 1; /* 撑满剩余高度 */
}

/* 标题：限制最多2行，超出省略，保证卡片高度一致 */
.card-item h3 { 
    font-size: 16px; 
    font-weight: 600; 
    color: #222; 
    line-height: 1.5; 
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px; /* 占据2行的高度，防止单行标题导致下方内容上移 */
}

/* 信息模块：学费与学制 */
.card-info {
    margin-bottom: 16px;
}
.card-info .info {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    display: flex;
    align-items: center;
}
/* 学费特殊高亮 */
.card-info .info.price {
    color: #c11d1c;
    font-weight: 600;
    font-size: 15px;
}
.card-info .info.price::before {
    content: "💰";
    margin-right: 6px;
    font-size: 14px;
}
.card-info .info.duration::before {
    content: "⏱️";
    margin-right: 6px;
    font-size: 14px;
}

/* 底部操作区：时间与按钮 */
.card-footer {
    margin-top: auto; /* 将底部区域推到卡片最下方 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px dashed #eee;
}
.card-footer .date {
    font-size: 13px;
    color: #999;
}
.card-footer .btn-more {
    background: #c11d1c;
    color: #fff;
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 4px;
    transition: background 0.2s;
    white-space: nowrap;
}
.card-item:hover .btn-more {
    background: #a01514;
}

/* ==================== 双栏信息面板 (课程预告+相关新闻) ==================== */
.info-dual-panel {
    display: flex;
    gap: 40px;
    background: #fff;
    padding: 30px 35px;
    border-radius: 8px;
    border: 1px solid #eee;
    margin-top: 30px;
}

/* 左右两列等宽 */
.panel-col {
    flex: 1;
    min-width: 0; /* 防止长标题撑破Flex容器 */
}

/* 统一的标题栏样式 */
.info-dual-panel .section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}
.info-dual-panel .section-title h3 {
    font-size: 18px;
    color: #222;
    font-weight: 600;
    margin: 0;
    padding-left: 10px;
    border-left: 3px solid #c11d1c; /* 主题红色竖线装饰 */
}
.info-dual-panel .section-title .more {
    font-size: 13px;
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}
.info-dual-panel .section-title .more:hover {
    color: #c11d1c;
}

/* 列表通用样式 */
.info-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #f5f5f5; /* 虚线分隔更轻盈 */
    transition: background 0.2s;
}
.info-list li:last-child {
    border-bottom: none;
}
.info-list li:hover {
    background: #fafafa;
}

/* 标题链接样式 */
.info-title {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* 超长标题自动省略号 */
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.info-title:hover {
    color: #c11d1c;
}

/* 标题前的小圆点装饰 */
.info-title .dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #ddd;
    border-radius: 50%;
    margin-right: 10px;
    flex-shrink: 0;
    transition: background 0.2s;
}
.info-list li:hover .dot {
    background: #c11d1c;
}

/* 日期样式 */
.info-date {
    font-size: 13px;
    color: #aaa;
    margin-left: 15px;
    flex-shrink: 0;
    font-family: Arial, sans-serif; /* 数字使用无衬线字体更整齐 */
}

/* ==================== 底部友情链接轮播区 (Swiper版) ==================== */
.quicklink { 
    background: #fff; 
    padding: 25px 0; 
    border-radius: 8px; 
    margin-top: 20px; 
    border: 1px solid #eee; 
}

.quicklink .carousel { 
    width: 1200px; 
    margin: 0 auto; 
    position: relative; 
    display: flex;
    align-items: center;
}

/* Swiper 可视区域宽度 */
.quicklink .swiper { 
    width: 1100px; 
    overflow: hidden; 
}

/* 固定轮播项尺寸 */
.quicklink .swiper-slide { 
    width: 205px; 
    height: 120px; 
    border-radius: 6px; 
    overflow: hidden; 
    border: 1px solid #eee; 
    background: #f9f9f9; 
    transition: all 0.3s ease;
}

/* 图片自适应填充 */
.quicklink .swiper-slide img { 
    width: 100%; 
    height: 100%; 
    display: block; 
    object-fit: cover; 
    object-position: center center; 
    transition: transform 0.3s ease;
}

/* 悬停微动效 */
.quicklink .swiper-slide:hover {
    border-color: #f5d5d5;
    box-shadow: 0 4px 10px rgba(193, 29, 28, 0.1);
}
.quicklink .swiper-slide:hover img {
    transform: scale(1.05);
}

/* 左右切换按钮样式 */
.quicklink .swiper-button-prev,
.quicklink .swiper-button-next {
    position: static; /* 取消Swiper默认的绝对定位 */
    width: 19px;
    height: 19px;
    margin-top: 0;
    background-size: contain;
    background-repeat: no-repeat;
}
.quicklink .swiper-button-prev {
    background-image: url(../images/index_124.png);
    margin-right: 20px;
}
.quicklink .swiper-button-next {
    background-image: url(../images/index_127.png);
    margin-left: 20px;
}
/* 隐藏 Swiper 默认的箭头图标（因为使用了自定义背景图） */
.quicklink .swiper-button-prev::after,
.quicklink .swiper-button-next::after {
    display: none;
}

/* ==================== Footer ==================== */
#footer { padding: 30px 0; text-align: center; color: #999; font-size: 13px; line-height: 2; }
#footer a { color: #888; margin: 0 3px; }
#footer a:hover { color: #c11d1c; }
#ph_footer { display: none; }

/* ==================== 响应式适配 ==================== */
@media (max-width: 1240px) {
    .mainbody, .quicklink .carousel { width: 96%; }
    /* 中等屏幕保持5列，卡片自然缩放 */
   .card-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
    .card-item img { height: 140px; }
    .xgxx_pic { flex: 0 0 380px; }
}
@media (max-width: 992px) {
    /* 平板横屏/小笔记本：切换为4列 */
    .card-grid { grid-template-columns: repeat(3, 1fr); }
    .info-dual-panel {
        flex-direction: column; /* 平板及以下改为上下堆叠 */
        gap: 30px;
        padding: 20px;
    }
}
@media (max-width: 768px) {
    body { background: #fff; }
    .mainbody { width: 100%; padding: 10px; }
    #banner2 { border-radius: 0; margin: -10px -10px 15px; }
    
    .position { 
        border-radius: 0; 
        margin: 0 -10px 15px; 
        padding: 10px 15px; 
        white-space: nowrap; 
        overflow-x: auto; 
        background: #fafafa; 
        border-bottom: 1px solid #eee; 
    }
    
    .xgxx { flex-direction: column; padding: 15px; gap: 15px; }
    .xgxx_pic { flex: none; width: 100%; }
    .xgxx_pic img { height: 200px; }
    .xgxx_news li a { font-size: 14px; }
    
    .section-title h3 { font-size: 18px; }
    /* 手机端保持2列不变 */
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .card-body { padding: 12px; }
    .card-item h3 { font-size: 14px; min-height: 42px; margin-bottom: 10px;}
    .card-info .info { font-size: 12px; }
    .card-footer .date { font-size: 11px; }
    .card-footer .btn-more { padding: 4px 8px; font-size: 11px; }
    
    .quicklink { display: none; }
    #footer { display: none; }
    #ph_footer { display: block; padding: 20px 10px; text-align: center; font-size: 12px; color: #999; border-top: 1px solid #eee; }
}