   COURSES PAGE - LIST OF COURSE CARDS
   ======================================== */

.courses-grid-section {
  padding: 60px 0;
  background-color: var(--body-bg, #fafafa);
}

.courses-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  justify-content: center;
  align-items: start;
}

@media (min-width: 992px) {
  .courses-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.course-item-card {
  background-color: var(--white, #ffffff);
  border-radius: 20px;
  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 489px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
}

.course-item-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.12);
}

/* Banner area: 225px height, with placeholder styling support */
.course-item-card-banner {
  height: 225px;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: #f0f4f8;
}

.course-item-card-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-item-card-banner-img:not([src]), 
.course-item-card-banner-img[src=""] {
  display: none;
}

/* Fallback gradient styling if no image src is loaded */
.course-item-card-banner.banner-blue {
  background: linear-gradient(180deg, #013475 0%, #324cfc 100%);
}

.course-item-card-banner.banner-orange {
  background: linear-gradient(180deg, #ec9a26 0%, #f2ba6a 100%);
}

.course-item-card-banner-placeholder-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
}

/* Card Body */
.course-item-card-body {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-item-card-title {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color, #013475);
  margin: 0 0 10px 0;
  line-height: 1.3;
}

/* Meta Info Row */
.course-item-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #838383;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}

.course-item-card-meta-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  opacity: 0.6;
}

/* Description */
.course-item-card-desc {
  font-family: var(--font-main, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 400;
  color: #757575;
  line-height: 19px;
  margin: 0 0 20px 0;
  display: -webkit-box;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 76px; /* 4 lines * 19px */
}

/* Footer row */
.course-item-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

/* Tag */
.course-item-card-tag {
  background-color: var(--primary-color, #013475);
  color: var(--white, #ffffff);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 37px;
  line-height: 1;
  text-decoration: none;
}

/* Lessons count */
.course-item-card-lessons {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #838383;
  font-size: 14px;
  font-weight: 500;
}

.course-item-card-lessons-icon {
  width: 14px;
  height: 14px;
  object-fit: contain;
  opacity: 0.6;
}

/* Empty state */
.courses-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #757575;
  font-size: 16px;
  padding: 40px 0;
}

/* Pagination */
.courses-pagination-nav {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.courses-pagination {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 8px;
  align-items: center;
}

.courses-page-item {
  display: inline-block;
}

.courses-page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: #ffffff;
  border: 1px solid #dfe3e8;
  border-radius: 4px;
  color: rgba(38, 38, 38, 0.6);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.courses-page-link:hover {
  background-color: #f5f5f5;
  border-color: #c4cdd5;
  color: rgba(38, 38, 38, 0.8);
}

.courses-page-item.active .courses-page-link {
  background-color: #ffffff;
  border: 1.5px solid #007bc1;
  color: #007bc1;
}

.courses-page-item.disabled .courses-page-link {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

/* Responsive adjustment */
@media (max-width: 767px) {
  .courses-grid-section {
    padding: 20px 0;
  }

  .courses-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

