    .course_ai_integrated {
        border-radius: 50px;
        padding: 10px 12px;
    }

    /* ── Tab button ─────────────────────────────── */
    .ec-tab-btn {
        white-space: nowrap;
        padding: 9px 20px !important;
        transition: all 0.22s ease;
        cursor: pointer;
    }

    @media (min-width: 992px) {
        .ec-tab-btn {
            padding: 16px 24px !important;
        }
    }

    .ec-tab-btn:hover {
        background: #eff6ff;
        color: #066ccb;
    }

    .ec-tab-btn.active {
        background: #066ccb !important;
        color: #fff !important;
    }

    /* ── "More" dropdown trigger ─────────────────── */
    .ec-more-btn {
        padding: 9px 18px !important;
        white-space: nowrap;
        transition: all 0.22s ease;
        cursor: pointer;
        position: relative;
    }

    @media (min-width: 992px) {
        .ec-more-btn {
            padding: 16px 24px !important;
        }
    }

    /* Responsive icon sizes */
    .ec-tab-btn i,
    .ec-more-btn i {
        font-size: 0.95rem !important;
    }

    @media (min-width: 992px) {

        .ec-tab-btn i,
        .ec-more-btn i {
            font-size: 1.25rem !important;
            /* Desktop icon size (equivalent to text-xl) */
        }
    }

    .ec-more-btn:hover,
    .ec-more-btn.open {
        background: #eff6ff;
        color: #066ccb;
    }

    /* When a dropdown category is active — identical style to .ec-tab-btn.active */
    .ec-more-btn.active-in-dropdown {
        background: #066ccb !important;
        color: #fff !important;
    }

    /* Keep chevron white when active */
    .ec-more-btn.active-in-dropdown .ec-chevron {
        color: #fff;
    }

    .ec-more-btn .ec-chevron {
        font-size: 0.72rem;
        transition: transform 0.2s ease;
    }

    .ec-more-btn.open .ec-chevron {
        transform: rotate(180deg);
    }

    /* ── Dropdown panel ─────────────────────────── */
    .ec-dropdown-wrap {
        position: static;
        /* don't create stacking context here */
        display: inline-block;
    }

    .ec-dropdown-panel {
        display: none;
        position: fixed;
        /* fixed breaks free from ALL parent stacking contexts */
        min-width: 240px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 8px 36px rgba(0, 0, 0, 0.18);
        border: 1px solid #e2e8f0;
        width: 10%;
        z-index: 1;
        overflow: hidden;
        animation: ecDropFade 0.18s ease;
    }

    .ec-dropdown-panel.open {
        display: block;
    }

    @keyframes ecDropFade {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* search box */
    .ec-drop-search {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 14px;
        border-bottom: 1px solid #f1f5f9;
        background: #f8fafc;
    }

    .ec-drop-search i {
        color: #94a3b8;
        font-size: 0.95rem;
    }

    .ec-drop-search input {
        border: none;
        background: transparent;
        outline: none;
        width: 100%;
        color: #0f172a;
    }

    .ec-drop-search input::placeholder {
        color: #94a3b8;
    }

    /* dropdown items list */
    .ec-drop-list {
        list-style: none;
        margin: 0;
        padding: 6px 0;
        max-height: 260px;
        overflow-y: auto;
    }

    .ec-drop-list li button {
        width: 100%;
        text-align: left;
        background: transparent;
        border: none;
        padding: 9px 16px;
        font-weight: 600;
        color: #334155;
        display: flex;
        align-items: center;
        gap: 9px;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
    }

    .ec-drop-list li button:hover {
        background: #eff6ff;
        color: #066ccb;
    }

    .ec-drop-list li button.active {
        background: #eff6ff;
        color: #066ccb;
        font-weight: 700;
    }

    /* Keyboard-focused row (different from mouse hover / selected) */
    .ec-drop-list li button.ec-drop-focused {
        background: #f0f4ff;
        color: #066ccb;
        outline: none;
        box-shadow: inset 3px 0 0 #066ccb;
    }

    .ec-drop-list li.ec-drop-no-results {
        padding: 10px 16px;
        color: #94a3b8;
        display: none;
    }

    /* ── Course card ─────────────────────────────── */
    .ec-card {
        background: #fff;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 1px 12px rgba(0, 0, 0, 0.07);
        display: flex;
        flex-direction: column;
        height: 100%;
        transition: box-shadow 0.28s ease, transform 0.28s ease;
    }

    .ec-card:hover {
        box-shadow: 0 14px 44px rgba(6, 108, 203, 0.13);
        transform: translateY(-5px);
    }

    .ec-card:hover .ec-thumb-img {
        transform: scale(1.06);
    }

    .ec-thumb-img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }

    .course-grid-img-fallback {
        position: absolute;
        inset: 0;
        display: none;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #5264ad 0%, #25459d 100%);
    }

    .course-grid-img-fallback img {
        max-width: 120px;
        height: auto;
        object-fit: contain;
    }

    .ec-enroll-btn {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: #066ccb;
        color: #fff !important;
        font-size: 0.8rem;
        font-weight: 700;
        padding: 8px 16px;
        border-radius: 50px;
        text-decoration: none !important;
        white-space: nowrap;
        transition: background 0.2s ease, transform 0.15s ease;
        letter-spacing: 0.3px;
    }

    .ec-enroll-btn:hover {
        background: #0454a0;
        transform: scale(1.04);
    }

    /* ── Custom Course Grid Classes ──────────────────────── */
    .ec_card_img_container {
        padding-bottom: 58%;
    }

    .ec-card-img-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.52) 0%, transparent 58%);
        pointer-events: none;
    }

    .ec-course-duration {
        bottom: 12px;
        left: 14px;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        color: #fff;
        font-size: 0.76rem;
        font-weight: 700;
        padding: 7px 11px;
        border-radius: 50px;
        gap: 5px;
        line-height: 1;
    }

    .ec-duration-icon {
        font-size: 0.82rem;
        position: relative;
        top: 1px;
    }

    .ec-course-info {
        padding: 18px 20px 0;
    }

    .ec-course-title {
        font-size: 0.97rem;
        font-weight: 700;
        color: #0f172a;
        line-height: 1.45;
        margin-bottom: 12px;
    }

    .ec-course-badges {
        gap: 6px;
        margin-bottom: 14px;
    }

    .ec-course-badge {
        gap: 4px;
        font-size: 0.75rem;
        font-weight: 700;
        padding: 4px 10px;
        border-radius: 50px;
    }

    .ec-badge-module {
        background: #eff6ff;
        color: #066ccb;
    }

    .ec-badge-advanced {
        background: #ede9fe;
        color: #5b21b6;
    }

    .ec-badge-intermediate {
        background: #fff7ed;
        color: #9a3412;
    }

    .ec-badge-beginner {
        background: #dcfce7;
        color: #166534;
    }

    .ec-badge-icon {
        font-size: 0.78rem;
    }

    .ec-course-instructor {
        padding-bottom: 16px;
        gap: 8px;
    }

    .ec-instructor-img {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #e2e8f0;
        flex-shrink: 0;
    }

    .user-img-fallback {
        display: none;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        object-fit: cover;
        align-items: center;
        justify-content: center;
        border: 2px solid #e2e8f0;
        flex-shrink: 0;
    }

    .ec-instructor-name {
        font-size: 0.81rem;
        font-weight: 600;
        color: #475569;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ec-course-footer {
        padding: 12px 20px 16px;
        border-top: 1px solid #f1f5f9;
        gap: 8px;
    }

    .ec-price-current {
        font-size: 1.05rem;
        font-weight: 800;
        color: #066ccb;
        line-height: 1.2;
    }

    .ec-price-original {
        font-size: 0.76rem;
        color: #94a3b8;
        text-decoration: line-through;
    }

    .ec-enroll-icon {
        font-size: 0.82rem;
    }

    .ec-view-all-btn {
        padding: 14px 32px;
        gap: 10px;
        width: fit-content;
        white-space: nowrap;
        box-shadow: rgba(6, 108, 203, 0.3) 0px 8px 28px;
        letter-spacing: 0.4px;
        font-size: 0.95rem;
        transition: transform 0.2s, box-shadow 0.2s;
        transform: translateY(0px);
    }

    .ec-view-all-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 36px rgba(6, 108, 203, 0.42);
    }

    .ec-view-all-icon {
        font-size: 0.85rem;
    }

    /* Tab nav pill wrapper — horizontal scroll on small screens */
    .ec-tab-nav-wrap {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        overflow-x: auto;
        overflow-y: visible;
        max-width: 100%;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 8px !important;
        /* Mobile/Tablet default gap */
    }

    @media (min-width: 992px) {
        .ec-tab-nav-wrap {
            gap: 16px !important;
            /* Desktop gap */
        }
    }

    /* Hide scrollbars completely to keep the UI perfectly clean and vertically centered */
    .ec-tab-nav-wrap {
        scrollbar-width: none;
        /* Firefox */
        -ms-overflow-style: none;
        /* IE/Edge */
    }

    .ec-tab-nav-wrap::-webkit-scrollbar {
        display: none;
        /* Chrome, Safari, Opera */
    }

    /* Outer centering row must be positioned so dropdown escapes it */
    .ec-tab-nav-row {
        position: relative;
        z-index: 100;
    }

    /* ── Show-more card hiding ───────────────────────────────────── */
    .ec-card-hidden {
        display: none;
    }

    .ec-card-reveal {
        display: block;
        animation: ecCardIn 0.35s ease both;
    }

    @keyframes ecCardIn {
        from {
            opacity: 0;
            transform: translateY(18px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Show-more button */
    .ec-show-more-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #fff;
        border: 2px solid #066ccb;
        color: #066ccb;
        font-size: 0.88rem;
        font-weight: 700;
        padding: 10px 28px;
        border-radius: 50px;
        cursor: pointer;
        transition: background 0.2s, color 0.2s, transform 0.15s;
        letter-spacing: 0.3px;
    }

    .ec-show-more-btn:hover {
        background: #066ccb;
        color: #fff;
        transform: translateY(-2px);
    }

    @media (max-width:768px) {
        .ec-enroll-btn {
            padding: 8px 10px;
        }
    }

    /* ── Mobile card grid layout (< 576px) ────────────────────────────────── */
    @media (max-width: 575.98px) {

        /* tab navbar  */
        .ec-tab-scroll-wrap {
            /* border: 1px solid red; */
            padding: 0 !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            background: transparent !important;
        }

        .ec-tab-btn,
        .ec-more-btn {
            /* border: 1px solid #222e48 !important; */
            background: #fff !important;
        }

        /* ── Grid shell — NO card padding so footer fills edge-to-edge ── */
        .ec-card {
            display: grid !important;
            grid-template-columns: 50% 50%;
            grid-template-rows: auto auto;
            height: auto;
        }

        /* ── Image cell — row 1, col 1 ──────────────────────────────── */
        .ec_card_img_container {
            grid-column: 1;
            grid-row: 1;
            position: relative !important;
            padding-bottom: 0 !important;
            border-radius: 16px;
            overflow: hidden;
            margin: 10px 6px 10px 10px;
        }

        .ec_card_img_container .ec-thumb-img {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .ec_card_img_container>a,
        .ec-card-img-overlay {
            position: absolute;
            inset: 0;
        }

        .ec-course-duration {
            font-size: 0.7rem !important;
            padding: 4px 6px !important;
            bottom: 6px !important;
            left: 6px !important;
        }

        /* Hide desktop AI badge on mobile */
        .course_grid_ai_tag {
            display: flex !important;
            /* override d-none on mobile only */
            width: max-content;
            padding: 4px 6px !important;
            font-size: 0.65rem !important;
            gap: 3px !important;
            margin-top: 6px !important;
            margin-right: 6px !important;
            font-size: 0.62rem !important;
        }

        /* ── Info cell — row 1, col 2 ───────────────────────────────── */
        .ec-course-info {
            grid-column: 2;
            grid-row: 1;
            padding: 10px 12px 0 6px !important;
            min-width: 0;
        }

        /* Title */
        .ec-course-title {
            font-size: 1rem !important;
            margin-bottom: 6px !important;
        }

        /* Description */
        .ec-course-info p {
            font-size: 0.70rem !important;
            margin-bottom: 8px !important;
        }

        /* Badge pills */
        .ec-course-badge {
            font-size: 0.65rem !important;
            padding: 2px 7px !important;
        }

        /* Instructor row */
        .ec-course-instructor {
            padding-bottom: 8px !important;
        }

        .ec-instructor-img,
        .user-img-fallback {
            width: 30px !important;
            height: 30px !important;
        }

        .ec-instructor-name {
            font-size: 0.75rem !important;
        }

        /* ── Footer — row 2, spans BOTH columns ───────────────────────*/
        .ec-course-footer {
            grid-column: 1 / -1;
            grid-row: 2;
            display: flex !important;
            gap: 8px !important;
            padding: 10px 12px 12px !important;
            margin-top: 6px;
            border-radius: 0 0 16px 16px;
            background: #f3f9ff;
        }

        /* Price */
        .ec-price-current {
            font-size: 0.92rem !important;
        }

        .ec-price-original {
            font-size: 0.74rem !important;
        }

        /* Enroll Now — full-width, centred */
        .ec-course-footer .ec-enroll-btn {
            font-size: 0.73rem !important;
            padding: 10px 20px !important;
            justify-content: center;
            box-sizing: border-box;
        }

        /* Reset any leftover margin-top from old rule */
        .courseGrid_enroll_btn {
            margin-top: 0;
        }

        .course_grid_tab {
            margin-bottom: 24px !important;
        }
    }

    @media (min-width:576px) {

        .ec-tab-btn,
        .ec-more-btn {
            border: none !important;
        }

    }

    /* ── Horizontal scroll affordance (mobile) ─────────────────*/
    .ec-tab-scroll-wrap {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 16px rgba(0, 0, 0, 0.09);
    }

    @media (min-width: 1200px) {
        .ec-tab-scroll-wrap {
            width: fit-content;
            margin-left: auto;
            margin-right: auto;
        }
    }



    /* Floating chevron arrow */
    .ec-scroll-hint-arrow {
        display: none;
        position: absolute;
        right: 6px;
        top: 50%;
        transform: translateY(-50%);
        width: 30px;
        height: 30px;
        background: #fff;
        border-radius: 50%;
        border: 1px solid #e2e8f0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
        align-items: center;
        justify-content: center;
        color: #066ccb;
        font-size: 0.75rem;
        pointer-events: none;
        z-index: 3;
        animation: ecArrowPulse 1.4s ease-in-out infinite;
    }

    .ec-tab-scroll-wrap.ec-has-overflow .ec-scroll-hint-arrow {
        display: flex;
    }

    @keyframes ecArrowPulse {

        0%,
        100% {
            transform: translateY(-50%) translateX(0);
            opacity: 1;
        }

        50% {
            transform: translateY(-50%) translateX(3px);
            opacity: 0.7;
        }
    }