/* v2.32 — CP v16 group 01 "Theme Layout Course Grid/List v1.8" for Learnify course cards. */
/* ---------- 16:9 thumbnail, whole artwork visible ---------- */
.nwqc-cards .course-thumb-wrap { aspect-ratio: 16 / 9; background: #f1f5f9; }
.nwqc-cards .course-thumb-wrap > a:not(.lf-wishlist-btn) { position: absolute; inset: 0; display: block; }
.nwqc-cards .course-thumb { position: relative; z-index: 1; width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
.nwqc-cards.nwqc-fit-contain .course-thumb { object-fit: contain; object-position: center; }
.nwqc-cards.nwqc-fit-contain .course-card:hover .course-thumb { transform: scale(1.03); }
.nwqc-cards.nwqc-fit-contain .nwqc-thumb::before {
  content: ""; position: absolute; inset: -12px; z-index: 0; pointer-events: none;
  background: var(--nwqc-thumb-bg) center / cover no-repeat; filter: blur(10px); opacity: .22; transform: scale(1.06);
}
.nwqc-cards .course-thumb-wrap > .lf-badge-row, .nwqc-cards .course-thumb-wrap > .lf-wishlist-btn,
.nwqc-cards .course-thumb-wrap > .lf-wishlist-form, .nwqc-cards .course-thumb-wrap .lf-play { z-index: 2; }
/* Course page pricing card: complete 16:9 artwork. */
.nwqc-cards.nwqc-fit-contain .nwqc-detail-thumb { aspect-ratio: 16 / 9; object-fit: contain; background: #f1f5f9; }

/* ---------- Full titles (CP: titles are never cut) ---------- */
.nwqc-cards.nwqc-full-title .lf-course-title { display: block; -webkit-line-clamp: unset; overflow: visible; overflow-wrap: anywhere; }

/* ---------- Discount pill between price and the button ---------- */
.nwqc-cards .nwqc-card-foot { display: grid !important; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; column-gap: 8px; }
.nwqc-cards .nwqc-card-foot > :first-child { min-width: 0; justify-self: start; }
.nwqc-deal {
  display: inline-flex; align-items: center; gap: 3px; min-height: 26px; padding: 3px 8px; border-radius: 999px; white-space: nowrap;
  background: rgba(255, 111, 45, .96); color: #fff; font-size: 11px; font-weight: 700; line-height: 1.2;
  border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 2px 7px rgba(15, 23, 42, .14); direction: ltr;
}
.nwqc-deal i { font-size: 12px; }
.course-card.nwqc-deal-moved .course-thumb-wrap .lf-badge--deal { display: none; }
@media (max-width: 575.98px) {
  .nwqc-cards .nwqc-card-foot { grid-template-columns: minmax(0, 1fr) auto; row-gap: 6px; }
  .nwqc-cards .nwqc-card-foot > .nwqc-deal { grid-column: 1 / -1; grid-row: 1; justify-self: start; }
}

/* ---------- Grid / List switch ---------- */
.nwqc-viewbar { display: flex; justify-content: flex-end; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.nwqc-viewbar .btn { display: inline-flex; align-items: center; gap: .35rem; }
.nwqc-list > [class*="col-"] { flex: 0 0 100%; max-width: 100%; width: 100%; }
.nwqc-list .course-card { flex-direction: row; height: auto !important; }
.nwqc-list .course-card .course-thumb-wrap { flex: 0 0 34%; max-width: 34%; aspect-ratio: 16 / 9; align-self: flex-start; border-radius: inherit; }
.nwqc-list .course-card .card-body { min-width: 0; }
.nwqc-list .course-card .lf-course-title { min-height: 0 !important; font-size: 1.05rem; }
@media (max-width: 575.98px) {
  .nwqc-list .course-card { flex-direction: column; }
  .nwqc-list .course-card .course-thumb-wrap { flex-basis: auto; max-width: 100%; width: 100%; }
}

/* ---------- Home categories: logo fills the 46px canvas (no extra ring) ---------- */
.lf-cat .lf-ico.nwqc-cat-logo { background: transparent !important; box-shadow: none !important; padding: 0; overflow: hidden; }
.lf-cat .lf-ico.nwqc-cat-logo img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Dark mode ---------- */
[data-bs-theme="dark"] .nwqc-cards .course-thumb-wrap, [data-bs-theme="dark"] .nwqc-cards.nwqc-fit-contain .nwqc-detail-thumb { background: #111c2e; }
[data-bs-theme="dark"] .nwqc-cards.nwqc-fit-contain .nwqc-thumb::before { opacity: .32; }
