/* ============================================================
   课程详情页样式（course / content_edu 共用 single-content_edu.php）
   说明：主题此前仅 mobile.css 有少量移动端 !important 覆盖，
   桌面端 .course-* 系列基础样式完全缺失，导致课程页排版错乱。
   本文件补全完整桌面端基础样式；移动端由 mobile.css 的 !important 覆盖进一步收紧。
   ============================================================ */

.course-detail {
    max-width: 760px;
    margin: 0 auto;
    background: #ffffff;
    min-height: 100vh;
    padding-bottom: 96px; /* 给吸底购买条留空间 */
    border: 1px solid #eceef3;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 4px 24px rgba(17, 24, 39, 0.06);
}

/* ---------- 头部 ---------- */
.course-header {
    position: relative;
    padding: 40px 28px 32px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #3b82f6 100%);
    color: #fff;
    border-radius: 0 0 24px 24px;
}
.course-header .back {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 14px;
    font-size: 13px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    text-decoration: none;
    transition: background .2s;
}
.course-header .back:hover { background: rgba(255, 255, 255, 0.32); }
.course-header .title {
    margin: 0 0 14px;
    font-size: 1.9rem;
    line-height: 1.35;
    font-weight: 800;
    color: #fff;
}
.course-header .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
}
.course-header .meta-item { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 信息条：4 列网格，上移覆盖头部 ---------- */
.course-info-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: -28px 20px 22px;
    padding: 18px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.12);
}
.course-info-bar .item {
    text-align: center;
    padding: 12px 8px;
    border-radius: 12px;
    background: #f7f8fc;
}
.course-info-bar .value { font-size: 1.25rem; font-weight: 800; color: #4f46e5; }
.course-info-bar .label { margin-top: 4px; font-size: 12px; color: #888; }

/* ---------- 内容区 ---------- */
.course-content { padding: 0 24px; }
.course-section {
    padding: 20px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #eef0f5;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.04);
}
.course-section h3 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    padding-left: 12px;
    border-left: 4px solid #4f46e5;
}
.course-section .desc { font-size: 15px; line-height: 1.8; color: #374151; word-break: break-word; }
.course-section .desc p { margin: 0 0 12px; }
.course-section .desc img { max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 14px auto; }
.course-section .desc h1,
.course-section .desc h2,
.course-section .desc h3,
.course-section .desc h4 { margin: 18px 0 10px; color: #111827; }

/* ---------- 分类标签 ---------- */
.category-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.category-tag {
    font-size: 12px;
    padding: 4px 12px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 999px;
}

/* ---------- 讲师卡 ---------- */
.teacher-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f7f8fc;
    border-radius: 14px;
}
.teacher-avatar {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: #e0e7ff;
    border-radius: 50%;
}
.teacher-info { flex: 1; min-width: 0; }
.teacher-name { font-size: 16px; font-weight: 700; color: #1f2937; }
.teacher-title { margin-top: 2px; font-size: 13px; color: #6b7280; }

/* ---------- 章节列表 ---------- */
.chapter-list { display: flex; flex-direction: column; gap: 10px; }
.chapter-item {
    padding: 14px 16px;
    background: #f9fafb;
    border: 1px solid #eef0f5;
    border-radius: 12px;
    transition: transform .15s, box-shadow .15s;
    cursor: pointer;
}
.chapter-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(79, 70, 229, 0.1); }
.chapter-item .title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    color: #374151;
}
.chapter-item .title .duration { font-size: 12px; color: #9ca3af; flex: 0 0 auto; margin-left: 12px; }

/* ---------- 底部购买条（吸底，桌面端对齐 760px 内容列） ---------- */
.course-buy {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 760px;
    box-sizing: border-box;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid #eceef3;
    border-left: 1px solid #eceef3;
    border-right: 1px solid #eceef3;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -6px 24px rgba(17, 24, 39, 0.08);
}
.course-buy .btn { flex: 0 0 auto; }
.course-price { font-size: 1.25rem; font-weight: 800; color: #4f46e5; }

/* ---------- 按钮（仅作用于课程页 .course-detail 内，避免全局 .btn 泄漏到其它页面） ---------- */
.course-detail .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    transition: background .2s, transform .1s;
    white-space: nowrap;
}
.course-detail .btn:active { transform: scale(0.98); }
.course-detail .btn-primary { background: #4f46e5; color: #fff; }
.course-detail .btn-primary:hover { background: #4338ca; }
.course-detail .btn-outline {
    background: #fff;
    color: #4f46e5;
    border-color: #c7d2fe;
}
.course-detail .btn-outline:hover { background: #eef2ff; }

/* ---------- 关联招生计划卡片（Tailwind 彩色类兜底，避免构建未扫描到时无色） ---------- */
.course-section .bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, #eff6ff, #eef2ff);
}
.course-section .from-blue-50 { --tw-gradient-from: #eff6ff; }
.course-section .to-indigo-50 { --tw-gradient-to: #eef2ff; }
