/* ==========================================================================
   LeadMinds — single course page
   Source design: single-course.html   (all classes prefixed lm-s-)
   ========================================================================== */

.lm-s {
  width: 100%; flex: 0 0 100%; min-width: 0;
  --s-ink: #0E2727; --s-muted: #4C6161; --s-line: rgba(14, 39, 39, .08);
  --s-accent: #F37458; --s-accent-ink: #B8441F; --s-gold: #FABA3D; --s-navy: #0B2E4A;
  --s-bg: #F8FAFC;
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  color: var(--s-ink);
  background: var(--s-bg);
}
.lm-s *, .lm-s *::before, .lm-s *::after { box-sizing: border-box; }
.lm-s a { color: inherit; text-decoration: none; }
.lm-s ul { list-style: none; margin: 0; padding: 0; }
.lm-s img { max-width: 100%; display: block; }
.lm-s h1, .lm-s h2, .lm-s h3 { margin: 0; padding: 0; font-family: inherit; }
.lm-s h1::before, .lm-s h1::after, .lm-s h2::before, .lm-s h2::after, .lm-s h3::before, .lm-s h3::after { content: none; }
.lm-s-wrap { max-width: 1240px; margin: 0 auto; padding-inline: 40px; }

/* ---------- shared bits ---------- */
.lm-s-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.lm-s-bh { margin: 0 0 14px; font-size: 24px; font-weight: 700; line-height: 1.4; display: flex; align-items: center; gap: 10px; }
.lm-s-bh::before { content: ""; width: 4px; height: 20px; border-radius: 2px; background: var(--s-gold); flex: none; }
.lm-s-panel { background: #fff; border: 1px solid var(--s-line); border-radius: 16px; padding: 26px; }
.lm-s-block { margin: 0 0 32px; }
.lm-s-ben { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; }
.lm-s-ben li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.75; }
.lm-s-ben li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 3px; border-radius: 6px; background: rgba(243, 116, 88, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23B8441F' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center; }
.lm-s-desc { max-width: 70ch; font-size: 15.5px; line-height: 1.8; color: var(--s-muted); }
.lm-s-desc p { margin: 0 0 14px; }
.lm-s-desc ul { list-style: disc; padding-inline-start: 20px; margin: 0 0 14px; }
.lm-s-desc a { color: var(--s-accent-ink); text-decoration: underline; }

/* curriculum */
.lm-s-curric { border: 1px solid var(--s-line); border-radius: 16px; overflow: hidden; background: #fff; }
.lm-s-mod { border-top: 1px solid var(--s-line); }
.lm-s-mod:first-child { border-top: 0; }
.lm-s-mod > summary { list-style: none; cursor: pointer; min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 12px 18px; font-size: 15.5px; font-weight: 700; line-height: 1.55; }
.lm-s-mod > summary::-webkit-details-marker { display: none; }
.lm-s-mod-name { flex: 1; min-width: 0; }
.lm-s-mod-meta { flex: none; font-size: 12.5px; font-weight: 500; color: var(--s-muted); }
.lm-s-mod-chev { flex: none; color: rgba(14, 39, 39, .45); display: inline-flex; transition: transform .18s; }
.lm-s-mod[open] > summary .lm-s-mod-chev { transform: rotate(180deg); }
.lm-s-les { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 18px; border-top: 1px solid rgba(14, 39, 39, .05); background: var(--s-bg); font-size: 14px; font-weight: 500; line-height: 1.6; }
.lm-s-les svg { flex: none; color: #6B8080; }
.lm-s-lname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-s-ltime { flex: none; font-size: 12.5px; color: var(--s-muted); }
.lm-s-prev { flex: none; height: 24px; display: inline-flex; align-items: center; padding: 0 9px; background: rgba(250, 186, 61, .22); color: #6B4E06; border-radius: 7px; font-size: 11.5px; font-weight: 700; }

/* facts / buttons / side card */
.lm-s-facts { padding: 14px 0 0; border-top: 1px solid var(--s-line); display: flex; flex-direction: column; }
.lm-s-facts li { min-height: 44px; display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--s-muted); }
.lm-s-facts li + li { border-top: 1px solid rgba(14, 39, 39, .05); }
.lm-s-facts svg { flex: none; color: #6B8080; }
.lm-s-facts b { margin-inline-start: auto; font-weight: 700; color: var(--s-ink); }
.lm-s-cta { min-height: 52px; display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--s-accent); color: var(--s-ink); border-radius: 12px; font-size: 16px; font-weight: 700; border: 0; cursor: pointer; width: 100%; font-family: inherit; }
.lm-s-cta:hover { filter: brightness(.96); color: var(--s-ink); }
.lm-s-cta.is-disabled { background: #E4E8E8; color: #5A6B6B; cursor: default; }
.lm-s-out { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; background: #fff; border: 1.5px solid var(--s-navy); border-radius: 12px; font-size: 15px; font-weight: 700; color: var(--s-navy); cursor: pointer; font-family: inherit; }
.lm-s-sidecard { background: #fff; border: 1px solid var(--s-line); border-radius: 16px; padding: 20px; box-shadow: 0 12px 30px -22px rgba(14, 39, 39, .7); display: flex; flex-direction: column; gap: 14px; }
.lm-s-now { font-size: 30px; font-weight: 700; }
.lm-s-cur { font-size: 16px; font-weight: 600; }
.lm-s-old { font-size: 15px; font-weight: 500; color: #5F6F6D; }
.lm-s-dot { flex: none; width: 6px; height: 6px; margin-top: 10px; border-radius: 50%; background: var(--s-gold); }
.lm-s-plain { display: flex; flex-direction: column; gap: 10px; }
.lm-s-plain li { display: flex; gap: 10px; font-size: 14.5px; line-height: 1.75; color: var(--s-muted); }
.lm-s-stars { display: inline-flex; gap: 2px; color: var(--s-gold); }
.lm-s-share { flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--s-bg); border: 1px solid var(--s-line); border-radius: 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; color: var(--s-ink); }
.lm-s-installment { border: 1px solid rgba(250, 186, 61, .5); border-radius: 12px; padding: 14px; background: rgba(250, 186, 61, .10); display: flex; flex-direction: column; gap: 4px; }
.lm-s-date { min-height: 48px; padding: 0 14px; background: #fff; border: 1.5px solid #D5D9D3; border-radius: 10px; display: flex; align-items: center; justify-content: space-between; font-size: 14.5px; font-weight: 500; }
.lm-s-scarcity { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(250, 186, 61, .18); font-size: 13px; font-weight: 700; color: #6B4E06; }

/* faq */
.lm-s-faq { border: 1px solid var(--s-line); border-radius: 16px; overflow: hidden; background: #fff; }
.lm-s-faq > summary { list-style: none; cursor: pointer; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; font-size: 15px; font-weight: 700; line-height: 1.6; }
.lm-s-faq > summary::-webkit-details-marker { display: none; }
.lm-s-faq[open] > summary svg { transform: rotate(180deg); }
.lm-s-faq + .lm-s-faq { border-top: 0; border-radius: 0; }
.lm-s-faq p { margin: 0; padding: 0 18px 16px; font-size: 14.5px; line-height: 1.8; color: var(--s-muted); }

.lm-s-imgslot { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(14, 39, 39, .35); font-size: 12px; font-weight: 600; text-align: center; background: #E6E9E8; }

/* ---------- hero ---------- */
.lm-s-hero { position: relative; overflow: hidden; background: linear-gradient(135deg, #071A1A 0%, #0E2727 100%); }
.lm-s-hero-inner { position: relative; max-width: 1240px; margin: 0 auto; padding: 128px 40px 46px; display: flex; flex-direction: column; gap: 14px; }
.lm-s-crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: rgba(255, 255, 255, .72); }
.lm-s-crumb b { color: #fff; font-weight: 600; }
.lm-s-title { font-size: 38px; font-weight: 700; line-height: 1.4; color: #fff; max-width: 24ch; }
.lm-s-hdesc { margin: 0; max-width: 62ch; font-size: 16px; line-height: 1.75; color: rgba(255, 255, 255, .8); }
.lm-s-hmeta { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.lm-s-hmeta li { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, .82); }
.lm-s-hmeta svg { color: var(--s-gold); }
.lm-s-hrating { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 7px 12px; border-radius: 10px; background: rgba(250, 186, 61, .16); font-size: 13px; font-weight: 600; color: #fff; }
.lm-s-htutor { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.lm-s-htutor .lm-s-av { width: 32px; height: 32px; border-radius: 50%; flex: none; overflow: hidden; background: #E9E2D6; }
.lm-s-htutor .lm-s-av img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- tab bar ---------- */
.lm-s-tabbar { position: sticky; top: var(--lm-stick, 88px); z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: blur(6px); border-bottom: 1px solid var(--s-line); }
.lm-s-tabwrap { overflow-x: auto; scrollbar-width: none; }
.lm-s-tabwrap::-webkit-scrollbar { display: none; }
.lm-s-tabrow { display: flex; align-items: center; gap: 2px; width: max-content; min-width: 100%; }
.lm-s-tab { position: relative; min-height: 48px; display: inline-flex; align-items: center; padding: 0 12px; font-size: 14px; font-weight: 600; white-space: nowrap; color: var(--s-muted); }
.lm-s-tab.is-on { color: var(--s-accent-ink); }
.lm-s-tab.is-on::after { content: ""; position: absolute; inset-inline: 12px; bottom: 8px; height: 2px; border-radius: 2px; background: var(--s-accent); }

/* ---------- layout ---------- */
.lm-s-grid { max-width: 1240px; margin: 0 auto; padding: 32px 40px 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.lm-s-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: var(--lm-stick-side, 160px); }
.lm-s-vid { margin: 0 0 24px; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden; position: relative; background: #E6E9E8; }
.lm-s-vid img, .lm-s-vid iframe, .lm-s-vid video { width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.lm-s-vid .lm-s-play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.lm-s-vid .lm-s-play span { width: 68px; height: 68px; border-radius: 50%; background: rgba(255, 255, 255, .92); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(7, 26, 26, .3); }
.lm-s-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lm-s-mobile-only { display: none; }
.lm-s-related h2 { margin-bottom: 14px; }
.lm-s-rel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.lm-s-sticky-bar { display: none; }
.lm-s-file { min-height: 52px; display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 14.5px; font-weight: 500; }
.lm-s-file + .lm-s-file { border-top: 1px solid var(--s-line); }
.lm-s-file-ic { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; background: var(--s-bg); color: var(--s-accent-ink); }
.lm-s-bars { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.lm-s-bar-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--s-muted); }
.lm-s-bar-track { flex: 1; height: 7px; border-radius: 4px; background: #E6EAE9; overflow: hidden; }
.lm-s-bar-fill { display: block; height: 100%; background: var(--s-gold); }
.lm-s-review + .lm-s-review { border-top: 1px solid var(--s-line); }

@media (max-width: 1023px) {
  .lm-s-wrap { padding-inline: 32px; }
  .lm-s-hero-inner { padding: 118px 32px 38px; }
  .lm-s-title { font-size: 32px; max-width: none; }
  .lm-s-grid { grid-template-columns: 1fr; padding: 28px 32px 32px; gap: 0; }
  .lm-s-side { position: static; flex-direction: row; flex-wrap: wrap; gap: 20px; margin-top: 8px; }
  .lm-s-side > .lm-s-sidecard { flex: 1 1 320px; }
  .lm-s-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .lm-s-wrap { padding-inline: 20px; }
  .lm-s-hero-inner { padding: 104px 20px 26px; gap: 11px; }
  .lm-s-title { font-size: 26px; }
  .lm-s-hdesc { font-size: 15px; }
  .lm-s-grid { padding: 20px; }
  .lm-s-mobile-only { display: flex; margin-bottom: 20px; }
  .lm-s-side { display: none; }
  .lm-s-rel-grid { grid-template-columns: 1fr; }
  .lm-s-related { padding-bottom: 88px; }
  .lm-s-ben { grid-template-columns: 1fr; }
  .lm-s-two { grid-template-columns: 1fr; }
  .lm-s-sticky-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; min-height: 64px;
    display: flex; align-items: center; gap: 12px;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--s-line);
  }
  .lm-s-sticky-bar .lm-s-price { display: flex; flex-direction: column; }
  .lm-s-sticky-bar .lm-s-price b { font-size: 19px; font-weight: 700; line-height: 1.2; }
  .lm-s-sticky-bar .lm-s-price s { font-size: 12.5px; font-weight: 500; color: #5F6F6D; }
  .lm-s-sticky-bar .lm-s-cta { flex: 1; }
  body.single-courses { padding-bottom: 64px; }
}

/* ---------- dark mode ---------- */
[data-theme="dark"] .lm-s {
  width: 100%; flex: 0 0 100%; min-width: 0; background: #0b1220; color: #e2e8f0; }
[data-theme="dark"] .lm-s-panel,
[data-theme="dark"] .lm-s-curric,
[data-theme="dark"] .lm-s-faq,
[data-theme="dark"] .lm-s-sidecard,
[data-theme="dark"] .lm-s-tabbar { background: #111a2e; border-color: #1f2a44; }
[data-theme="dark"] .lm-s-les { background: #0b1220; border-color: #1f2a44; }
[data-theme="dark"] .lm-s-desc,
[data-theme="dark"] .lm-s-facts li,
[data-theme="dark"] .lm-s-plain li,
[data-theme="dark"] .lm-s-faq p { color: #cbd5e1; }
[data-theme="dark"] .lm-s-facts b,
[data-theme="dark"] .lm-s-now { color: #f1f5f9; }
[data-theme="dark"] .lm-s-date,
[data-theme="dark"] .lm-s-share { background: #0b1220; border-color: #1f2a44; color: #e2e8f0; }
[data-theme="dark"] .lm-s-sticky-bar { background: rgba(11, 18, 32, .97); border-color: #1f2a44; }

/* Anchor links must clear the fixed header AND the sticky tab bar. */
body.single-courses { scroll-padding-top: 150px; }
