/* ============================================================
   COURSE SHOW — Training Institute Design
   White cards, light borders, subtle shadows, 2-column layout
   ============================================================ */

:root {
  --cs-bg: #f8f9fa;
  --cs-card-bg: #ffffff;
  --cs-primary: #2d5487;
  --cs-primary-dark: #1a3a5c;
  --cs-primary-rgb: 45, 84, 135;
  --cs-accent: #f59e0b;
  --cs-success: #10b981;
  --cs-danger: #ef4444;
  --cs-orange: #f97316;
  --cs-orange-light: #fff7ed;
  --cs-orange-border: #fed7aa;
  --cs-text: #1e293b;
  --cs-text-secondary: #475569;
  --cs-text-muted: #94a3b8;
  --cs-border: #e2e8f0;
  --cs-border-light: #f1f5f9;
  --cs-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --cs-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --cs-radius: 8px;
  --cs-radius-lg: 12px;
  --cs-transition: 0.25s ease;
}

/* ===== PAGE CONTAINER ===== */
.cs-course-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 90px 20px 60px;
}

.cs-course-page > * + * {
  margin-top: 20px;
}

/* ===== BLOCKS (every section is a .cs-block) ===== */
.cs-block {
  /* base */
}

/* ===== COURSE IMAGE (full-width within main content) ===== */
.cs-block-image {
  line-height: 0;
}

.cs-image-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* ===== TITLE & META ===== */
.cs-image-title {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 800;
  color: var(--cs-text);
  line-height: 1.35;
  margin: 0 0 10px;
}

.cs-image-info-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--cs-text-secondary);
  font-weight: 500;
}

.cs-image-info-row i {
  width: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--cs-primary);
}

.cs-image-instructor,
.cs-image-rating,
.cs-image-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ===== SECTION CARDS (main content) ===== */
.cs-section-card {
  background: var(--cs-card-bg);
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius-lg);
  padding: 24px;
  box-shadow: var(--cs-shadow-sm);
}

.cs-section-card + .cs-section-card {
  margin-top: 16px;
}

.cs-section-title {
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 800;
  color: var(--cs-primary);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.3;
}

.cs-section-title i {
  font-size: 16px;
}

.cs-empty {
  color: var(--cs-text-muted);
  font-size: 14px;
  padding: 12px 0;
}

/* ===== SIDEBAR WRAPPER ===== */
.cs-sidebar-wrap > * + * {
  margin-top: 16px;
}

/* ===== SIDEBAR CARDS ===== */
.cs-sidebar-card {
  background: var(--cs-card-bg);
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  padding: 18px 20px;
  box-shadow: var(--cs-shadow-sm);
}

.cs-sidebar-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--cs-primary);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-sidebar-card-title i {
  font-size: 14px;
}

/* ===== SIDEBAR LIST (Features, Target Audience) ===== */
.cs-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-sidebar-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--cs-text-secondary);
  line-height: 1.4;
}

.cs-sidebar-list li i {
  flex-shrink: 0;
  font-size: 14px;
  color: var(--cs-primary);
}

/* ===== PRICE CARD (sidebar) ===== */
.cs-price-card {
  background: var(--cs-card-bg);
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  padding: 22px 20px;
  box-shadow: var(--cs-shadow-sm);
}

.cs-price-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.cs-old-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--cs-text-muted);
  text-decoration: line-through;
}

.cs-old-price small {
  font-size: 0.7em;
  font-weight: 600;
}

.cs-discount-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--cs-danger);
  font-size: 12px;
  font-weight: 800;
  border-radius: 20px;
  line-height: 1.3;
}

.cs-price-current {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 900;
  color: var(--cs-text);
  line-height: 1.15;
  margin-bottom: 16px;
}

.cs-price-current small {
  font-size: 0.4em;
  font-weight: 700;
  color: var(--cs-text-muted);
  margin-right: 4px;
}

.cs-price-free {
  color: var(--cs-success);
  font-size: 22px;
}

