/* Homepage featured collection — Coursera-style blue panel */

.homepage-discovery-toolbar {
  display: none !important;
}

.home-featured {
  margin-top: 1.75rem;
  padding: 0;
}

@media (min-width: 768px) {
  .home-featured {
    margin-top: 2rem;
  }
}

.home-featured__panel {
  background: #2563eb;
  border-radius: 0;
  padding: 1.75rem 1.25rem 1.375rem;
}

@media (min-width: 768px) {
  .home-featured__panel {
    padding: 2.25rem 1.75rem 1.625rem;
  }
}

@media (min-width: 1024px) {
  .home-featured__panel {
    padding: 2.5rem 2rem 1.75rem;
  }
}

.home-featured__header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.375rem;
}

@media (min-width: 768px) {
  .home-featured__header {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.625rem;
  }
}

.home-featured__intro {
  max-width: 42rem;
}

.home-featured__label {
  margin: 0 0 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

@media (min-width: 768px) {
  .home-featured__label {
    font-size: 0.75rem;
  }
}

.home-featured__title {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.625rem, 2.8vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.home-featured__copy {
  margin: 0.625rem 0 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9375rem;
  line-height: 1.55;
}

@media (min-width: 768px) {
  .home-featured__copy {
    font-size: 1rem;
    line-height: 1.6;
  }
}

.home-featured__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: flex-start;
  padding: 0.5625rem 1rem;
  border-radius: 9999px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.home-featured__cta:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

.home-featured__cta:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.home-featured__grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.375rem;
}

.home-featured__grid::-webkit-scrollbar {
  display: none;
}

.home-featured__grid > .home-featured-card {
  flex: 0 0 85%;
  max-width: 85%;
  scroll-snap-align: start;
}

.home-featured__grid > .home-featured__status {
  flex: 0 0 100%;
  max-width: 100%;
}

@media (min-width: 640px) {
  .home-featured__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    overflow-x: visible;
    scroll-snap-type: none;
    padding-bottom: 0;
  }

  .home-featured__grid > .home-featured-card {
    flex: none;
    max-width: none;
    scroll-snap-align: none;
  }
}

@media (min-width: 1024px) {
  .home-featured__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
  }
}

@media (min-width: 1280px) {
  .home-featured__grid {
    gap: 1.25rem;
  }
}

@media (min-width: 1440px) {
  .home-featured__grid {
    gap: 1.5rem;
  }
}

.home-featured__status {
  margin: 0;
  padding: 1.25rem 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.9375rem;
  text-align: center;
}

/* Featured course card */

.home-featured-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

@media (min-width: 768px) {
  .home-featured-card {
    border-radius: 1.125rem;
  }
}

.home-featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.home-featured-card:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.home-featured-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
  overflow: hidden;
}

.home-featured-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.home-featured-card__media-fallback {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
}

.home-featured-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 0.9375rem 1rem 1.125rem;
}

@media (min-width: 768px) {
  .home-featured-card__body {
    padding: 1rem 1.0625rem 1.1875rem;
  }
}

.home-featured-card__provider {
  margin: 0 0 0.375rem;
  color: #64748b;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.home-featured-card__title {
  margin: 0;
  color: #0f172a;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .home-featured-card__title {
    font-size: 1rem;
  }
}

.home-featured-card__benefit {
  margin: 0.5rem 0 0;
  color: #64748b;
  font-size: 0.8125rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.home-featured-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.875rem;
}

.home-featured-card__price {
  color: #0f172a;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
}

.home-featured-card__price--sale {
  color: #047857;
}

.home-featured-card__price-original {
  margin-left: 0.375rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: line-through;
}

.home-featured-card__action {
  color: #2563eb;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .home-featured-card {
    transition: none;
  }

  .home-featured-card:hover {
    transform: none;
  }
}
