/* ============================================================
   Course Learn — enrolled course details + lecture player
   Scoped under .cl- to avoid clashing with the rest of the site.
   Keeps the site brand (orange) and works in both RTL & LTR.
   ============================================================ */
:root {
    --cl-primary: #2b66bf;
    --cl-primary-d: #0d164f;
    --cl-dark: #1f2937;
    --cl-muted: #6b7280;
    --cl-bg: #f6f6f7;
    --cl-card: #ffffff;
    --cl-border: #e5e7eb;
    --cl-radius: 16px;
    --cl-shadow: 0 10px 30px rgba(13,22,79, .06);
}

/* ---------- HERO ---------- */
.cl-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 24px;
    padding: 28px;
    border-radius: var(--cl-radius);
    background: linear-gradient(135deg, #3a53a4 0%, #2b66bf 38%, #3f7bd0 75%, #62d4f5 100%);
    color: #fff;
    overflow: hidden;
    margin-bottom: 22px;
}
.cl-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, .12);
    border-radius: 50%;
}
.cl-hero-info { flex: 1 1 320px; position: relative; z-index: 1; }
.cl-hero-title { font-size: 26px; font-weight: 800; line-height: 1.35; margin: 0 0 10px; color: #fff; }
.cl-hero-desc { font-size: 14px; line-height: 1.9; opacity: .95; margin: 0 0 16px; }
.cl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cl-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    padding: 6px 12px; border-radius: 30px;
    font-size: 12.5px; font-weight: 600; backdrop-filter: blur(2px);
}
.cl-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; color: var(--cl-primary-d);
    padding: 11px 24px; border-radius: 30px;
    font-weight: 800; font-size: 14px; text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.cl-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .18); color: var(--cl-primary-d); }

.cl-hero-media { flex: 0 0 280px; position: relative; z-index: 1; }
.cl-hero-thumb {
    position: relative; display: block; border-radius: 14px; overflow: hidden;
    aspect-ratio: 16 / 9; background-size: cover; background-position: center;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .25);
}
.cl-hero-thumb .cl-play {
    position: absolute; inset: 0; margin: auto;
    width: 58px; height: 58px; border-radius: 50%;
    background: rgba(255, 255, 255, .92); color: var(--cl-primary);
    display: flex; align-items: center; justify-content: center; font-size: 22px;
}

/* ---------- BODY GRID ---------- */
.cl-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.cl-main { flex: 1 1 420px; min-width: 0; }
.cl-side { flex: 0 0 260px; }
@media (max-width: 991px) { .cl-side { flex: 1 1 100%; } }

