/* ===== Course detail page — Udemy style ===== */
.cud-page {
  width: 100%;
  font-family: 'Tajawal', Tahoma, Arial, sans-serif;
}

html[dir="ltr"] .cud-page {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Hero band ---- */
.cud-hero {
  background: linear-gradient(160deg, #0B1426 0%, #152238 100%);
  color: #fff;
  padding: 26px 18px 34px;
}

.cud-hero__inner {
  max-width: 1180px;
  margin: 0 auto;
}

.cud-hero__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: #FFB300;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.cud-hero__back:hover {
  color: #fff;
}

.cud-hero__title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 800;
  line-height: 1.35;
}

.cud-hero__lead {
  margin: 0 0 16px;
  max-width: 820px;
  color: #c9cdd3;
  font-size: 15px;
  line-height: 1.7;
}

.cud-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  font-size: 13px;
  color: #d8dbe0;
}

.cud-hero__sep {
  opacity: 0.5;
}

.cud-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cud-meta-item i {
  opacity: 0.75;
}

.cud-hero__instructor {
  margin: 14px 0 0;
  font-size: 14px;
  color: #c9cdd3;
}

.cud-hero__instructor a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cud-hero__instructor a:hover {
  color: #FFCA28;
}

.cud-rating {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cud-rating__num {
  color: #FFB300;
  font-weight: 800;
  font-size: 14px;
}

.cud-stars {
  display: inline-flex;
  gap: 1px;
  color: #FFB300;
  font-size: 11px;
}

.cud-stars .cud-star--empty {
  opacity: 0.4;
}

.cud-rating__count {
  color: #FFB300;
  text-decoration: underline;
}

/* ---- Layout ---- */
.cud-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 14px 44px;
}

.cud-main {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.cud-side {
  order: 1;
  min-width: 0;
}

/* ---- Cards ---- */
.cud-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  padding: 18px;
}

.cud-card > h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.cud-card > h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 800;
}

.cud-learn__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 18px;
}

.cud-learn__grid li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: #334155;
}

.cud-learn__grid li i {
  margin-top: 2px;
  font-size: 13px;
  color: #059669;
}

.cud-about p {
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
  color: #334155;
}

.cud-reqs ul {
  margin: 0;
  padding-inline-start: 18px;
}

.cud-reqs li {
  margin-bottom: 4px;
  font-size: 14px;
  line-height: 1.7;
  color: #334155;
}

/* ---- Instructor ---- */
.cud-instructor__row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.cud-instructor__avatar {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: #f0f4f8;
  display: grid;
  place-items: center;
}

.cud-instructor__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cud-instructor__avatar-ph {
  font-size: 22px;
  font-weight: 800;
  color: #0B1426;
}

.cud-instructor__body {
  min-width: 0;
}

.cud-instructor__name {
  display: block;
  margin-bottom: 2px;
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  text-decoration: none;
}

.cud-instructor__name:hover {
  color: #0B1426;
  text-decoration: underline;
}

.cud-instructor__spec {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: #64748b;
}

.cud-instructor__bio {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.75;
  color: #334155;
  white-space: pre-line;
}

/* ---- Reviews ---- */
.cud-reviews__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cud-reviews__head a {
  font-size: 13px;
  font-weight: 700;
  color: #0B1426;
  text-decoration: none;
}

.cud-reviews__head a:hover {
  text-decoration: underline;
}

.cud-reviews__summary {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
}

.cud-reviews__avg {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  color: #FFB300;
}

.cud-reviews__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cud-reviews__stars-big {
  display: inline-flex;
  gap: 2px;
  color: #FFB300;
  font-size: 14px;
}

.cud-reviews__count {
  font-size: 13px;
  color: #64748b;
}

.cud-reviews__empty {
  margin: 12px 0 0;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
  font-size: 13px;
  color: #64748b;
}

/* ---- Exam banner ---- */
.cud-exam-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(11, 20, 38, 0.06), rgba(11, 20, 38, 0.02));
  border: 1px solid rgba(11, 20, 38, 0.12);
  border-radius: 14px;
  text-decoration: none;
  color: #1e293b;
}

.cud-exam-link__ic {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #0B1426;
  color: #fff;
  font-size: 18px;
}

.cud-exam-link strong {
  display: block;
  font-size: 14px;
}

.cud-exam-link small {
  color: #64748b;
}

/* ---- Related (like suggested programs, warm) ---- */
.cud-related {
  padding: 20px 18px 22px;
}

.cud-related > h2 {
  position: relative;
  margin: 0 0 14px;
  padding-bottom: 12px;
  font-size: 1.1rem;
  font-weight: 800;
  color: #1c1917;
  border-bottom: 1px solid #f5f5f4;
}

.cud-related > h2::after {
  content: '';
  position: absolute;
  bottom: -1px;
  inset-inline-start: 0;
  width: 56px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #f97316, #fb923c);
}

