/* ============================================================
 * EduMaster 课程中心（?ls_route=course / courses）
 * 独立作用域：.ls-chub，避免与全局 Tailwind 收口规则互相污染。
 * 视觉：品牌深蓝 #0E2A47 / 蓝 #1B4A77 / 金 #C8A45C，克制、专业。
 * ============================================================ */

.ls-chub {
    --ch-navy: #0E2A47;
    --ch-blue: #1B4A77;
    --ch-gold: #C8A45C;
    --ch-ink: #1A2230;
    --ch-body: #3A4452;
    --ch-muted: #6B7686;
    --ch-line: #E6EAF0;
    --ch-line-2: #F0F3F8;
    --ch-bg: #F5F7FA;
    --ch-soft: #EAF0F6;
    --ch-card: #FFFFFF;
    --ch-radius: 14px;
    --ch-shadow: 0 6px 24px rgba(14, 42, 71, .06);
    color: var(--ch-ink);
    background: var(--ch-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
    padding-bottom: 56px;
}

.ls-chub *,
.ls-chub *::before,
.ls-chub *::after { box-sizing: border-box; }

.ls-chub a { color: inherit; text-decoration: none; }
.ls-chub h1, .ls-chub h2, .ls-chub h3, .ls-chub p { margin: 0; }
.ls-chub button, .ls-chub input, .ls-chub select { font: inherit; }

.ls-chub-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Hero ---------- */
.ls-chub-hero {
    position: relative;
    overflow: hidden;
    background: var(--ch-navy);
    color: #fff;
    padding: 46px 0 38px;
}
.ls-chub-hero::before,
.ls-chub-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.ls-chub-hero::before {
    width: 520px; height: 520px;
    right: -150px; top: -260px;
    border: 1px solid rgba(200, 164, 92, .22);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(200, 164, 92, .045), 0 0 0 140px rgba(200, 164, 92, .03);
}
.ls-chub-hero::after {
    width: 340px; height: 340px;
    left: -180px; bottom: -230px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
}
.ls-chub-hero-inner { position: relative; z-index: 1; }
.ls-chub-eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--ch-gold); font-size: 12px; font-weight: 700;
    letter-spacing: .18em; text-transform: uppercase;
    margin-bottom: 14px;
}
.ls-chub-eyebrow::before {
    content: ""; width: 28px; height: 2px; background: var(--ch-gold);
}
.ls-chub-hero h1 {
    font-size: 34px; line-height: 1.24; font-weight: 700;
    letter-spacing: -.02em; margin-bottom: 12px;
}
.ls-chub-hero h1 span { color: var(--ch-gold); }
.ls-chub-hero-desc {
    max-width: 660px; font-size: 15px; line-height: 1.75;
    color: rgba(255, 255, 255, .76); margin-bottom: 26px;
}

.ls-chub-searchbar {
    display: flex; align-items: stretch; gap: 0;
    max-width: 780px; background: #fff;
    border-radius: 10px; padding: 5px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}
.ls-chub-searchbar input[type="text"] {
    flex: 1; min-width: 0; border: 0; outline: 0;
    padding: 10px 14px; font-size: 14px; color: var(--ch-ink);
    background: transparent;
}
.ls-chub-searchbar input::placeholder { color: #A3ADBA; }
.ls-chub-searchbar select {
    width: 130px; border: 0; border-left: 1px solid var(--ch-line);
    padding: 0 10px; outline: 0; color: var(--ch-body);
    background: #fff; font-size: 13px;
}
.ls-chub-searchbar button {
    border: 0; cursor: pointer; flex-shrink: 0;
    padding: 10px 22px; border-radius: 7px;
    background: var(--ch-blue); color: #fff;
    font-size: 14px; font-weight: 600;
    transition: background .18s;
}
.ls-chub-searchbar button:hover { background: var(--ch-navy); }

.ls-chub-stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 0; max-width: 780px; margin-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    padding-top: 18px;
}
.ls-chub-stat { padding-left: 18px; border-left: 1px solid rgba(255, 255, 255, .14); }
.ls-chub-stat:first-child { padding-left: 0; border-left: 0; }
.ls-chub-stat strong {
    display: block; font-size: 22px; line-height: 1.2;
    font-weight: 700; color: #fff;
}
.ls-chub-stat span { display: block; font-size: 12px; margin-top: 5px; color: rgba(255, 255, 255, .6); }
.ls-chub-stat b { color: var(--ch-gold); font-weight: 700; }

