/* ============================================================
   MyLearnify – course-details.css
   Styles for the Course Details page
   ============================================================ */

/* ---- Page-level overflow guard ---- */
html { overflow-x: hidden; }
.cd-hero, .cd-stats-bar, .cd-main, .cd-related, .cta-section {
  max-width: 100vw;
  overflow-x: hidden;
}
/* Universal box-sizing for all cd- elements */
[class*="cd-"] {
  box-sizing: border-box;
}

/* ---- Hero Section ---- */
.cd-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  padding: 120px 0 72px;
  overflow: hidden;
}

.cd-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform 8s ease;
}

.cd-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(8, 18, 55, 0.96) 0%,
    rgba(14, 30, 80, 0.88) 50%,
    rgba(14, 30, 80, 0.60) 100%
  );
  z-index: 1;
}

.cd-hero .container { position: relative; z-index: 2; overflow: hidden; max-width: 100%; }

.cd-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 48px;
  align-items: start;
  min-width: 0;
  overflow: hidden;
}

/* ---- Hero Info (left) ---- */
.cd-hero-info {
  color: #fff;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cd-hero-info * {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cd-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: rgba(255,255,255,.65);
  margin-bottom: 18px;
}
.cd-breadcrumb a   { color: var(--accent); }
.cd-breadcrumb i   { font-size: .65rem; }

.cd-badge-row { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

.cd-cat-badge {
  background: rgba(245,197,24,.18);
  color: var(--accent);
  border: 1px solid rgba(245,197,24,.4);
  font-size: .78rem; font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.cd-level-badge {
  background: rgba(6,182,212,.15);
  color: var(--secondary);
  border: 1px solid rgba(6,182,212,.35);
  font-size: .78rem; font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.cd-title {
  font-size: 2.3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.22;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,.28);
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  hyphens: auto;
}

.cd-desc {
  font-size: 1.02rem;
  color: rgba(255,255,255,.85);
  line-height: 1.8;
  margin-bottom: 20px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  overflow: hidden;
  hyphens: auto;
}

.cd-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  font-size: .88rem;
}

.cd-stars      { color: var(--warning); font-size: .9rem; }
.cd-rating-num { font-weight: 700; color: var(--warning); }
.cd-reviews    { color: rgba(255,255,255,.65); }

.cd-students {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.8);
  margin-left: 4px;
}
.cd-students i { color: var(--secondary); }

.cd-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  max-width: 100%;
}
.cd-meta-pills span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.85);
  font-size: .82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cd-meta-pills span i { color: var(--accent); }

.cd-updated { font-size:.82rem; color: rgba(255,255,255,.55); }
.cd-updated i { margin-right: 4px; }

/* ---- Enroll Card (hero right / sidebar) ---- */
.cd-enroll-card {
  background: var(--bg-white);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 40px rgba(0,150,199,.18);
  overflow: hidden;
  border: 1px solid rgba(0,150,199,.07);
}

.cd-card-img-wrap { position: relative; }
.cd-card-img      { width: 100%; height: 210px; object-fit: cover; display: block; }

.cd-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px; height: 56px;
  background: rgba(0,150,199,.85);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  border: 3px solid rgba(255,255,255,.3);
}
.cd-play-btn:hover { background: var(--primary); transform: translate(-50%,-50%) scale(1.1); }

.cd-card-body { padding: 24px; }

.cd-card-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.cd-price     { font-size: 1.9rem; font-weight: 800; color: var(--primary); }
.cd-old-price { font-size: 1rem; color: var(--text-light); text-decoration: line-through; }
.cd-discount  {
  font-size: .78rem; font-weight: 700;
  background: #fef3c7; color: #d97706;
  padding: 3px 10px; border-radius: var(--radius-full);
}

.cd-offer-timer {
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cd-btn-main {
  width: 100%;
  justify-content: center;
  text-align: center;
  padding: 14px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 24px rgba(0,150,199,.3);
}
.cd-btn-main:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(0,150,199,.4); }

