/* Scoped styles for Best Courses on index.html to avoid affecting navbar */

.best-courses-scope {
  /* Derive from global theme to match existing cards */
  --accent: var(--primary);
  --accent-hover: var(--secondary);
  --success: var(--accent);
  --success-dark: #2F855A;
  --text-main: var(--text);
  --text-secondary: var(--text-light);
  --card-bg: var(--surface);
  --shadow: var(--shadow);
  --radius: 18px;
}

/* Grid */
.best-courses-scope .featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Card */
.best-courses-scope .featured-card {
  background: var(--card-bg);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}
.best-courses-scope .featured-card:hover {
  transform: translateY(-10px) scale(1.03);
  box-shadow: 0 12px 36px rgba(79,140,255,0.18), 0 2px 8px rgba(67,233,123,0.10);
}

/* Badge */
.best-courses-scope .featured-badge {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Image */
.best-courses-scope .featured-image {
  height: 200px;
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s;
  border-bottom: 2px solid var(--accent);
}
.best-courses-scope .featured-card:hover .featured-image {
  transform: scale(1.05);
}

/* Content */
.best-courses-scope .featured-content {
  padding: 1.5rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Category */
.best-courses-scope .featured-category {
  display: inline-block;
  background: rgba(79,140,255,0.10) !important; /* primary tint */
  color: var(--primary) !important;
  padding: 0.25rem 0.95rem;
  border-radius: 15px;
  font-size: 1.13rem;
  margin-bottom: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.best-courses-scope .featured-category:hover,
.best-courses-scope .featured-card:hover .featured-category {
  background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 100%) !important;
  color: #fff !important;
  box-shadow: 0 2px 12px rgba(79,140,255,0.13);
}

/* Title */
.best-courses-scope .featured-title {
  margin: 0 0 0.5rem;
  font-size: 1.3rem;
  line-height: 1.4;
  font-weight: bold;
  color: var(--primary);
}

/* Instructor */
.best-courses-scope .featured-instructor {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.best-courses-scope .instructor-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

/* Meta */
.best-courses-scope .featured-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.best-courses-scope .meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Price */
.best-courses-scope .featured-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}
.best-courses-scope .price-amount {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--danger);
}
.best-courses-scope .price-original {
  text-decoration: line-through;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Actions */
.best-courses-scope .featured-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: stretch;
  align-items: stretch;
}
.best-courses-scope .enroll-btn,
.best-courses-scope .preview-btn {
  flex: 1 1 0;
  padding: 0.85rem 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 0;
}
.best-courses-scope .enroll-btn {
  background: var(--primary);
  color: #fff;
}
.best-courses-scope .enroll-btn:hover:not(:disabled) {
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(58,134,255,0.10);
}
.best-courses-scope .preview-btn {
  background: #2D3748;
  color: #fff;
  text-decoration: none;
}
.best-courses-scope .preview-btn:hover {
  background: #4A5568;
}
.best-courses-scope .enroll-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .best-courses-scope .featured-card { min-height: 320px; }
  .best-courses-scope .enroll-btn, .best-courses-scope .preview-btn { font-size: 0.95rem; padding: 0.7rem 0.5rem; }
}
