/* =========================================================
   Course Details Page — styles
   يعتمد على متغيرات الثيم (اللون/المسافات) المعرّفة في style.css
   لازم يتحمّل بعد style.css في الصفحة عشان يورث نفس متغيرات
   الوضع الليلي/النهاري تلقائيًا.
   ========================================================= */

.cd-page-spacer {
  height: var(--header-h, 84px);
}

.cd-breadcrumb {
  padding: 22px 0 6px;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.cd-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.cd-breadcrumb a:hover {
  color: var(--brand-primary);
}
.cd-breadcrumb i {
  font-size: 0.7rem;
  margin: 0 6px;
  vertical-align: middle;
}

.cd-hero {
  padding: 18px 0 40px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-soft);
}
.cd-hero-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  color: #fff;
  background: var(--brand-primary);
  margin-bottom: 14px;
}
.cd-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--text-dark);
  margin-bottom: 14px;
}
.cd-hero-desc {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 700px;
  margin-bottom: 20px;
}
.cd-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}
.cd-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-dark);
}
.cd-meta-item i {
  color: var(--brand-primary);
  font-size: 1.05rem;
}
.cd-rating-stars i {
  color: var(--brand-orange);
}

.cd-content-section {
  padding: 48px 0 70px;
}
.cd-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  margin-bottom: 26px;
}
.cd-card h2,
.cd-card h4 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 16px;
}
.cd-card p {
  color: var(--text-muted);
  line-height: 1.9;
}
.cd-thumb {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 26px;
  box-shadow: var(--shadow-sm);
}
.cd-thumb img {
  width: 100%;
  display: block;
  aspect-ratio: 16/8;
  object-fit: cover;
}

.cd-curriculum-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.cd-curriculum-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px dashed var(--border-soft);
  color: var(--text-dark);
  font-size: 0.95rem;
}
.cd-curriculum-list li:last-child {
  border-bottom: none;
}
.cd-curriculum-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cd-curriculum-left i {
  color: var(--brand-primary);
  font-size: 1.05rem;
}
.cd-curriculum-duration {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.cd-instructor {
  display: flex;
  align-items: center;
  gap: 18px;
}
.cd-instructor img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--brand-primary-light);
}
.cd-instructor h4 {
  margin-bottom: 4px;
}
.cd-instructor p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.cd-sidebar {
  position: sticky;
  top: calc(var(--header-h, 84px) + 20px);
}
.cd-price-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 28px;
  margin-bottom: 22px;
}
.cd-price-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.1rem;
  color: var(--brand-primary);
  margin-bottom: 4px;
}
.cd-price-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.cd-includes-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.cd-includes-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--text-dark);
  font-size: 0.9rem;
}
.cd-includes-list li i {
  color: var(--brand-teal);
  font-size: 1rem;
}
.cd-share-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.cd-share-row a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  color: var(--brand-primary);
  transition: all 0.25s var(--ease);
}
.cd-share-row a:hover {
  background: var(--brand-primary);
  color: #fff;
  transform: translateY(-3px);
}

@media (max-width: 991.98px) {
  .cd-sidebar {
    position: static;
    margin-top: 8px;
  }
}
