/* ==========================================================
   CERTIFICATE LINKS IN ACHIEVEMENTS + STATISTICS v17.5.1
========================================================== */

.certificate-dashboard-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin: 16px 0;
    padding: 20px 22px;
    color: var(--text);
    text-decoration: none;
    background:
        radial-gradient(circle at 88% 12%, rgba(23, 105, 255, .16), transparent 32%),
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 7%, var(--surface)), var(--surface));
    border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--border-soft));
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.certificate-dashboard-card:hover,
.certificate-dashboard-card:focus-visible {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primary) 62%, var(--border-soft));
    box-shadow: 0 16px 38px rgba(23, 105, 255, .14);
    outline: none;
}

.certificate-dashboard-icon {
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    background: #fff;
    border: 1px solid rgba(23, 105, 255, .22);
    border-radius: 17px;
    box-shadow: 0 10px 24px rgba(23, 105, 255, .12);
}

.certificate-dashboard-icon img {
    width: 45px;
    height: 45px;
}

.certificate-dashboard-copy {
    min-width: 0;
}

.certificate-dashboard-eyebrow {
    display: block;
    margin-bottom: 4px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.certificate-dashboard-card h3 {
    margin: 0;
    color: var(--text);
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.2;
}

.certificate-dashboard-card p {
    max-width: 760px;
    margin: 7px 0 0;
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.55;
}

.certificate-dashboard-side {
    display: grid;
    justify-items: end;
    gap: 11px;
}

.certificate-dashboard-metrics {
    display: flex;
    gap: 9px;
}

.certificate-dashboard-metric {
    min-width: 88px;
    padding: 10px 12px;
    text-align: center;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--border-soft);
    border-radius: 12px;
}

.certificate-dashboard-metric strong,
.certificate-dashboard-metric small {
    display: block;
}

.certificate-dashboard-metric strong {
    color: var(--primary);
    font-size: 21px;
    line-height: 1;
}

.certificate-dashboard-metric small {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
}

.certificate-dashboard-action {
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
}

html[data-theme="dark"] .certificate-dashboard-icon {
    background: #f8fbff;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] .certificate-dashboard-icon {
        background: #f8fbff;
    }
}

@media (max-width: 760px) {
    .certificate-dashboard-card {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }

    .certificate-dashboard-side {
        grid-column: 1 / -1;
        width: 100%;
        justify-items: stretch;
    }

    .certificate-dashboard-metrics {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .certificate-dashboard-action {
        text-align: right;
    }
}

@media (max-width: 430px) {
    .certificate-dashboard-card {
        gap: 13px;
        padding: 17px;
    }

    .certificate-dashboard-icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }

    .certificate-dashboard-icon img {
        width: 37px;
        height: 37px;
    }
}