.cl-card {
    background: var(--cl-card);
    border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius);
    box-shadow: var(--cl-shadow);
    padding: 22px; margin-bottom: 20px;
}
.cl-card-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 17px; font-weight: 800; color: var(--cl-dark);
    margin: 0 0 16px; padding-bottom: 12px; border-bottom: 2px solid var(--cl-bg);
}
.cl-card-title .cl-ico {
    width: 34px; height: 34px; border-radius: 10px;
    background: rgba(43,102,191, .12); color: var(--cl-primary);
    display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.cl-prose { font-size: 14px; line-height: 1.95; color: #374151; }

/* ---------- SIDE INFO CARD ---------- */
.cl-info-list { list-style: none; margin: 0; padding: 0; }
.cl-info-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 11px 0; border-bottom: 1px dashed var(--cl-border); font-size: 13.5px;
}
.cl-info-list li:last-child { border-bottom: 0; }
.cl-info-list .k { color: var(--cl-muted); display: flex; align-items: center; gap: 8px; }
.cl-info-list .v { font-weight: 700; color: var(--cl-dark); }
.cl-badge-ok { color: #07502b; font-weight: 700; }
.cl-badge-no { color: #b22e4f; font-weight: 700; }

/* ---------- CURRICULUM ---------- */
.cl-lec {
    display: flex; align-items: center; gap: 14px;
    padding: 14px; margin-bottom: 12px;
    border: 1px solid var(--cl-border); border-radius: 14px;
    background: #fff; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    text-decoration: none;
}
.cl-lec:hover { border-color: var(--cl-primary); box-shadow: var(--cl-shadow); transform: translateY(-1px); }
.cl-lec-num {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 12px;
    background: var(--cl-bg); color: var(--cl-primary);
    font-weight: 800; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
}
.cl-lec-body { flex: 1 1 auto; min-width: 0; }
.cl-lec-title { font-size: 14.5px; font-weight: 700; color: var(--cl-dark); margin-bottom: 5px; }
.cl-lec-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.cl-tag {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--cl-bg); color: var(--cl-muted);
    padding: 3px 10px; border-radius: 20px; font-size: 11.5px; font-weight: 600;
}
.cl-lec-play {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
    background: var(--cl-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
}

/* ---------- LOCKED / EMPTY ---------- */
.cl-note {
    text-align: center; padding: 26px 18px; border-radius: 14px;
    background: #eef3fa; border: 1px dashed var(--cl-primary);
    color: var(--cl-primary-d); font-size: 14px; font-weight: 600;
}
.cl-note.muted { background: var(--cl-bg); border-color: var(--cl-border); color: var(--cl-muted); }

/* ============================================================
   PLAYER PAGE
   ============================================================ */
.cl-player-wrap { display: flex; flex-wrap: wrap; gap: 18px; }
.cl-stage { flex: 1 1 540px; min-width: 0; }
.cl-playlist { flex: 0 0 330px; }
@media (max-width: 991px) { .cl-playlist { flex: 1 1 100%; } }

.cl-video {
    position: relative; width: 100%; aspect-ratio: 16 / 9;
    background: #000; border-radius: var(--cl-radius); overflow: hidden;
    box-shadow: var(--cl-shadow);
}
.cl-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cl-now {
    background: var(--cl-card); border: 1px solid var(--cl-border);
    border-radius: var(--cl-radius); box-shadow: var(--cl-shadow);
    padding: 20px; margin-top: 16px;
}
.cl-now h1 { font-size: 19px; font-weight: 800; color: var(--cl-dark); margin: 0 0 8px; }
.cl-now p { font-size: 13.5px; line-height: 1.9; color: #4b5563; margin: 0; }

.cl-pl-head {
    background: linear-gradient(135deg, var(--cl-primary), var(--cl-primary-d));
    color: #fff; border-radius: var(--cl-radius) var(--cl-radius) 0 0;
    padding: 16px 18px; font-weight: 800; font-size: 15px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cl-pl-head small { font-weight: 600; opacity: .9; font-size: 12px; }
.cl-pl-body {
    background: var(--cl-card); border: 1px solid var(--cl-border); border-top: 0;
    border-radius: 0 0 var(--cl-radius) var(--cl-radius);
    max-height: 560px; overflow-y: auto;
}
.cl-pl-item {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 16px; border-bottom: 1px solid var(--cl-border);
    text-decoration: none; transition: background .12s ease;
}
.cl-pl-item:hover { background: var(--cl-bg); }
.cl-pl-item:last-child { border-bottom: 0; }
.cl-pl-item.active { background: rgba(43,102,191, .08); border-inline-start: 3px solid var(--cl-primary); }
.cl-pl-num {
    flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
    background: var(--cl-bg); color: var(--cl-primary);
    font-size: 13px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.cl-pl-item.active .cl-pl-num { background: var(--cl-primary); color: #fff; }
.cl-pl-info { flex: 1 1 auto; min-width: 0; }
.cl-pl-title {
    font-size: 13.5px; font-weight: 700; color: var(--cl-dark);
    margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cl-pl-time { font-size: 11.5px; color: var(--cl-muted); display: flex; align-items: center; gap: 5px; }
.cl-pl-play { flex: 0 0 auto; color: var(--cl-primary); font-size: 16px; }
.cl-pl-item.active .cl-pl-play { color: var(--cl-primary-d); }

.cl-back {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--cl-muted); text-decoration: none; font-size: 13.5px; font-weight: 600;
    margin-bottom: 14px;
}
.cl-back:hover { color: var(--cl-primary); }

/* Hero text must stay white on the navy gradient
   (design2.css forces all h1=ink and p=ink-2; override it here) */
.cl-hero-title {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: none !important;
}
.cl-hero-desc { color: #fff !important; opacity: .92 !important; }

/* ============================================================
   CURRICULUM SECTIONS + INSTRUCTOR CARD
   ============================================================ */
.cl-section { margin-bottom: 18px; }
.cl-section:last-child { margin-bottom: 0; }
.cl-section-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: linear-gradient(135deg, rgba(43,102,191,.10), rgba(98,212,245,.08));
    border: 1px solid var(--cl-border); border-radius: 12px; padding: 11px 15px; margin-bottom: 10px;
}
.cl-section-head .t { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--cl-dark); font-size: 14.5px; }
.cl-section-head .n {
    width: 28px; height: 28px; border-radius: 9px; background: var(--cl-primary); color: #fff;
    font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0;
}
.cl-section-head .c { font-size: 12px; color: var(--cl-muted); font-weight: 600; white-space: nowrap; }
.cl-lec-desc { font-size: 12.5px; color: var(--cl-muted); line-height: 1.7; margin-top: 4px; }

/* instructor card */
.cl-instructor { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cl-instructor-avatar {
    width: 74px; height: 74px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 3px solid #fff; box-shadow: var(--cl-shadow); background: #eef3fa;
}
.cl-instructor-info { flex: 1; min-width: 200px; }
.cl-instructor-name { font-size: 16px; font-weight: 800; color: var(--cl-dark); }
.cl-instructor-title { font-size: 13px; color: var(--cl-primary); font-weight: 700; margin-bottom: 8px; }
.cl-instructor-bio { font-size: 13.5px; line-height: 1.9; color: #4b5563; }

/* playlist section divider */
.cl-pl-section {
    padding: 9px 16px; background: var(--cl-bg); font-weight: 800; font-size: 12px;
    color: var(--cl-primary-d); border-bottom: 1px solid var(--cl-border);
    display: flex; align-items: center; gap: 8px;
}

/* ============================================================
   CURRICULUM ACCORDION (collapsible sections)
   ============================================================ */
.cl-section-head.cl-acc { cursor: pointer; user-select: none; margin-bottom: 0; transition: background .2s ease; }
.cl-section-head.cl-acc:hover { filter: brightness(.98); }
.cl-section-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.cl-chev { color: var(--cl-primary); font-size: 12px; transition: transform .3s ease; }
.cl-section.cl-open .cl-section-head.cl-acc { border-color: var(--cl-primary); }
.cl-section.cl-open .cl-chev { transform: rotate(180deg); }
.cl-sec-lectures { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
.cl-sec-lectures .cl-lec:first-child { margin-top: 10px; }
