.main-content {
    margin-top: 90px;
}

/* 轮播图区域 */
.banner {
    position: relative;
    height: 370px;
}

.banner-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    height: 350px;
}

/* 课程分类导航 */
.category-nav {
    width: 200px;
    background-color: #003e50;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    overflow: visible;
    padding-top: 10px;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 30px;
    color: #fff;
    font-size: 14px;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.nav-item > a:hover {
    background-color: var(--primary-hover);
}

.nav-item > a i {
    font-size: 16px;
}

/* 二级菜单样式 */
.sub-menu {
    position: absolute;
    left: 200px;
    top: 0;
    width: 250px;
    background: rgba(0, 0, 0, .8);
    border-radius: 0 8px 8px 0;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    display: none;
    z-index: 100;
    height: 100%;
    overflow-y: auto;
}

.sub-menu::-webkit-scrollbar {
    width: 4px;
}

.sub-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sub-menu::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 2px;
}

.sub-menu::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.sub-menu-item {
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sub-menu-item:hover {
    background: rgba(254, 165, 0, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sub-menu-item.active {
    background: rgba(254, 165, 0, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

/* 导航项悬停时显示二级菜单 */
.nav-item:hover .sub-menu {
    display: block;
}

/* 轮播图主体 */
.banner-container {
    flex: 1;
    height: 350px;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    overflow: hidden;
    position: relative;
}

.banner-slide {
    position: absolute;
    left: 0; top: 0; width: 100%; height: 100%;
    z-index: 1;
    opacity: 1;
    pointer-events: none;
    transition: transform 0.5s;
    transform: translateX(100%);
}

.banner-slide.active {
    z-index: 2;
    pointer-events: auto;
    transform: translateX(0);
}

.banner-slide.slide-out-left {
    z-index: 2;
    transform: translateX(-100%);
}

.banner-slide.slide-in-right {
    z-index: 2;
    transform: translateX(0);
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px
}

.banner-content {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    padding: 20px;
    color: #fff;
    text-align: center;
}

.banner-content h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 16px;
    margin-bottom: 20px;
}

.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.banner-prev,
.banner-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-prev:hover,
.banner-next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.banner-prev {
    left: 20px;
}

.banner-next {
    right: 20px;
}

/* 热门课程 */
.popular-courses {
    padding: 60px 0;
    background-color: #fff;
}

.section-title {
    text-align: center;
    font-size: 28px;
    color: var(--text-color);
    margin-bottom: 40px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.course-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

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

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

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

.course-info {
    padding: 15px;
}

.course-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.course-info p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.4;
}

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

.meta-left {
    display: flex;
    gap: 15px;
}

.meta-left span {
    display: flex;
    align-items: center;
    gap: 5px;
}

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

.course-price {
    color: var(--primary-color);
    font-size: 20px;

}
.course-price small {
    font-size: 14px;
    color: #999;
}
.course-enroll {
    padding: 6px 12px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
}

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

/* 考试服务 */
.exam-services {
    padding: 60px 0;
    background-color: #f5f5f5;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.service-card i {
    font-size: 40px;
    color: var(--primary-hover);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
}

.service-card p {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* 学习优势 */
.advantages {
    padding: 60px 0;
    background-color: #fff;
}

.advantage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.advantage-card {
    text-align: center;
    padding: 30px;
}

.advantage-card i {
    font-size: 40px;
    color: var(--primary-hover);
    margin-bottom: 20px;
}

.advantage-card h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
}

.advantage-card p {
    color: #666;
    font-size: 14px;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .main-content {
        margin-top: 60px;
    }

    /* 轮播图区域 */
    .banner {
        height: 180px;
    }

    .banner-wrapper {
        position: relative;
        max-width: 1200px;
        margin: 0 auto;
        display: flex;
        height: 180px;
        padding:30px 10px 10px 10px;
    }
    .banner-slide img{
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
    }
    /* 课程分类导航 */
    .category-nav {
        display: none;
    }

    /* 轮播图主体 */
    .banner-container {
        flex: 1;
        height: 180px;
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
        overflow: hidden;
        position: relative;
    }

    .banner-content {
        bottom: 20px;
        padding: 10px;
    }

    .banner-content h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .banner-content p {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .banner-prev,
    .banner-next {
        width: 30px;
        height: 30px;
    }

    /* 热门课程 */
    .popular-courses {
        padding: 30px 0;
    }

    .section-title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .course-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }

    .course-card {
        margin-bottom: 10px;
    }

    .course-image {
        height: 100px;
    }

    .course-info {
        padding: 8px;
    }

    .course-info p {
        font-size: 13px;
        margin-bottom: 6px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .course-meta {
        margin-bottom: 6px;
    }

    .meta-left {
        gap: 8px;
    }

    .meta-left span {
        font-size: 11px;
    }

    .course-price {
        font-size: 16px;
    }

    .course-price small {
        font-size: 11px;
    }

    .course-enroll {
        padding: 4px 8px;
        font-size: 12px;
    }

    /* 考试服务 */
    .exam-services {
        padding: 30px 0;
        overflow: hidden;
    }

    .service-grid {
        display: flex;
        gap: 10px;
        padding: 0 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .service-grid::-webkit-scrollbar {
        display: none;
    }

    .service-card {
        flex: 0 0 calc(50% - 5px);
        scroll-snap-align: start;
        padding: 15px;
    }

    .service-card i {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .service-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .service-card p {
        font-size: 13px;
        margin-bottom: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* 学习优势 */
    .advantages {
        padding: 30px 0;
    }

    .advantage-grid {
        display: flex;
        gap: 10px;
        padding: 0 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .advantage-grid::-webkit-scrollbar {
        display: none;
    }

    .advantage-card {
        flex: 0 0 calc(50% - 5px);
        scroll-snap-align: start;
        padding: 15px;
        text-align: center;
    }

    .advantage-card i {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .advantage-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .advantage-card p {
        font-size: 13px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* 小屏幕手机适配 */
@media screen and (max-width: 375px) {
    .banner-container {
        flex: 1;
        height: 180px;
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
        overflow: hidden;
        position: relative;
    }

    .banner-content h2 {
        font-size: 18px;
    }

    .banner-content p {
        font-size: 12px;
    }

    .course-image {
        height: 120px;
    }

    .course-info {
        padding: 6px;
    }

    .course-info p {
        font-size: 12px;
    }

    .meta-left span {
        font-size: 10px;
    }

    .course-price {
        font-size: 14px;
    }

    .course-enroll {
        padding: 3px 6px;
        font-size: 11px;
    }

    .course-grid {
        gap: 8px;
        padding: 0 8px;
    }

    .service-grid {
        gap: 8px;
        padding: 0 8px;
    }

    .service-card {
        flex: 0 0 calc(50% - 4px);
        padding: 12px;
    }

    .service-card i {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .service-card h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .service-card p {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .advantage-grid {
        gap: 8px;
        padding: 0 8px;
    }

    .advantage-card {
        flex: 0 0 calc(50% - 4px);
        padding: 12px;
    }

    .advantage-card i {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .advantage-card h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .advantage-card p {
        font-size: 12px;
    }
}