/* ---------- 分类导航 ---------- */
.ls-chub-cats {
    background: var(--ch-card);
    border-bottom: 1px solid var(--ch-line);
    /* 站点头部固定：桌面 80px / 手机 56px，粘在头部下方而不是被遮住 */
    position: sticky; top: 80px; z-index: 20;
}
.ls-chub-section { scroll-margin-top: 96px; }
.ls-chub-cat { min-height: 44px; }
.ls-chub-cats-inner {
    display: flex; align-items: center; gap: 6px;
    overflow-x: auto; scrollbar-width: none;
    padding: 10px 0;
}
.ls-chub-cats-inner::-webkit-scrollbar { display: none; }
.ls-chub-cat {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 15px; border-radius: 8px;
    color: var(--ch-body); font-size: 13px; font-weight: 600;
    border: 1px solid transparent; white-space: nowrap;
    transition: background .16s, color .16s, border-color .16s;
}
.ls-chub-cat:hover { background: var(--ch-soft); color: var(--ch-blue); }
.ls-chub-cat.is-active {
    background: var(--ch-blue); color: #fff;
}
.ls-chub-cat-num {
    font-size: 11px; font-weight: 700;
    min-width: 20px; text-align: center;
    padding: 1px 5px; border-radius: 10px;
    background: var(--ch-bg); color: var(--ch-muted);
}
.ls-chub-cat.is-active .ls-chub-cat-num {
    background: rgba(255, 255, 255, .18); color: #fff;
}

/* ---------- Section 通用 ---------- */
.ls-chub-section { padding-top: 34px; }
.ls-chub-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; margin-bottom: 18px;
}
.ls-chub-head h2 {
    font-size: 22px; font-weight: 700; letter-spacing: -.01em;
    padding-left: 12px; border-left: 3px solid var(--ch-gold);
    line-height: 1.3;
}
.ls-chub-head p { font-size: 13px; color: var(--ch-muted); margin-top: 6px; margin-left: 15px; }
.ls-chub-more {
    flex-shrink: 0; font-size: 13px; color: var(--ch-blue); font-weight: 600;
}
.ls-chub-more:hover { color: var(--ch-navy); text-decoration: underline; }

.ls-chub-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