.cd-btn-secondary {
  width: 100%;
  justify-content: center;
  text-align: center;
  padding: 12px;
  font-size: .92rem;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cd-btn-brochure {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  font-size: .92rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: #fff3f3;
  color: #c0392b;
  border: 2px solid #e53e3e;
  text-decoration: none;
  transition: var(--transition);
  margin-bottom: 16px;
}
.cd-btn-brochure:hover {
  background: #e53e3e;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(229,62,62,.3);
}

.cd-card-perks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.cd-card-perks li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .83rem;
  color: var(--text-body);
  padding: 2px 0;
}
.cd-card-perks li i { color: var(--success); font-size: .85rem; }

/* ---- Stats Bar ---- */
.cd-stats-bar {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #0f2875 100%);
  padding: 0;
  border-top: 1px solid rgba(255,255,255,.06);
}
.cd-stats-inner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 0;
}
.cd-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 26px 28px;
  border-right: 1px solid rgba(255,255,255,.08);
  flex: 1;
  min-width: 120px;
  transition: background .2s ease;
}
.cd-stat:hover { background: rgba(255,255,255,.05); }
.cd-stat:last-child { border-right: none; }
.cd-stat > i {
  font-size: 1.6rem;
  color: var(--accent);
  min-width: 30px;
}
.cd-stat > div { display: flex; flex-direction: column; }
.cd-stat strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.cd-stat span  { font-size: .76rem; color: rgba(255,255,255,.6); letter-spacing: .01em; }

/* ---- Main Content Layout ---- */
.cd-main { padding: 64px 0 80px; background: var(--bg-light); overflow: hidden; }

.cd-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 40px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

/* ---- Body (left) ---- */
.cd-body {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

/* ---- Tabs ---- */
.cd-tabs {
  position: sticky;
  top: 80px;
  z-index: 100;
  display: flex;
  gap: 0;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow-x: auto;
  overflow-y: hidden;
  margin-bottom: 32px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;   /* Firefox */
}
.cd-tabs::-webkit-scrollbar { display: none; } /* Chrome/Safari */
.cd-tab {
  flex: 1;
  min-width: fit-content;
  padding: 16px 20px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  letter-spacing: .01em;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: center;
}
.cd-tab:hover  { color: var(--primary); background: rgba(0,150,199,.04); }
.cd-tab.active {
  color: var(--primary);
  background: rgba(0,150,199,.07);
  border-bottom-color: var(--primary);
}

/* ---- Tab Panels ---- */
.cd-tab-panel { display: none; }
.cd-tab-panel.active {
  display: block;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  padding-top: 24px;
}

/* ---- Section ---- */
.cd-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 18px rgba(0,150,199,.07);
  padding: 36px;
  margin-bottom: 28px;
  border: 1px solid rgba(0,150,199,.06);
  transition: box-shadow .28s ease;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  scroll-margin-top: 200px;
}


.cd-section-title {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(0,150,199,.1);
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.cd-section-title i {
  color: var(--primary);
  background: rgba(0,150,199,.1);
  padding: 8px;
  border-radius: var(--radius);
  font-size: .88rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---- What You'll Learn Grid ---- */
.cd-learn-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}
.cd-learn-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  color: var(--text-body);
  line-height: 1.55;
  background: rgba(16,185,129,.04);
  border: 1px solid rgba(16,185,129,.15);
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: var(--transition);
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}
.cd-learn-item:hover {
  background: rgba(16,185,129,.08);
  border-color: rgba(16,185,129,.3);
  transform: translateX(2px);
}
.cd-learn-item i {
  color: var(--success);
  font-size: .85rem;
  margin-top: 2px;
  flex-shrink: 0;
}
.cd-learn-item span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---- Requirements ---- */
.cd-req-list { display: flex; flex-direction: column; gap: 10px; width: 100%; box-sizing: border-box; }
.cd-req-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .88rem;
  color: var(--text-body);
  line-height: 1.6;
  padding: 8px 12px;
  border-radius: var(--radius);
  transition: background .18s ease;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
}
.cd-req-list li:hover { background: rgba(0,150,199,.04); }
.cd-req-list li i { color: var(--primary); margin-top: 3px; flex-shrink: 0; }
.cd-req-list li span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---- Description ---- */
.cd-description {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
  hyphens: auto;
}
.cd-description p {
  font-size: .93rem;
  color: var(--text-body);
  line-height: 1.9;
  margin-bottom: 14px;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}
