:root {
    --primary: #1890ff;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #f5222d;
    --light: #f5f7fa;
    --gray: #666;
    --border-radius: 8px;
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", sans-serif;
    color: #333;
    background: #fff;
}

/* ========== 头部 ========== */
.header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    padding: 12px 0;
}
.header .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo img {
    height: 40px;
}
.logo span {
    font-size: 14px;
    color: #666;
}
.nav a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav a::before {
    content: "↩";
    font-size: 16px;
}

/* ========== Banner ========== */
.banner {
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

.banner .img-box {
    position: relative;
    width: 100%;
    height: 405px; /* 根据实际需求调整高度 */
    overflow: hidden;
}

.banner .img-box img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.banner .img-box img.active {
    opacity: 1;
}

.points {
    position: absolute;
    bottom: 20px; /* 距离顶部的距离 */
    left: 50%;
    transform: translateX(-50%); /* 居中对齐 */
    z-index: 10; /* 确保在图片上方 */
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.points li {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.points li.active {
    background-color: #007bff; /* 当前激活项颜色 */
}

.banner-content {
    flex: 1;
}
.banner-image {
    flex: 1;
    display: flex;
    justify-content: center;
}
.banner-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* ========== 筛选区 ========== */
.filters {
    max-width: 1360px;
    margin: 35px auto;
    padding: 0 20px;
}
.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    margin-bottom: 16px;
}
.filter-group .filter-title {
    width: 90px;
    font-weight: 400;
    font-size: 16px;
    color: #666666;
    text-align: left;
}
.filter-group .button {
    font-size: 16px;
    cursor: pointer;
    background: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 4px;
    padding: 6px 8px;
    /*transition: all 0.3s;*/
}
.filter-group .button.active {
    background: #f0f2f5;
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
.filter-group .button:hover:not(.active) {
    background: #f0f2f5;
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========== 课程网格 ========== */
.courses {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 20px 60px;
}
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.course-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    background: var(--bg);
    cursor: pointer;
}
.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.card-header {
    /*padding: 20px 16px 12px;*/
    text-align: center;
}

.card-header img {
    width: 100%;          /* 水平铺满父容器 */
    height: auto;         /* 保持原始宽高比，避免变形 */
    display: block;       /* 消除底部空白（inline-img 默认有基线间隙） */
    border-radius: var(--border-radius) var(--border-radius) 0 0; /* 与卡片圆角一致 */
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    margin-bottom: 8px;
}
.badge {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.desc {
    font-size: 18px;
    color: #000000;
    text-align: left;
    padding: 0 12px;
    margin-top: 11px;
    line-height: 22px;
}

.course-desc{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    margin-top: 20px;
    margin-bottom: 14px;
}

.meta {
    font-weight: 400;
    font-size: 14px;
    color: #999999;
    text-align: left;
}

.price-btn {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    gap: 20px;
}
.price {
    font-size: 18px;
    font-weight: 700;
    color: var(--danger);
    text-align: left;
}
.btn-register {
    background: #F8FCFF;
    padding: 6px 16px;
    cursor: pointer;
    border-radius: 20px;
    border: 1px solid #0079FF;
    font-weight: 400;
    font-size: 14px;
    color: #0079FF;
}
.btn-register:hover {
    background: #bae7ff; /* rgba(24,144,255,0.2) */
    border-color: #0079FF;
    color: #0079FF;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .banner {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
    }
    .banner-content {
        flex: none;
    }
    .banner-image {
        flex: none;
        width: 100%;
        max-width: 400px;
    }
    .course-grid {
        grid-template-columns: 1fr;
    }
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-group span {
        margin-bottom: 8px;
    }
}