/* Career Fixx — course card (partials/course-card.blade.php): plan detail and all-courses pages.
   Glossy clay card on the site's violet; uses the tokens from cf-gloss-site.css.
   Loaded through @stack('css-last'), after the theme files. */

.cfx-cc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 26px; }

.cfx-cc {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 10px;
    border-radius: 28px;
    background: var(--gl-card);
    box-shadow: var(--gl-clay);
    transition: transform .4s cubic-bezier(.34, 1.4, .5, 1), box-shadow .4s ease;
}
.cfx-cc:hover { box-shadow: var(--gl-clay-hover); }

/* ── picture ─────────────────────────────────────────────────────────── */
.cfx-cc-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #e9d9fd 0%, #d6cbfd 45%, #cdbdfb 100%);
    isolation: isolate;
}
html[data-theme="dark"] .cfx-cc-media { background: linear-gradient(135deg, #2a1f4d 0%, #1e1640 100%); }
.cfx-cc-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.cfx-cc:hover .cfx-cc-media img { transform: scale(1.07); }
/* a soft shade at the bottom and the glossy rim */
.cfx-cc-media::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(to top, rgba(22, 10, 50, .45) 0%, rgba(22, 10, 50, 0) 48%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .12);
    pointer-events: none;
}
.cfx-cc-media.is-empty::after { background: none; }
/* placeholder when the picture is missing */
.cfx-cc-ph { position: absolute; inset: 0; z-index: -1; display: flex; align-items: center; justify-content: center; color: rgba(91, 33, 182, .35); font-size: 46px; }
html[data-theme="dark"] .cfx-cc-ph { color: rgba(216, 180, 254, .3); }

/* number and level: small glass chips on the picture */
.cfx-cc-num,
.cfx-cc-level {
    position: absolute;
    top: 12px;
    z-index: 1;
    padding: 5px 11px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .78);
    box-shadow: inset 0 1px 0 #fff, 0 4px 12px rgba(22, 10, 50, .15);
    -webkit-backdrop-filter: blur(8px);
            backdrop-filter: blur(8px);
    color: #5b21b6;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    line-height: 1.2;
}
.cfx-cc-num { left: 12px; }
.cfx-cc-level { right: 12px; text-transform: capitalize; letter-spacing: 0; font-weight: 700; }
html[data-theme="dark"] :is(.cfx-cc-num, .cfx-cc-level) { background: rgba(22, 16, 45, .7); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); color: #d8b4fe; }

/* glossy violet play disc on the picture's lower edge */
.cfx-cc-top { position: relative; }
.cfx-cc-play {
    position: absolute;
    right: 14px;
    bottom: -25px; /* half its height: it sits on the picture's lower edge */
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gl-btn);
    box-shadow: 0 0 0 5px var(--gl-card), var(--gl-btn-shadow);
    color: #fff;
    font-size: 19px;
    transition: transform .3s ease;
}
.cfx-cc-play i { margin-left: 3px; }
.cfx-cc-play::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid rgba(155, 60, 246, .45); opacity: 0; }
.cfx-cc:hover .cfx-cc-play::after { animation: cfxCcPulse 1.4s ease-out infinite; }
.cfx-cc-play:hover { color: #fff; transform: scale(1.08); }
@keyframes cfxCcPulse { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.45); } }

/* ── words ───────────────────────────────────────────────────────────── */
.cfx-cc-body { display: flex; flex: 1; flex-direction: column; padding: 18px 10px 6px; text-align: left; }
html body .cfx-cc .cfx-cc-title { margin: 0 64px 12px 0; font-size: 18px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em; }
html body .cfx-cc .cfx-cc-title a {
    display: -webkit-box;
    overflow: hidden;
    color: var(--gl-ink);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color .25s ease;
}
html body .cfx-cc:hover .cfx-cc-title a { color: var(--gl-accent); }
html[data-theme="dark"] body .cfx-cc:hover .cfx-cc-title a { color: #d8b4fe; }

.cfx-cc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
html body .cfx-cc-meta li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 6px 11px;
    border-radius: 99px;
    background: var(--gl-light);
    box-shadow: var(--gl-light-shadow);
    color: var(--gl-text);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
}
.cfx-cc-meta i { color: var(--gl-accent); font-size: 14px; }
html[data-theme="dark"] .cfx-cc-meta i { color: #c4b5fd; }

/* instructor and the arrow, on a dashed line */
.cfx-cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px dashed rgba(124, 58, 237, .2); }
html[data-theme="dark"] .cfx-cc-foot { border-top-color: rgba(216, 180, 254, .16); }
.cfx-cc-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cfx-cc-author img { flex: none; width: 38px; height: 38px; padding: 2px; border-radius: 50%; background: var(--gl-accent-grad); object-fit: cover; }
.cfx-cc-author > span { min-width: 0; line-height: 1.25; }
.cfx-cc-author small { display: block; color: var(--gl-muted); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.cfx-cc-author b { display: block; overflow: hidden; color: var(--gl-ink); font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cfx-cc-go {
    display: flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gl-light);
    box-shadow: var(--gl-light-shadow);
    color: var(--gl-ink);
    font-size: 17px;
    transition: background .3s ease, color .3s ease, transform .3s ease;
}
.cfx-cc:hover .cfx-cc-go { background: var(--gl-btn); box-shadow: var(--gl-btn-shadow); color: #fff; transform: rotate(45deg); }

/* ── section head on the plan page ───────────────────────────────────── */
.cfx-cc-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 34px; }
.cfx-cc-head-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px; 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-cc-head-badge { color: #d8b4fe; }
html body .cfx-cc-head h2 { margin: 0; color: var(--gl-ink); font-size: clamp(26px, 3vw, 38px); line-height: 1.2; }
html body .cfx-cc-head h2 span { background: var(--gl-accent-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
html body .cfx-cc-head p { margin: 0; color: var(--gl-text); font-size: 15px; }

/* ── smaller screens ─────────────────────────────────────────────────── */
@media (max-width: 1199.98px) { .cfx-cc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .cfx-cc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 575.98px) {
    .cfx-cc-grid { grid-template-columns: 1fr; gap: 18px; }
    .cfx-cc { border-radius: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .cfx-cc, .cfx-cc-media img, .cfx-cc-go, .cfx-cc-play { transition: none; }
    .cfx-cc:hover .cfx-cc-play::after { animation: none; }
}
