/* Trang chu LMS: Khoa hoc noi bat + Khoa hoc khac (classes/frontpage.php) */
#page-site-index #frontpage-available-course-list { display: none; }
#page-site-index:has(#ef-fp) .frontpage-course-list-all { display: none; }

.ef-fp {
  --fp-primary: #007a80;
  --fp-primary-hover: #00666b;
  --fp-text: #16302f;
  --fp-muted: #5b6b6b;
  --fp-border: #e1eaea;
  --fp-accent: #c2410c;
  margin: 8px 0 32px;
}
.ef-fp-title { margin: 8px 0 16px; font-size: 1.5rem; font-weight: 700; color: var(--fp-text); }
.ef-fp-title-sm { margin-top: 36px; font-size: 1.2rem; }

/* The lon */
.ef-fp-featured { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.ef-fp-card {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--fp-border); border-radius: 18px; background: #fff;
  color: var(--fp-text); text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 80, 84, .07);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.ef-fp-card:hover, .ef-fp-card:focus-visible {
  transform: translateY(-3px); border-color: #b8d8d8;
  box-shadow: 0 12px 28px rgba(0, 80, 84, .14); color: var(--fp-text); text-decoration: none;
}
.ef-fp-card:focus-visible, .ef-fp-scard:focus-visible { outline: 3px solid rgba(0, 122, 128, .45); outline-offset: 2px; }
.ef-fp-cover { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #eef4f4; }
.ef-fp-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ef-fp-cover-empty, .ef-fp-thumb.ef-fp-cover-empty {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #007a80 0%, #00a9a5 55%, #f59e0b 100%);
}
.ef-fp-cover-text { color: #fff; font-size: 1.6rem; font-weight: 800; letter-spacing: .02em; text-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.ef-fp-badge {
  position: absolute; bottom: 12px; left: 12px; padding: 4px 12px; border-radius: 999px;
  background: #fff; color: var(--fp-accent); font-size: .8rem; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}
.ef-fp-badge-on { color: var(--fp-primary); }
.ef-fp-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.ef-fp-name { margin: 0 0 6px; font-size: 1.25rem; font-weight: 700; color: var(--fp-text); }
.ef-fp-desc { flex: 1; margin-bottom: 16px; font-size: .95rem; line-height: 1.5; color: var(--fp-muted); }
.ef-fp-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ef-fp-meta { font-size: .9rem; font-weight: 600; color: var(--fp-muted); white-space: nowrap; }
.ef-fp-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 12px;
  background: var(--fp-primary); color: #fff; font-weight: 700; white-space: nowrap;
  transition: background-color .2s ease;
}
.ef-fp-card:hover .ef-fp-btn { background: var(--fp-primary-hover); }

/* Khoa khac: luoi nho */
.ef-fp-others { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.ef-fp-scard {
  display: flex; flex-direction: column; overflow: hidden;
  border: 1px solid var(--fp-border); border-radius: 14px; background: #fff;
  color: var(--fp-text); text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.ef-fp-scard:hover { border-color: #b8d8d8; box-shadow: 0 6px 16px rgba(0, 80, 84, .10); color: var(--fp-text); text-decoration: none; }
.ef-fp-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: #eef4f4; }
.ef-fp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ef-fp-thumb .ef-fp-cover-text { font-size: 1.1rem; }
.ef-fp-sname { margin: 0; padding: 10px 12px 12px; font-size: .95rem; font-weight: 600; line-height: 1.35; color: var(--fp-text); }

@media (max-width: 480px) {
  .ef-fp-featured { gap: 16px; }
  .ef-fp-others { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ef-fp-card, .ef-fp-scard, .ef-fp-btn { transition: none; }
  .ef-fp-card:hover { transform: none; }
}
@media (max-width: 640px) {
  .ef-fp-featured { grid-template-columns: 1fr; }
}
