/* ========== 学习路线页面样式 ========== */

/* 主色调 - 橙色系 */
:root {
    --primary-color: #FF6B35;
    --primary-light: #FF8F66;
    --primary-gradient: linear-gradient(135deg, #FF6B35 0%, #FF8F66 100%);
    --text-dark: #333;
    --text-gray: #666;
    --text-light: #999;
    --bg-light: #f5f5f5;
    --bg-white: #fff;
    --border-color: #e8e8e8;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;
}

/* ========== 页面基础 ========== */
.learning-page {
    min-height: 100vh;
    background: var(--bg-light);
}

/* ========== 学习路线筛选 ========== */
.path-filter-section {
    background: #fff;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.filter-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    flex-shrink: 0;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-gray);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-tab.active {
    background: var(--primary-gradient);
    border-color: var(--primary-color);
    color: #fff;
}

/* ========== 学习路线列表 ========== */
.path-list-section {
    padding: 30px 0 60px;
}

.path-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ========== 学习路线卡片 ========== */
.path-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.path-item.collapsed .path-stages {
    display: none;
}

.path-item.collapsed .path-item-toggle svg {
    transform: rotate(0deg);
}

.path-item-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #fff8f5 100%);
    cursor: pointer;
}

.path-item-header:hover {
    background: linear-gradient(135deg, #fff8f5 0%, #fff0eb 100%);
}

.path-item-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

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

.path-item-info {
    flex: 1;
    min-width: 0;
}

.path-item-category {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    border-radius: 12px;
    background: var(--primary-gradient);
    margin-bottom: 8px;
}

.path-item-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.3;
}

.path-item-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-light);
}

.path-item-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.path-item-meta svg {
    width: 14px;
    height: 14px;
}

.path-item-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    flex-shrink: 0;
}

.path-item-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}

/* ========== 学习阶段时间线 ========== */
.path-stages {
    padding: 20px;
}

.path-stages-timeline {
    position: relative;
}

.path-stages-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--primary-light));
}

.path-stage-item {
    position: relative;
    padding-left: 44px;
    margin-bottom: 24px;
}

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

.path-stage-marker {
    position: absolute;
    left: 4px;
    top: 0;
    width: 24px;
    height: 24px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    z-index: 1;
}

.path-stage-content {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.path-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 12px;
}

.path-stage-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
}

.path-stage-duration {
    flex-shrink: 0;
    font-size: 11px;
    color: var(--text-light);
    background: #fff;
    padding: 3px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.path-stage-desc {
    font-size: 13px;
    color: var(--text-gray);
    line-height: 1.5;
    margin-bottom: 12px;
}

/* ========== 阶段课程列表 ========== */
.path-stage-courses {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.path-course-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.path-course-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.1);
    transform: translateX(4px);
}

.path-course-item:hover .path-course-arrow {
    color: var(--primary-color);
}

.path-course-image {
    width: 50px;
    height: 38px;
    border-radius: 6px;
    object-fit: cover;
    background: var(--bg-light);
    flex-shrink: 0;
}

.path-course-info {
    flex: 1;
    min-width: 0;
}

.path-course-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.path-course-meta {
    font-size: 11px;
    color: var(--text-light);
}

.path-course-arrow {
    color: var(--text-light);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.path-course-arrow svg {
    width: 16px;
    height: 16px;
}

/* ========== 响应式适配 - 平板 ========== */
@media screen and (max-width: 768px) {
    .learning-page {
        padding-top: 56px;
    }

    .path-filter-section {
        padding: 12px 0;
    }

    .filter-tab {
        padding: 6px 12px;
        font-size: 12px;
    }

    .path-list-section {
        padding: 16px 0 40px;
    }

    .path-item {
        border-radius: 12px;
    }

    .path-item-header {
        padding: 14px;
        gap: 12px;
    }

    .path-item-image {
        width: 64px;
        height: 48px;
    }

    .path-item-title {
        font-size: 15px;
    }

    .path-item-meta {
        font-size: 11px;
        gap: 10px;
    }

    .path-item-toggle {
        width: 28px;
        height: 28px;
    }

    .path-item-toggle svg {
        width: 18px;
        height: 18px;
    }

    .path-stages {
        padding: 14px;
    }

    .path-stages-timeline::before {
        left: 11px;
    }

    .path-stage-item {
        padding-left: 32px;
        margin-bottom: 16px;
    }

    .path-stage-marker {
        left: 2px;
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .path-stage-content {
        padding: 12px;
        border-radius: 10px;
    }

    .path-stage-title {
        font-size: 14px;
    }

    .path-stage-duration {
        font-size: 10px;
        padding: 2px 8px;
    }

    .path-stage-desc {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .path-stage-courses {
        gap: 6px;
    }

    .path-course-item {
        padding: 8px 10px;
        gap: 10px;
    }

    .path-course-image {
        width: 44px;
        height: 34px;
    }

    .path-course-title {
        font-size: 12px;
    }

    .path-course-meta {
        font-size: 10px;
    }
}

/* ========== 响应式适配 - 手机 ========== */
@media screen and (max-width: 480px) {
    .filter-tabs {
        gap: 6px;
        padding: 0 12px;
    }

    .filter-tab {
        padding: 5px 10px;
        font-size: 11px;
        border-radius: 16px;
    }

    .path-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .path-item-image {
        width: 100%;
        height: 100px;
        border-radius: 8px;
    }

    .path-item-info {
        width: 100%;
    }

    .path-item-toggle {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
    }

    .path-item.collapsed .path-item-toggle svg {
        transform: rotate(0deg);
    }

    .path-item-header {
        position: relative;
    }

    .path-item-meta {
        flex-wrap: wrap;
    }

    .path-stages-timeline::before {
        left: 9px;
    }

    .path-stage-item {
        padding-left: 30px;
        margin-bottom: 14px;
    }

    .path-stage-marker {
        left: 0px;
        width: 18px;
        height: 18px;
        font-size: 9px;
    }

    .path-stage-content {
        padding: 12px;
    }

    .path-stage-header {
        flex-direction: column;
        gap: 6px;
    }

    .path-stage-title {
        font-size: 13px;
    }

    .path-stage-desc {
        font-size: 11px;
    }

    .path-course-item {
        padding: 8px;
    }

    .path-course-image {
        width: 40px;
        height: 30px;
    }

    .path-course-title {
        font-size: 11px;
    }
}
