/* ============ 核心容器 全局统一约束 ============ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ============ Banner轮播图 ============ */
.banner-section {
    margin: 20px 0;
}
.banner-container {
    height: 380px; /* 改这里，更大高度容纳顶部画面 */
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
/* ========== 新增下面这段修复代码 ========== */
#homeBanner,
#homeBanner > div[carousel-item],
#homeBanner > div[carousel-item] > div,
#homeBanner a {
    height: 100% !important;
    overflow: hidden !important;
}
#homeBanner img {
    width: 100%;
    height: 100%;
    display: block;
}
/* ============ 课程区域通用标题 ============ */
.main-content {
    margin: 20px 0;
}
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    color: #222;
}
.section-title span{
    position: relative;
    padding-left: 12px;
}
.section-title span::before{
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background-color: #165DFF;
    border-radius: 2px;
}
.more-link {
    color: #165DFF;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: 0.2s;
}
.more-link:hover {
    color: #0d4ab8;
}

/* ============ 限时秒杀 滚动条正常显示 ============ */
.seckill-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    margin-bottom: 24px;
}
.seckill-scroll-container::-webkit-scrollbar {
    height: 6px;
}
.seckill-scroll-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
.seckill-scroll-container::-webkit-scrollbar-track {
    background: #f5f5f5;
}
.seckill-course-list {
    display: flex;
    gap: 16px;
}

/* ============ 推荐/热销/VIP 隐藏滚动条 ============ */
#recommendCourses,
#hotCourses,
#vipCourses {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0 16px 0;
    scrollbar-width: none;
}
#recommendCourses::-webkit-scrollbar,
#hotCourses::-webkit-scrollbar,
#vipCourses::-webkit-scrollbar {
    display: none;
}

/* ============ 通用课程卡片 ============ */
.course-card {
    width: 220px;
    flex-shrink: 0;
    box-sizing: border-box;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.course-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* ============ 布局容器 严格对齐无溢出 ============ */
.row-news-study {
    display: flex;
    gap: 20px;
    margin: 24px 0;
    width: 100%;
    box-sizing: border-box;
}

/* 左右两块样式完全统一对齐 */
.col-study {
    flex: 1;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-sizing: border-box;
}
.col-tab {
    flex: 0 0 340px;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-sizing: border-box;
}

/* 升学三栏排布 */
.study-grid {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}
.study-card {
    flex: 1;
}

/* 小升初/中考/高考 标签样式 */
.study-badge {
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    padding: 6px 0;
    border-radius: 8px;
    margin-bottom: 15px;
}
.study-badge.xsc {
    background-color: #e8f3ff;
    color: #165DFF;
}
.study-badge.zk {
    background-color: #fff3e8;
    color: #ff7d00;
}
.study-badge.gk {
    background-color: #e8f8f5;
    color: #009688;
}

/* 恢复升学课程图片布局 */
.study-list .course-title {
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333;
}
.study-list .course-card {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100% !important;
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
}
/* 显示图片 */
.study-list .course-img {
    display: block;
    width: 75px;
    height: 55px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}
.study-list .course-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.study-list .course-title {
    font-size: 13px;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333;
}
.study-list .course-price {
    font-size: 12px;
    color: #f53f3f;
    font-weight: 600;
    margin-top: 3px;
}

/* 公告新闻区域样式 */
.tab-box .layui-tab {
    margin: 0;
}
.tab-box .layui-tab-title {
    border-bottom-color: #e8e8e8;
}
.tab-box .layui-tab-content {
    padding: 8px 0 0 0;
}
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 6px;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}
.more-btn {
    font-size: 13px;
    color: #165DFF;
    text-decoration: none;
}
.list-body {
    max-height: 240px;
    overflow-y: auto;
}
.list-body .announcement-item,
.list-body .news-item {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    font-size: 13px;
    border-bottom: 1px dashed #eee;
    color: #555;
}
.list-body .announcement-item:last-child,
.list-body .news-item:last-child {
    border-bottom: none;
}

.announcement-item, .news-item, .course-card {
    cursor: pointer;
}

.course-path-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 8px;
}
.course-path {
    flex: 1;
    margin-bottom: 0 !important;
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}
.course-sales {
    font-size: 12px;
    color: #ff7d00;
    white-space: nowrap;
}

/* ✅ 统一使用 .original-price，与课程中心一致 */
.original-price {
    text-decoration: line-through;
    font-size: 12px;
    color: #999;
    margin-left: 4px;
}

/* 标签默认显示，不要 hover */
.course-tag,
.seckill-tag,
.recommend-tag,
.hot-tag,
.vip-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 2;
    color: #fff;
    font-weight: bold;
    display: block !important; /* 强制显示 */
}

/* 秒杀红 */
.seckill-tag {
    background: #ff4d4f;
}

/* 推荐蓝 */
.recommend-tag {
    background: #165DFF;
}

/* 热销橙 */
.hot-tag {
    background: #ff7d00;
}

/* VIP 紫 */
.vip-tag {
    background: #722ed1;
}

/* 防止 hover 影响 */
.course-card:hover .seckill-tag,
.course-card:hover .recommend-tag,
.course-card:hover .hot-tag,
.course-card:hover .vip-tag {
    display: block !important;
}