/* ==========================================================
   courses.css — BEELESSON Course List Page
   Page-specific: course cards, grid layout
   ========================================================== */

.courses-hero {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

/* Grid */
.courses-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .courses-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .courses-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Course Card */
.course-card {
  display: flex;
  flex-direction: column;
  background-color: var(--card-bg);
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.12s ease-out, box-shadow 0.12s ease-out,
    border-color 0.12s ease-out;
}

.course-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
  border-color: var(--accent-soft);
}

.course-thumb {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background-color: #020617;
}

.course-thumb-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.course-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #e5e7eb;
  background: radial-gradient(circle at top left, #f97316 0, #1f2937 36%, #020617 100%);
}

.course-body {
  padding: 0.8rem 0.9rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Badges */
.course-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.1rem;
}

.course-badge {
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  border: 1px solid var(--border);
  background-color: var(--bg-soft);
  color: var(--ink-soft);
}

.course-badge.level {
  border-color: rgba(251, 191, 36, 0.7);
}

.course-badge.sale-type {
  border-color: rgba(96, 165, 250, 0.7);
}

/* Text */
.course-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.course-subtitle {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 0.05rem 0 0.2rem;
}

/* Meta */
.course-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.course-meta-row span::before {
  content: "•";
  margin: 0 0.3rem 0 0;
  color: var(--ink-soft);
}

.course-meta-row span:first-child::before {
  content: "";
  margin: 0;
}

.course-meta-bottom {
  margin-top: 0.3rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.course-price {
  font-size: 0.9rem;
  font-weight: 600;
}

/* Small helper when no results */
.courses-empty-msg {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}