.cs-price-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== COUPON SECTION (sidebar) ===== */
.cs-coupon-section {
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: var(--cs-radius);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.cs-coupon-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 10px;
}

.cs-coupon-header i {
  color: #d97706;
  font-size: 14px;
}

.cs-coupon-body {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cs-coupon-code {
  font-family: 'Tajawal', monospace;
  font-size: 15px;
  font-weight: 900;
  color: #92400e;
  background: rgba(255, 255, 255, 0.7);
  border: 2px dashed #d97706;
  border-radius: 6px;
  padding: 6px 14px;
  letter-spacing: 2px;
  direction: ltr;
  flex: 1;
  text-align: center;
}

.cs-coupon-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  background: #d97706;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--cs-transition);
  white-space: nowrap;
}

.cs-coupon-copy:hover {
  background: #b45309;
}

.cs-coupon-copy.cs-copied {
  background: var(--cs-success);
}

/* ===== QUICK INFO GRID (sidebar) ===== */
.cs-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cs-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--cs-border-light);
  border-radius: var(--cs-radius);
}

.cs-info-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cs-card-bg);
  border-radius: 8px;
  font-size: 14px;
  color: var(--cs-primary);
  flex-shrink: 0;
  border: 1px solid var(--cs-border);
}

.cs-info-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cs-info-label {
  font-size: 10px;
  color: var(--cs-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.cs-info-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--cs-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== COUNTDOWN (sidebar) ===== */
.cs-countdown-card {
  background: var(--cs-orange-light);
  border: 1px solid var(--cs-orange-border);
  border-radius: var(--cs-radius);
  padding: 18px 16px;
  text-align: center;
}

.cs-countdown-label {
  font-size: 13px;
  font-weight: 700;
  color: #9a3412;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cs-countdown-label i {
  color: var(--cs-orange);
}

.cs-countdown-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.cs-cd-unit {
  background: var(--cs-orange);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 54px;
  text-align: center;
}

.cs-cd-num {
  display: block;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  direction: ltr;
}

.cs-cd-label {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 4px;
  font-weight: 600;
}

.cs-course-started {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #9a3412;
  padding: 4px 0;
}

/* ===== DESCRIPTION BODY ===== */
.cs-desc-body {
  font-size: 14px;
  color: var(--cs-text-secondary);
  line-height: 1.9;
  overflow-wrap: break-word;
  word-break: break-word;
}

.cs-desc-body p:last-child {
  margin-bottom: 0;
}

.cs-desc-body h1,
.cs-desc-body h2,
.cs-desc-body h3,
.cs-desc-body h4,
.cs-desc-body h5,
.cs-desc-body h6 {
  margin: 20px 0 10px;
  font-weight: 700;
  color: var(--cs-primary);
}

.cs-desc-body h2 { font-size: clamp(17px, 2vw, 20px); }
.cs-desc-body h3 { font-size: clamp(15px, 1.5vw, 17px); }
.cs-desc-body p { margin: 0 0 12px; }
.cs-desc-body ul,
.cs-desc-body ol { padding-right: 22px; margin-bottom: 12px; }
.cs-desc-body li { margin-bottom: 6px; }
.cs-desc-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--cs-radius);
  margin: 12px 0;
}
.cs-desc-body blockquote {
  border-right: 4px solid var(--cs-primary);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--cs-border-light);
  border-radius: 0 var(--cs-radius) var(--cs-radius) 0;
  font-style: italic;
  color: var(--cs-text-secondary);
  line-height: 1.9;
}
.cs-desc-body a {
  color: var(--cs-primary);
  text-decoration: underline;
  word-break: break-all;
}
.cs-desc-body a:hover {
  color: var(--cs-primary-dark);
}
.cs-desc-body strong,
.cs-desc-body b {
  font-weight: 700;
  color: var(--cs-text);
}

.cs-video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 16px 0;
  border-radius: var(--cs-radius);
}

