/* ============================================================
   HOMEPAGE FEATURED QUALIFICATIONS — edutec-courses widget only
   Scope: front page + course cards specifically (leaving other cards/widgets unaffected)
   ============================================================ */

/* 1. Hide red/other category labels (.ccategory) in both .course-inner and .course-hover */
.home .courses .ccategory,
.front-page .courses .ccategory,
.home .course-item .ccategory,
.front-page .course-item .ccategory {
    display: none !important;
}

/* 2. Equal-height cards — desktop & tablet (≥768px) */
@media (min-width: 768px) {
    /* Ensure flex rows stretch properly */
    .home .courses .row,
    .front-page .courses .row {
        align-items: stretch !important;
    }

    /* Make column containers d-flex column to stretch cards */
    .home .courses .col-xl-3,
    .home .courses .col-xl-4,
    .home .courses .col-lg-4,
    .home .courses .col-md-6,
    .front-page .courses .col-xl-3,
    .front-page .courses .col-xl-4,
    .front-page .courses .col-lg-4,
    .front-page .courses .col-md-6 {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Card wrapper stretches to full height */
    .home .courses .course-item,
    .front-page .courses .course-item {
        height: 100% !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Inner stretches inside item */
    .home .courses .course-inner,
    .front-page .courses .course-inner {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Prevent image stretching */
    .home .courses .course-img,
    .front-page .courses .course-img {
        flex-shrink: 0 !important;
    }

    /* Content area grows to fill remaining height */
    .home .courses .course-content,
    .front-page .courses .course-content {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
    }

    /* Ensure title remains readable and visible */
    .home .courses .course-content h3,
    .front-page .courses .course-content h3 {
        flex-shrink: 0 !important;
        white-space: normal !important;
        overflow: visible !important;
        -webkit-line-clamp: unset !important;
    }

    /* Rating remains fixed at original content scale */
    .home .courses .crating,
    .front-page .courses .crating {
        flex-shrink: 0 !important;
    }

    /* Footer meta pushed to the bottom of the card */
    .home .courses .cmeta,
    .front-page .courses .cmeta {
        margin-top: auto !important;
        flex-shrink: 0 !important;
    }
}

/* 3. Mobile — natural behavior */
@media (max-width: 767.98px) {
    .home .courses .course-item,
    .home .courses .course-inner,
    .home .courses .course-content,
    .front-page .courses .course-item,
    .front-page .courses .course-inner,
    .front-page .courses .course-content {
        height: auto !important;
        flex: unset !important;
        display: block !important;
    }

    .home .courses .cmeta,
    .front-page .courses .cmeta {
        margin-top: 0 !important;
    }
}
