/* ── Moodle Courses Carousel ─────────────────────────────────────────────── */

.lexzur-moodle-courses {
    position: relative;
    width: 100%;
    padding: 0 52px;
    box-sizing: border-box;
}

/* Scrollable track — smooth free scroll, no snap, hidden scrollbar */
.lexzur-moodle-track {
    display: flex;
    gap: 18px;
    overflow-x: scroll;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-top: 26px;
}

.lexzur-moodle-track::-webkit-scrollbar {
    display: none;
}

/* Fade edges via mask — only when there's actually hidden overflow on that side */
.lexzur-moodle-courses.has-next .lexzur-moodle-track {
    -webkit-mask-image: linear-gradient(to right, black 0%, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 0%, black 85%, transparent 100%);
}

.lexzur-moodle-courses.has-prev:not(.has-next) .lexzur-moodle-track {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 100%);
}

.lexzur-moodle-courses.has-prev.has-next .lexzur-moodle-track {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

/* ── Card — 3 visible at once ──────────────────────────────────────────────── */

.lexzur-moodle-course {
    flex: 0 0 calc(33.333% - 12px);
    min-height: 470px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
    padding: 70px 24px 50px 24px !important;
}

.lexzur-moodle-course:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
}

.lexzur-moodle-course__new-badge {
    position: absolute;
    top: 30px;
    background: #27B48D;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 20px;
    border-radius: 8px;
    white-space: nowrap;
    min-width: 100px;
    background-color: #33ae8a;
    color: #000000;
}

/* ── Title ─────────────────────────────────────────────────────────────────── */

.lexzur-moodle-course__title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    margin-block: 20px;
    /* Fixed 2-line height so all images align horizontally across cards */
    min-height: calc(2 * 1.3em);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Course image ──────────────────────────────────────────────────────────── */

.lexzur-moodle-course__img {
    width: 130px;
    height: 130px;
    margin-bottom: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lexzur-moodle-course__img img,
.lexzur-moodle-course__img svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ── Description ───────────────────────────────────────────────────────────── */

.lexzur-moodle-course__desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 auto;
    padding-bottom: 28px;
    height: 200px;
}

/* ── CTA button ────────────────────────────────────────────────────────────── */

.lexzur-moodle-course__cta {
    display: inline-block;
    background: #ffffff;
    color: #0d1526;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 36px;
    border-radius: 50px;
    transition: background 0.2s ease;
    white-space: nowrap;
    margin-top: auto;
    border: none;
    cursor: pointer;
}

.lexzur-moodle-course__cta:hover,
.lexzur-moodle-course__cta:focus {
    background: #e6edf8;
    color: #0d1526;
    text-decoration: none;
}

/* ── Navigation arrows ─────────────────────────────────────────────────────── */

.lexzur-moodle-btn {
    position: absolute;
    border: 1px solid #ccc;
    top: 50%;
    transform: translateY(-50%);
    padding: 13px;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
    width: 35px;
    height: 35px;
}

.lexzur-moodle-btn:hover,
.lexzur-moodle-btn:focus {
    background: #ffffff63 !important;
}

.lexzur-moodle-prev {
    left: 35px;
}

.lexzur-moodle-next {
    right: 35px;
}

/* Hidden state managed by JS */
.lexzur-moodle-btn[hidden] {
    display: none;
}

/* ── States ────────────────────────────────────────────────────────────────── */

.lexzur-moodle-error,
.lexzur-moodle-empty {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    text-align: center;
    padding: 24px;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .lexzur-moodle-course {
        flex: 0 0 calc(50% - 9px);
    }
}

@media (max-width: 767px) {
    .lexzur-moodle-courses {
        padding: 0 44px;
    }

    .lexzur-moodle-course {
        flex: 0 0 80%;
        min-height: 420px;
    }
}

@media (max-width: 480px) {
    .lexzur-moodle-courses {
        padding: 0 40px;
    }

    .lexzur-moodle-course {
        flex: 0 0 88%;
    }
}

/* ── Modal open / close animations ────────────────────────────────────────── */

@keyframes lmc-overlay-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes lmc-overlay-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@keyframes lmc-modal-in {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes lmc-modal-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
}

/* ── Modal overlay ─────────────────────────────────────────────────────────── */