.cs-video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--cs-radius);
}

/* ===== TABS (underline style) ===== */
.cs-tabs-nav {
  display: flex;
  border-bottom: 2px solid var(--cs-border);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 0;
}

.cs-tab-btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: var(--cs-text-muted);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color var(--cs-transition), border-color var(--cs-transition);
  white-space: nowrap;
  text-align: center;
  flex-shrink: 0;
}

.cs-tab-btn:hover {
  color: var(--cs-primary);
}

.cs-tab-btn.active {
  color: var(--cs-primary);
  border-bottom-color: var(--cs-primary);
}

.cs-tab-panel {
  display: none;
  animation: csFadeIn 0.3s ease forwards;
}

.cs-tab-panel.active {
  display: block;
}

@keyframes csFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== TOPICS LIST ===== */
.cs-topic-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cs-topic-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--cs-border-light);
  border-radius: var(--cs-radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--cs-text);
  line-height: 1.4;
}

.cs-topic-list li i {
  flex-shrink: 0;
  color: var(--cs-primary);
  font-size: 15px;
}

/* ===== ACCORDION (Content) ===== */
.cs-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-acc-item {
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  overflow: hidden;
  background: var(--cs-card-bg);
  transition: border-color var(--cs-transition);
}

.cs-acc-item.open {
  border-color: rgba(var(--cs-primary-rgb), 0.2);
}

.cs-acc-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cs-text);
  background: var(--cs-border-light);
  cursor: pointer;
  font-family: inherit;
  text-align: right;
  border: none;
  transition: background var(--cs-transition);
  gap: 12px;
}

.cs-acc-header:hover {
  background: var(--cs-border);
}

.cs-acc-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-acc-title i {
  color: var(--cs-primary);
  flex-shrink: 0;
  font-size: 14px;
}

.cs-acc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.cs-acc-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--cs-text-muted);
  background: var(--cs-card-bg);
  border-radius: 20px;
  padding: 2px 10px;
  white-space: nowrap;
}

.cs-acc-icon {
  transition: transform var(--cs-transition);
  color: var(--cs-text-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.cs-acc-item.open .cs-acc-icon {
  transform: rotate(180deg);
}

.cs-acc-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 18px;
}

.cs-acc-item.open .cs-acc-body {
  /* max-height set by JS */
}

.cs-lesson {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--cs-text);
  border-bottom: 1px solid var(--cs-border-light);
  transition: all 0.2s;
  min-height: 44px;
}

.cs-lesson:last-child {
  border-bottom: none;
}

.cs-lesson:hover {
  background: var(--cs-border-light);
  margin: 0 -18px;
  padding: 12px 18px;
}

.cs-lesson-locked {
  color: var(--cs-text-muted);
}

.cs-lesson i {
  color: var(--cs-primary);
  font-size: 13px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.cs-lesson-locked i {
  color: var(--cs-text-muted);
}

.cs-lesson a {
  color: inherit;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.cs-lesson-empty {
  padding: 14px 0;
  font-size: 13px;
  color: var(--cs-text-muted);
}

.cs-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.cs-badge-paid {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
}

.cs-badge-exam {
  background: rgba(var(--cs-primary-rgb), 0.1);
  color: var(--cs-primary);
}

/* ===== REVIEWS ===== */
.cs-reviews-summary {
  text-align: center;
  padding: 28px 20px;
  background: var(--cs-border-light);
  border-radius: var(--cs-radius);
  margin-bottom: 16px;
}

.cs-reviews-avg {
  font-size: 42px;
  font-weight: 900;
  color: var(--cs-text);
  line-height: 1;
}

.cs-reviews-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 8px 0;
  font-size: 18px;
  color: var(--cs-accent);
}

.cs-reviews-stars .cs-star-empty {
  color: var(--cs-border);
}

.cs-reviews-count {
  font-size: 13px;
  color: var(--cs-text-muted);
  font-weight: 500;
}

.cs-reviews-empty {
  text-align: center;
  padding: 36px 20px;
  color: var(--cs-text-muted);
}

.cs-reviews-empty i {
  font-size: 32px;
  color: var(--cs-border);
  margin-bottom: 10px;
  display: block;
}

.cs-reviews-empty p {
  font-size: 13px;
  margin: 0;
}

.cs-review-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--cs-border-light);
}

