/* Qimah LearnDash Styles - Loaded only on LD post types and archives */

/* =========================================================
 Hero
========================================================= */
.hero-cover img {
  display: block;
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.hero-title {
  color: #163d31;
  margin: 0 0 8px;
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 28px);
}

.hero-desc {
  color: #2f5d50;
  line-height: 1.5;
  margin: 0 0 12px;
  max-width: 52ch;
}

.hero-progress .ld-progress {
  height: 10px;
  background: var(--q-green-20);
  border-radius: 999px !important;
  margin: 6px 0 12px;
}

.hero-progress .ld-progress-bar {
  background: var(--q-green);
  border-radius: 999px !important;
}

.hero-progress .ld-progress-stats,
.hero-progress .ld-progress-steps {
  display: none !important;
}

/* Resume button */
.hero-resume {
  text-align: center;
}

.hero-resume .ld-button,
.hero-resume a {
  display: inline-block;
  min-width: 240px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--q-green);
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-resume .ld-button:hover,
.hero-resume a:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.hero-resume .ld-button:active,
.hero-resume a:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* =========================================================
 LearnDash layout helpers
========================================================= */
.learndash-wrapper {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.learndash-wrapper .ld-course-content {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  position: relative;
}

.learndash-wrapper .ld-content-area {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}

.learndash-wrapper .ld-course-navigation {
  flex: 0 0 300px;
  width: 300px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  z-index: 10;
  padding-bottom: 20px;
}

.learndash-wrapper .ld-course-navigation.ld-course-nav-collapsed {
  flex: 0 0 50px;
  width: 50px;
}

.learndash-wrapper .ld-course-navigation.ld-course-nav-collapsed~.ld-content-area {
  max-width: none;
}

.learndash-wrapper .ld-content-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding: 20px 0;
  gap: 15px;
  background: transparent;
  position: relative;
  z-index: 1;
}

.learndash-wrapper .ld-content-actions>* {
  flex: 0 0 auto;
  margin: 0;
  white-space: nowrap;
}

.learndash-wrapper .ld-progress {
  margin: 20px 0;
}

/* Videos responsive */
.learndash-wrapper .entry-content iframe,
.learndash-wrapper iframe[src*="bunny"],
.learndash-wrapper iframe[src*="bunnycdn"],
.learndash-wrapper .wp-video,
.learndash-wrapper .wp-block-video,
.learndash-wrapper video {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16/9;
  height: auto;
  display: block;
}

/* =========================================================
 Topic/Lesson tweaks
========================================================= */
.learndash-wrapper .ld-topic-status .ld-breadcrumbs {
  display: none !important;
}

div:has(> iframe[src*="mediadelivery.net"]) {
  padding-top: 0 !important;
}

body.single-sfwd-topic #ld-focus-content iframe[src*="iframe.mediadelivery.net"] {
  position: static !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9 !important;
  max-width: 100% !important;
  margin: 0 auto !important;
}

.single-sfwd-topic .site-main,
.single-sfwd-topic .content-area,
.single-sfwd-topic .site-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.single-sfwd-topic .ld-course-status,
.single-sfwd-topic .ld-status,
.single-sfwd-topic .ld-progress {
  display: none;
}

.single-sfwd-topic .ld-content-actions .ld-button {
  padding: 14px 22px;
  font-size: 16px;
  transition: all 0.2s ease-in-out;
}

.single-sfwd-topic .ld-content-actions .ld-button:hover {
  background: #222;
  color: #fff;
}

/* =========================================================
 Focus Mode
========================================================= */
.ld-focus .ld-focus-sidebar {
  box-shadow: none !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  height: 100vh !important;
  width: 380px !important;
  max-width: 90vw !important;
  background: #fff !important;
  transform: translateX(-100%) !important;
  transition: transform 0.25s ease !important;
  z-index: 10020 !important;
  overflow: hidden !important;
}

.ld-focus:not(.ld-focus-sidebar-collapsed) .ld-focus-sidebar {
  transform: translateX(0) !important;
}

body:has(.ld-focus:not(.ld-focus-sidebar-collapsed))::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 10010;
  pointer-events: none;
}

.ld-focus .ld-button-toggle {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 10030 !important;
}

.ld-focus .ld-focus-main {
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 16px !important;
}

.ld-focus .entry-content iframe[src*="iframe.mediadelivery.net"] {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9 !important;
}


/* =========================================================
 Contact Buttons (iPad)
========================================================= */
@media screen and (min-width: 767px) and (max-width: 1366px) {

  body.single-sfwd-topic .elementor-widget-contact-buttons .e-contact-buttons__chat-button-container,
  body.single-sfwd-lessons .elementor-widget-contact-buttons .e-contact-buttons__chat-button-container,
  body.learndash-focus-mode .elementor-widget-contact-buttons .e-contact-buttons__chat-button-container {
    position: fixed !important;
    bottom: 140px !important;
    right: 16px !important;
  }

  body.single-sfwd-topic .elementor-widget-contact-buttons .e-contact-buttons.has-v-alignment-bottom,
  body.single-sfwd-lessons .elementor-widget-contact-buttons .e-contact-buttons.has-v-alignment-bottom,
  body.learndash-focus-mode .elementor-widget-contact-buttons .e-contact-buttons.has-v-alignment-bottom {
    bottom: 140px !important;
    right: 16px !important;
  }
}

/* =========================================================
 Responsive layout helpers
========================================================= */
@media (max-width: 1024px) {

  .hero-cover img {
    height: 300px;
  }

  body.single-sfwd-courses #id-hero .glass-surface.rim-glow {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .learndash-wrapper {
    max-width: 100%;
  }

  .learndash-wrapper .ld-course-navigation {
    flex: 0 0 250px;
    width: 250px;
  }
}

@media (max-width: 768px) {
  .learndash-wrapper {
    padding: 0 15px;
  }

  .learndash-wrapper .ld-course-content {
    flex-direction: column;
    gap: 15px;
  }

  .learndash-wrapper .ld-content-area,
  .learndash-wrapper .ld-course-navigation {
    max-width: 100%;
    width: 100%;
    flex: 1 1 100%;
    position: relative;
    top: auto;
    max-height: none;
  }

  .learndash-wrapper .ld-course-navigation {
    order: 2;
  }

  .learndash-wrapper .ld-content-area {
    order: 1;
  }

  .learndash-wrapper .ld-content-actions {
    flex-direction: column;
    gap: 10px;
  }

  .learndash-wrapper .ld-content-actions>* {
    width: 100%;
    text-align: center;
  }

  .elementor .glass-surface {
    flex-direction: column;
    gap: 20px;
  }

  .hero-cover img {
    height: 220px;
  }

  .hero-resume .ld-button,
  .hero-resume a {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .learndash-wrapper {
    padding: 0 10px;
  }

  .learndash-wrapper .ld-course-content {
    gap: 15px;
  }

  /* Focus Mode sidebar - full width on small phones */
  .ld-focus .ld-focus-sidebar {
    width: 100vw !important;
    max-width: 100vw !important;
  }
}

/* 1. Default (Light Mode) - Keep this! */
#id-hero {
  background-image: linear-gradient(180deg, #1e6649 50%, #fffdf6 100%) !important;
  background-size: cover !important;
}

/* 2. Dark Mode Override - ADD THIS BELOW */
html[data-theme="dark"] #id-hero {
    /* Changes the bottom beige to dark green */
    background-image: linear-gradient(180deg, #1e6649 50%, #163d31 100%) !important;
}

/* Qimah Next Step pill - glassy continue style */
.q-next-step {
  margin: 8px 0 2px;
}

.q-next-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid #dbe7e3;
  border-radius: 999px;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  font-weight: 700;
  color: #0f3b2f;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.q-next-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
}

