/* Featured courses — homepage section */

.apm-section--courses {
  padding: 72px 0;
  background: #fff;
}

/* Header */
.apm-fc-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.apm-fc-header__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #0d5bdb;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.apm-fc-header__title {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.apm-fc-header__subtitle {
  margin: 0;
  max-width: 560px;
  font-size: 1rem;
  line-height: 1.6;
  color: #64748b;
}

.apm-fc-header__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
  flex-shrink: 0;
}

.apm-fc-header__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #0d5bdb;
  text-decoration: none;
  transition: color 300ms ease;
}

.apm-fc-header__link:hover {
  color: #0947ad;
}

.apm-fc-nav {
  display: flex;
  gap: 8px;
}

.apm-fc-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  cursor: pointer;
  transition: border-color 300ms ease, background 300ms ease, color 300ms ease, transform 300ms ease;
}

.apm-fc-nav__btn:hover {
  border-color: #0d5bdb;
  color: #0d5bdb;
}

.apm-fc-nav__btn:disabled,
.apm-fc-nav__btn.swiper-button-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Slider */
.apm-fc-slider {
  overflow: hidden;
  margin-bottom: 32px;
}

.apm-fc-slider .swiper-wrapper {
  align-items: stretch;
}

/* Card */
.apm-fc-card {
  display: flex;
  flex-direction: column;
  height: auto;
  background: #fff;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.apm-fc-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.apm-fc-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.apm-fc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 300ms ease;
}

.apm-fc-card:hover .apm-fc-card__media img {
  transform: scale(1.05);
}

.apm-fc-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  z-index: 2;
}

.apm-fc-card__badge--hot {
  background: #ef4444;
}

.apm-fc-card__badge--sale {
  background: #16a34a;
}

.apm-fc-card__float-icon {
  position: absolute;
  right: 12px;
  bottom: -18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: #0d5bdb;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  z-index: 2;
}

.apm-fc-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px 20px 20px;
}

.apm-fc-card__tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.apm-fc-card__tag--soft {
  background: #e0f2fe;
  color: #0369a1;
}

.apm-fc-card__tag--pro {
  background: #dcfce7;
  color: #166534;
}

.apm-fc-card__tag--manage {
  background: #ede9fe;
  color: #6d28d9;
}

.apm-fc-card__tag--default {
  background: #f1f5f9;
  color: #475569;
}

.apm-fc-card__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apm-fc-card__title a {
  color: inherit;
  text-decoration: none;
}

.apm-fc-card__title a:hover {
  color: #0d5bdb;
}

.apm-fc-card__desc {
  margin: 0 0 14px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.apm-fc-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 12px;
  font-size: 0.8125rem;
  color: #64748b;
}

.apm-fc-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.apm-fc-card__rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.apm-fc-card__stars {
  display: inline-flex;
  gap: 1px;
  color: #fbbf24;
}

.apm-fc-card__rating-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
}

.apm-fc-card__reviews {
  font-weight: 500;
  color: #64748b;
}

.apm-fc-card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  margin-top: auto;
}

.apm-fc-card__price-current {
  font-size: 1.125rem;
  font-weight: 700;
  color: #16a34a;
}

.apm-fc-card__price-old {
  font-size: 0.875rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.apm-fc-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: #0d5bdb;
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background 300ms ease;
}

.apm-fc-card__cta:hover {
  background: #0947ad;
  color: #fff;
}

/* Benefits strip */
.apm-fc-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8faff 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
}

.apm-fc-benefit {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.apm-fc-benefit__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.apm-fc-benefit--blue .apm-fc-benefit__icon { background: #dbeafe; color: #1d4ed8; }
.apm-fc-benefit--green .apm-fc-benefit__icon { background: #dcfce7; color: #16a34a; }
.apm-fc-benefit--purple .apm-fc-benefit__icon { background: #ede9fe; color: #7c3aed; }
.apm-fc-benefit--amber .apm-fc-benefit__icon { background: #fef3c7; color: #d97706; }

.apm-fc-benefit__title {
  display: block;
  margin-bottom: 4px;
  font-size: 0.9375rem;
  color: #0f172a;
}

.apm-fc-benefit__desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #64748b;
}

/* Responsive */
@media (max-width: 1024px) {
  .apm-fc-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .apm-section--courses {
    padding: 56px 0;
  }

  .apm-fc-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .apm-fc-header__actions {
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .apm-fc-benefits {
    grid-template-columns: 1fr;
    padding: 20px 16px;
  }

  .apm-fc-benefit {
    gap: 10px;
  }
}
