/* 课程详情页样式 */
.course-detail {
    padding: 20px;
    background: #f5f5f5;
    min-height: 100vh;
    margin-top: 70px; /* 为固定头部留出空间 */
}

/* 添加容器宽度限制 */
.course-detail > div {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
}

.course-header {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.course-header-content {
    display: flex;
    gap: 20px;
}

.course-image {
    flex: 0 0 300px;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
}

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

.course-header-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-title {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

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

.course-content {
    display: flex;
    gap: 20px;
}

.course-main {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.course-sidebar {
    width: 300px;
    position: sticky;
    top: 80px; /* 修改为80px，与头部导航保持20px距离 */
    height: fit-content;
}

.course-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

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

.course-price small {
    font-size: 14px;
    color: #999;
}

.btn-enroll {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s;
}

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

.course-info {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: #666;
    font-size: 13px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item i {
    color: var(--primary-color);
    font-size: 14px;
}

.info-item span:last-child {
    color: #333;
    font-weight: 500;
}

.course-nav {
    background: #fff;
    padding: 20px 20px;
    margin-bottom: 20px;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.nav-list {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-item a {
    color: #666;
    text-decoration: none;
    font-size: 16px;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

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

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

.nav-item a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.course-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}
.review-item{
    margin-bottom: 20px;
    display: flex;
}
.review-avatar img{
    width:40px;
    height: 40px;
    border-radius: 20px;
}
.review-content{
    margin-left: 15px;
}
.review-rating {
    display: inline-block;
    margin-bottom: 10px;
}

.review-rating i {
    color: #ddd;
    font-size: 14px;
    margin-right: 2px;
}

.review-rating i.active {
    color: var(--primary-color);
}
.course-description {
    color: #666;
    line-height: 1.6;
}
.course-detailes img{
    width:100%;
    height: auto;
}
.course-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
}

.feature-content h4 {
    margin: 0 0 5px;
    color: #333;
}

.feature-content p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.course-outline {
    margin-top: 20px;
}

/* 课程大纲样式 */
.outline-list {
    margin-top: 20px;
}

.outline-item {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.3s ease;
}



.outline-header {
    padding: 15px 20px;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.outline-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.outline-duration {
    color: #666;
    font-size: 14px;
}

.outline-header i {
    transition: transform 0.3s ease;
}

.outline-item.active .outline-header i {
    transform: rotate(180deg);
}

.outline-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(-10px);
}

.outline-item.active .outline-content {
    max-height: 1000px;
    opacity: 1;
    transform: translateY(0);
    padding: 15px 20px;
}


.outline-item.active .outline-content li {
    transform: translateY(0);
    opacity: 1;
}
.outline-content li:hover {
    background: #F8F9FA;
    cursor: pointer;
}
.no-chapter .outline-content :hover {
    background: #F8F9FA;
    cursor: pointer;
}
/* 独立课时样式 */
.outline-item.no-chapter {
    border: none;
    background: transparent;
    margin-bottom: 0;
}

.outline-item.no-chapter .outline-content {
    max-height: none;
    opacity: 1;
    transform: none;
    padding: 0;
}

.outline-item.no-chapter .outline-content ul {
    padding: 0;
}

.outline-item.no-chapter .outline-content li {
    transform: none;
    opacity: 1;
    background: #fff;
    border-radius: 8px;
    padding-left: 15px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
}

.outline-item.no-chapter .outline-content li:last-child {
    margin-bottom: 15px;
}

.outline-item.no-chapter .outline-content li:hover {
    background: #F8F9FA;
    cursor: pointer;
}

/* 课时信息样式 */
.lesson-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 10px;
}
.lesson-type i.fa-image {
    color: #722ed1;
}

.lesson-type i.fa-tasks {
    color: #722ed1;
}

.lesson-duration {
    color: #666;
    font-size: 13px;
}
.learned-tag {
    padding: 2px 8px;
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
    border-radius: 4px;
    font-size: 12px;
}
.free-tag {
    padding: 2px 8px;
    background: #fff5e6;
    color: #ff8c00;
    border: 1px solid #FEA500;
    border-radius: 4px;
    font-size: 12px;
}
.siting-tag{
    padding: 2px 8px;
    background: #ffebeb;
    color: #ff4d4f;
    border: 1px solid #ff4d4f;
    border-radius: 4px;
    font-size: 12px;
}
/* 响应式调整 */
@media (max-width: 768px) {
    .outline-header {
        padding: 12px 15px;
    }

    .outline-content {
        padding: 12px 15px;
    }



    .lesson-extra {
        width: 100%;
        justify-content: space-between;
    }
}

/* 课程类型图标样式 */
.lesson-type {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lesson-type i {
    font-size: 16px;
}

/* 不同类型课程的图标颜色 */
.lesson-type i.fa-video {
    color: #ff4d4f;
}

.lesson-type i.fa-image {
    color: #722ed1;
}

.lesson-type i.fa-tasks {
    color: #722ed1;
}

.lesson-type i.fa-file-pdf {
    color: #f5222d;
}

.lesson-type i.fa-file-word {
    color: #1890ff;
}

.lesson-type i.fa-file-excel {
    color: #52c41a;
}

/* 免费标签样式 */

.lesson-title {
    flex: 1;
    font-size: 14px;
    color: var(--text-color);
}

.lesson-extra {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .course-content {
        flex-direction: column;
    }

    .course-sidebar {
        width: 100%;
        position: static;
    }

    .course-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .course-nav{
        padding: 5px 5px!important;
    }
    .course-features {
        grid-template-columns: 1fr;
    }

    .nav-list {
        gap: 15px;
    }

    .nav-item a {
        font-size: 14px;
    }

    .outline-header {
        padding: 12px 15px;
    }

    .outline-content {
        padding: 12px 15px;
    }

    .lesson-info {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 0;
    }

    .lesson-extra {
        width: 100%;
        justify-content: space-between;
    }

    .lesson-type {
        width: 20px;
        height: 20px;
    }

    .lesson-type i {
        font-size: 14px;
    }

    .free-tag {
        font-size: 11px;
        padding: 1px 4px;
        margin-left: 6px;
    }

    .info-item {
        font-size: 12px;
    }

    .info-item i {
        font-size: 13px;
    }
    #downloads{
        display: none;
    }
    .course-sidebar{display: none}
}

@media (max-width: 576px) {
    .course-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .course-title {
        font-size: 20px;
    }
}

/* 侧边栏课程卡片图片 */
.course-sidebar .course-image {
    width: 100%;
    height: 160px;
    margin-bottom: 15px;
}

.course-sidebar .course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

/* 资料下载样式 */
.downloads-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.download-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.download-item:hover {
    transform: translateX(5px);
}

.download-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
}

.download-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.download-info h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    min-width: 120px;
}

.download-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
    flex: 1;
}

.download-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
    margin: 0 20px;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: none;
}
.btn-download{
    cursor:pointer;
}
.btn-download:hover {
    background: var(--primary-color);
    opacity: 0.9;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .download-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .download-info h4 {
        min-width: auto;
    }

    .download-meta {
        margin: 0;
    }
}

@media (max-width: 576px) {
    .download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .download-info {
        width: 100%;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
    }
}