.cs-review-card:last-child {
  border-bottom: none;
}

.cs-review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.cs-review-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cs-review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.cs-review-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--cs-text);
  display: block;
}

.cs-review-date {
  font-size: 11px;
  color: var(--cs-text-muted);
}

.cs-review-stars {
  display: flex;
  gap: 2px;
  font-size: 13px;
  color: var(--cs-accent);
}

.cs-review-stars .star-filled {
  color: var(--cs-accent);
}

.cs-review-stars .fa-star:not(.star-filled) {
  color: var(--cs-border);
}

.cs-review-comment {
  font-size: 13px;
  color: var(--cs-text-muted);
  line-height: 1.7;
  margin: 0;
}

.cs-star-filled {
  color: var(--cs-accent);
}

/* ===== FAQ ===== */
.cs-faq {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-faq-item {
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius);
  overflow: hidden;
  transition: border-color var(--cs-transition);
  background: var(--cs-card-bg);
}

.cs-faq-item.open {
  border-color: rgba(var(--cs-primary-rgb), 0.2);
}

.cs-faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--cs-text);
  text-align: right;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all var(--cs-transition);
  min-height: 48px;
}

.cs-faq-q:hover {
  color: var(--cs-primary);
}

.cs-faq-item.open .cs-faq-q {
  color: var(--cs-primary);
}

.cs-faq-q span {
  flex: 1;
}

.cs-faq-icon {
  color: var(--cs-primary);
  font-size: 12px;
  transition: transform var(--cs-transition);
  flex-shrink: 0;
}

.cs-faq-item.open .cs-faq-icon {
  transform: rotate(90deg);
}

.cs-faq-a {
  font-size: 13px;
  color: var(--cs-text-secondary);
  line-height: 1.8;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 18px;
}

.cs-faq-item.open .cs-faq-a {
  /* max-height set by JS */
}