.cd-description p:last-child { margin-bottom: 0; }

/* ---- Career Outcomes Grid ---- */
.cd-outcomes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
}
.cd-outcome-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  box-sizing: border-box;
  line-height: 1.5;
}
.cd-outcome-item:hover {
  border-color: var(--primary);
  background: rgba(0,150,199,.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,150,199,.12);
}
.cd-outcome-item i {
  color: var(--primary);
  background: rgba(0,150,199,.1);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: .88rem;
}
.cd-outcome-item span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---- Curriculum ---- */
.cd-curr-summary {
  font-size: .88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.cd-curriculum { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.cd-module { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-width: 0; width: 100%; box-sizing: border-box; }

.cd-module-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px 22px;
  background: var(--bg-light);
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  border-left: 3px solid transparent;
  box-sizing: border-box;
  min-width: 0;
  gap: 10px;
}
.cd-module-head:hover  { background: rgba(0,150,199,.05); border-left-color: rgba(0,150,199,.3); }
.cd-module-head.open   { background: rgba(0,150,199,.07); color: var(--primary); border-left-color: var(--primary); }
.cd-module-head > span:first-child {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}
.cd-module-head > span:first-child i { color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.cd-module-meta { font-size: .8rem; font-weight: 400; color: var(--text-muted); display: flex; align-items: center; gap: 8px; flex-shrink: 0; white-space: nowrap; }
.cd-chevron { transition: transform .3s ease; }
.cd-module-head.open .cd-chevron { transform: rotate(180deg); }

.cd-module-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
  padding: 0 20px;
  background: var(--bg-white);
}
.cd-module-body.open { max-height: 1000px; padding: 16px 20px; }
.cd-module-body li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .86rem;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
  max-width: 100%;
}
.cd-module-body li:last-child { border-bottom: none; }
.cd-module-body li i { color: var(--primary); font-size: .85rem; flex-shrink: 0; margin-top: 2px; }

/* ---- Instructor ---- */
.cd-instructor-card { }

/* Initials avatar fallback */
.cd-inst-initials {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 3px solid var(--primary-light);
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.cd-inst-top {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
  align-items: flex-start;
}
.cd-inst-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--primary-light);
  box-shadow: var(--shadow);
}
.cd-inst-name { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; overflow-wrap: anywhere; word-break: break-word; }
.cd-inst-role { font-size: .85rem; color: var(--primary); font-weight: 600; margin-bottom: 10px; overflow-wrap: anywhere; word-break: break-word; }
.cd-inst-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .82rem;
  color: var(--text-muted);
}
.cd-inst-stats span { display: flex; align-items: center; gap: 5px; }
.cd-inst-stats i    { color: var(--primary); }
.cd-inst-bio { font-size: .9rem; color: var(--text-muted); line-height: 1.85; padding-top: 4px; overflow-wrap: anywhere; word-break: break-word; max-width: 100%; }

/* Multiple instructor cards separator */
.cd-instructor-card + .cd-instructor-card {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border-light);
}

/* ---- Reviews ---- */
.cd-review-summary {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 32px;
  padding: 28px;
  background: var(--bg-light);
  border-radius: var(--radius);
  flex-wrap: wrap;
}

.cd-rev-score { text-align: center; min-width: 90px; }
.cd-rev-big   { font-size: 3.5rem; font-weight: 800; color: var(--warning); line-height: 1; }
.cd-rev-stars { color: var(--warning); font-size: 1.1rem; margin: 6px 0; }
.cd-rev-label { font-size: .78rem; color: var(--text-muted); }

.cd-rev-bars  { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.cd-rev-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  color: var(--text-muted);
}
.cd-rev-bar-label { min-width: 36px; color: var(--text-dark); font-size: .85rem; }
.cd-rev-bar-track { flex: 1; height: 8px; background: var(--border); border-radius: var(--radius-full); overflow: hidden; }
.cd-rev-bar-fill  { height: 100%; background: var(--warning); border-radius: var(--radius-full); }
.cd-rev-bar-pct   { min-width: 36px; text-align: right; font-size: .78rem; }

