/* ── Course Card Component ──────────────────────────────────────
   Matches the design language from card.html
   Uses CSS variables defined in resources/css/app.css
──────────────────────────────────────────────────────────────── */

.cc-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface-low);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(16, 76, 157, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.cc-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 76, 157, 0.22);
}

.cc-card.selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 76, 157, 0.12), var(--shadow-md);
}

/* ── Image ──────────────────────────────────────────────────── */
.cc-image {
    height: 11rem;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.cc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.cc-card:hover .cc-image img {
    transform: scale(1.08);
}

.cc-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-surface-mid) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-image-placeholder .material-symbols-outlined {
    font-size: 3rem;
    color: var(--color-primary);
    opacity: 0.45;
}

.cc-sponsored-badge {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    background: var(--color-green);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
}

/* ── Body ───────────────────────────────────────────────────── */
.cc-body {
    padding: 1.5rem 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cc-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.85rem;
}

.cc-meta .material-symbols-outlined {
    font-size: 0.95rem;
    color: var(--color-green);
}

.cc-meta span:last-child {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-muted);
}

.cc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.cc-title {
    font-family: var(--font-headline);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 0.6rem;
    line-height: 1.3;
}

.cc-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.65;
    flex: 1;
    margin: 0 0 1.25rem;
}

/* ── Footer ─────────────────────────────────────────────────── */
.cc-footer {
    border-top: 1px solid var(--color-surface-high);
    padding-top: 1.25rem;
    margin-top: auto;
}

.cc-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.cc-price-label,
.cc-status-label {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    margin: 0 0 0.15rem;
}

.cc-status-label {
    color: var(--color-green-dark);
    text-align: right;
}

.cc-price-amount {
    font-family: var(--font-headline);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-primary);
    opacity: 0.45;
    text-decoration: line-through;
    margin: 0;
}

.cc-status-value {
    font-family: var(--font-headline);
    font-size: 1rem;
    font-weight: 800;
    color: var(--color-green-dark);
    text-align: right;
    margin: 0;
}

/* ── Action row ─────────────────────────────────────────────── */
.cc-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cc-btn-apply {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.7rem 1rem;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.cc-btn-apply:hover {
    opacity: 0.88;
    transform: scale(0.98);
}

.cc-btn-apply.green {
    background: var(--color-green);
    color: #fff;
}

.cc-btn-learn {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    padding-bottom: 1px;
    transition: border-color 0.2s ease;
}

.cc-btn-learn:hover {
    border-color: var(--color-primary);
}

/* Status badges inside card */
.cc-badge-pending {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    white-space: nowrap;
}