/* ===== SHARE (sidebar) ===== */
.cs-share-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cs-share-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background-color: #f1f5f9;
  color: var(--brand-color);
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cs-share-btn.facebook { --brand-color: #1877f2; }
.cs-share-btn.telegram { --brand-color: #0088cc; }
.cs-share-btn.whatsapp { --brand-color: #25d366; }
.cs-share-btn.twitter { --brand-color: #111827; }
.cs-share-btn.email { --brand-color: #ea4335; }

.cs-share-btn:hover {
  background-color: var(--brand-color);
  color: #ffffff;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 20px -6px var(--brand-color);
}

.cs-copy-link-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--cs-text-secondary);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.cs-copy-link-btn:hover {
  background: var(--cs-primary);
  color: #fff;
  border-color: var(--cs-primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px -6px var(--cs-primary);
}

/* ===== BUTTONS ===== */
.cs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: var(--cs-radius);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--cs-transition);
  white-space: nowrap;
  line-height: 1.3;
}

.cs-btn-block {
  width: 100%;
}

.cs-btn-primary {
  background: var(--cs-primary);
}

.cs-btn-primary:hover {
  background: var(--cs-primary-dark);
  transform: translateY(-1px);
}

.cs-btn-outline {
  background: transparent;
  color: var(--cs-primary);
  border: 2px solid var(--cs-primary);
}

.cs-btn-outline:hover {
  background: var(--cs-primary);
  color: #fff;
  transform: translateY(-1px);
}

/* ===== RELATED COURSES ===== */
.cs-related-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.cs-related-swiper {
  padding: 4px 0 32px;
  overflow: visible;
}

.cs-related-card {
  display: block;
  border: 1px solid var(--cs-border);
  border-radius: var(--cs-radius-lg);
  overflow: hidden;
  text-decoration: none;
  color: var(--cs-text);
  background: var(--cs-card-bg);
  transition: all var(--cs-transition);
  height: 100%;
}

.cs-related-card:hover {
  border-color: var(--cs-primary);
  box-shadow: 0 4px 16px rgba(var(--cs-primary-rgb), 0.10);
  transform: translateY(-2px);
}

.cs-related-img {
  height: 150px;
  overflow: hidden;
  background: var(--cs-border-light);
}

.cs-related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.cs-related-card:hover .cs-related-img img {
  transform: scale(1.05);
}

.cs-related-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cs-related-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--cs-text);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cs-related-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-related-meta span {
  font-size: 12px;
  color: var(--cs-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cs-related-meta span i {
  color: var(--cs-primary);
  font-size: 11px;
  width: 14px;
  text-align: center;
}

.cs-related-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--cs-primary);
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--cs-border);
}

.cs-related-price span {
  font-size: 11px;
  font-weight: 600;
}

.cs-related-free {
  color: var(--cs-success);
}

.swiper-pagination {
  position: relative;
  margin-top: 14px;
}

.swiper-pagination-bullet-active {
  background: var(--cs-primary);
}

/* ===== MOBILE STICKY BOTTOM BAR ===== */
.cs-mobile-sticky {
  display: none;
}

/* ============================================================
   DESKTOP LAYOUT (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
  .cs-course-page {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
    padding: 90px 20px 64px;
  }



  .cs-course-page > * + * {
    margin-top: 0;
  }

  /* Main content column items */
  .cs-block-image {
    grid-column: 1;
    grid-row: 2;
  }

  .cs-block-meta {
    grid-column: 1;
    grid-row: 1;
  }

  .cs-block-desc {
    grid-column: 1;
    grid-row: 3;
  }

  .cs-block-tabs {
    grid-column: 1;
    grid-row: 4;
  }

  .cs-block-faq {
    grid-column: 1;
    grid-row: 5;
  }

  /* Sidebar wrapper — placed in column 2, spans all rows */
  .cs-sidebar-wrap {
    grid-column: 2;
    grid-row: 1 / 6;
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-self: start;
  }

  .cs-sidebar-wrap > * + * {
    margin-top: 0;
  }
}

/* ============================================================
   TABLET & MOBILE (< 1024px)
   Flex layout with order for correct visual reordering
   ============================================================ */
