/*
 * NexttCareer Course Preview Full Image Fix
 *
 * The V6 catalogue originally uses a 3:2 preview wrapper, while an older
 * course-card fix forces all images to a 220px cover crop. These overrides
 * restore natural image height and show the complete promotional artwork.
 */

/* V6, V4 and custom NexttCareer card containers. */
.nextt-v6-course-card,
.nextt-v4-course-card,
.nextt-v4-course-card,
.nextt-category-course-card,
.nextt-course-card {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Exact image wrappers used by the current V6 catalogue. */
.nextt-v6-course-image,
.nextt-v4-course-image,
.nextt-category-course-image,
.nextt-course-card .course-image,
.nextt-course-card .course-thumbnail {
    position: relative !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    line-height: 0 !important;
    background: #ffffff !important;
}

/* The actual promotional images must remain complete and proportional. */
.nextt-v6-course-image img,
.nextt-v4-course-image img,
.nextt-category-course-image img,
.nextt-course-card .course-image img,
.nextt-course-card .course-thumbnail img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    float: none !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
    filter: none !important;
    clip: auto !important;
    clip-path: none !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* LearnPress archive and theme card fallbacks. */
.learn-press-courses .course-item .course-thumbnail,
.lp-archive-courses .course-item .course-thumbnail,
.learn-press-courses .course-item .course-img,
.lp-archive-courses .course-item .course-img,
.learn-press-courses .course-item .course-image,
.lp-archive-courses .course-item .course-image,
ul.learn-press-courses .course .course-thumbnail,
.courses-list .course-item .course-thumbnail,
.course-grid .course-item .course-thumbnail {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    background: #ffffff !important;
}

.learn-press-courses .course-item .course-thumbnail img,
.lp-archive-courses .course-item .course-thumbnail img,
.learn-press-courses .course-item .course-img img,
.lp-archive-courses .course-item .course-img img,
.learn-press-courses .course-item .course-image img,
.lp-archive-courses .course-item .course-image img,
ul.learn-press-courses .course .course-thumbnail img,
.courses-list .course-item .course-thumbnail img,
.course-grid .course-item .course-thumbnail img {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    filter: none !important;
}

/*
 * Undo the older image-error plugin's wrapper and 220px crop if any cached
 * markup remains after that plugin has been deactivated.
 */
.nextt-v6-course-card .nextt-safe-hero-wrap,
.nextt-v6-course-card .nextt-hero-colour-fill-wrap,
.nextt-v4-course-card .nextt-safe-hero-wrap,
.nextt-v4-course-card .nextt-hero-colour-fill-wrap,
.nextt-category-course-card .nextt-safe-hero-wrap,
.nextt-category-course-card .nextt-hero-colour-fill-wrap,
.learn-press-courses .course-item .nextt-safe-hero-wrap,
.learn-press-courses .course-item .nextt-hero-colour-fill-wrap,
.lp-archive-courses .course-item .nextt-safe-hero-wrap,
.lp-archive-courses .course-item .nextt-hero-colour-fill-wrap {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #ffffff !important;
    background-image: none !important;
    filter: none !important;
    transform: none !important;
}

.nextt-v6-course-card .nextt-safe-hero-bg,
.nextt-v6-course-card .nextt-safe-hero-overlay,
.nextt-v6-course-card .nextt-hero-colour-fill-bg,
.nextt-v6-course-card .nextt-hero-colour-fill-overlay,
.nextt-v4-course-card .nextt-safe-hero-bg,
.nextt-v4-course-card .nextt-safe-hero-overlay,
.nextt-category-course-card .nextt-safe-hero-bg,
.nextt-category-course-card .nextt-safe-hero-overlay,
.learn-press-courses .course-item .nextt-safe-hero-bg,
.learn-press-courses .course-item .nextt-safe-hero-overlay,
.lp-archive-courses .course-item .nextt-safe-hero-bg,
.lp-archive-courses .course-item .nextt-safe-hero-overlay {
    display: none !important;
}

/* Keep rounded card corners while allowing the complete image to define height. */
.nextt-v6-course-card,
.nextt-v4-course-card,
.nextt-category-course-card,
.nextt-course-card,
.learn-press-courses .course-item,
.lp-archive-courses .course-item {
    overflow: hidden !important;
}

/* Prevent title text outside the image from being clipped by card-height rules. */
.nextt-v6-course-card-body,
.nextt-v4-course-card-body,
.nextt-category-course-card-body,
.nextt-course-card .course-content,
.learn-press-courses .course-item .course-content,
.lp-archive-courses .course-item .course-content {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
}

.nextt-v6-course-card h2,
.nextt-v4-course-card h2,
.nextt-category-course-card h2,
.nextt-course-card h2,
.learn-press-courses .course-item .course-title,
.lp-archive-courses .course-item .course-title {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
}
