﻿/* ============================================================
   CDL Components – Cards
   ============================================================ */

/* ============================================================
   Base Content Card (CDL Card)
   Für Inhalte, Features, Learning Cards
   ============================================================ */

/* ============================================================
   CDL Card – Base (global)
   ============================================================ */

.cdl-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(255,255,255,0.62);
    border: 1px solid rgba(255,255,255,0.30);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 22px;
    padding: 2rem 1.75rem;
    box-shadow: 0 10px 34px rgba(0,0,0,0.06);
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}

.cdl-card {
    position: relative;
}

    /* feine Lichtkante oben */
    .cdl-card::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        background: linear-gradient( 180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.15) 35%, rgba(255,255,255,0.05) );
        opacity: 0.7;
    }

    /* Schatten-Layer (Tiefe) */
    .cdl-card::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 0 rgba(0,0,0,0.04);
    }


    .cdl-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 18px 46px rgba(0,0,0,0.12), 0 6px 18px rgba(0,0,0,0.06);
    }


/* ------------------------------------------------------------
   CDL Card Structure
------------------------------------------------------------ */

.cdl-card-body {
    padding: 1.5rem;
    text-align: left;
}

.cdl-card-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: .35rem;
    color: var(--text-strong);
}

.cdl-card-text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* =========================================================
   Glass Card – Basis (neutral)
   ========================================================= */

/* =========================================================
   Glass Card (DG Legacy)
   ========================================================= */

.glass-card {
    display: block;
    height: 100%;
    text-align: center;
    background: transparent;
    box-shadow: none;
}

    /* inner Wrapper */
    .glass-card .inner {
        padding: 1.5rem;
    }

    /* DG-Bilder: groß & dominant */
    .glass-card img {
        display: block;
        max-width: 100%;
        max-height: 300px;
        margin: 0 auto;
    }


/* ============================================================
   Chips / Badges (shared)
   ============================================================ */

.cdl-chip {
    position: absolute;
    top: .75rem;
    right: .75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: .5rem;
    padding: 0.25rem .55rem;
}

.cdl-chip-premium {
    background: #c8a06f;
    color: #fff;
}

.cdl-chip-free {
    background: #e7f9eb;
    color: #0a7a3a;
}

/* ============================================================
   Lab Cards (compose from cdl-card)
   ============================================================ */

.lab-card {
    composes: cdl-card;
}

.lab-thumb {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

    .lab-thumb img {
        height: 90%;
        object-fit: contain;
    }

.lab-body {
    padding: 1rem 1.25rem;
}

.lab-title-item {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--text-strong);
}

.lab-meta {
    color: var(--text-muted);
    font-size: .9rem;
}

.lab-actions {
    padding: 0.75rem 1rem 1.25rem;
    display: flex;
    gap: .5rem;
}

/* ============================================================
   Soft Badges
   ============================================================ */

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .35rem .55rem;
    font-weight: 600;
    font-size: .85rem;
    border-radius: .5rem;
    border: 1px solid rgba(0,0,0,0.08);
    background: #f8f8f8;
}

    .badge-soft.ar {
        color: #0a7a3a;
        background: #eaf7ee;
        border-color: #cdeed4;
    }

    .badge-soft.vr {
        color: #0b5ed7;
        background: #e8f1ff;
        border-color: #d1e1ff;
    }

    .badge-soft.view {
        color: #333;
    }





/* ============================================================
   CDL Tile Card (Thumbnail + Title only)
   Use-case: Subject / Topic grids (DG, Mathe, ...)
   ============================================================ */

.cdl-tile {
    display: block;
    height: 100%;
    text-decoration: none;
    border-radius: 24px;
    background: rgba(255,255,255,0.78);
    backdrop-filter: blur(10px) saturate(130%);
    box-shadow: inset 0 1px rgba(255,255,255,0.65), 0 10px 26px rgba(0,0,0,0.06);
    transition: transform .22s ease, box-shadow .22s ease;
    overflow: hidden;
}

    .cdl-tile:hover {
        transform: translateY(-3px);
        box-shadow: inset 0 1px rgba(255,255,255,0.65), 0 16px 34px rgba(0,0,0,0.09);
    }

.cdl-tile__body {
    padding: 1.5rem 1.25rem 1.75rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cdl-tile__thumb {
    /* sorgt dafür, dass ALLE Tiles gleich ruhig aussehen */
    width: 220px; /* „wie früher“: klar begrenzt */
    max-width: 100%;
    aspect-ratio: 1 / 1; /* macht das Grid sauber */
    display: grid;
    place-items: center;
}

    .cdl-tile__thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* deine Kreise kommen aus dem Bild → contain! */
        display: block;
    }

.cdl-tile__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    /* „wie früher“: nicht hart schwarz */
    color: var(--text-muted);
}

/* Optional: kompakter auf kleineren Screens */
@media (max-width: 576px) {
    .cdl-tile__body {
        padding: 1.25rem 1rem 1.5rem;
    }

    .cdl-tile__thumb {
        width: 200px;
    }
}


/* ============================================================
   CDL Card – Icon Variant
   ============================================================ */

.cdl-card--icon {
    text-align: center;
}

.cdl-card__icon {
    font-size: 2.2rem;
    opacity: 0.85;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.08));
}
}

.cdl-card:hover .cdl-card__icon {
    transform: translateY(-2px);
    opacity: 1;
}

.cdl-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .4rem;
    letter-spacing: -0.01em;
}

.cdl-card__text {
    font-size: .95rem;
    color: rgba(0,0,0,0.58);
    line-height: 1.6;
    margin-bottom: 1.6rem;
}
/* Buttons in Cards immer unten */
.cdl-card__actions {
    margin-top: auto;
    padding-top: 1.25rem;
    display: flex;
    justify-content: center;
}


.cdl-card__content {
    flex: 1 1 auto; /* DAS ist der Schlüssel */
}
