/* ============================================================
   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(249,115,22,.18);
  color: var(--accent);
  border: 1px solid rgba(249,115,22,.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(26,60,143,.18);
  overflow: hidden;
  border: 1px solid rgba(26,60,143,.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(26,60,143,.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(26,60,143,.3);
}
.cd-btn-main:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(26,60,143,.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-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(26,60,143,.04); }
.cd-tab.active {
  color: var(--primary);
  background: rgba(26,60,143,.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(26,60,143,.07);
  padding: 36px;
  margin-bottom: 28px;
  border: 1px solid rgba(26,60,143,.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(26,60,143,.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(26,60,143,.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(26,60,143,.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(26,60,143,.05);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(26,60,143,.12);
}
.cd-outcome-item i {
  color: var(--primary);
  background: rgba(26,60,143,.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(26,60,143,.05); border-left-color: rgba(26,60,143,.3); }
.cd-module-head.open   { background: rgba(26,60,143,.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(26,60,143,.08);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(26,60,143,.07);
}
.cd-related-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(26,60,143,.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); }

/* ================================================================
   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; }
}
