.course-widget-item .course-widget-image-wrapper {
  height: 220px;
  overflow: hidden;
  border-radius: 10px;
}

 .course-widget-item {
  height: 100%;
 }

 .course-widget-item .rbt-card {
  height: 720px;
  display: flex;
  flex-direction: column;
 }

 .course-widget-item .rbt-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
 }

 .course-widget-item .rbt-card-bottom {
  margin-top: auto;
 }

 .course-widget-item .rbt-card-title a {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
 }

 .course-widget-item .rbt-card-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  line-clamp: 7;
  overflow: hidden;
 }

 .course-widget-item .rbt-meta {
  margin-bottom: 0;
 }

 .course-widget-item .rbt-meta li {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
 }

.course-widget-item .course-widget-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-widget-item .course-widget-fallback {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-weight: 600;
  padding: 12px;
  text-align: center;
  font-size: 14px;
  border-radius: 6px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-detail-fallback {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: #fff;
  font-weight: 600;
  padding: 20px;
  text-align: center;
  border-radius: 8px;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.course-widget-item .course-widget-hover {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity .2s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.course-widget-item .course-widget-image-wrapper:hover .course-widget-hover {
  opacity: 1;
}

/* Card hover / tap animation */
.course-widget-item .rbt-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Desktop / pointer devices: animate on hover */
@media (hover: hover) and (pointer: fine) {
  .course-widget-item:hover .rbt-card {
    transform: translateY(-6px);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.18);
  }
}

/* Touch devices: animate on tap/focus */
@media (hover: none) and (pointer: coarse) {
  .course-widget-item:active .rbt-card,
  .course-widget-item:focus-within .rbt-card {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  }
}
