/* 主内容宽度变量由 style.css 的 :root 统一提供（含移动端的收窄），
   这里不再重复定义：本文件在 style.css 之后加载，重复声明会覆盖掉
   移动端的 --container-w: 92%，导致本页左右留白远大于其它页面 */


/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background-color: #fff;
}

/* ==================== 个人在线学习课程 ==================== */
.courses {
    padding: 80px 0;
    background: #f5faff url('../images/personal/course_bg.jpg') no-repeat center;
    background-size: cover;
}

.courses-inner .section-head {
    margin-bottom: 50px;
}

.courses-inner .section-head.light-bg .section-title {
    color: #000;
}

.courses-inner .section-head.light-bg .section-desc {
    color: #666;
}

.courses-body {
    display: flex;
    align-items: flex-start;
    gap: 50px;
}

.course-tabs {
    flex: 0 0 340px;
    display: flex;
    flex-direction: column;
    gap: 38px;
}

.course-tab {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    transition: color 0.3s;
}

.course-tab .tab-title {
    font-size: 22px;
    font-weight: 500;
    color: #000;
    line-height: 1.4;
}

.course-tab .tab-desc {
    font-size: 16px;
    color: #666;
    line-height: 1.8;
}

.course-tab.active .tab-title {
    color: #0164ff;
}

.course-tab.active .tab-desc {
    color: #0164ff;
}

.course-panels {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 18px;
    padding: 44px 48px;
    box-shadow: 0 10px 40px rgba(0, 70, 160, 0.06);
    backdrop-filter: blur(8px);
}

.course-panel {
    display: none;
    align-items: flex-start;
    gap: 40px;
}

.course-panel.active {
    display: flex;
}

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

.course-name {
    font-size: 28px;
    font-weight: 500;
    color: #000;
    margin-bottom: 18px;
}

.course-intro {
    font-size: 16px;
    color: #666;
    line-height: 2.0;
    margin-bottom: 22px;
}