.q-next-icon {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #e8f5ef;
  color: #1e6649;
  align-items: center;
  justify-content: center;
}

.q-next-k {
  opacity: 0.75;
  font-weight: 700;
}

.q-next-title {
  max-width: 42ch;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.q-next-dot {
  opacity: 0.5;
}

.q-next-pct {
  background: #e8f5ef;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  color: #1e6649;
}

/* Only inside the hero */
#id-hero .q-next-link {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

#id-hero .q-next-title {
  color: #fff;
}

#id-hero .q-next-k {
  color: #fff;
  opacity: 0.9;
}

#id-hero .q-next-dot {
  color: #fff;
  opacity: 0.6;
}

#id-hero .q-next-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Apply RTL to that specific widget */
.rtl-blurb {
  direction: rtl;
  unicode-bidi: plaintext;
  text-align: right;
}

/* Scope to Focus Mode content pane */
.ld-focus .ld-content .q-lesson-topics-wrap,
.learndash-focus .ld-content .q-lesson-topics-wrap {
  margin-top: 24px;
}

/* Title */
.q-lesson-topics-title {
  margin: 0 0 12px;
  font-weight: 700;
  color: #1e6649;
}

/* Empty state note */
.q-lesson-empty-note {
  margin-top: 12px;
  color: #868686;
  font-size: 14px;
}

/* =========================================================
   LIGHT MODE: LEARNDASH FOCUS SIDEBAR
========================================================= */

/* Sidebar base - warm white with subtle green tint */
.ld-focus .ld-focus-sidebar {
    background: #f8faf9 !important;
    border-right: 1px solid #e8e4d8 !important;
}

/* Course title header */
.ld-focus-sidebar .ld-course-navigation-heading {
    background: #1E6649 !important;
    color: #fff !important;
}

/* Topic list container */
.ld-focus-sidebar .ld-table-list,
.ld-focus-sidebar .ld-topic-list {
    background: rgba(30, 102, 73, 0.04) !important;
    border-radius: 8px !important;
    margin: 4px 6px !important;
}

/* Topic items */
.ld-focus-sidebar .ld-table-list-item,
.ld-focus-sidebar .ld-table-list-item.learndash-incomplete,
.ld-focus-sidebar .ld-table-list-item.learndash-complete {
    border-color: rgba(30, 102, 73, 0.06) !important;
}

.ld-focus-sidebar .ld-table-list-item:hover {
    background: rgba(30, 102, 73, 0.06) !important;
}

/* Lesson items - subtle borders */
.ld-focus-sidebar .ld-lesson-item {
    border-color: #e8e4d8 !important;
}

/* Topic links */
.ld-focus-sidebar .ld-topic-item a,
.ld-focus-sidebar .ld-table-list-item a,
.ld-focus-sidebar a.ld-table-list-item-preview,
.ld-focus-sidebar .ld-table-list-item-preview {
    color: #334155 !important;
}

.ld-focus-sidebar .ld-topic-item a:hover,
.ld-focus-sidebar .ld-table-list-item a:hover,
.ld-focus-sidebar a.ld-table-list-item-preview:hover {
    color: #1E6649 !important;
    background: rgba(30, 102, 73, 0.06) !important;
}

/* Lesson titles */
.ld-focus-sidebar .ld-lesson-item-preview-heading,
.ld-focus-sidebar .ld-lesson-title,
.ld-focus-sidebar .ld-lesson-item-preview {
    color: #1a1a1a !important;
}

/* =========================================================
   DARK MODE: LEARNDASH FOCUS FIXES
========================================================= */