.cd-reviews-list { display: flex; flex-direction: column; gap: 24px; }
.cd-review-item  {
  display: flex;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  min-width: 0;
  overflow: hidden;
}
.cd-review-item:last-child { border-bottom: none; padding-bottom: 0; }
.cd-rev-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.cd-rev-body { flex: 1; min-width: 0; overflow: hidden; }
.cd-rev-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.cd-rev-header strong { font-size: .92rem; color: var(--text-dark); overflow-wrap: anywhere; word-break: break-word; }
.cd-rev-date { font-size: .78rem; color: var(--text-muted); }
.cd-rev-stars-small { color: var(--warning); font-size: .8rem; margin-bottom: 8px; }
.cd-rev-body p { font-size: .87rem; color: var(--text-muted); line-height: 1.7; overflow-wrap: anywhere; word-break: break-word; }

/* ---- Right Sidebar ---- */
.cd-sidebar { position: sticky; top: 100px; }
.cd-sidebar-card .cd-card-body { padding: 28px; }

/* ---- Related Courses ---- */
.cd-related { background: var(--bg-white); overflow: hidden; }
.cd-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.cd-related-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(0,150,199,.08);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0,150,199,.07);
}
.cd-related-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,150,199,.16); }

.cd-rel-img-wrap { overflow: hidden; }
.cd-rel-img-wrap img { width: 100%; height: 170px; object-fit: cover; transition: var(--transition-slow); display: block; }
.cd-related-card:hover .cd-rel-img-wrap img { transform: scale(1.06); }

.cd-rel-body  { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.cd-rel-cat   { font-size: .72rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.cd-rel-body h4 { font-size: .95rem; font-weight: 700; line-height: 1.35; margin-bottom: 10px; color: var(--text-dark); flex: 1; overflow-wrap: anywhere; word-break: break-word; }
.cd-rel-meta  { display: flex; gap: 12px; font-size: .78rem; color: var(--text-muted); margin-bottom: 12px; }
.cd-rel-meta i { color: var(--primary); margin-right: 3px; }
.cd-rel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}
.cd-rel-price  { font-size: .98rem; font-weight: 800; color: var(--primary); }
.cd-rel-rating { font-size: .82rem; font-weight: 600; color: var(--warning); display: flex; align-items: center; gap: 4px; }

/* ---- Mobile Sticky Bar ---- */
.cd-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  z-index: 900;
  box-shadow: 0 -4px 20px rgba(0,0,0,.12);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transform: translateY(100%);
  transition: transform .3s ease;
}
.cd-mobile-bar.visible { transform: translateY(0); }
.cd-mobile-bar-price   { display: flex; flex-direction: column; }
.cd-mobile-bar #cdMobilePrice { font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.cd-mobile-bar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.cd-mobile-brochure    { width: auto; margin-bottom: 0; padding: 11px 16px; font-size: .82rem; white-space: nowrap; }

/* ================================================================
   COURSE DETAILS STYLE VARIANTS (ADMIN SWITCHABLE)
   style-1 = default
================================================================ */