.course-list {
    list-style: none;
    margin-bottom: 68px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-list li {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
}

.course-list li a {
    color: #333;
    text-decoration: none;
}

.course-list li a:hover,
.course-list li a:focus,
.course-list li a:visited {
    color: #333;
    text-decoration: none;
}

.course-list li::before {
    content: '';
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    margin-top: 4px; /* (行高 16*1.6=25.6 - 图标 18) / 2 ≈ 4px，与首行文字居中 */
    background: url('../images/personal/right_icon.png') no-repeat center;
    background-size: contain;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.course-tags span {
    display: inline-block;
    padding: 7px 18px;
    background: #e6f2ff;
    border-radius: 20px;
    font-size: 13px;
    color: #0164ff;
    font-weight: 500;
}

.course-media {
    flex: 0 0 42%;
    max-width: 380px;
    display: flex;
    align-items: center;
}

.course-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

@media (max-width: 1200px) {
    .courses-body {
        gap: 36px;
    }

    .course-tabs {
        flex: 0 0 230px;
    }

    .course-panels {
        padding: 36px;
    }
}

@media (max-width: 1024px) {
    .courses {
        padding: 64px 0;
    }

    .courses-body {
        flex-direction: column;
    }

    .course-tabs {
        /* PC 的 flex: 0 0 340px 是竖排时给的宽度；父容器改成竖向后，
           flex-basis 作用在了高度上，导致横排的 tab 被拉成 224px 高的长条。
           这里把 flex 复位让高度回到内容高度，并取消子项的拉伸 */
        flex: 0 0 auto;
        height: auto;
        flex-direction: row;
        /* 移动端直接换行铺开（两列），不再横向滑动 */
        flex-wrap: wrap;
        align-items: stretch;
        gap: 16px;
        width: 100%;
    }

    .course-tab {
        /* 两列等分：min-width:0 让 flex 项能被压到列宽以内 */
        flex: 1 1 calc((100% - 16px) / 2);
        min-width: 0;
        padding: 14px 16px;
        /* 这一块底图是浅蓝且明暗不匀，卡片要给实一点的白底 + 浅蓝描边，
           否则半透明白会和背景糊在一起，看不出是可点的按钮 */
        background: rgba(255, 255, 255, .92);
        border: 1px solid rgba(1, 100, 255, .14);
        border-radius: 10px;
        box-shadow: 0 4px 14px rgba(15, 34, 67, .06);
    }

    /* 换行铺开后同行由 stretch 自动等高，标题放行显示（不再截断求值）*/

    .course-tab .tab-desc {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .course-tab.active {
        background: #fff;
        border-color: rgba(1, 100, 255, .5);
        box-shadow: 0 6px 18px rgba(1, 100, 255, .16);
    }

    .course-panels {
        width: 100%;
    }

    /* 竖排后按 HTML 顺序：课程文字在上、配图在下（column-reverse 会反过来） */
    .course-panel.active {
        flex-direction: column;
    }

    /* 列表原本靠 68px 下边距把右侧配图撑开，竖排后这层留白落在图文之间，收掉 */
    .course-list {
        margin-bottom: 28px;
    }

    .course-media {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .courses {
        padding: 30px 0;
    }
    .courses-body{
        gap:20px;
    }
    .courses-inner .section-head {
        margin-bottom: 15px;
    }

    .course-panels {
        padding: 15px;
        border-radius: 14px;
    }

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

    .course-tab .tab-title {
        font-size: 16px;
    }

    .course-tab .tab-desc {
        display: none;
    }

    .course-list li {
        font-size: 14px;
    }

    .course-list li::before {
        margin-top: 2px; /* 14*1.6=22.4，(22.4 - 18) / 2 ≈ 2px */
    }

    /* 移动端：收紧面板内间距，课程图居中限宽 */
    .course-panel.active {
        gap: 24px;
    }

    .course-intro {
        font-size: 14px;
        line-height: 1.8;
    }

    .course-list {
        margin-bottom: 28px;
    }

    .course-media img {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .course-tabs {
        gap: 10px;
    }

    .course-tab {
        min-width: 0;
        flex-basis: calc((100% - 10px) / 2);
        padding: 12px 14px;
    }

    .course-tab .tab-title {
        font-size: 14px;
    }

    .course-panels {
        padding: 15px;
    }
}

/* ==================== 学习答疑与学习支持 ==================== */
.learning-support {
    padding: 80px 0;
    background: url('../images/personal/support_bg.jpg') no-repeat center;
    background-size: cover;
    position: relative;
}

.learning-support::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(6, 26, 43, 0.35);
    pointer-events: none;
}

.support-inner {
    position: relative;
    z-index: 1;
}

.support-inner .section-head.light {
    text-align: center;
    margin-bottom: 46px;
}

.support-inner .section-head.light .section-title {
    color: #fff;
    font-size: 36px;
    font-weight: 700;
}

.support-inner .section-head.light .section-desc {
    color: rgba(255, 255, 255, 0.85);
    max-width: 900px;
    margin: 18px auto 0;
    font-size: 15px;
    line-height: 1.7;
}

.support-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.support-card {
    background: #fff url('../images/personal/support_item_bg.png') no-repeat center top;
    background-size: 100% 100%;
    border-radius: 16px;
    padding: 34px 30px 28px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.12);
    transition: transform 0.25s, box-shadow 0.25s;
}

.support-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 52px rgba(0, 0, 0, 0.16);
}

.support-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.support-header img {
    width: 56px;
    height: 56px;
    display: block;
    flex-shrink: 0;
}

.support-header h3 {
    font-size: 22px;
    font-weight: 500;
    color: #000;
}

.support-list {
    list-style: none;
    flex: 1;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 80px;
}

.support-list li {
    position: relative;
    padding-left: 18px;
    font-size: 16px;
    color: #555;
    line-height: 1.5;
}

.support-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 7px;
    width: 6px;
    height: 6px;
    background: #006aed;
    border-radius: 50%;
}

.support-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    padding: 10px 22px;
    border: 1px solid #006aed;
    border-radius: 20px;
    font-size: 14px;
    color: #006aed;
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
}

.support-btn:hover {
    background: #006aed;
    color: #fff;
}

@media (max-width: 1024px) {
    .learning-support {
        padding: 64px 0;
    }

    .support-grid {
        gap: 18px;
    }

    .support-card {
        padding: 28px 22px;
    }
}

