/* ==========================================================================
   Trang danh sách khoá học /khoa-hoc/ — hướng 5a của bản thiết kế.

   Chỉ những khối riêng của trang này. Hero (.awe-phero), section, .awe-card,
   .awe-chip, .awe-band, .awe-cta và toàn bộ token dùng lại của awe.css.
   ========================================================================== */

/* Màu cảnh báo — dùng cho giá nhập sai còn trong DB. */
:root {
    --awe-warn: #b3261e;
    --awe-warn-bg: #fdeceb;
}

/* --- hero: chữ bên trái, ba con số bên phải --- */
.awe-phero__split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 60px;
}
.awe-figs { display: flex; gap: 34px; flex: none; margin: 0 0 6px; }
.awe-fig { margin: 0; }
.awe-fig__num {
    font-weight: 800;
    font-size: 28px;
    line-height: 1;
    color: var(--awe-primary);
    font-variant-numeric: tabular-nums;
}
.awe-fig__label { font-size: 12.5px; color: var(--awe-muted); margin: 5px 0 0; }

/* Chú thích phải của đầu dải. `baseline` để nó nằm đúng dòng tiêu đề: mặc định
   .awe-sechead căn `flex-end`, câu dẫn hai dòng sẽ đẩy chú thích tụt xuống đáy.
   Chỉ đổi trong file này nên trang chủ và các trang khác không ảnh hưởng. */
.awe-sechead { align-items: baseline; }
.awe-sechead__note { font-size: 14px; color: var(--awe-muted); flex: none; }

/* Ngành chưa có lộ trình: vẫn bày nút, nhưng không phải link. */
.awe-chip--off { color: var(--awe-muted-2); border-style: dashed; cursor: default; }
.awe-chip--off b { color: var(--awe-muted-2); }

/* ========================= thang lộ trình nghề =========================
   Sáu cột cao dần theo số tháng. Chiều cao đến từ --awe-bar (PHP tính theo
   khoảng tháng thật), nên thêm/bớt lộ trình không phải sửa CSS. */
.awe-ladder {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}
/* align-items mặc định là stretch: mọi cột cao bằng nhau, khung cột luôn 278px,
   nên phần thẻ bên dưới cũng cao bằng nhau. Nếu để `end`, thẻ nào có tên dài
   hơn sẽ đẩy cột của nó lên cao và thang không còn đọc được theo số tháng. */
.awe-rung { display: flex; flex-direction: column; }

