/* Career Fixx — course detail page (frontend/course_details.blade.php).
   Glossy finish on the site's violet; uses the tokens from cf-gloss-site.css.
   Loaded through @stack('css-last'), after the theme files. */

.cfx-cd-hero, .cfx-cd { --cd-sticky: 96px; --cd-soft: #f4effe; --cd-line: #eee9f8; --cd-star: #ffb21b; --cd-star-off: #e4dcf5; }
html[data-theme="dark"] :is(.cfx-cd-hero, .cfx-cd) { --cd-soft: #221c3d; --cd-line: #2e2650; --cd-star-off: #3a3160; }

/* ══ Hero ═════════════════════════════════════════════════════════════ */
html[data-theme] body .rbt-breadcrumb-default.cfx-cd-hero { padding-bottom: 64px; text-align: left; }
.cfx-cd-hero-row { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; gap: 48px; }

.cfx-cd-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 18px; font-size: 13.5px; font-weight: 600; }
.cfx-cd-crumbs a { color: var(--gl-accent); }
.cfx-cd-crumbs a:hover { color: #5b21b6; }
.cfx-cd-crumbs i { color: var(--gl-muted); font-size: 13px; }
.cfx-cd-crumbs span { overflow: hidden; max-width: 260px; color: var(--gl-muted); text-overflow: ellipsis; white-space: nowrap; }
html[data-theme="dark"] .cfx-cd-crumbs a { color: #d8b4fe; }

.cfx-cd-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 99px; background: var(--gl-light); box-shadow: var(--gl-light-shadow); color: var(--gl-accent); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
html[data-theme="dark"] .cfx-cd-badge { color: #d8b4fe; }
html[data-theme] body .cfx-cd-hero .cfx-cd-title { margin: 16px 0 14px; font-size: clamp(32px, 4vw, 54px); font-weight: 800; line-height: 1.08; letter-spacing: -.025em; }
html[data-theme] body .cfx-cd-hero .cfx-cd-lead { max-width: 640px; margin: 0; font-size: 16.5px; line-height: 1.7; text-align: left; }

.cfx-cd-teacher { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.cfx-cd-teacher img { width: 50px; height: 50px; padding: 3px; border-radius: 50%; background: var(--gl-accent-grad); object-fit: cover; }
.cfx-cd-teacher small { display: block; color: var(--gl-muted); font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.cfx-cd-teacher b { display: block; color: var(--gl-ink); font-size: 16px; }
.cfx-cd-rate { display: inline-flex; align-items: center; gap: 6px; margin-left: 6px; padding: 6px 12px; border-radius: 99px; background: var(--gl-light); box-shadow: var(--gl-light-shadow); color: var(--gl-ink); font-size: 13.5px; font-weight: 700; }
.cfx-cd-rate i, .cfx-cd-chips .is-small i[aria-hidden], .cfx-cd-chips li > i[aria-hidden] { color: var(--cd-star); font-style: normal; }

.cfx-cd-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
html body .cfx-cd-chips li { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 8px 14px; border-radius: 99px; background: var(--gl-light); box-shadow: var(--gl-light-shadow); color: var(--gl-text); font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.cfx-cd-chips i { color: var(--gl-accent); font-size: 15px; }
html[data-theme="dark"] .cfx-cd-chips i:not([aria-hidden]) { color: #c4b5fd; }
.cfx-cd-chips.is-small { margin-top: 14px; }
html body .cfx-cd-chips.is-small li { padding: 6px 12px; font-size: 12.5px; text-transform: none; }

.cfx-cd-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* the preview video in a glossy frame */
.cfx-cd-hero-media { position: relative; }
.cfx-cd-video {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 10px solid var(--gl-card);
    border-radius: 30px;
    background: linear-gradient(135deg, #e9d9fd 0%, #d6cbfd 45%, #cdbdfb 100%);
    box-shadow: 0 30px 60px -24px rgba(76, 29, 149, .45), 0 3px 3px rgba(60, 20, 140, .08), inset 0 0 0 1px rgba(124, 58, 237, .08);
    isolation: isolate;
}
html[data-theme="dark"] .cfx-cd-video { background: linear-gradient(135deg, #2a1f4d, #1e1640); box-shadow: 0 30px 60px -24px rgba(0, 0, 0, .7); }
.cfx-cd-video :is(iframe, img) { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 20px; object-fit: cover; }
.cfx-cd-video-ph { position: absolute; inset: 0; z-index: -1; display: flex; align-items: center; justify-content: center; color: rgba(91, 33, 182, .35); font-size: 54px; }
.cfx-cd-video-tag {
    position: absolute;
    left: 24px;
    bottom: -16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: calc(100% - 48px);
    padding: 9px 16px;
    overflow: hidden;
    border-radius: 99px;
    background: var(--gl-btn);
    box-shadow: var(--gl-btn-shadow);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ══ Body ═════════════════════════════════════════════════════════════ */
.cfx-cd { padding: 56px 0 96px; }
.cfx-cd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 32px; }

/* section tabs, stuck under the header */
.cfx-cd-tabs {
    position: sticky;
    top: var(--cd-sticky);
    z-index: 5;
    display: flex;
    gap: 6px;
    padding: 6px;
    overflow-x: auto;
    border-radius: 99px;
    background: rgba(255, 255, 255, .82);
    box-shadow: var(--gl-light-shadow), 0 14px 30px -18px rgba(76, 29, 149, .35);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
    scrollbar-width: none;
}
.cfx-cd-tabs::-webkit-scrollbar { display: none; }
html[data-theme="dark"] .cfx-cd-tabs { background: rgba(28, 23, 51, .85); }
.cfx-cd-tabs a { display: inline-flex; flex: 1 0 auto; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 99px; color: var(--gl-text); font-size: 14.5px; font-weight: 600; white-space: nowrap; transition: background .25s ease, color .25s ease; }
.cfx-cd-tabs a:hover { background: var(--cd-soft); color: var(--gl-accent); }
html[data-theme="dark"] .cfx-cd-tabs a:hover { color: #d8b4fe; }
.cfx-cd-tabs a span { padding: 2px 8px; border-radius: 99px; background: var(--cd-soft); color: var(--gl-accent); font-size: 12px; font-weight: 700; }
.cfx-cd-tabs a.is-active { background: var(--gl-btn); box-shadow: var(--gl-btn-shadow); color: #fff; }
.cfx-cd-tabs a.is-active span { background: rgba(255, 255, 255, .22); color: #fff; }

/* the cards */
.cfx-cd-card { margin-top: 22px; padding: 30px; scroll-margin-top: calc(var(--cd-sticky) + 76px); border-radius: 32px; background: var(--gl-card); box-shadow: var(--gl-clay); }
.cfx-cd-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.cfx-cd-card-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 14px; background: var(--gl-btn); box-shadow: inset 0 -3px 0 #3b0f86, inset 0 1px 0 rgba(255, 255, 255, .3), 0 8px 16px rgba(91, 33, 182, .22); color: #fff; font-size: 19px; }
html body .cfx-cd-card-head h2 { margin: 0; color: var(--gl-ink); font-size: 21px; font-weight: 700; line-height: 1.3; }
.cfx-cd-card-note { margin-left: auto; padding: 6px 12px; border-radius: 99px; background: var(--cd-soft); color: var(--gl-text); font-size: 13px; font-weight: 600; }

/* text from the course form: one size and colour, whatever the editor saved */
.cfx-cd-prose { color: var(--gl-text); font-size: 15.5px; line-height: 1.75; }
.cfx-cd-prose :is(p, li, span, font, strong, b, em, div) { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; }
.cfx-cd-prose :is(p, span, font, li, div) { color: inherit !important; background: none !important; }
html body .cfx-cd-prose p { margin: 0 0 14px; text-align: left; }
.cfx-cd-prose p:last-child { margin-bottom: 0; }
.cfx-cd-prose :is(strong, b) { color: var(--gl-ink) !important; }
.cfx-cd-prose a { color: var(--gl-accent); text-decoration: underline; text-underline-offset: 3px; }

/* overview: a few paragraphs, then "Read more" */
.cfx-cd-clamp { position: relative; max-height: 260px; overflow: hidden; transition: max-height .4s ease; }
.cfx-cd-clamp::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(to top, var(--gl-card), rgba(255, 255, 255, 0)); pointer-events: none; }
html[data-theme="dark"] .cfx-cd-clamp::after { background: linear-gradient(to top, var(--gl-card), rgba(28, 23, 51, 0)); }
.cfx-cd-clamp.is-open { max-height: none; }
.cfx-cd-clamp.is-open::after { display: none; }
.cfx-cd-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 18px; border: 0; border-radius: 99px; background: var(--gl-light); box-shadow: var(--gl-light-shadow); color: var(--gl-accent); font-size: 14px; font-weight: 700; cursor: pointer; }
html[data-theme="dark"] .cfx-cd-more { color: #d8b4fe; }
.cfx-cd-more i { transition: rotate .3s ease; }
.cfx-cd-more.is-open i { rotate: 180deg; }
.cfx-cd-more[hidden] { display: none; }

/* lessons */
.cfx-cd-lock-note { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 16px; border-radius: 16px; background: var(--cd-soft); color: var(--gl-text); font-size: 14px; line-height: 1.55; }
.cfx-cd-lock-note i { margin-top: 3px; color: var(--gl-accent); }
.cfx-cd-lock-note a { color: var(--gl-accent); font-weight: 700; }
html[data-theme="dark"] .cfx-cd-lock-note :is(i, a) { color: #d8b4fe; }
.cfx-cd-lessons { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cfx-cd-lessons.is-short > li:nth-child(n + 9) { display: none; }
html body .cfx-cd-lesson {
    display: grid;
    grid-template-columns: 34px 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 18px;
    background: var(--gl-card-2);
    box-shadow: inset 0 0 0 1px var(--cd-line);
    transition: background .25s ease, box-shadow .25s ease;
}
.cfx-cd-lesson:hover { background: var(--cd-soft); box-shadow: inset 0 0 0 1px rgba(124, 58, 237, .18); }
.cfx-cd-lesson-num { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gl-light); box-shadow: var(--gl-light-shadow); color: var(--gl-accent); font-size: 12.5px; font-weight: 800; }
html[data-theme="dark"] .cfx-cd-lesson-num { color: #d8b4fe; }
.cfx-cd-lesson-thumb { position: relative; display: flex; align-items: center; justify-content: center; width: 64px; height: 42px; overflow: hidden; border-radius: 11px; background: linear-gradient(135deg, #e9d9fd, #cdbdfb); color: rgba(91, 33, 182, .45); font-size: 16px; isolation: isolate; }
html[data-theme="dark"] .cfx-cd-lesson-thumb { background: linear-gradient(135deg, #2a1f4d, #1e1640); color: rgba(216, 180, 254, .4); }
.cfx-cd-lesson-thumb img { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.cfx-cd-lesson-title { overflow: hidden; color: var(--gl-ink); font-size: 15px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cfx-cd-lesson.is-locked .cfx-cd-lesson-title { color: var(--gl-text); }
.cfx-cd-lesson-go { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--gl-btn); box-shadow: var(--gl-btn-shadow); color: #fff; font-size: 15px; }
.cfx-cd-lesson-go i.feather-play { margin-left: 2px; }
.cfx-cd-lesson-go:hover { color: #fff; }
.cfx-cd-lesson-go.is-lock { background: var(--gl-light); box-shadow: var(--gl-light-shadow); color: var(--gl-muted); }
.cfx-cd-lesson-go.is-lock:hover { color: var(--gl-accent); }
.cfx-cd-lesson-tag { padding: 7px 13px; border-radius: 99px; background: var(--gl-btn); box-shadow: var(--gl-btn-shadow); color: #fff; font-size: 12.5px; font-weight: 700; }
.cfx-cd-lesson-tag:hover { color: #fff; }

/* highlights: two columns, ticks instead of bullets */
.cfx-cd-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.cfx-cd-split > div + div { padding-left: 32px; border-left: 1px dashed var(--cd-line); }
.cfx-cd-checks :is(ul, ol) { margin: 0; padding: 0; list-style: none; }
html body .cfx-cd-checks li { position: relative; margin: 0 0 12px; padding-left: 32px; }
.cfx-cd-checks li::before {
    content: '✓';
    position: absolute;
    top: 2px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: var(--gl-btn);
    box-shadow: inset 0 -2px 0 #3b0f86;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

/* instructor */
.cfx-cd-mentor { display: flex; align-items: center; gap: 22px; }
.cfx-cd-mentor img { flex: none; width: 104px; height: 104px; padding: 4px; border-radius: 30px; background: var(--gl-accent-grad); object-fit: cover; }
html body .cfx-cd-mentor h3 { margin: 0; color: var(--gl-ink); font-size: 22px; font-weight: 700; }
html body .cfx-cd-mentor p { margin: 4px 0 0; color: var(--gl-text); font-size: 15px; text-align: left; }

/* reviews */
.cfx-cd-score { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: center; gap: 28px; }
.cfx-cd-score-big { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 16px; border-radius: 24px; background: var(--cd-soft); text-align: center; }
.cfx-cd-score-big b { color: var(--gl-ink); font-size: 54px; font-weight: 800; line-height: 1; }
.cfx-cd-score-big small { color: var(--gl-muted); font-size: 13px; font-weight: 600; }
.cfx-cd-score-bar { display: flex; align-items: center; gap: 16px; }
.cfx-cd-score-bar b { color: var(--gl-ink); font-size: 15px; }
.cfx-cd-bar { flex: 1; height: 10px; overflow: hidden; border-radius: 99px; background: var(--cd-line); }
.cfx-cd-bar i { display: block; height: 100%; border-radius: inherit; background: var(--gl-accent-grad); }
/* five stars, filled up to --rate */
.cfx-cd-stars::before {
    content: '★★★★★';
    background: linear-gradient(90deg, var(--cd-star) var(--rate, 100%), var(--cd-star-off) var(--rate, 100%));
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    font-size: 19px;
    letter-spacing: 3px;
}

/* ══ Sidebar ══════════════════════════════════════════════════════════ */
.cfx-cd-side { position: sticky; top: var(--cd-sticky); }
.cfx-cd-buy { padding: 12px 12px 18px; border-radius: 32px; background: var(--gl-card); box-shadow: var(--gl-clay); }
.cfx-cd-buy-pic { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 22px; background: linear-gradient(135deg, #e9d9fd 0%, #d6cbfd 45%, #cdbdfb 100%); isolation: isolate; }
html[data-theme="dark"] .cfx-cd-buy-pic { background: linear-gradient(135deg, #2a1f4d, #1e1640); }
.cfx-cd-buy-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cfx-cd-buy-ph { position: absolute; inset: 0; z-index: -1; display: flex; align-items: center; justify-content: center; color: rgba(91, 33, 182, .35); font-size: 44px; }
html[data-theme="dark"] .cfx-cd-buy-ph { color: rgba(216, 180, 254, .3); }
.cfx-cd-buy-btn { width: calc(100% - 12px); margin: 16px 6px 0; }
.cfx-cd-buy-note { margin: 10px 0 0; color: var(--gl-muted); font-size: 13px; text-align: center; }
.cfx-cd-facts { margin: 16px 6px 0; padding: 0; list-style: none; }
html body .cfx-cd-facts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 4px; border-bottom: 1px dashed var(--cd-line); font-size: 14.5px; }
.cfx-cd-facts li:last-child { border-bottom: 0; }
.cfx-cd-facts span { display: inline-flex; align-items: center; gap: 10px; color: var(--gl-text); }
.cfx-cd-facts span i { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 10px; background: var(--cd-soft); color: var(--gl-accent); font-size: 15px; }
html[data-theme="dark"] .cfx-cd-facts span i { color: #c4b5fd; }
.cfx-cd-facts b { color: var(--gl-ink); }
.cfx-cd-call { display: flex; align-items: center; gap: 12px; margin: 14px 6px 0; padding: 12px 14px; border-radius: 20px; background: var(--gl-light); box-shadow: var(--gl-light-shadow); }
.cfx-cd-call > span:first-child { display: flex; flex: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gl-btn); box-shadow: inset 0 -2px 0 #3b0f86; color: #fff; font-size: 17px; }
.cfx-cd-call small { display: block; color: var(--gl-muted); font-size: 12px; font-weight: 600; }
.cfx-cd-call b { display: block; color: var(--gl-ink); font-size: 15.5px; }
.cfx-cd-call:hover b { color: var(--gl-accent); }

/* a missing picture leaves the placeholder behind it */
:is(.cfx-cd-video, .cfx-cd-buy-pic).is-empty img { display: none; }

/* ══ Smaller screens ══════════════════════════════════════════════════ */
@media (max-width: 1199.98px) {
    .cfx-cd-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
    .cfx-cd-hero-row { gap: 32px; }
}
@media (max-width: 991.98px) {
    .cfx-cd-hero, .cfx-cd { --cd-sticky: 84px; }
    .cfx-cd-hero-row { grid-template-columns: minmax(0, 1fr); }
    .cfx-cd-grid { grid-template-columns: minmax(0, 1fr); }
    .cfx-cd-side { position: static; }
    .cfx-cd-buy { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 0 20px; }
    .cfx-cd-buy-pic { grid-row: span 4; }
    .cfx-cd-buy-btn { width: 100%; margin: 4px 0 0; }
    .cfx-cd-facts, .cfx-cd-call { margin-right: 0; margin-left: 0; }
}
@media (max-width: 767.98px) {
    html[data-theme] body .rbt-breadcrumb-default.cfx-cd-hero { padding-bottom: 48px; }
    .cfx-cd { padding: 40px 0 72px; }
    .cfx-cd-card { padding: 22px 18px; border-radius: 26px; }
    .cfx-cd-actions .cfx-gl-btn { flex: 1 1 auto; padding: 13px 16px; font-size: 15px; }
    .cfx-cd-tabs { border-radius: 20px; }
    .cfx-cd-tabs a { padding: 9px 14px; font-size: 13.5px; }
    html body .cfx-cd-lesson { grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; padding: 10px; }
    .cfx-cd-lesson-num { width: 30px; height: 30px; }
    .cfx-cd-lesson-thumb { display: none; }
    .cfx-cd-split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .cfx-cd-split > div + div { padding: 24px 0 0; border-top: 1px dashed var(--cd-line); border-left: 0; }
    .cfx-cd-mentor { flex-direction: column; align-items: flex-start; }
    .cfx-cd-score { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .cfx-cd-buy { display: block; }
    .cfx-cd-buy-btn { width: calc(100% - 12px); margin: 16px 6px 0; }
}