.lmc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 17, 35, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    animation: lmc-overlay-in 0.22s ease forwards;
}

.lmc-modal-overlay[hidden] {
    display: none;
}

.lmc-modal-overlay.is-closing {
    animation: lmc-overlay-out 0.2s ease forwards;
}

/* ── Modal container ───────────────────────────────────────────────────────── */

.lmc-modal {
    position: relative;
    display: flex;
    background: #0d1628;
    border-radius: 16px;
    width: 100%;
    max-width: 980px;
    max-height: 90vh;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: lmc-modal-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.lmc-modal-overlay.is-closing .lmc-modal {
    animation: lmc-modal-out 0.2s ease forwards;
}

/* ── Close button ──────────────────────────────────────────────────────────── */

.lmc-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    z-index: 1;
    transition: color 0.2s ease;
    box-shadow: none !important;
}

.lmc-modal__close:hover {
    color: #ffffff;
    background: transparent !important;
}

/* ── Left panel ────────────────────────────────────────────────────────────── */

.lmc-modal__left {
    flex: 0 0 38%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    gap: 24px;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.1);
}

.lmc-modal__badge {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lmc-modal__badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.lmc-modal__divider {
    width: 1px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.lmc-modal__course-label {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
    margin: 0;
    line-height: 1.4;
}

/* ── Right panel ───────────────────────────────────────────────────────────── */

.lmc-modal__right {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 50px 40px 50px;
    overflow-y: auto;
    min-width: 0;
}

/* ── Content card ──────────────────────────────────────────────────────────── */

.lmc-modal__content-card {
    padding-inline: 5px;
    margin-bottom: 20px;
}

.lmc-modal__title {
    color: #ffffff !important;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 14px;
    line-height: 1.3;
    padding-right: 32px;
}

.lmc-modal__desc {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
}

.lmc-modal__desc p {
    margin: 0 0 8px;
}

.lmc-modal__desc p:last-child {
    margin-bottom: 0;
}

.lmc-modal__desc ul,
.lmc-modal__desc ol {
    padding-left: 20px;
    margin: 8px 0 0;
}

.lmc-modal__desc li {
    margin-bottom: 6px;
}

/* ── Tab bar — segmented control ───────────────────────────────────────────── */

.lmc-modal__tabs {
    display: flex;
    gap: 0;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50px;
    padding: 4px;
    margin-bottom: 10px;
}

.lmc-modal__tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 500;
    padding: 9px 14px;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    box-shadow: none !important;
}

.lmc-modal__tab.active {
    background: #ffffff !important;
    color: #0d1526 !important;
}

.lmc-modal__tab:hover:not(.active) {
    color: rgba(255, 255, 255, 0.8);
}

/* ── Tab content ───────────────────────────────────────────────────────────── */

.lmc-modal__tab-content {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.7;
    flex-shrink: 0;
    min-height: 50px;
    padding-inline-start: 20px;
}

/* ── Get Certified CTA ─────────────────────────────────────────────────────── */

.lmc-modal__cta {
    display: block;
    background: #ffffff;
    color: #0d1526 !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    padding: 15px 24px;
    border-radius: 50px;
    text-align: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
    margin-top: 15px;
}

.lmc-modal__cta:hover,
.lmc-modal__cta:focus {
    background: #e6edf8;
    color: #0d1526;
    text-decoration: none;
}

/* ── Modal responsive ──────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .lmc-modal {
        flex-direction: column;
        max-height: 85vh;
        overflow-y: auto;
    }

    .lmc-modal__left {
        flex: none;
        flex-direction: row;
        padding: 24px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        gap: 16px;
        justify-content: flex-start;
    }

    .lmc-modal__badge {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }

    .lmc-modal__divider {
        width: 1px;
        height: 50px;
    }

    .lmc-modal__course-label {
        text-align: left;
    }

    .lmc-modal__right {
        padding: 24px;
    }

    .lmc-modal__title {
        font-size: 17px;
        padding-right: 0;
    }

    .lmc-modal__tab {
        font-size: 12px;
        padding: 8px 10px;
        gap: 4px;
    }

    .lmc-modal__tab svg {
        display: none;
    }

    .lmc-modal__tab-content {
        min-height: 80px;
    }
}