@media (max-width: 1023px) {
  .cs-course-page {
    display: flex;
    flex-direction: column;
    padding: 80px 16px 48px;
  }

  .cs-block + .cs-block {
    margin-top: 0;
  }

  /* Sidebar wraps children into the flex flow */
  .cs-sidebar-wrap {
    display: contents;
  }

  /* Mobile order */
  .cs-block           { order: 6; }
  .cs-block-image     { order: 2; }
  .cs-block-meta      { order: 1; }
  .cs-block-price     { order: 3; }
  .cs-block-info      { order: 4; }
  .cs-block-countdown { order: 5; }
  .cs-block-desc      { order: 7; }
  .cs-block-tabs      { order: 8; }
  .cs-block-faq       { order: 9; }
  .cs-block-share     { order: 10; }

  .cs-block {
    margin-top: 16px;
  }
  .cs-block:first-child {
    margin-top: 0;
  }

  .cs-topic-list {
    grid-template-columns: 1fr;
  }

  .cs-info-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================================
   MOBILE (0–767px)
   ============================================================ */
@media (max-width: 767px) {
  .cs-course-page {
    padding: 70px 12px 80px;
  }

  .cs-block + .cs-block {
    margin-top: 0;
  }

  .cs-block {
    margin-top: 14px;
  }

  .cs-image-title {
    font-size: 18px;
  }

  .cs-image-info-row {
    gap: 12px;
    font-size: 12px;
  }

  .cs-section-card {
    padding: 18px 16px;
  }

  .cs-section-card + .cs-section-card {
    margin-top: 12px;
  }

  .cs-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .cs-info-item {
    padding: 10px;
  }

  .cs-topic-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .cs-topic-list li {
    padding: 10px 12px;
    font-size: 12px;
  }

  .cs-tabs-nav {
    margin-bottom: 16px;
  }

  .cs-tab-btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  .cs-price-card {
    padding: 18px 16px;
  }

  .cs-acc-header {
    padding: 12px 14px;
    font-size: 12px;
  }

  .cs-acc-body {
    padding: 0 14px;
  }

  .cs-lesson {
    padding: 10px 0;
    font-size: 12px;
    min-height: 40px;
  }

  .cs-lesson:hover {
    margin: 0 -14px;
    padding: 10px 14px;
  }

  .cs-countdown-card {
    padding: 14px 12px;
  }

  .cs-cd-unit {
    padding: 8px 10px;
    min-width: 46px;
  }

  .cs-cd-num {
    font-size: 18px;
  }

  .cs-sidebar-card {
    padding: 14px 16px;
  }

  .cs-faq-q {
    padding: 12px 14px;
    font-size: 12px;
    min-height: 44px;
  }

  .cs-faq-a {
    padding: 0 14px;
  }

  .cs-share-row {
    justify-content: center;
  }

  .cs-reviews-summary {
    padding: 24px 16px;
  }

  .cs-reviews-avg {
    font-size: 36px;
  }

  .cs-related-section {
    padding: 0 12px 32px;
  }

  .cs-related-img {
    height: 130px;
  }

  /* Mobile Sticky Bottom Bar */
  .cs-mobile-sticky {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--cs-card-bg);
    border-top: 1px solid var(--cs-border);
    padding: 12px 16px;
    gap: 12px;
    align-items: center;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  .cs-sticky-pricing {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    flex-shrink: 0;
  }

  .cs-sticky-price {
    font-size: 18px;
    font-weight: 900;
    color: var(--cs-text);
  }

  .cs-sticky-price.cs-sticky-free {
    color: var(--cs-success);
  }

  .cs-sticky-currency {
    font-size: 11px;
    color: var(--cs-text-muted);
    font-weight: 600;
  }

  .cs-sticky-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    background: var(--cs-primary);
    color: #fff;
    border: none;
    border-radius: var(--cs-radius);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--cs-transition);
    white-space: nowrap;
  }

  .cs-sticky-btn:active {
    transform: scale(0.97);
  }
}

/* ============================================================
   SMALL MOBILE (0–480px)
   ============================================================ */
@media (max-width: 480px) {
  .cs-course-page {
    padding: 60px 10px 80px;
  }

  .cs-image-title {
    font-size: 16px;
  }

  .cs-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .cs-info-item {
    padding: 8px;
    gap: 8px;
  }

  .cs-info-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .cs-info-value {
    font-size: 11px;
  }

  .cs-cd-unit {
    min-width: 40px;
    padding: 6px 8px;
  }

  .cs-cd-num {
    font-size: 16px;
  }

  .cs-mobile-sticky {
    padding: 10px 12px;
    gap: 10px;
  }

  .cs-sticky-price {
    font-size: 16px;
  }

  .cs-sticky-btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}

/* ===== ENROLL BUTTONS — FORCE WHITE TEXT ===== */
.cs-btn-primary,
.cs-btn-primary:link,
.cs-btn-primary:visited,
.cs-btn-primary:hover,
.cs-btn-primary:focus,
.cs-btn-primary:active,
.cs-btn-block,
.cs-btn-block:link,
.cs-btn-block:visited,
.cs-btn-block:hover,
.cs-btn-block:focus,
.cs-btn-block:active {
    color: #ffffff !important;
}
.cs-btn-primary i,
.cs-btn-primary svg,
.cs-btn-block i,
.cs-btn-block svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}