/* ---------- 课程卡片 ---------- */
.ls-chub-card {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--ch-card);
    border: 1px solid var(--ch-line);
    border-radius: var(--ch-radius);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ls-chub-card:hover {
    transform: translateY(-3px);
    border-color: #C8D6E7;
    box-shadow: var(--ch-shadow);
}
.ls-chub-cover {
    position: relative; aspect-ratio: 16 / 10;
    overflow: hidden; background: var(--ch-soft);
}
.ls-chub-cover img {
    display: block; width: 100%; height: 100%; object-fit: cover;
    transition: transform .35s;
}
.ls-chub-card:hover .ls-chub-cover img { transform: scale(1.04); }
.ls-chub-cover-fallback {
    width: 100%; height: 100%; position: relative;
    background: linear-gradient(135deg, #12355B 0%, #1B4A77 62%, #2A5D8F 100%);
    display: flex; align-items: center; justify-content: center;
}
.ls-chub-cover-fallback::before {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 28px 28px;
}
.ls-chub-cover-fallback::after {
    content: ""; position: absolute; right: -30px; top: -40px;
    width: 150px; height: 150px; border-radius: 50%;
    border: 1px solid rgba(200, 164, 92, .35);
}
.ls-chub-cover-mark {
    position: relative; z-index: 1;
    font-size: 50px; font-weight: 800; line-height: 1;
    color: rgba(255, 255, 255, .2);
}
.ls-chub-cover-cat {
    position: absolute; z-index: 1; left: 14px; bottom: 12px;
    font-size: 11px; font-weight: 600; letter-spacing: .08em;
    color: rgba(255, 255, 255, .82);
}
.ls-chub-badge {
    position: absolute; z-index: 2; top: 10px; left: 10px;
    padding: 4px 9px; border-radius: 5px;
    background: rgba(14, 42, 71, .86); color: #fff;
    font-size: 11px; font-weight: 600;
}
.ls-chub-badge.is-gold { background: rgba(200, 164, 92, .94); color: #1A2230; }

.ls-chub-card-body {
    display: flex; flex-direction: column; flex: 1;
    padding: 16px;
}
.ls-chub-card-top {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; color: var(--ch-muted); margin-bottom: 9px;
    flex-wrap: wrap;
}
.ls-chub-card-top i {
    width: 3px; height: 3px; border-radius: 50%;
    background: #B6C0CD; display: inline-block;
}
.ls-chub-card h3 {
    font-size: 15px; line-height: 1.5; font-weight: 700;
    color: var(--ch-ink); min-height: 45px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    transition: color .16s;
}
.ls-chub-card:hover h3 { color: var(--ch-blue); }
.ls-chub-card-excerpt {
    margin-top: 8px; font-size: 12px; line-height: 1.6;
    color: var(--ch-muted); min-height: 38px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.ls-chub-card-foot {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 8px; margin-top: auto; padding-top: 14px;
    border-top: 1px solid var(--ch-line-2);
}
.ls-chub-price {
    font-size: 17px; font-weight: 800; color: var(--ch-navy);
    font-variant-numeric: tabular-nums;
}
.ls-chub-price.is-free { color: var(--ch-blue); }
.ls-chub-price del {
    display: block; font-size: 11px; font-weight: 400;
    color: var(--ch-faint, #98A2B3); margin-top: 1px;
}
.ls-chub-go {
    font-size: 12px; font-weight: 700; color: var(--ch-blue); white-space: nowrap;
}
.ls-chub-card:hover .ls-chub-go { color: var(--ch-navy); }

/* ---------- 精选：首张更宽，但封面等高，避免同排卡片被拉伸留白（2026-11-26） ---------- */
.ls-chub-featured-grid .ls-chub-card:first-child { grid-column: span 2; }
/* 关键：首张封面不再用 aspect-ratio 撑高（span2 时会比其他卡片高约 100px，
   导致同一行卡片被 grid 拉伸、内容区底部出现大片空白）。全部固定等高即可。 */
.ls-chub-featured-grid .ls-chub-cover,
.ls-chub-featured-grid .ls-chub-card:first-child .ls-chub-cover {
    aspect-ratio: auto;
    height: 188px;
}
.ls-chub-featured-grid .ls-chub-card:first-child .ls-chub-card-body { padding: 20px; }
.ls-chub-featured-grid .ls-chub-card:first-child h3 { font-size: 19px; min-height: auto; }
.ls-chub-featured-grid .ls-chub-card:first-child .ls-chub-card-excerpt { min-height: 40px; }
/* 内容区高度也对齐：标题/简介统一最小高度，避免短标题卡片底部空一大截 */
.ls-chub-featured-grid .ls-chub-card-body { padding: 16px; }
.ls-chub-featured-grid .ls-chub-card h3 { min-height: 45px; }
.ls-chub-featured-grid .ls-chub-card-excerpt { min-height: 38px; }
.ls-chub-featured-grid .ls-chub-card-foot { margin-top: auto; }

/* ---------- 空状态 / 分页 ---------- */
.ls-chub-empty {
    padding: 56px 20px; text-align: center;
    background: var(--ch-card); border: 1px dashed var(--ch-line);
    border-radius: var(--ch-radius);
}
.ls-chub-empty strong { display: block; font-size: 17px; margin-bottom: 8px; color: var(--ch-ink); }
.ls-chub-empty p { font-size: 13px; color: var(--ch-muted); }
.ls-chub-empty a { color: var(--ch-blue); font-weight: 600; text-decoration: underline; }

.ls-chub-pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 6px; margin-top: 32px; flex-wrap: wrap;
}
.ls-chub-pagination .page-numbers {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; padding: 0 10px;
    border: 1px solid var(--ch-line); border-radius: 7px;
    background: #fff; color: var(--ch-body); font-size: 13px;
}
.ls-chub-pagination .page-numbers:hover { border-color: var(--ch-blue); color: var(--ch-blue); }
.ls-chub-pagination .page-numbers.current {
    background: var(--ch-blue); border-color: var(--ch-blue); color: #fff; font-weight: 700;
}

/* ---------- 咨询区 ---------- */
.ls-chub-cta {
    margin-top: 44px; padding: 30px 32px;
    background: var(--ch-navy); color: #fff;
    border-radius: var(--ch-radius);
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px; flex-wrap: wrap;
    position: relative; overflow: hidden;
}
.ls-chub-cta::after {
    content: ""; position: absolute; right: -60px; top: -80px;
    width: 260px; height: 260px; border-radius: 50%;
    border: 1px solid rgba(200, 164, 92, .25);
}
.ls-chub-cta h2 { font-size: 20px; margin-bottom: 7px; }
.ls-chub-cta p { font-size: 13px; color: rgba(255, 255, 255, .68); }
.ls-chub-cta-list { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.ls-chub-cta-item {
    padding: 10px 16px; border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .18);
    font-size: 13px; color: rgba(255, 255, 255, .88);
}
.ls-chub-cta-item b { color: var(--ch-gold); font-weight: 700; margin-right: 6px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .ls-chub-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ls-chub-featured-grid .ls-chub-card:first-child { grid-column: span 1; }
}
@media (max-width: 760px) {
    .ls-chub-cats { top: 56px; }
    .ls-chub-section { scroll-margin-top: 72px; }
    .ls-chub-hero { padding: 34px 0 28px; }
    .ls-chub-hero h1 { font-size: 26px; }
    .ls-chub-hero-desc { font-size: 13px; margin-bottom: 20px; }
    .ls-chub-searchbar { flex-wrap: wrap; }
    .ls-chub-searchbar input[type="text"] { flex-basis: 100%; }
    .ls-chub-searchbar select { flex: 1; border-left: 0; border-top: 1px solid var(--ch-line); padding: 9px 10px; }
    .ls-chub-searchbar button { padding: 9px 18px; }
    .ls-chub-stats { grid-template-columns: repeat(2, 1fr); row-gap: 14px; }
    .ls-chub-stat:nth-child(3) { padding-left: 0; border-left: 0; }
    .ls-chub-wrap { padding: 0 14px; }
    .ls-chub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .ls-chub-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ls-chub-featured-grid .ls-chub-card:first-child { grid-column: span 1; }
    .ls-chub-featured-grid .ls-chub-cover,
    .ls-chub-featured-grid .ls-chub-card:first-child .ls-chub-cover { height: 132px; }
    .ls-chub-card-body { padding: 12px; }
    .ls-chub-card h3 { font-size: 14px; min-height: 42px; }
    .ls-chub-card-excerpt { display: none; }
    .ls-chub-head h2 { font-size: 19px; }
    .ls-chub-cta { padding: 24px 20px; }
}
@media (max-width: 480px) {
    .ls-chub-grid { grid-template-columns: 1fr; }
    .ls-chub-featured-grid .ls-chub-card:first-child { grid-column: span 1; }
    .ls-chub-cover { aspect-ratio: 16 / 9; }
    .ls-chub-card h3 { min-height: auto; }
}

/* ---------- 暗色模式 ---------- */
html.dark-mode .ls-chub { background: #111820; color: #E7ECF3; }
html.dark-mode .ls-chub-card,
html.dark-mode .ls-chub-empty { background: #18222E; border-color: #2A3949; }
html.dark-mode .ls-chub-card h3,
html.dark-mode .ls-chub-head h2 { color: #E7ECF3; }
html.dark-mode .ls-chub-card-excerpt,
html.dark-mode .ls-chub-head p,
html.dark-mode .ls-chub-card-top { color: #9AA7B6; }
html.dark-mode .ls-chub-cats { background: #18222E; border-color: #2A3949; }
html.dark-mode .ls-chub-cat { color: #B8C4D1; }
html.dark-mode .ls-chub-cat:hover { background: #223044; }
html.dark-mode .ls-chub-cat-num { background: #223044; color: #9AA7B6; }
html.dark-mode .ls-chub-price { color: #E7ECF3; }
html.dark-mode .ls-chub-searchbar,
html.dark-mode .ls-chub-searchbar select { background: #18222E; color: #E7ECF3; }
html.dark-mode .ls-chub-searchbar input[type="text"] { color: #E7ECF3; }
html.dark-mode .ls-chub-pagination .page-numbers {
    background: #18222E; border-color: #2A3949; color: #B8C4D1;
}

/* ---------- 原生 /blog/course/ 归档 + 手机 APP 化补丁（2026-11-23） ---------- */
.ls-chub .ls-chub-cat,
.ls-chub .ls-chub-searchbar input[type="text"],
.ls-chub .ls-chub-searchbar select,
.ls-chub .ls-chub-searchbar button,
.ls-chub .ls-chub-more,
.ls-chub .ls-chub-pagination .page-numbers {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ls-chub .ls-chub-pagination .page-numbers { min-width: 40px; }

@media (max-width: 480px) {
    .ls-chub-hero { padding: 26px 0 22px; }
    .ls-chub-hero h1 { font-size: 22px; }
    .ls-chub-hero-desc { font-size: 12px; line-height: 1.6; margin-bottom: 16px; }
    .ls-chub-searchbar { padding: 4px; }
    .ls-chub-searchbar input[type="text"] { font-size: 16px; padding: 10px 12px; }
    .ls-chub-searchbar select,
    .ls-chub-searchbar button { font-size: 13px; }
    .ls-chub-stats { margin-top: 18px; padding-top: 14px; row-gap: 10px; }
    .ls-chub-stat strong { font-size: 18px; }
    .ls-chub-stat span { font-size: 11px; }
    .ls-chub-cats-inner { padding: 8px 0; gap: 6px; }
    .ls-chub-cat { padding: 8px 12px; border-radius: 8px; font-size: 12px; }
    .ls-chub-cat-num { min-width: 18px; padding: 1px 4px; }
    .ls-chub-section { padding-top: 24px; }
    .ls-chub-head { margin-bottom: 14px; }
    .ls-chub-head h2 { font-size: 18px; }
    .ls-chub-head p { font-size: 12px; }
    .ls-chub-grid,
    .ls-chub-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .ls-chub-featured-grid .ls-chub-card:first-child { grid-column: span 1; }
    .ls-chub-featured-grid .ls-chub-cover,
    .ls-chub-featured-grid .ls-chub-card:first-child .ls-chub-cover { height: 118px; }
    .ls-chub-card { border-radius: 12px; }
    .ls-chub-card-body { padding: 10px; }
    .ls-chub-card-top { font-size: 10.5px; gap: 6px; margin-bottom: 7px; }
    .ls-chub-card h3 { font-size: 13.5px; line-height: 1.4; min-height: 38px; }
    .ls-chub-card-excerpt { display: none; }
    .ls-chub-card-foot { padding-top: 8px; margin-top: 8px; }
    .ls-chub-price { font-size: 15px; }
    .ls-chub-go { font-size: 11px; }
    .ls-chub-cta { padding: 20px 16px; }
    .ls-chub-cta h2 { font-size: 18px; }
}