/* ---- Style 2: Cinematic Split (card-first hero, dark dashboard body) ---- */
body.course-details-style-2 .cd-hero {
  min-height: 640px;
  padding-top: 110px;
}
body.course-details-style-2 .cd-hero-overlay {
  background: linear-gradient(110deg, rgba(2,6,23,.95) 0%, rgba(15,23,42,.88) 45%, rgba(30,41,59,.55) 100%);
}
body.course-details-style-2 .cd-hero-inner {
  grid-template-columns: 430px minmax(0, 1fr);
  gap: 44px;
}
body.course-details-style-2 #cdEnrollCard { order: -1; }
body.course-details-style-2 .cd-main,
body.course-details-style-2 .cd-related { background: #0b1220; }
body.course-details-style-2 .cd-stats-bar {
  background: transparent;
  margin-top: -22px;
  position: relative;
  z-index: 5;
}
body.course-details-style-2 .cd-stats-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
body.course-details-style-2 .cd-stat {
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 14px;
  background: rgba(15,23,42,.84);
  backdrop-filter: blur(8px);
  padding: 18px 16px;
}
body.course-details-style-2 .cd-section,
body.course-details-style-2 .cd-tabs,
body.course-details-style-2 .cd-enroll-card,
body.course-details-style-2 .cd-sidebar-card,
body.course-details-style-2 .cd-related-card,
body.course-details-style-2 .cd-review-summary {
  background: #111827;
  border: 1px solid rgba(148,163,184,.24);
  box-shadow: 0 12px 30px rgba(2,6,23,.45);
}
body.course-details-style-2 .cd-tab {
  color: #93a4bc;
  border-bottom-width: 2px;
}
body.course-details-style-2 .cd-tab.active {
  color: #67e8f9;
  background: rgba(56,189,248,.11);
  border-bottom-color: #22d3ee;
}
body.course-details-style-2 .cd-section-title,
body.course-details-style-2 .cd-rel-body h4,
body.course-details-style-2 .cd-inst-name,
body.course-details-style-2 .cd-module-head,
body.course-details-style-2 .rv-list-heading,
body.course-details-style-2 .rv-card-title,
body.course-details-style-2 .rv-card-name { color: #e5e7eb; }
body.course-details-style-2 .cd-description p,
body.course-details-style-2 .cd-req-list li,
body.course-details-style-2 .cd-learn-item,
body.course-details-style-2 .cd-outcome-item,
body.course-details-style-2 .cd-module-body li,
body.course-details-style-2 .cd-inst-bio,
body.course-details-style-2 .cd-curr-summary,
body.course-details-style-2 .cd-rel-meta,
body.course-details-style-2 .rv-card-body,
body.course-details-style-2 .rv-card-date,
body.course-details-style-2 .cd-rev-body p { color: #cbd5e1; }
body.course-details-style-2 .cd-outcome-item,
body.course-details-style-2 .cd-learn-item,
body.course-details-style-2 .cd-module,
body.course-details-style-2 .rv-card,
body.course-details-style-2 .rv-write-card { border-color: rgba(148,163,184,.24); background: rgba(15,23,42,.56); }

/* ---- Style 3: Minimal Editorial (single-column narrative) ---- */
body.course-details-style-3 .cd-hero {
  min-height: auto;
  padding: 110px 0 56px;
}
body.course-details-style-3 .cd-hero-overlay {
  background: linear-gradient(120deg, rgba(15,23,42,.82) 0%, rgba(51,65,85,.58) 100%);
}
body.course-details-style-3 .cd-hero-inner {
  grid-template-columns: 1fr;
  gap: 0;
}
body.course-details-style-3 #cdEnrollCard { display: none !important; }
body.course-details-style-3 .cd-hero-info {
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
}
body.course-details-style-3 .cd-stats-bar {
  background: #fff;
  border-top: 0;
  border-bottom: 1px solid #e2e8f0;
}
body.course-details-style-3 .cd-stats-inner {
  justify-content: space-between;
}
body.course-details-style-3 .cd-stat {
  border-right: 0;
  padding: 16px 10px;
  min-width: 100px;
}
body.course-details-style-3 .cd-stat > i { color: #334155; font-size: 1rem; }
body.course-details-style-3 .cd-stat strong { color: #0f172a; font-size: 1rem; }
body.course-details-style-3 .cd-stat span { color: #64748b; }
body.course-details-style-3 .cd-main,
body.course-details-style-3 .cd-related { background: #fff; }
body.course-details-style-3 .cd-content-layout {
  grid-template-columns: minmax(0,1fr) 320px;
  gap: 26px;
}
body.course-details-style-3 .cd-sidebar {
  display: block;
  top: 92px;
}
body.course-details-style-3 .cd-sidebar-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(2,6,23,.08);
}
body.course-details-style-3 .cd-sidebar-card .cd-card-body {
  padding: 22px;
}
body.course-details-style-3 .cd-btn-main,
body.course-details-style-3 .cd-btn-secondary,
body.course-details-style-3 .cd-btn-brochure {
  border-radius: 8px;
}
body.course-details-style-3 .cd-tabs {
  position: static;
  border-radius: 0;
  box-shadow: none;
  border: 1px solid #e2e8f0;
}
body.course-details-style-3 .cd-tab {
  border-bottom-width: 2px;
  background: #fff;
}
body.course-details-style-3 .cd-tab.active {
  background: #fff;
  color: #0f172a;
  border-bottom-color: #0f172a;
}
body.course-details-style-3 .cd-section {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 0;
  padding: 26px 0;
}
body.course-details-style-3 .cd-section:last-child { border-bottom: 0; }
body.course-details-style-3 .cd-section-title {
  border-bottom: 0;
  margin-bottom: 16px;
  padding-bottom: 0;
}
body.course-details-style-3 .cd-section-title i {
  background: #f1f5f9;
  color: #334155;
}
body.course-details-style-3 .cd-learn-item,
body.course-details-style-3 .cd-outcome-item,
body.course-details-style-3 .cd-module,
body.course-details-style-3 .rv-summary-bar,
body.course-details-style-3 .rv-write-card,
body.course-details-style-3 .rv-card,
body.course-details-style-3 .cd-related-card {
  border-radius: 8px;
  box-shadow: none;
}

/* ---- Style 4: Sidebar-First Workspace (left tools rail + card blocks) ---- */
body.course-details-style-4 .cd-hero-overlay {
  background: linear-gradient(120deg, rgba(8,47,73,.82) 0%, rgba(76,29,149,.68) 45%, rgba(15,118,110,.58) 100%);
}
body.course-details-style-4 .cd-main,
body.course-details-style-4 .cd-related {
  background: linear-gradient(180deg, #eff6ff 0%, #ecfeff 50%, #f8fafc 100%);
}
body.course-details-style-4 .cd-content-layout {
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 26px;
}
body.course-details-style-4 .cd-sidebar {
  order: -1;
  top: 90px;
}
body.course-details-style-4 .cd-body { order: 1; }
body.course-details-style-4 .cd-tabs {
  border-radius: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
  padding: 10px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.course-details-style-4 .cd-tab {
  border-radius: 12px;
  border-bottom: 0;
  padding: 14px 12px;
}
body.course-details-style-4 .cd-tab.active {
  background: rgba(14,116,144,.12);
  color: #0e7490;
  box-shadow: inset 0 0 0 1px rgba(8,145,178,.25);
}
body.course-details-style-4 .cd-section,
body.course-details-style-4 .cd-enroll-card,
body.course-details-style-4 .cd-sidebar-card,
body.course-details-style-4 .cd-related-card,
body.course-details-style-4 .rv-summary-bar,
body.course-details-style-4 .rv-write-card,
body.course-details-style-4 .rv-card {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(148,163,184,.3);
  box-shadow: 0 12px 34px rgba(15,23,42,.14);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body.course-details-style-4 #tab-overview.active {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 16px;
}
body.course-details-style-4 #tab-overview.active .cd-section {
  margin-bottom: 0;
  height: 100%;
}
body.course-details-style-4 #tab-overview.active .cd-section:last-child {
  grid-column: 1 / -1;
}

/* ---- Style 5: Magazine Flow (centered hero + horizontal stats cards) ---- */
body.course-details-style-5 .cd-hero {
  min-height: auto;
  padding: 120px 0 62px;
}
body.course-details-style-5 .cd-hero-overlay {
  background: linear-gradient(105deg, rgba(120,53,15,.9) 0%, rgba(154,52,18,.78) 55%, rgba(180,83,9,.52) 100%);
}
body.course-details-style-5 .cd-hero-inner {
  grid-template-columns: 1fr;
  gap: 24px;
}
body.course-details-style-5 .cd-hero-info {
  max-width: 900px;
}
body.course-details-style-5 #cdEnrollCard {
  width: min(760px, 100%);
  margin: 0 auto;
}
body.course-details-style-5 .cd-stats-bar {
  background: transparent;
  margin-top: -16px;
  position: relative;
  z-index: 4;
}
body.course-details-style-5 .cd-stats-inner {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px,1fr));
  gap: 10px;
}
body.course-details-style-5 .cd-stat {
  border-right: 0;
  border-radius: 14px;
  background: #fffdf8;
  border: 1px solid #fed7aa;
  padding: 14px 12px;
}
body.course-details-style-5 .cd-stat > i { color: #b45309; font-size: 1.05rem; }
body.course-details-style-5 .cd-stat strong { color: #7c2d12; font-size: 1rem; }
body.course-details-style-5 .cd-stat span { color: #9a3412; opacity: .75; }
body.course-details-style-5 .cd-main,
body.course-details-style-5 .cd-related {
  background: #fff7ed;
}
body.course-details-style-5 .cd-content-layout {
  grid-template-columns: 1fr 330px;
  gap: 30px;
}
body.course-details-style-5 .cd-tabs {
  background: #7c2d12;
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 8px 20px rgba(124,45,18,.22);
}
body.course-details-style-5 .cd-tab {
  color: rgba(255,255,255,.72);
  border-radius: 12px;
  border-bottom: 0;
}
body.course-details-style-5 .cd-tab.active {
  background: #fff;
  color: #9a3412;
}
body.course-details-style-5 .cd-section,
body.course-details-style-5 .cd-enroll-card,
body.course-details-style-5 .cd-sidebar-card,
body.course-details-style-5 .cd-related-card,
body.course-details-style-5 .rv-summary-bar,
body.course-details-style-5 .rv-write-card,
body.course-details-style-5 .rv-card {
  background: #fffdf8;
  border: 1px solid #fed7aa;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(154,52,18,.12);
}
body.course-details-style-5 .cd-section-title {
  border-bottom-color: #fed7aa;
}
body.course-details-style-5 .cd-section-title i,
body.course-details-style-5 .cd-outcome-item i {
  color: #c2410c;
  background: rgba(251,146,60,.15);
}
body.course-details-style-5 .cd-price,
body.course-details-style-5 .cd-rel-price {
  color: #b45309;
}

/* ---- Cross-style Professional Polish (styles 2-5) ---- */
body.course-details-style-2 .cd-section,
body.course-details-style-3 .cd-section,
body.course-details-style-4 .cd-section,
body.course-details-style-5 .cd-section {
  transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}
body.course-details-style-2 .cd-section:hover,
body.course-details-style-4 .cd-section:hover,
body.course-details-style-5 .cd-section:hover {
  transform: translateY(-2px);
}
body.course-details-style-2 .cd-section-title,
body.course-details-style-3 .cd-section-title,
body.course-details-style-4 .cd-section-title,
body.course-details-style-5 .cd-section-title {
  font-size: 1.14rem;
  letter-spacing: .01em;
}
body.course-details-style-2 .cd-btn-main,
body.course-details-style-3 .cd-btn-main,
body.course-details-style-4 .cd-btn-main,
body.course-details-style-5 .cd-btn-main {
  font-size: .95rem;
  font-weight: 700;
}
body.course-details-style-2 .cd-related-card,
body.course-details-style-4 .cd-related-card,
body.course-details-style-5 .cd-related-card {
  overflow: hidden;
}

/* ---- Variant Responsive Safety ---- */
@media (max-width: 1180px) {
  body.course-details-style-2 .cd-hero-inner { grid-template-columns: 1fr; }
  body.course-details-style-2 #cdEnrollCard { order: 2; max-width: 480px; }
  body.course-details-style-2 .cd-stats-inner { grid-template-columns: repeat(2, minmax(0,1fr)); }

  body.course-details-style-3 .cd-content-layout { grid-template-columns: 1fr; }
  body.course-details-style-3 .cd-sidebar { display: none; }
  body.course-details-style-3 .cd-mobile-bar { display: flex !important; }

  body.course-details-style-4 .cd-content-layout { grid-template-columns: 1fr; }
  body.course-details-style-4 .cd-sidebar { order: 2; }
  body.course-details-style-4 .cd-body { order: 1; }
  body.course-details-style-4 #tab-overview.active { grid-template-columns: 1fr; }

  body.course-details-style-5 .cd-stats-inner { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 768px) {
  body.course-details-style-2 .cd-stats-inner,
  body.course-details-style-5 .cd-stats-inner { grid-template-columns: repeat(2, minmax(0,1fr)); }
  body.course-details-style-2 .cd-stat,
  body.course-details-style-5 .cd-stat { min-width: 0; }
  body.course-details-style-4 .cd-tabs { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  body.course-details-style-2 .cd-stats-inner,
  body.course-details-style-5 .cd-stats-inner { grid-template-columns: 1fr; }
}

/* ================================================================
   RESPONSIVE
================================================================ */

/* ---- Tablet landscape / large tablet (≤1080px) ---- */
@media (max-width: 1080px) {
  .cd-content-layout { grid-template-columns: minmax(0, 1fr); }
  .cd-sidebar { display: none; }
  .cd-mobile-bar { display: flex; }

  .cd-hero-inner { grid-template-columns: minmax(0, 1fr); }
  .cd-enroll-card { display: none; }
  .cd-hero { padding-bottom: 80px; }

  .cd-outcomes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cd-related-grid  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Tablet portrait (≤768px) ---- */
@media (max-width: 768px) {
  .cd-title { font-size: 1.6rem; }
  .cd-desc  { font-size: .93rem; }

  .cd-stats-inner { flex-wrap: wrap; }
  .cd-stat {
    min-width: calc(50% - 1px);
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }

  .cd-learn-grid    { grid-template-columns: minmax(0, 1fr); }
  .cd-outcomes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cd-related-grid  { grid-template-columns: minmax(0, 1fr); }

  .cd-tabs        { position: static; border-radius: var(--radius); }
  .cd-tab         { font-size: .80rem; padding: 12px 14px; }
  .cd-section     { padding: 20px 16px; }
  .cd-section-title { font-size: 1rem; }

  .cd-inst-top    { flex-direction: column; align-items: center; text-align: center; }
  .cd-inst-stats  { justify-content: center; }

  .cd-review-summary { flex-direction: column; align-items: flex-start; }
  .cd-rev-bars       { width: 100%; min-width: 0; }
  .cd-rev-bar-track  { min-width: 0; }

  .cd-hero-inner  { grid-template-columns: minmax(0, 1fr); }
  .cd-enroll-card { display: none; }
  .cd-mobile-bar  { display: flex; }

  .cd-card-body   { padding: 18px; }
  .cd-price       { font-size: 1.5rem; }

  .cd-module-head { padding: 14px 16px; font-size: .88rem; }
}

/* ---- Mobile (≤480px) ---- */
@media (max-width: 480px) {
  .cd-hero        { padding: 90px 0 40px; min-height: auto; }
  .cd-title       { font-size: 1.3rem; }
  .cd-desc        { font-size: .88rem; }

  .cd-main        { padding: 40px 0 60px; }
  .cd-section     { padding: 18px 14px; margin-bottom: 16px; }
  .cd-section-title { font-size: .95rem; gap: 8px; }
  .cd-section-title i { padding: 6px; }

  .cd-outcomes-grid { grid-template-columns: minmax(0, 1fr); }

  .cd-stat        { min-width: 50%; padding: 14px 12px; }
  .cd-stat strong { font-size: .92rem; }
  .cd-stat span   { font-size: .70rem; }

  .cd-module-head { font-size: .82rem; padding: 12px 14px; }
  .cd-module-meta { font-size: .74rem; }

  .cd-tabs        { margin-bottom: 20px; }
  .cd-tab         { font-size: .76rem; padding: 11px 12px; }

  .cd-inst-initials,
  .cd-inst-avatar { width: 72px; height: 72px; font-size: 1.2rem; }

  .cd-rev-big     { font-size: 2.8rem; }
  .cd-rev-avatar  { width: 38px; height: 38px; }

  .cd-mobile-bar  { padding: 12px 16px; }
  .cd-mobile-bar #cdMobilePrice { font-size: 1.05rem; }

  .cd-related-grid { gap: 16px; }
  .cd-rel-img-wrap img { height: 150px; }

  .cd-curr-summary { font-size: .82rem; }
  .cd-module-body li { font-size: .82rem; }
}
