/* ============================================================
   CoKreAktiv Downloads – Frontend CSS
   Farben direkt aus dem Child-Theme:
     #F9BD15  → CTA-Buttons (Primär, wie "Zum Kurs")
     #87AD96  → Salbeigrün (Dozenten-Namen, Akzente)
     #49C3D3  → Teal (Social Icons, Tags)
     #3C8AAB  → Blau (Links, Titel)
     border-radius: 24px  → durchgängig im Design
   ============================================================ */

/* ── Grid ─────────────────────────────────────────────────── */
.ckdl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
    width: 100%;
}

.ckdl-grid--single {
    grid-template-columns: minmax(280px, 400px);
}

.ckdl-empty {
    color: #888;
    font-style: italic;
}

/* ── Karte ─────────────────────────────────────────────────── */
.ckdl-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 0 15px 0 #ccc;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ckdl-card:hover {
    box-shadow: 0 4px 24px 0 #bbb;
    transform: translateY(-2px);
}

/* ── Vorschaubild ──────────────────────────────────────────── */
.ckdl-card__thumb {
    width: 100%;
    overflow: hidden;
    background: #f5f0ea;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px 24px 0 0;
}

.ckdl-card__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 24px 24px 0 0;
}

.ckdl-card__thumb--placeholder {
    color: #ccc;
    font-size: 3rem;
}

/* ── Karten-Body ───────────────────────────────────────────── */
.ckdl-card__body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

/* ── Tags / Kategorien ─────────────────────────────────────── */
.ckdl-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ckdl-tag {
    background: #49C3D3;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 12px;
    border-radius: 14px;
}

/* ── Titel & Beschreibung ──────────────────────────────────── */
.ckdl-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #87AD96;
    font-family: Handlee, cursive;
    margin: 0;
    line-height: 1.35;
}

.ckdl-card__excerpt {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.55;
    margin: 0;
}

/* ── Dozenten-Bereich ──────────────────────────────────────── */
.ckdl-card__dozent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    background: #f5f5f0;
    border-radius: 14px;
    margin-top: auto;
}

.ckdl-dozent__link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #87AD96;
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 0;
}

.ckdl-dozent__link:hover {
    color: #6a9a80;
}

.ckdl-dozent__pic {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #87AD96;
}

.ckdl-dozent__pic--fallback {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8f0ea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    border: 3px solid #87AD96;
}

.ckdl-dozent__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* CTA: "Kurse ansehen →" – exakt wie .sd_list a.button */
.ckdl-dozent__kurs-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: #F9BD15;
    color: #fff !important;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 14px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.18s ease;
}

.ckdl-dozent__kurs-link:hover {
    background-color: #e0aa0a;
    color: #fff !important;
}

/* ── Download-Buttons ──────────────────────────────────────── */
.ckdl-card__buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

/* Gleicher Stil wie .sd_list a.button / .sd_kursbutton */
.ckdl-btn--download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background-color: #F9BD15;
    color: #fff !important;
    border: none;
    border-radius: 14px;
    padding: 12px 24px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease;
    width: 100%;
}

.ckdl-btn--download:hover {
    background-color: #e0aa0a;
    color: #fff !important;
    text-decoration: none;
}


/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ckdl-grid {
        grid-template-columns: 1fr;
    }

    .ckdl-card__dozent {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .ckdl-dozent__kurs-link {
        width: 100%;
        text-align: center;
    }
}