.cud-related__list {
  display: grid;
  gap: 10px;
}

.cud-related__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: #fff8f2;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.cud-related__item:hover {
  border-color: #f97316;
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.14);
  transform: translateY(-1px);
}

.cud-related__item-thumb {
  flex: 0 0 auto;
  width: 84px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f4;
}

.cud-related__item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cud-related__item-body {
  min-width: 0;
  flex: 1;
}

.cud-related__item-body strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 800;
  color: #1c1917;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cud-related__item-body small {
  display: block;
  margin-top: 3px;
  font-size: 0.74rem;
  color: #78716c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cud-related__item-body small i {
  margin-inline-end: 3px;
  color: #f97316;
}

.cud-related__item-arrow {
  flex: 0 0 auto;
  color: #f97316;
  font-size: 12px;
  opacity: 0.6;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.cud-related__item:hover .cud-related__item-arrow {
  opacity: 1;
  transform: translateX(-3px);
}

html[dir="ltr"] .cud-related__item-arrow {
  transform: scaleX(-1);
}

html[dir="ltr"] .cud-related__item:hover .cud-related__item-arrow {
  transform: scaleX(-1) translateX(3px);
}

@media (max-width: 480px) {
  .cud-related__item-thumb {
    width: 72px;
    height: 48px;
  }
}

/* ---- Purchase box ---- */
.cud-purchase {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.cud-purchase__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0b1426;
  overflow: hidden;
}

.cud-purchase__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cud-purchase__free {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  color: #059669;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.cud-purchase__free i {
  font-size: 11px;
}

.cud-purchase__body {
  padding: 16px;
}

.cud-purchase__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.cud-purchase__price .cud-now {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
}

.cud-purchase__price .cud-now--free {
  color: #059669;
}

.cud-purchase__price .cud-was {
  font-size: 14px;
  color: #94a3b8;
  text-decoration: line-through;
}

.cud-purchase__off {
  font-size: 11px;
  font-weight: 800;
  color: #0B1426;
  background: linear-gradient(135deg, #FFB300, #FFCA28);
  padding: 3px 8px;
  border-radius: 999px;
}

.cud-purchase__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.cud-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.cud-btn i {
  font-size: 13px;
}

.cud-btn:active {
  transform: translateY(1px);
}

.cud-btn--buy {
  background: #f97316;
  color: #fff;
  box-shadow: 0 6px 16px rgba(249, 115, 22, 0.32);
}

.cud-btn--buy:hover {
  background: #ea580c;
  color: #fff;
}

.cud-btn--cart {
  background: #fff;
  border-color: #1c1917;
  color: #1c1917;
}

.cud-btn--cart:hover {
  background: #fafaf9;
  color: #1c1917;
}

.cud-btn--cart.is-active {
  background: #ecfdf5;
  border-color: #059669;
  color: #059669;
}

.cud-btn--free {
  background: #f97316;
  color: #fff;
}

.cud-btn--free:hover {
  background: #ea580c;
  color: #fff;
}

.cud-btn--ghost {
  background: #f5f5f4;
  color: #44403c;
}

.cud-btn--ghost:hover {
  background: #e7e5e4;
  color: #44403c;
}

.cud-purchase__guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  font-size: 12px;
  color: #64748b;
}

.cud-purchase__includes {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f2f4;
}

.cud-purchase__includes h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.cud-purchase__includes ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cud-purchase__includes li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}

.cud-purchase__includes li i {
  flex: 0 0 16px;
  width: 16px;
  text-align: center;
  font-size: 12px;
  color: #059669;
}

.cud-purchase__coupon {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #f0f2f4;
}

.cud-purchase__coupon-row {
  display: flex;
  gap: 8px;
}

.cud-purchase__coupon-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13px;
  color: #0f172a;
}

.cud-purchase__coupon-btn {
  border: 1px solid #1c1917;
  color: #1c1917;
  background: #fff;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.cud-purchase__coupon-btn:hover {
  background: #1c1917;
  color: #fff;
}

.cud-purchase__coupon-msg {
  margin: 8px 0 0;
  font-size: 12px;
}

.cud-purchase__coupon-msg.is-ok {
  color: #059669;
}

.cud-purchase__coupon-msg.is-err {
  color: #dc2626;
}

.cud-purchase__wish {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.cud-wish {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: none;
  background: none;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.cud-wish:hover {
  color: #d97706;
}

.cud-wish.is-active {
  color: #d97706;
}

.cud-wish i {
  font-size: 13px;
}

/* ---- Responsive ---- */
@media (min-width: 900px) {
  .cud-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 26px;
    padding: 26px 20px 56px;
  }

  .cud-main {
    order: 1;
    flex: 1;
  }

  .cud-side {
    order: 2;
    flex: 0 0 340px;
    position: sticky;
    top: 16px;
  }

  .cud-learn__grid {
    grid-template-columns: 1fr 1fr;
  }
}
