/* MK-CanDu training course cards */
.mk-course-card {
    --mkc-navy: #1B3A5F;
    --mkc-primary: #396EB0;
    --mkc-line: rgba(57, 110, 176, 0.16);
    --mkc-muted: #6B7C93;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--mkc-line);
    border-radius: 18px;
    background: #FFFFFF;
    box-shadow: 0 12px 30px rgba(27, 58, 95, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mk-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(27, 58, 95, 0.13);
}

/* Media: logo bar + title design + instructor photo */
.mk-course-media {
    display: flex;
    flex-direction: column;
    color: inherit;
    text-decoration: none;
}

.mk-course-media-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 8px 14px;
    border-bottom: 1px dashed rgba(57, 110, 176, 0.35);
    background: #FFFFFF;
}

.mk-course-logo {
    max-width: 110px;
    max-height: 24px;
    object-fit: contain;
}

.mk-course-ai {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #396EB0 0%, #6A4FB3 100%);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.mk-course-media-body {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    aspect-ratio: 16 / 8.6;
}

.mk-course-design {
    position: relative;
    display: flex;
    align-items: center;
    padding: 16px;
    overflow: hidden;
    border-inline-end: 1px dashed rgba(57, 110, 176, 0.45);
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0) 42%),
        linear-gradient(140deg, #D6F0FC 0%, #BFE3F7 55%, #A9D3F0 100%);
    background-size: cover;
    background-position: center;
}

.mk-course-design::after {
    content: "";
    position: absolute;
    inset-inline-end: -26px;
    bottom: -26px;
    width: 92px;
    height: 92px;
    border: 14px solid rgba(57, 110, 176, 0.12);
    border-radius: 50%;
}

.mk-course-design.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(214, 240, 252, 0.92) 0%, rgba(169, 211, 240, 0.78) 100%);
}

.mk-course-design-title {
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--mkc-navy);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.mk-course-instructor-shot {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(180deg, #E4ECF7 0%, #CCDAEE 100%);
}

.mk-course-instructor-shot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.mk-course-instructor-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin: auto auto 34px;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    background: linear-gradient(145deg, #396EB0 0%, #1B3A5F 100%);
    box-shadow: 0 10px 22px rgba(27, 58, 95, 0.25);
    color: #FFFFFF;
    font-size: 30px;
}
.mk-course-instructor-name {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: 18px 8px 6px;
    background: linear-gradient(180deg, rgba(27, 58, 95, 0) 0%, rgba(27, 58, 95, 0.85) 100%);
    color: #FFFFFF;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}

.mk-course-wish {
    position: absolute;
    top: 50px;
    inset-inline-start: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--mkc-navy);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(27, 58, 95, 0.15);
}

.mk-course-wish.inList {
    color: #C8102E;
}

/* Body */
.mk-course-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    padding: 16px 16px 12px;
}

.mk-course-category {
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 999px;
    background: #EEF4FB;
    color: var(--mkc-primary);
    font-size: 11px;
    font-weight: 700;
}

.mk-course-title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.35;
}

.mk-course-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--mkc-navy);
    text-decoration: none;
}

.mk-course-title a:hover {
    color: var(--mkc-primary);
}

.mk-course-brief {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
    overflow: hidden;
    color: var(--mkc-muted);
    font-size: 13.5px;
    line-height: 1.55;
}

.mk-course-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}

.mk-course-meta li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border: 1px solid #E4EAF2;
    border-radius: 8px;
    color: #44546A;
    font-size: 12px;
    font-weight: 600;
}

.mk-course-meta i {
    color: var(--mkc-primary);
    font-size: 11px;
}

.mk-course-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed #E1E8F1;
}

.mk-course-by {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #44546A;
    font-size: 13px;
    font-weight: 600;
}

.mk-course-by > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mk-course-price {
    flex-shrink: 0;
    color: var(--mkc-navy);
    font-size: 17px;
    font-weight: 800;
}

.mk-course-price del {
    margin-inline-start: 4px;
    color: #9AA8BA;
    font-size: 13px;
    font-weight: 600;
}

/* Actions */
.mk-course-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px dashed rgba(57, 110, 176, 0.35);
}

.mk-course-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 10px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.mk-course-btn.is-cart {
    color: var(--mkc-navy);
    background: #FFFFFF;
}

.mk-course-btn.is-cart:hover {
    background: #EEF4FB;
    color: var(--mkc-primary);
}

.mk-course-btn.is-cart.is-in {
    color: #1F8A70;
}

.mk-course-btn.is-more {
    background: #DDF3D6;
    color: #1E6B35;
}

.mk-course-btn.is-more:hover {
    background: #1F8A70;
    color: #FFFFFF;
}

html[dir="rtl"] .mk-course-btn.is-more i {
    transform: scaleX(-1);
}

html.mk-lang-ar .mk-course-card .mk-i18n-ar {
    font-family: "Tajawal", "Cairo", "Segoe UI", Tahoma, sans-serif;
}

@media (max-width: 575px) {
    .mk-course-design-title {
        font-size: 15px;
    }
}
