/* ==========================================================================
   Course card (inc/course-card.php and member/courses.php)
   ========================================================================== */

.cc {
    --cc-surface: #0f172a;
    --cc-border: rgba(255, 255, 255, 0.08);
    --cc-text: #f8fafc;
    --cc-muted: #94a3b8;
    --cc-faint: #64748b;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(19, 28, 49, 0.95), rgba(13, 19, 34, 0.98));
    border: 1px solid var(--cc-border);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 30px -12px rgba(0, 0, 0, 0.6);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.cc:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 22px 44px -14px rgba(0, 0, 0, 0.75), 0 0 36px -10px rgba(37, 99, 235, 0.35);
}
.cc.hidden { display: none !important; }
@media (hover: none) { .cc:hover { transform: none; } }

/* ---- Thumbnail ---- */
.cc-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, var(--c1, #2563eb), var(--c2, #1e3a8a));
    isolation: isolate;
}
.cc-thumb::before { /* soft light + grid texture */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.28), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.35), transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 100% 22px,
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px) 0 0 / 22px 100%;
}
.cc-thumb::after { /* bottom fade so overlays stay readable */
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 55%;
    z-index: -1;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.65), transparent);
}
.cc-glyph {
    position: absolute;
    right: -14px;
    bottom: -22px;
    font-size: 120px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.1);
    transform: rotate(-12deg);
    pointer-events: none;
}
.cc-word {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    font-size: clamp(1.7rem, 4.2vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.cc-chip, .cc-new, .cc-dur {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.cc-chip { top: 12px; left: 12px; max-width: 62%; background: rgba(2, 6, 23, 0.55); color: #e0f2fe; border: 1px solid rgba(255, 255, 255, 0.16); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-chip.ok { background: rgba(16, 185, 129, 0.25); color: #a7f3d0; border-color: rgba(16, 185, 129, 0.4); }
.cc-chip.wait { background: rgba(245, 158, 11, 0.25); color: #fde68a; border-color: rgba(245, 158, 11, 0.4); }
.cc-new { top: 12px; right: 12px; background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; box-shadow: 0 6px 16px -4px rgba(244, 63, 94, 0.6); }
.cc-dur { bottom: 12px; right: 12px; background: rgba(2, 6, 23, 0.7); color: #fff; border: 1px solid rgba(255, 255, 255, 0.14); }
.cc-dur i { color: #38bdf8; font-size: 11px; }
.cc-play {
    position: absolute;
    left: 50%; top: 50%;
    width: 56px; height: 56px;
    margin: -28px 0 0 -28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #1d4ed8;
    font-size: 18px;
    padding-left: 3px;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.cc:hover .cc-play { opacity: 1; transform: scale(1); }
@media (hover: none) { .cc-play { display: none; } }

/* ---- Body ---- */
.cc-body { display: flex; flex: 1; flex-direction: column; padding: 18px 20px 20px; }
.cc-cat { align-self: flex-start; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #38bdf8; }
.cc-title { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.35; color: var(--cc-text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-title a { color: inherit; text-decoration: none; }
.cc:hover .cc-title a { color: #7dd3fc; }
.cc-desc { margin: 8px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--cc-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.cc-meta { margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 14px; padding: 0; list-style: none; font-size: 12.5px; color: var(--cc-muted); }
.cc-meta li { display: inline-flex; align-items: center; gap: 6px; }
.cc-meta i { font-size: 12px; color: #60a5fa; }
.cc-meta .rate { color: #fbbf24; font-weight: 700; }
.cc-meta .rate i { color: #fbbf24; }
.cc-meta .rate span { color: var(--cc-faint); font-weight: 500; }

.cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--cc-border); }
.cc-price { display: flex; flex-direction: column; line-height: 1.15; }
.cc-price .now { font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.cc-price .now.free { color: #34d399; }
.cc-price .was { font-size: 12px; color: var(--cc-faint); text-decoration: line-through; }
.cc-price .off { display: inline-block; margin-top: 3px; align-self: flex-start; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 800; background: rgba(244, 63, 94, 0.15); color: #fb7185; }

.cc-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 40px; padding: 0 16px;
    border: 0; border-radius: 12px;
    font-size: 13px; font-weight: 700; color: #fff; text-decoration: none; white-space: nowrap; cursor: pointer;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 8px 20px -8px rgba(37, 99, 235, 0.7);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.cc-btn:hover { filter: brightness(1.1); box-shadow: 0 12px 26px -8px rgba(37, 99, 235, 0.85); }
.cc-btn:active { transform: scale(0.97); }
.cc-btn i { font-size: 11px; transition: transform 0.15s; }
.cc-btn:hover i { transform: translateX(3px); }
.cc-btn.ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: none; color: #e2e8f0; }
.cc-btn.ghost:hover { background: rgba(255, 255, 255, 0.1); }
.cc-note { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #fbbf24; background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.25); }
.cc-review { margin-top: 12px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; font-size: 12px; font-weight: 700; color: #38bdf8; }
.cc-review:hover { color: #7dd3fc; }

@media (max-width: 420px) {
    .cc-body { padding: 16px; }
    .cc-btn { padding: 0 14px; }
}
