/* 课程中心页样式 */
.course-center-main {
    padding: 90px 0;
    background-color: var(--light-gray);
}

/* 课程分类区域样式 */
.course-category-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.category-container {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.category-group {
    margin-bottom: 15px;
}

.category-group:last-child {
    margin-bottom: 0;
}

.category-group label {
    display: inline-block;
    width: 80px;
    color: var(--text-color);
    font-weight: 500;
}

.category-options {
    display: inline-flex;
    gap: 15px;
    flex-wrap: wrap;
}

.category-options a {
    color: var(--text-color);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.category-options a:hover {
    color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.1);
}

.category-options a.active {
    color: #fff;
    background-color: var(--primary-color);
}

/* 二级分类样式 */
.sub-category-container {
    margin-top: 10px;
    padding-top: 10px;
}

.sub-category-options {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

.sub-category-options a {
    color: var(--text-color);
    text-decoration: none;
    padding: 3px 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.sub-category-options a:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.sub-category-options a.active {
    color: var(--primary-color);
    font-weight: 500;

}

/* 课程列表头部样式 */
.course-list-header {
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: var(--card-shadow);
}

.sort-options {
    display: flex;
    gap: 20px;
}

.sort-options a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.sort-options a:hover {
    color: var(--primary-color);
}

.sort-options a.active {
    color: var(--primary-color);
    font-weight: 500;
}

/* 课程列表 */
.view-options {
    display: flex;
    gap: 10px;
}

.view-options a {
    color: #666;
    text-decoration: none;
    padding: 5px;
    transition: color 0.3s;
}

.view-options a:hover,
.view-options a.active {
    color: #1890ff;
}

.course-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-image {
    position: relative;
    height: 140px;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    background-color: #ff4d4f;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
}

.course-info {
    padding: 15px;
}

.course-info h3 {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 50px;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.course-meta i {
    margin-right: 5px;
    color: var(--primary-color);
}

.course-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-size: 20px;
    color: #ff4d4f;
}
.free {
    font-size: 20px;
    color: #52c41a;
    font-weight: bold;
}

.btn-enroll {
    padding: 6px 15px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-enroll:hover {
    background-color: var(--primary-hover);
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .sort-options{
        display: none;
    }
    .course-center-main {
        padding: 60px 0;
    }

    .category-container {
        padding: 15px;
    }

    .category-group {
        margin-bottom: 12px;
    }

    .category-group label {
        display: none;
    }

    .category-options {
        gap: 10px;
    }

    .category-options a {
        padding: 3px 3px;
        font-size: 13px;
    }

    /* 移动端二级分类样式 */
    .sub-category-options {
        margin-left: 0;
        gap: 8px;
    }

    .sub-category-options a {
        padding: 2px 8px;
        font-size: 12px;
    }

    .course-list-header {
        padding: 12px 15px;
        margin-bottom: 15px;
    }

    .view-options {
        gap: 8px;
    }

    .view-options a {
        font-size: 13px;
    }

    .course-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        margin-top: 15px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .course-image {
        height: 100px;
    }

    .course-info {
        padding: 12px;
    }

    .course-info h3 {
        font-size: 14px;
        height: 20px;
        margin-bottom: 8px;
    }

    .course-meta {
        margin-bottom: 10px;
        font-size: 12px;
    }

    .price, .free {
        font-size: 16px;
    }

    .btn-enroll {
        padding: 5px 12px;
        font-size: 13px;
    }
}

/* 小屏幕手机适配 */
@media screen and (max-width: 375px) {
    .course-center-main {
        padding: 50px 0;
    }

    .category-container {
        padding: 12px;
    }

    .category-options a {
        padding: 2px 8px;
        font-size: 12px;
    }

    .course-list-header {
        padding: 10px 12px;
    }

    .course-list {
        gap: 12px;
    }

    .course-image {
        height: 100px;
    }

    .course-info {
        padding: 10px;
    }

    .course-info h3 {
        font-size: 13px;
        height: 36px;
    }

    .course-meta {
        font-size: 11px;
    }

    .price, .free {
        font-size: 15px;
    }

    .btn-enroll {
        padding: 4px 10px;
        font-size: 12px;
    }
}