@media (max-width: 768px) {
    .learning-support {
        padding: 48px 0;
    }

    .support-inner .section-head.light {
        margin-bottom: 32px;
    }

    .support-inner .section-head.light .section-title {
        font-size: 26px;
    }

    .support-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    .support-card {
        padding: 26px 24px;
    }

    /* 移动端：取消 80px 缩进，列表不再被挤到右侧 */
    .support-list {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .support-inner .section-head.light .section-title {
        font-size: 22px;
    }

    .support-header h3 {
        font-size: 18px;
    }

    .support-btn {
        align-self: flex-end;
    }
}

/* ==================== 课程长期有效 ==================== */
.course-valid {
    padding: 80px 0;
    background: #fff;
}
.course-valid-inner .section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    color: #222;
    margin-bottom: 54px;
}

.course-valid-body {
    display: flex;
    align-items: center;
    gap: 60px;
    margin:0 auto;
    max-width: 1200px;
}

.valid-timeline {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
    background-repeat: no-repeat;
    background-position: left top;
    background-size: 100% 43px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item:nth-child(1) {
    background-image: url('../images/personal/line_1.png');
    background-position: 60px bottom ;
    background-repeat: no-repeat;
    padding-left: 60px;
    background-size:100% auto ;
}

.timeline-item:nth-child(2) {
    background-image: url('../images/personal/line_2.png');
    background-position: 10px bottom;
    background-repeat: no-repeat;
    background-size: 100% auto;
    padding-left: 0px;
}

.timeline-item:nth-child(3) {
    background-image: url('../images/personal/line_3.png');
    background-position: 60px bottom ;
    background-repeat: no-repeat;
    background-size:100% auto ;
    padding-left: 60px;
}

.timeline-content {
    padding-bottom: 26px;
    padding-right: 60px;
}

.timeline-tag {
    display: inline-block;
    padding: 8px 20px;
    min-width: 260px;
    background: linear-gradient(90deg, #305bf9 0%, #fdfdff 100%);
    border-radius: 20px;
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 12px;
    /* box-shadow: 0 4px 12px rgba(1, 100, 255, 0.25); */
}

.timeline-content p {
    font-size: 16px;
    color: #666;
    line-height: 2.0;
}

.valid-media {
    flex: 0 0 auto;
    max-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.valid-media img {
    width: 100%;
    height: auto;
    display: block;
}



@media (max-width: 1024px) {
    .course-valid {
        padding: 64px 0;
    }

    .course-valid-inner .section-title {
        font-size: 30px;
        margin-bottom: 42px;
    }

    .course-valid-body {
        gap: 40px;
    }

    .valid-media {
        max-width: 320px;
    }
}

@media (max-width: 768px) {
    .course-valid {
        padding: 30px 0;
    }

    .course-valid-inner .section-title {
        font-size: 26px;
        margin-bottom: 32px;
    }

    .course-valid-body {
        flex-direction: column;
        gap: 36px;
    }

    .valid-timeline {
        width: 100%;
        gap: 20px;
    }

    /* 移动端：装饰线原图只有 198×43，background-size: 100% auto 会把它横向拉伸到
       整行宽（比例严重变形、画面发虚）。这里改按卡片呈现：浅底 + 左侧强调条 */
    .timeline-item:nth-child(1),
    .timeline-item:nth-child(2),
    .timeline-item:nth-child(3) {
        padding: 16px 16px 14px;
        background-image: none;
        border-left: 3px solid #305bf9;
        border-radius: 10px;
        background-color: rgba(48, 91, 249, .06);
    }

    .timeline-item {
        padding-bottom: 16px;
    }

    .timeline-content {
        padding-right: 0;
        padding-bottom: 0;
    }

    .timeline-content p {
        line-height: 1.8;
    }

    .timeline-tag {
        /* 三条给同一个下限宽度，避免随字数长短不齐 */
        min-width: 148px;
        font-size: 16px;
        /* 原渐变末端是 #fdfdff（近白），移动端标签只有 100 来像素宽，
           白字会落在渐变的浅色段上几乎看不见；把渐变收在蓝色区间 */
        background: linear-gradient(90deg, #305bf9 0%, #5b83ff 100%);
    }

    .valid-media {
        max-width: 280px;
        order: -1;
    }
}

@media (max-width: 480px) {
    .course-valid-inner .section-title {
        font-size: 22px;
    }

    .timeline-tag {
        font-size: 14px;
        padding: 6px 16px;
    }

    .timeline-content p {
        font-size: 13px;
    }



    .valid-media {
        max-width: 220px;
    }
}