.awe-rung__bar {
    height: 278px;
    flex: none;
    display: flex;
    align-items: flex-end;
}
.awe-rung__fill {
    position: relative;
    display: block;
    width: 100%;
    height: var(--awe-bar, 100%);
    border-radius: 3px 3px 0 0;
    background: var(--awe-primary);
}
/* Thang teal nhạt → đậm theo thứ tự cột. */
.awe-rung__fill--0 { background: #cfe2e1; }
.awe-rung__fill--1 { background: #a9cecd; }
.awe-rung__fill--2 { background: #79b5b3; }
.awe-rung__fill--3 { background: #3d9a97; }
.awe-rung__fill--4 { background: var(--awe-primary); }

/* Đặt trong cột chứ không trong khung cột: nhãn phải nằm ngay trên đầu cột màu,
   không lơ lửng giữa khoảng trắng phía trên. */
.awe-rung__flag {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 4px;
    z-index: 1;
    background: var(--awe-gold);
    color: var(--awe-ink);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 8px;
}

.awe-rung__card {
    display: block;
    flex: 1;
    background: var(--awe-surface);
    border: 1px solid rgba(20, 32, 31, .16);
    border-top: 0;
    border-radius: 0 0 3px 3px;
    padding: 16px 15px 17px;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease;
}
.awe-rung__card:hover { border-color: var(--awe-primary); }
.awe-rung--top .awe-rung__card { border-color: var(--awe-primary); }

.awe-rung__dur { font-weight: 800; font-size: 22px; letter-spacing: -.02em; color: var(--awe-ink); }
.awe-rung__dur small { font-size: 13px; font-weight: 600; color: var(--awe-muted); }
.awe-rung__title { font-weight: 600; font-size: 14.5px; line-height: 1.35; margin: 9px 0 0; min-height: 58px; }
.awe-rung__meta { font-size: 12.5px; color: var(--awe-muted); margin: 0 0 11px; }
.awe-rung__price { display: block; }
.awe-rung__price .awe-price--old { display: block; margin: 2px 0 0; }

/* ========================= card khoá phần mềm ========================= */
.awe-card--list .awe-card__meta { font-size: 13px; color: var(--awe-muted); margin: 0; }
.awe-card--list .awe-card__title { min-height: 44px; }

/* ========================= combo ========================= */
.awe-combo {
    display: flex;
    flex-direction: column;
    background: var(--awe-surface);
    border: 1px solid rgba(20, 32, 31, .16);
    border-radius: var(--awe-radius);
    padding: 20px 20px 22px;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease;
}
.awe-combo:hover { border-color: var(--awe-primary); }
/* Thẻ nổi bật mang teal đậm thay vì mực đen — cùng họ với nhãn vàng bên trong
   (cặp teal ↔ gold của bộ nhận diện) và nổi hơn hẳn giữa các thẻ nền trắng. */
.awe-combo--best { background: var(--awe-primary-deep); border-color: var(--awe-primary-deep); color: #fff; }
.awe-combo--best:hover { border-color: var(--awe-gold); }

.awe-combo__flag {
    align-self: flex-start;
    background: var(--awe-gold);
    color: var(--awe-ink);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 9px;
}
.awe-combo__flag--plain {
    background: transparent;
    border: 1px solid rgba(20, 32, 31, .22);
    color: var(--awe-muted);
    font-weight: 600;
}
.awe-combo__title { font-weight: 700; font-size: 17px; line-height: 1.35; margin: 14px 0 0; }
.awe-combo__title span { display: block; font-weight: 500; }
.awe-combo__meta { font-size: 13px; color: var(--awe-muted); margin: 9px 0 16px; }
.awe-combo--best .awe-combo__meta { color: rgba(255, 255, 255, .72); }
.awe-combo__price { margin-top: auto; }
.awe-combo__price .awe-price { font-size: 22px; }
.awe-combo__price .awe-price--old { display: block; margin: 2px 0 0; }
.awe-combo--best .awe-combo__price .awe-price { color: #fff; }
.awe-combo--best .awe-combo__price .awe-price--old { color: rgba(255, 255, 255, .68); }

/* ========================= kiến thức nền =========================
   Danh sách hai cột: 9 khoá lẻ, người đọc quét tên rồi nhìn giá. */
.awe-toplist {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 40px;
    background: var(--awe-surface);
    border: 1px solid var(--awe-line);
    border-radius: var(--awe-radius);
    padding: 6px 24px;
    margin: 0;
    list-style: none;
}
.awe-toplist__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--awe-line-soft);
}
/* Hai ô cuối mỗi cột không cần gạch chân. */
.awe-toplist__row:nth-last-child(2):not(.awe-toplist__row--flag),
.awe-toplist__row:nth-last-child(3):not(.awe-toplist__row--flag) { border-bottom: 0; }

.awe-toplist__name { color: inherit; text-decoration: none; font-size: 15.5px; }
.awe-toplist__name:hover { color: var(--awe-primary); }
.awe-toplist__name small { font-size: 12px; color: var(--awe-muted-2); }

.awe-toplist__price { white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.awe-toplist__price b { font-weight: 700; color: var(--awe-primary); font-variant-numeric: tabular-nums; }
.awe-toplist__price s { font-size: 12.5px; color: var(--awe-muted-2); }

/* Môn chỉ có trong lộ trình: chỗ của giá là chỗ nói vì sao không có giá. */
.awe-toplist__only {
    font-size: 12px;
    font-weight: 600;
    color: var(--awe-primary-deep);
    background: var(--awe-tint);
    padding: 4px 9px;
    white-space: nowrap;
}

/* Giá nhập sai: hiện đúng con số kèm ghi chú thay vì giấu — đội nội dung sửa
   giá là dòng này tự trở về bình thường. */
.awe-toplist__row--flag {
    grid-column: 1 / -1;
    border-bottom: 0;
    border-top: 1px solid var(--awe-line-soft);
}
.awe-toplist__row--flag .awe-toplist__name { color: var(--awe-muted); }
.awe-price--bad { color: var(--awe-warn) !important; }
.awe-toplist__warn {
    background: var(--awe-warn-bg);
    color: var(--awe-warn);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
}

/* Nút viền trắng trên nền teal của dải CTA. */
.awe-btn--ghostteal { border: 1px solid rgba(255, 255, 255, .6); color: #fff; }
.awe-btn--ghostteal:hover { background: rgba(255, 255, 255, .12); color: #fff; }

/* ========================= responsive ========================= */
@media (max-width: 1200px) {
    /* Sáu cột không còn đủ chỗ cho tên khoá — xoay thang thành danh sách dọc,
       thanh ngang dài dần thay cho cột cao dần (bản 5c của thiết kế). */
    .awe-ladder { grid-template-columns: 1fr; gap: 10px; }
    .awe-rung { flex-direction: column; }
    .awe-rung__bar { height: 5px; display: block; }
    .awe-rung__fill { width: var(--awe-bar, 100%); height: 5px; border-radius: 0; }
    /* Bản mobile của thiết kế không có nhãn này: một nhãn vàng đặt trên thanh
       5px thì không đọc được. */
    .awe-rung__flag { display: none; }
    .awe-rung__card {
        border-top: 1px solid rgba(20, 32, 31, .16);
        border-radius: 0 0 4px 4px;
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 4px 16px;
        padding: 13px 15px 15px;
    }
    .awe-rung__dur { grid-row: 1; font-size: 15px; }
    .awe-rung__title { grid-column: 1; margin: 0; min-height: 0; font-size: 15px; }
    .awe-rung__meta { grid-column: 1; margin: 4px 0 0; }
    .awe-rung__price { grid-column: 2; grid-row: 1 / span 3; text-align: right; align-self: center; }
}

@media (max-width: 900px) {
    .awe-phero__split { flex-direction: column; align-items: flex-start; gap: 22px; }
    .awe-figs { gap: 26px; margin-bottom: 0; }
    .awe-fig__num { font-size: 24px; }

    .awe-toplist { grid-template-columns: 1fr; gap: 0; padding: 6px 18px; }
    .awe-toplist__row:nth-last-child(2):not(.awe-toplist__row--flag) { border-bottom: 1px solid var(--awe-line-soft); }
    .awe-toplist__row { align-items: flex-start; flex-direction: column; gap: 6px; }
    .awe-toplist__price { gap: 8px; flex-wrap: wrap; }
}