/* 1. Turn the Sidebar Dark */
html[data-theme="dark"] .ld-focus .ld-focus-sidebar {
    background-color: #0a1e14 !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* Sidebar content full-width */
.ld-focus-sidebar .ld-focus-sidebar-wrapper,
.ld-focus-sidebar .ld-course-navigation,
.ld-focus-sidebar .ld-lesson-item,
.ld-focus-sidebar .ld-lesson-item-preview {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* 2. Turn the Main Content Area Dark */
html[data-theme="dark"] .ld-focus .ld-focus-main,
html[data-theme="dark"] .ld-focus .ld-focus-content,
html[data-theme="dark"] .ld-focus-header,
html[data-theme="dark"] .ld-content-actions {
    background-color: transparent !important;
    color: #eaf3f0 !important;
}

/* 3. Fix Text Colors in Focus Mode */
html[data-theme="dark"] .ld-focus-content h1,
html[data-theme="dark"] .ld-focus-content h2,
html[data-theme="dark"] .ld-focus-content h3,
html[data-theme="dark"] .ld-focus-content h4,
html[data-theme="dark"] .ld-focus-content p,
html[data-theme="dark"] .ld-focus-content li {
    color: #ffffff !important;
}

/* 4. Sidebar Menu Items (Dark Mode) */
html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item,
html[data-theme="dark"] .ld-focus-sidebar .ld-topic-item {
    color: #eaf3f0 !important;
    background-color: transparent !important;
}

html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item:hover,
html[data-theme="dark"] .ld-focus-sidebar .ld-topic-item:hover {
    background-color: rgba(255,255,255,0.05) !important;
}

/* =========================================================
   DARK MODE: CARD FIXES (q-card)
   Turns white cards dark green so text is readable
========================================================= */
html[data-theme="dark"] .q-card {
    background-color: var(--q-surface-2) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

/* Force text inside these cards to be light */
html[data-theme="dark"] .q-card h1,
html[data-theme="dark"] .q-card h2,
html[data-theme="dark"] .q-card h3,
html[data-theme="dark"] .q-card h4,
html[data-theme="dark"] .q-card h5,
html[data-theme="dark"] .q-card p,
html[data-theme="dark"] .q-card span,
html[data-theme="dark"] .q-card div {
    color: #eaf3f0 !important;
}
/* =========================================================
   QIMAH FIXES
   Global font, testimonials, focus mode dark mode
========================================================= */

/* ---------------------------------------------------------
   1. GLOBAL FONT - Force IBM Plex Sans Arabic everywhere
   Wildcard with exclusions for icon fonts
--------------------------------------------------------- */
*:not([class*="ld-icon"]):not([class*="fa-"]):not(.fa):not(.fas):not(.far):not(.fal):not(.fab):not(.dashicons):not([class*="dashicons-"]):not([class*="eicon"]) {
    font-family: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
}

/* Force LearnDash icons to use correct icon font */
[class*="ld-icon"] {
    font-family: ld-icons !important;
}

/* ---------------------------------------------------------
   2. TESTIMONIALS - Dark mode fix
   Card gets dark surface, text goes light (matches q-card pattern)
--------------------------------------------------------- */

html[data-theme="dark"] .elementor-testimonial {
    background: var(--q-surface-2) !important;
    border: 1px solid var(--q-border) !important;
    border-radius: var(--q-rad) !important;
}

html[data-theme="dark"] .elementor-testimonial .elementor-testimonial__content,
html[data-theme="dark"] .elementor-testimonial .elementor-testimonial__text,
html[data-theme="dark"] .elementor-testimonial .elementor-testimonial__text p,
html[data-theme="dark"] .elementor-testimonial .elementor-testimonial__name,
html[data-theme="dark"] .elementor-testimonial .elementor-testimonial__title {
    color: var(--q-text) !important;
}

/* ---------------------------------------------------------
   3. FOCUS MODE - Dark mode fixes
--------------------------------------------------------- */

/* SIDEBAR */

/* Topic list container - dark overlay */
html[data-theme="dark"] .ld-focus-sidebar .ld-table-list,
html[data-theme="dark"] .ld-focus-sidebar .ld-topic-list {
    background: rgba(0, 0, 0, 0.25) !important;
    border-radius: 8px !important;
    margin: 4px 6px !important;
}

/* Topic items wrapper - no inner scroll; sidebar itself handles scrolling */
.ld-focus-sidebar .ld-table-list-items,
.ld-focus-sidebar .ld-topic-list-items {
    max-height: none;
    overflow-y: visible;
    border-radius: 8px;
    margin: 4px 8px;
}

html[data-theme="dark"] .ld-focus-sidebar .ld-table-list-items,
html[data-theme="dark"] .ld-focus-sidebar .ld-topic-list-items {
    background: rgba(0, 0, 0, 0.25) !important;
}

/* Lesson titles - bright white */
html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item-preview-heading,
html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-title,
html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item-preview {
    color: #ffffff !important;
}

/* Topic links */
html[data-theme="dark"] .ld-focus-sidebar .ld-topic-item a,
html[data-theme="dark"] .ld-focus-sidebar .ld-table-list-item a,
html[data-theme="dark"] .ld-focus-sidebar a.ld-table-list-item-preview,
html[data-theme="dark"] .ld-focus-sidebar .ld-table-list-item-preview {
    color: rgba(255, 255, 255, 0.65) !important;
    background: transparent !important;
}

/* Topic list item borders — override LD's hardcoded #e0e7ed */
html[data-theme="dark"] .ld-focus-sidebar .ld-table-list-item,
html[data-theme="dark"] .ld-focus-sidebar .ld-table-list-item.learndash-incomplete,
html[data-theme="dark"] .ld-focus-sidebar .ld-table-list-item.learndash-complete {
  border-color: rgba(255, 255, 255, 0.03) !important;
  background: transparent !important;
}

html[data-theme="dark"] .ld-focus-sidebar .ld-table-list-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
}

/* Sidebar lesson items — subtle borders */
html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item {
  border-color: rgba(255, 255, 255, 0.04) !important;
}

/* Topic link hover */
html[data-theme="dark"] .ld-focus-sidebar .ld-topic-item a:hover,
html[data-theme="dark"] .ld-focus-sidebar .ld-table-list-item a:hover,
html[data-theme="dark"] .ld-focus-sidebar a.ld-table-list-item-preview:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

/* CEP duration badge + bookmark button */
/* Lesson aggregate duration — green */
html[data-theme="dark"] .qimah-cep-lesson-duration-badge {
  color: var(--q-primary, #1E6649) !important;
}

/* Lesson meta (e.g. "18 Topics | 1 Quiz") — white on course page, not sidebar */
html[data-theme="dark"] .learndash-wrapper .ld-item-list .ld-item-component {
  color: rgba(255, 255, 255, 0.7) !important;
}
/* Topic duration on single course page — green */
html[data-theme="dark"] .ld-table-list-item .qimah-cep-duration-badge {
  color: var(--q-primary, #1E6649) !important;
}
/* Topic duration in Focus Mode sidebar — white for visibility */
html[data-theme="dark"] .qimah-cep-duration-badge-topic,
html[data-theme="dark"] .ld-focus-sidebar .qimah-cep-duration-badge {
  color: rgba(255, 255, 255, 0.4) !important;
}

html[data-theme="dark"] .qimah-cep-bookmark-btn.qimah-cep-bookmark-btn-list svg {
  stroke: #fff !important;
}

/* Current/active topic - highlighted */
html[data-theme="dark"] .ld-focus-sidebar a.ld-table-list-item-preview[aria-current="page"],
html[data-theme="dark"] .ld-focus-sidebar .ld-topic-item.ld-is-current-item a,
html[data-theme="dark"] .ld-focus-sidebar .ld-table-list-item.ld-is-current-item a {
    color: #fff !important;
    background: rgba(30, 102, 73, 0.3) !important;
    border-radius: 6px !important;
}

/* "X Topics" count labels - muted */
html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item-expanded-label,
html[data-theme="dark"] .ld-focus-sidebar .ld-item-components {
    color: rgba(255, 255, 255, 0.35) !important;
}

/* Section headings in sidebar */
html[data-theme="dark"] .ld-focus-sidebar .ld-section-heading {
    color: rgba(127, 184, 168, 0.6) !important;
    font-weight: 700 !important;
}

/* Course title in sidebar header */
html[data-theme="dark"] .ld-focus-sidebar .ld-course-navigation-heading span,
html[data-theme="dark"] .ld-focus-sidebar .ld-course-navigation-heading a {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 700 !important;
}

/* Course title bar bg — match LD specificity (4 classes) to override */
html[data-theme="dark"] .learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading {
    background: transparent !important;
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 14px 16px !important;
}

/* Fix double arrow - hide duplicate expand icons */
.ld-focus-sidebar .ld-lesson-item-expanded .ld-icon-arrow-down:nth-of-type(2),
.ld-focus-sidebar .ld-expand-button .ld-icon:nth-of-type(2) {
    display: none !important;
}

/* Expand/collapse arrow styling */
html[data-theme="dark"] .ld-focus-sidebar .ld-expand-button {
    color: rgba(255, 255, 255, 0.35) !important;
}

html[data-theme="dark"] .ld-focus-sidebar .ld-expand-button:hover {
    color: rgba(255, 255, 255, 0.7) !important;
}


html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item.ld-is-current-lesson > .ld-lesson-item-preview {
    background: rgba(30, 102, 73, 0.3) !important;
}
/* Dark mode base */
html[data-theme="dark"] .ld-focus,
html[data-theme="dark"] .ld-focus .ld-focus-main {
    background: var(--q-bg) !important;
}

body.ld-in-focus-mode .learndash-wrapper {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}
/* =========================================================
   Focus Mode Header + Current Lesson Contrast Fix
   Append at end
========================================================= */

/* 1) Header: unified dark bg, no split color */
html[data-theme="dark"] body.ld-in-focus-mode #ld-focus-header,
html[data-theme="dark"] body.ld-in-focus-mode .ld-focus-header,
html[data-theme="dark"] .ld-focus-header {
  background: #0d2119 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: #eaf3f0 !important;
  box-sizing: border-box;
}

/* 2) Header: kill the green (LearnDash uses .ld-secondary-color) */
html[data-theme="dark"] .ld-focus-header .ld-secondary-color,
html[data-theme="dark"] .ld-focus-header .ld-progress-percentage,
html[data-theme="dark"] .ld-focus-header .ld-progress-steps,
html[data-theme="dark"] .ld-focus-header a,
html[data-theme="dark"] .ld-focus-header .ld-text,
html[data-theme="dark"] .ld-focus-header span {
  color: #eaf3f0 !important;
}

html[data-theme="dark"] .ld-focus-header .ld-progress-percentage {
  background: transparent !important;
  border-color: transparent !important;
}

/* Header nav links — same bg */
html[data-theme="dark"] .ld-focus-header .ld-content-action,
html[data-theme="dark"] .ld-focus-header a {
  color: rgba(255, 255, 255, 0.75) !important;
  background: transparent !important;
}

html[data-theme="dark"] .ld-focus-header a:hover {
  color: #fff !important;
}

/* Header Previous/Next sections — same color, no split */
html[data-theme="dark"] .ld-focus-header .ld-focus-header-main-actions,
html[data-theme="dark"] .ld-focus-header .ld-focus-header-main-actions > div {
  background: transparent !important;
}

/* Header Previous/Next buttons — darker, not bright green */
html[data-theme="dark"] .ld-focus-header .ld-button,
html[data-theme="dark"] .ld-focus-header .ld-button.ld-button-transparent {
  background: rgba(30, 102, 73, 0.2) !important;
  color: rgba(255, 255, 255, 0.8) !important;
  border: none !important;
}

html[data-theme="dark"] .ld-focus-header .ld-button:hover {
  background: rgba(30, 102, 73, 0.35) !important;
  color: #fff !important;
}

/* 3) Header: prevent overflow/bleed (actions are inside header) */
#ld-focus-header .ld-content-actions {
  flex-wrap: wrap;
  gap: 12px;
}

/* Make header actions compact (no big margins/borders) */
html[data-theme="dark"] body.ld-in-focus-mode #ld-focus-header .ld-content-actions {
  margin-top: 0 !important;
  padding: 10px 0 !important;
  border-top: 0 !important;
}

/* Reduce the bright separators */
html[data-theme="dark"] body.ld-in-focus-mode #ld-focus-header * {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Make "Mark Complete" text white */
html[data-theme="dark"] body.ld-in-focus-mode #ld-focus-header .learndash_mark_complete_button {
  color: #ffffff !important;
}

/* Sidebar toggle button — clean, no oval */
html[data-theme="dark"] .ld-focus-sidebar .ld-focus-sidebar-trigger {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

html[data-theme="dark"] .ld-focus-sidebar .ld-focus-sidebar-trigger:hover {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Toggle icon circle — subtle, not bright green */
html[data-theme="dark"] .ld-focus-sidebar .ld-focus-sidebar-trigger .ld-icon {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.6) !important;
}

html[data-theme="dark"] .ld-focus-sidebar .ld-focus-sidebar-trigger:hover .ld-icon {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

/* 4) Current lesson: force WHITE on the anchor + title */
html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item.ld-is-current-lesson a,
html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item.ld-is-current-lesson .ld-lesson-title,
html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item.ld-is-current-lesson .ld-lesson-item-preview-heading {
  color: #ffffff !important;
}

/* Current lesson: stronger highlight */
html[data-theme="dark"] .ld-focus-sidebar .ld-lesson-item.ld-is-current-lesson > .ld-lesson-item-preview {
  background: rgba(30, 102, 73, 0.35) !important;
  border-inline-start: 4px solid var(--q-primary) !important;
}

/* =========================================================
   DARK MODE: LearnDash Quiz (wpProQuiz)
   Quiz results, questions, buttons, progress bars
========================================================= */

/* Quiz wrapper and results */
html[data-theme="dark"] .wpProQuiz_content,
html[data-theme="dark"] .wpProQuiz_results,
html[data-theme="dark"] .wpProQuiz_quiz {
  background: transparent !important;
  color: var(--q-text) !important;
}

/* Quiz headers */
html[data-theme="dark"] .wpProQuiz_header,
html[data-theme="dark"] .wpProQuiz_header > h2 {
  color: var(--q-text) !important;
}

/* Points message bar (light gray bg → dark) */
html[data-theme="dark"] .wpProQuiz_points--message,
html[data-theme="dark"] .wpProQuiz_results .wpProQuiz_response {
  background-color: var(--q-surface-2) !important;
  border-color: var(--q-border) !important;
  color: var(--q-text) !important;
}

/* Quiz time and score text */
html[data-theme="dark"] .wpProQuiz_quiz_time,
html[data-theme="dark"] .wpProQuiz_time_limit_expired,
html[data-theme="dark"] .wpProQuiz_results p,
html[data-theme="dark"] .wpProQuiz_results span {
  color: var(--q-text) !important;
}

/* Quiz buttons */
html[data-theme="dark"] .wpProQuiz_button,
html[data-theme="dark"] .wpProQuiz_button2,
html[data-theme="dark"] .wpProQuiz_QuestionButton,
html[data-theme="dark"] input[name="startQuiz"],
html[data-theme="dark"] input[name="reShowQuestion"] {
  background: var(--q-surface-3) !important;
  color: var(--q-text) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 8px !important;
  cursor: pointer;
}

html[data-theme="dark"] .wpProQuiz_button:hover,
html[data-theme="dark"] .wpProQuiz_button2:hover {
  background: var(--q-primary) !important;
  color: #fff !important;
}

/* Question list items (answer options) */
html[data-theme="dark"] .wpProQuiz_questionList,
html[data-theme="dark"] .wpProQuiz_questionListItem {
  color: var(--q-text) !important;
}

html[data-theme="dark"] .wpProQuiz_questionListItem label {
  color: var(--q-text) !important;
}

/* Question container */
html[data-theme="dark"] .wpProQuiz_question .wpProQuiz_question_text {
  color: var(--q-text) !important;
}

/* Correct/incorrect feedback */
html[data-theme="dark"] .wpProQuiz_correct {
  background: rgba(30, 102, 73, 0.2) !important;
  color: #6ee7b7 !important;
}

html[data-theme="dark"] .wpProQuiz_incorrect {
  background: rgba(180, 60, 60, 0.2) !important;
  color: #fca5a5 !important;
}

/* Review section */
html[data-theme="dark"] .wpProQuiz_reviewDiv,
html[data-theme="dark"] .wpProQuiz_reviewQuestion {
  background: var(--q-surface-1) !important;
  border-color: var(--q-border) !important;
}

html[data-theme="dark"] .wpProQuiz_reviewLegend span {
  color: var(--q-text-secondary) !important;
}

/* Progress bar */
html[data-theme="dark"] .wpProQuiz_progress {
  background: var(--q-surface-1) !important;
  border-color: var(--q-border) !important;
}

/* =========================================================
   Single Course Page — Dark Mode
========================================================= */

/* Course page outer wrapper — match dark bg + kill borders */
html[data-theme="dark"] .single-sfwd-courses .elementor-element-10b867a5 {
  background: var(--q-bg, #0d2119) !important;
  border: none !important;
  box-shadow: none !important;
}

/* Tabs container — kill borders/shadow */
html[data-theme="dark"] .single-sfwd-courses .elementor-element-13a0592e,
html[data-theme="dark"] .single-sfwd-courses .elementor-element-13a0592e > .e-con-inner {
  border: none !important;
  box-shadow: none !important;
}

/* Lesson/chapter rows */
html[data-theme="dark"] .learndash-wrapper .ld-item-list .ld-item-list-item,
html[data-theme="dark"] .learndash-wrapper .ld-lesson-item {
  background: var(--q-surface-1, #0A1D16) !important;
  border-color: var(--q-border, rgba(255,255,255,0.1)) !important;
}

/* Topic list container + items */
html[data-theme="dark"] .learndash-wrapper .ld-table-list,
html[data-theme="dark"] .learndash-wrapper .ld-table-list-items {
  background: var(--q-surface-2, #0f251c) !important;
  border-color: var(--q-border, rgba(255,255,255,0.1)) !important;
}

html[data-theme="dark"] .learndash-wrapper .ld-table-list-item {
  border-color: var(--q-border-subtle, rgba(255,255,255,0.06)) !important;
  border-radius: 12px;
  transition: background 0.25s ease, border-color 0.25s ease;
}

html[data-theme="dark"] .learndash-wrapper .ld-table-list-item:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Topic/lesson links */
html[data-theme="dark"] .learndash-wrapper .ld-table-list-item a,
html[data-theme="dark"] .learndash-wrapper a.ld-table-list-item-preview,
html[data-theme="dark"] .learndash-wrapper .ld-table-list-item-preview {
  color: var(--q-text, #e0e0e0) !important;
  text-decoration: none !important;
  transition: color 0.25s ease;
}

html[data-theme="dark"] .learndash-wrapper .ld-table-list-item a:hover {
  color: #fff !important;
  text-decoration: none !important;
}

/* Lesson item preview (title area) */
html[data-theme="dark"] .learndash-wrapper .ld-item-list-item-preview,
html[data-theme="dark"] .learndash-wrapper .ld-lesson-item-preview {
  color: var(--q-text, #e0e0e0) !important;
}

/* Lesson title text */
html[data-theme="dark"] .learndash-wrapper .ld-lesson-title,
html[data-theme="dark"] .learndash-wrapper .ld-item-title,
html[data-theme="dark"] .learndash-wrapper .ld-item-name {
  color: var(--q-text, #e0e0e0) !important;
  text-decoration: none !important;
}

/* All learndash links — no underline in dark mode */
html[data-theme="dark"] .learndash-wrapper a {
  text-decoration: none !important;
}

/* Expanded section header (Lesson Content) */
html[data-theme="dark"] .learndash-wrapper .ld-table-list-header,
html[data-theme="dark"] .learndash-wrapper .ld-lesson-item-expanded-label {
  background: var(--q-surface-3, #132e23) !important;
  color: var(--q-text, #e0e0e0) !important;
}

/* Expand/collapse buttons */
html[data-theme="dark"] .learndash-wrapper .ld-expand-button,
html[data-theme="dark"] .learndash-wrapper .ld-item-list-item-expand {
  color: var(--q-text-secondary, rgba(255,255,255,0.6)) !important;
}

/* Duration/meta text (Focus Mode sidebar only — course page pills styled separately) */
html[data-theme="dark"] .learndash-wrapper .ld-lesson-item-details {
  color: var(--q-text-secondary, rgba(255,255,255,0.6)) !important;
}

/* Status icons — keep LD primary color intact, just ensure visibility */
html[data-theme="dark"] .learndash-wrapper .ld-status-incomplete {
  background: var(--q-surface-3, #132e23) !important;
  color: var(--q-text-secondary, rgba(255,255,255,0.6)) !important;
  border-color: var(--q-border, rgba(255,255,255,0.1)) !important;
}

/* ---- Course Infobar (progress bar + status segments) ---- */

/* Main container — dark bg */
html[data-theme="dark"] .elementor-widget-ld-course-infobar .ld-course-status {
  background: var(--q-surface-1, #0A1D16) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

/* Segment borders */
html[data-theme="dark"] .elementor-widget-ld-course-infobar .ld-course-status-segment:not(:last-child) {
  border-inline-end-color: rgba(255, 255, 255, 0.1) !important;
}

/* All text inside infobar — white */
html[data-theme="dark"] .elementor-widget-ld-course-infobar .ld-course-status-label,
html[data-theme="dark"] .elementor-widget-ld-course-infobar .ld-course-status-content,
html[data-theme="dark"] .elementor-widget-ld-course-infobar .ld-course-status-action,
html[data-theme="dark"] .elementor-widget-ld-course-infobar .ld-course-status-price {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Progress bar track — dark */
html[data-theme="dark"] .learndash-wrapper .ld-progress,
html[data-theme="dark"] .learndash-wrapper .ld-progress-inline {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Progress bar fill — keep green but brighter for dark */
html[data-theme="dark"] .learndash-wrapper .ld-progress .ld-progress-bar,
html[data-theme="dark"] .learndash-wrapper .ld-progress-inline .ld-progress-bar {
  background: #10b981 !important;
}

/* Progress stats text */
html[data-theme="dark"] .learndash-wrapper .ld-progress-stats,
html[data-theme="dark"] .learndash-wrapper .ld-progress-percentage,
html[data-theme="dark"] .learndash-wrapper .ld-progress-steps {
  color: #fff !important;
}

/* "IN PROGRESS" / "COMPLETE" status badges */
html[data-theme="dark"] .learndash-wrapper .ld-status.ld-status-progress,
html[data-theme="dark"] .learndash-wrapper .ld-status.ld-status-complete {
  background: rgba(16, 185, 129, 0.15) !important;
  color: #6ee7b7 !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

/* LearnDash breadcrumbs in focus mode */
html[data-theme="dark"] .learndash-wrapper .ld-breadcrumbs,
html[data-theme="dark"] .learndash-wrapper .ld-breadcrumbs a {
  background: var(--q-surface-1) !important;
  color: var(--q-text-secondary) !important;
}

html[data-theme="dark"] .learndash-wrapper .ld-breadcrumbs a:hover {
  color: var(--q-text) !important;
}

/* LearnDash quiz result action buttons (styled by LD, not wpProQuiz) */
html[data-theme="dark"] .learndash-wrapper .ld-quiz-actions a,
html[data-theme="dark"] .learndash-wrapper input[type="submit"] {
  background: var(--q-surface-3) !important;
  color: var(--q-text) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

html[data-theme="dark"] .learndash-wrapper .ld-quiz-actions a:hover,
html[data-theme="dark"] .learndash-wrapper input[type="submit"]:hover {
  background: var(--q-primary) !important;
  color: #fff !important;
}

/* =========================================================
   Focus Mode header: remove logo white block + no-bleed (all modes)
========================================================= */

/* 1) No-bleed header actions (applies to light + dark) */
body.ld-in-focus-mode #ld-focus-header .ld-content-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0 !important;
  padding: 10px 0 !important;
  border-top: 0 !important;
}

/* 2) Remove the white background behind the brand/logo block */
body.ld-in-focus-mode #ld-focus-header .ld-brand-logo,
body.ld-in-focus-mode #ld-focus-header .ld-brand-logo a {
  background: transparent !important;
}

body.ld-in-focus-mode #ld-focus-header .ld-brand-logo img {
  background: transparent !important;
  display: block;
}

/* 3) Optional: make the logo readable in dark mode (white) */
html[data-theme="dark"] body.ld-in-focus-mode #ld-focus-header .ld-brand-logo img {
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

/* =========================================================
   Course Content List — Qimah Polish
========================================================= */

/* --- Base card: glassmorphism + left accent + radius --- */
.learndash-wrapper .ld-item-list .ld-item-list-item {
  border-radius: 12px;
  overflow: hidden;
  border-inline-start: 3px solid rgba(30, 102, 73, 0.5);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(30, 102, 73, 0.12);
  border-inline-start: 3px solid #1E6649;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.learndash-wrapper .ld-item-list .ld-item-list-item:hover {
  box-shadow: 0 4px 16px rgba(30, 102, 73, 0.1);
  border-color: rgba(30, 102, 73, 0.25);
  border-inline-start: 3px solid #1E6649;
}

/* Dark mode glass */
html[data-theme="dark"] .learndash-wrapper .ld-item-list .ld-item-list-item {
  background: rgba(10, 29, 22, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  border-inline-start: 3px solid rgba(30, 154, 109, 0.6) !important;
}

html[data-theme="dark"] .learndash-wrapper .ld-item-list .ld-item-list-item:hover {
  background: rgba(10, 29, 22, 0.75) !important;
  box-shadow: 0 4px 16px rgba(30, 154, 109, 0.12);
  border-color: rgba(255, 255, 255, 0.12) !important;
  border-inline-start: 3px solid rgba(30, 154, 109, 0.8) !important;
}

/* --- Expand arrow: smooth rotation --- */
.learndash-wrapper .ld-expand-button .ld-icon,
.learndash-wrapper .ld-item-list-item-expand .ld-icon {
  transition: transform 0.3s ease;
}

.learndash-wrapper .ld-item-list-item.ld-expandable-list-item-expanded .ld-expand-button .ld-icon,
.learndash-wrapper .ld-item-list-item.ld-expandable-list-item-expanded .ld-item-list-item-expand .ld-icon {
  transform: rotate(180deg);
}

/* --- Topic count + duration: inline pill row --- */
.learndash-wrapper .ld-item-list-item .ld-item-components {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.learndash-wrapper .ld-item-list-item .ld-item-component,
.learndash-wrapper .ld-item-list-item .ld-item-components > .qimah-cep-lesson-duration-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(30, 102, 73, 0.1);
  color: #1E6649;
  white-space: nowrap;
}

/* Clock icon on duration pill */
.learndash-wrapper .ld-item-list-item .ld-item-components > .qimah-cep-lesson-duration-badge::before {
  content: "⏱";
  font-size: 10px;
  margin-inline-end: 2px;
  opacity: 0.7;
}

html[data-theme="dark"] .learndash-wrapper .ld-item-list-item .ld-item-component,
html[data-theme="dark"] .learndash-wrapper .ld-item-list-item .ld-item-components > .qimah-cep-lesson-duration-badge {
  background: rgba(30, 154, 109, 0.15) !important;
  color: #7fb8a8 !important;
}

/* Duration badge on course page — match topic count pill style */
.learndash-wrapper .ld-item-list-item .qimah-cep-duration-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(30, 102, 73, 0.1);
  color: #1E6649;
}

html[data-theme="dark"] .learndash-wrapper .ld-item-list-item .qimah-cep-duration-badge {
  background: rgba(30, 154, 109, 0.15) !important;
  color: #7fb8a8 !important;
}

/* =========================================================
   LearnDash Course Infobar - styling (Qimah look)
========================================================= */

/* Main bar */
.elementor-widget-ld-course-infobar .ld-course-status {
  border-radius: 14px;
  border: 1px solid rgba(30,102,73,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  overflow: hidden;
}

/* Segment separators */
.elementor-widget-ld-course-infobar .ld-course-status-segment {
  position: relative;
}

.elementor-widget-ld-course-infobar .ld-course-status-segment:not(:last-child) {
  border-inline-end: 1px solid rgba(30,102,73,0.18);
}

/* Headings */
.elementor-widget-ld-course-infobar .ld-course-status-label {
  font-weight: 700;
  letter-spacing: 0;
}

/* Price styling */
.elementor-widget-ld-course-infobar .ld-course-status-price {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* The actual join button */
.elementor-widget-ld-course-infobar a.ld-enrollment__join-button,
.elementor-widget-ld-course-infobar a#btn-join {
  background: #1E6649;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 800;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 22px rgba(30,102,73,0.28);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.elementor-widget-ld-course-infobar a.ld-enrollment__join-button:hover,
.elementor-widget-ld-course-infobar a#btn-join:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 14px 28px rgba(30,102,73,0.34);
}

/* Accessible focus */
.elementor-widget-ld-course-infobar a.ld-enrollment__join-button:focus-visible,
.elementor-widget-ld-course-infobar a#btn-join:focus-visible {
  outline: 3px solid rgba(79,138,135,0.55);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════════
   Qimah – Course Included Features
   ═══════════════════════════════════════════════════════════ */

.qm-course-included-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.qm-course-included {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px 16px;
  direction: rtl;
  text-align: right;
}

/* Grid columns */
.qm-course-included.qm-cols-1 { grid-template-columns: 1fr; }
.qm-course-included.qm-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qm-course-included.qm-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qm-course-included.qm-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ─────────────────────────────────────────────────────────
   Base pill
   ───────────────────────────────────────────────────────── */
.qm-course-included li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  height: 100%;
}

/* ─────────────────────────────────────────────────────────
   Featured item (first row, full width)
   ───────────────────────────────────────────────────────── */
.qm-course-included.qm-featured li {
  padding: 14px 18px;
  min-height: 56px;
}

.qm-course-included.qm-featured .qm-label {
  font-size: 16px;
}

.qm-course-included.qm-featured .qm-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  font-size: 16px;
}

/* ─────────────────────────────────────────────────────────
   Icon badge
   ───────────────────────────────────────────────────────── */
.qm-course-included .qm-icon {
  width: 28px;
  height: 28px;
  min-width: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────
   Label text
   ───────────────────────────────────────────────────────── */
.qm-course-included .qm-label {
  flex: 1 1 auto;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────
   ✓ INCLUDED – subtle green tint
   ───────────────────────────────────────────────────────── */
.qm-course-included li.is-in {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(230, 245, 235, 0.95) 100%
  );
  border: 1px solid rgba(30, 102, 73, 0.2);
}

.qm-course-included li.is-in .qm-icon {
  color: #1E6649;
  background: rgba(30, 102, 73, 0.15);
  border: 1.5px solid rgba(30, 102, 73, 0.3);
}

.qm-course-included li.is-in .qm-label {
  color: #1a3d2e;
}

/* ─────────────────────────────────────────────────────────
   ✗ NOT INCLUDED – subtle red/pink tint
   ───────────────────────────────────────────────────────── */
.qm-course-included li.is-out {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(255, 240, 240, 0.6) 100%
  );
  border: 1.5px dashed rgba(180, 100, 100, 0.25);
}

.qm-course-included li.is-out .qm-icon {
  color: #9f5656;
  background: rgba(180, 100, 100, 0.1);
  border: 1.5px solid rgba(180, 100, 100, 0.25);
}

.qm-course-included li.is-out .qm-label {
  color: #5c4a4a;
  opacity: 0.8;
}

/* ─────────────────────────────────────────────────────────
   Mobile
   ───────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .qm-course-included.qm-cols-2,
  .qm-course-included.qm-cols-3,
  .qm-course-included.qm-cols-4 {
    grid-template-columns: 1fr;
  }

  .qm-course-included li {
    min-height: 44px;
    padding: 9px 12px;
  }

  .qm-course-included.qm-featured li {
    min-height: 48px;
    padding: 12px 14px;
  }
}
/* ─────────────────────────────────────────────────────────
   Course Stats Row [qimah_course_stats]
   ───────────────────────────────────────────────────────── */
.qm-stats-row {
  display: flex;
  justify-content: flex-end;
  gap: 48px;
  padding: 16px 0;
  direction: rtl;
}

.qm-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.qm-stat-value {
  font-size: 36px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.qm-stat-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 767px) {
  .qm-stats-row {
    justify-content: center;
    gap: 40px;
  }

  .qm-stat-value {
    font-size: 28px;
  }
}

/* =========================================================
   Courses Page - Card Content Area (Light + Dark)
========================================================= */

/* Light mode */
.post-type-archive-sfwd-courses .e-loop-item .e-con.e-parent > .e-con.e-child,
.tax-ld_course_category .e-loop-item .e-con.e-parent > .e-con.e-child,
body.courses .e-loop-item .e-con.e-parent > .e-con.e-child {
  background: rgba(255, 255, 255, 0.85) !important;
  border: 1px solid rgba(30, 102, 73, 0.15) !important;
  border-top: none !important;
  border-radius: 0 0 16px 16px !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Dark mode override - Course card content area */
html[data-theme="dark"] .post-type-archive-sfwd-courses .e-loop-item .e-con.e-parent > .e-con.e-child,
html[data-theme="dark"] .tax-ld_course_category .e-loop-item .e-con.e-parent > .e-con.e-child,
html[data-theme="dark"] body.courses .e-loop-item .e-con.e-parent > .e-con.e-child,
html[data-theme="dark"] .e-loop-item .e-con.e-child {
  background: #04261b !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: none !important;
}

/* Force all nested containers in cards to be transparent */
html[data-theme="dark"] .e-loop-item .e-con.e-child .e-con,
html[data-theme="dark"] .e-loop-item .e-con.e-child > div {
  background: transparent !important;
}

/* Course titles */
html[data-theme="dark"] .post-type-archive-sfwd-courses .elementor-heading-title,
html[data-theme="dark"] .post-type-archive-sfwd-courses .elementor-heading-title a,
html[data-theme="dark"] body.courses .elementor-heading-title,
html[data-theme="dark"] body.courses .elementor-heading-title a {
  color: #FFFFFF !important;
}

/* Instructor names */
html[data-theme="dark"] .post-type-archive-sfwd-courses .elementor-widget-text-editor,
html[data-theme="dark"] .post-type-archive-sfwd-courses .elementor-widget-text-editor p,
html[data-theme="dark"] body.courses .elementor-widget-text-editor,
html[data-theme="dark"] body.courses .elementor-widget-text-editor p {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Elementor author box text */
html[data-theme="dark"] .elementor-author-box__name {
  color: #fff !important;
}
html[data-theme="dark"] .elementor-author-box__bio {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* LearnDash expand text — kill hover border that causes layout shift */
html[data-theme="dark"] .ld-expand-text.ld-primary-color,
html[data-theme="dark"] .ld-expand-text {
  color: #FFFFFF !important;
  border: none !important;
}
/* Reset nested containers */
.post-type-archive-sfwd-courses .e-loop-item .e-con.e-parent > .e-con.e-child .e-con,
body.courses .e-loop-item .e-con.e-parent > .e-con.e-child .e-con {
  background: transparent !important;
  border: none !important;
  backdrop-filter: none !important;
}

/* ---------------------------------------------------------
   Archive/Loop Course Cards (Elementor)
--------------------------------------------------------- */
html[data-theme="dark"] .e-loop-item .e-con.e-parent > .e-con.e-child {
  background: #04261b !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: none !important;
}

/* Course card parent container */
html[data-theme="dark"] .e-loop-item .e-con.e-parent {
  background: transparent !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}

/* Card text colors */
html[data-theme="dark"] .e-loop-item .elementor-heading-title,
html[data-theme="dark"] .e-loop-item .elementor-heading-title a {
  color: var(--q-text) !important;
}

html[data-theme="dark"] .e-loop-item .elementor-widget-text-editor,
html[data-theme="dark"] .e-loop-item .elementor-widget-text-editor p {
  color: var(--q-muted) !important;
}

/* Price styling */
html[data-theme="dark"] .e-loop-item [class*="price"],
html[data-theme="dark"] .e-loop-item .ld-course-status-price {
  color: #6ee7b7 !important;
}

/* Course card buttons */
html[data-theme="dark"] .e-loop-item .elementor-button {
  background: #22755a !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .e-loop-item .elementor-button:hover {
  background: #1a5c46 !important;
}

/* Secondary/outline buttons on cards */
html[data-theme="dark"] .e-loop-item .elementor-button[class*="outline"],
html[data-theme="dark"] .e-loop-item .elementor-button[class*="secondary"] {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #e4ebe8 !important;
}

html[data-theme="dark"] .e-loop-item .elementor-button[class*="outline"]:hover,
html[data-theme="dark"] .e-loop-item .elementor-button[class*="secondary"]:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* ---------------------------------------------------------
   Course Included Pills - dark mode
--------------------------------------------------------- */
html[data-theme="dark"] .qm-course-included li.is-in {
    background: linear-gradient(135deg, rgba(30, 102, 73, 0.15), rgba(30, 102, 73, 0.25)) !important;
    border-color: rgba(30, 102, 73, 0.4) !important;
}

html[data-theme="dark"] .qm-course-included li.is-in .qm-label {
    color: var(--q-text) !important;
}

html[data-theme="dark"] .qm-course-included li.is-in .qm-icon {
    color: #34d399 !important;
    background: rgba(52, 211, 153, 0.15) !important;
    border-color: rgba(52, 211, 153, 0.3) !important;
}

html[data-theme="dark"] .qm-course-included li.is-out {
    background: linear-gradient(135deg, rgba(180, 100, 100, 0.08), rgba(180, 100, 100, 0.15)) !important;
    border-color: rgba(180, 100, 100, 0.3) !important;
}

html[data-theme="dark"] .qm-course-included li.is-out .qm-label {
    color: var(--q-muted) !important;
}

html[data-theme="dark"] .qm-course-included li.is-out .qm-icon {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
}

/* ---------------------------------------------------------
   "Next Step" pill - dark mode (outside hero)
--------------------------------------------------------- */
html[data-theme="dark"] .q-next-link {
    background: var(--q-surface-2) !important;
    border-color: var(--q-border) !important;
    color: var(--q-text) !important;
}

html[data-theme="dark"] .q-next-link:hover {
    background: var(--q-surface-3) !important;
}

html[data-theme="dark"] .q-next-title {
    color: var(--q-text) !important;
}

html[data-theme="dark"] .q-next-icon {
    background: rgba(30, 102, 73, 0.2) !important;
    color: #34d399 !important;
}

html[data-theme="dark"] .q-next-pct {
    background: rgba(30, 102, 73, 0.2) !important;
    color: #34d399 !important;
}

/* ---------------------------------------------------------
   Progress Map - dark mode
   The map widget has a white card background
--------------------------------------------------------- */
html[data-theme="dark"] [class*="progress-map"],
html[data-theme="dark"] [class*="progressMap"],
html[data-theme="dark"] [class*="progress_map"] {
    background: var(--q-surface-1) !important;
    color: var(--q-text) !important;
    border: 1px solid var(--q-border) !important;
    border-radius: 14px;
}

html[data-theme="dark"] [class*="progress-map"] h2,
html[data-theme="dark"] [class*="progress-map"] h3,
html[data-theme="dark"] [class*="progress-map"] p,
html[data-theme="dark"] [class*="progressMap"] h2,
html[data-theme="dark"] [class*="progressMap"] h3,
html[data-theme="dark"] [class*="progressMap"] p {
    color: var(--q-text) !important;
}

html[data-theme="dark"] [class*="progress-map"] a,
html[data-theme="dark"] [class*="progressMap"] a {
    color: #6ee7b7 !important;
}

/* =========================================================
   Single Course Page — Tabs Section Dark Mode Fix
========================================================= */

/* Tabs section bg — match body */
html[data-theme="dark"] .e-con.e-child.elementor-element-10b867a5[data-settings] {
  background: #0d2119 !important;
  background-color: #0d2119 !important;
  background-image: none !important;
}

/* Tabs container — fix white bg */
html[data-theme="dark"] .elementor-element-2e2953d9 {
  background-color: #15352b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* =========================================================
   Course Content — Expanded Topic List Polish
========================================================= */

/* Expanded topic list container — darker, match card tone */
html[data-theme="dark"] .learndash-wrapper .ld-table-list,
html[data-theme="dark"] .learndash-wrapper .ld-table-list-items {
  background: #0f2a20 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

/* "Lesson Content" header — subtle, not bright green */
html[data-theme="dark"] .learndash-wrapper .ld-table-list-header {
  background: #112e24 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Progress text in header */
html[data-theme="dark"] .learndash-wrapper .ld-table-list-header .ld-progress-stats,
html[data-theme="dark"] .learndash-wrapper .ld-table-list-header .ld-progress-percentage,
html[data-theme="dark"] .learndash-wrapper .ld-table-list-header .ld-progress-steps {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Topic rows — clean separators, no green tint */
html[data-theme="dark"] .learndash-wrapper .ld-item-list .ld-table-list-item {
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.04) !important;
}

html[data-theme="dark"] .learndash-wrapper .ld-item-list .ld-table-list-item:hover {
  background: rgba(255, 255, 255, 0.03) !important;
}

/* Topic links */
html[data-theme="dark"] .learndash-wrapper .ld-item-list .ld-table-list-item a,
html[data-theme="dark"] .learndash-wrapper .ld-item-list a.ld-table-list-item-preview {
  color: rgba(255, 255, 255, 0.75) !important;
}

html[data-theme="dark"] .learndash-wrapper .ld-item-list .ld-table-list-item a:hover,
html[data-theme="dark"] .learndash-wrapper .ld-item-list a.ld-table-list-item-preview:hover {
  color: #fff !important;
}

/* Expanded topic list — clean bottom radius, no thick border */
html[data-theme="dark"] .learndash-wrapper .ld-item-list .ld-table-list {
  border-radius: 0 0 10px 10px !important;
  overflow: hidden !important;
  border: none !important;
}

/* Status circles — more subtle */
html[data-theme="dark"] .learndash-wrapper .ld-table-list-item .ld-status-icon img {
  opacity: 0.4 !important;
}

/* Tooltip parent wrapper — kill border */
html[data-theme="dark"] .learndash-wrapper .ld-item-list-item .ld-tooltip {
  border: none !important;
  background: transparent !important;
}

/* "You don't currently have access" tooltip — hide entirely */
html[data-theme="dark"] .learndash-wrapper .ld-item-list-item .ld-tooltip__text {
  display: none !important;
}

/* =========================================================
   Focus Mode Sidebar — Duration Badge Positioning (both modes)
========================================================= */

/* Title needs relative context for absolute badge */
.ld-focus-sidebar .ld-topic-title {
  position: relative !important;
  padding-inline-end: 52px !important;
}

/* Duration badge — pinned to inline-end, green pill */
.ld-focus-sidebar .ld-topic-title .qimah-cep-duration-badge {
  position: absolute !important;
  inset-inline-end: 0 !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  font-size: 10px !important;
  padding: 2px 7px !important;
  border-radius: 8px !important;
  white-space: nowrap !important;
  line-height: 1.4 !important;
}

/* Light mode badge colors */
.ld-focus-sidebar .ld-topic-title .qimah-cep-duration-badge {
  color: #1E6649 !important;
  background: rgba(30, 102, 73, 0.08) !important;
}

/* Dark mode badge colors */
html[data-theme="dark"] .ld-focus-sidebar .ld-topic-title .qimah-cep-duration-badge {
  color: rgba(255, 255, 255, 0.5) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

/* =========================================================
   Focus Mode Sidebar — Light Mode Polish
========================================================= */

/* Topic item hover — soft green tint */
.ld-focus-sidebar .ld-table-list-item:hover {
  background: rgba(30, 102, 73, 0.04) !important;
}

/* Topic link hover — turn green */
.ld-focus-sidebar .ld-table-list-item a:hover,
.ld-focus-sidebar a.ld-table-list-item-preview:hover {
  color: #1E6649 !important;
}

/* Current/active topic — green tint pill */
.ld-focus-sidebar a.ld-table-list-item-preview[aria-current="page"],
.ld-focus-sidebar .ld-table-list-item.ld-is-current-item a {
  background: rgba(30, 102, 73, 0.08) !important;
  color: #1E6649 !important;
  border-radius: 6px !important;
}

/* Current lesson — soft green left border accent */
.ld-focus-sidebar .ld-lesson-item.ld-is-current-lesson > .ld-lesson-item-preview {
  border-inline-start: 3px solid #1E6649 !important;
  border-radius: 4px !important;
}

/* Expand/collapse buttons — muted until hover */
.ld-focus-sidebar .ld-expand-button {
  color: #8fa89d !important;
}
.ld-focus-sidebar .ld-expand-button:hover {
  color: #1E6649 !important;
}

/* Section headings — branded green */
.ld-focus-sidebar .ld-section-heading {
  color: #1E6649 !important;
  font-weight: 700 !important;
}

/* Sidebar scrollbar — thin and subtle */
.ld-focus-sidebar .ld-focus-sidebar-wrapper::-webkit-scrollbar {
  width: 4px;
}
.ld-focus-sidebar .ld-focus-sidebar-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.ld-focus-sidebar .ld-focus-sidebar-wrapper::-webkit-scrollbar-thumb {
  background: rgba(30, 102, 73, 0.15);
  border-radius: 4px;
}
.ld-focus-sidebar .ld-focus-sidebar-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(30, 102, 73, 0.3);
}

/* =========================================================
   Focus Mode Sidebar — Hide Speech-Bubble Arrow (both modes)
========================================================= */

/* LD renders a rotated square ::before on .ld-table-list as a
   speech-bubble pointer — looks like a stray arrow. Hide it. */
.ld-focus-sidebar .ld-table-list::before {
  display: none !important;
}

/* Spacer ::before on expanded content — unnecessary gap */
.ld-focus-sidebar .ld-lesson-item-expanded::before {
  display: none !important;
}

/* =========================================================
   Focus Mode Content — Title Row (h1 + badges inline)
========================================================= */

/* Title row wrapper (JS creates .qimah-title-row around h1 + video-meta) */
.qimah-title-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 12px !important;
}

.qimah-title-row > h1 {
  font-size: 20px !important;
  margin: 0 !important;
  flex: 1 !important;
  min-width: 0 !important;
}

.qimah-title-row > .qimah-cep-video-meta {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}

/* Duration badge: flow layout, not absolute */
.qimah-cep-duration-badge-topic {
  position: static !important;
  margin: 0 !important;
}

/* Light mode content badge colors */
.qimah-cep-duration-badge-topic {
  color: #1E6649 !important;
  background: rgba(30, 102, 73, 0.08) !important;
}

/* Stats badge: match duration pill style */
.qimah-cep-video-meta .qimah-cep-stats-badge {
  border-radius: 20px !important;
  background: rgba(30, 102, 73, 0.08) !important;
  color: #1E6649 !important;
}

/* Dark mode content badge colors */
html[data-theme="dark"] .qimah-cep-duration-badge-topic,
html[data-theme="dark"] .qimah-cep-video-meta .qimah-cep-stats-badge {
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.5) !important;
}
