/**
 * Herb Whisperer — LearnDash Style Overrides
 *
 * IMPORTANT: This file does NOT redefine --hw-green or other brand tokens.
 * Those are defined in style.css (:root) and inherited here.
 * LD30 accent colors are set via the PHP filter hw_learndash_custom_colors()
 * in learndash-integration.php.
 *
 * Targets LD30 (LearnDash 4.x active skin).
 * Enqueued conditionally — only on LearnDash pages.
 */


/* ==========================================================================
   1. Global LD Typography
   ========================================================================== */

.learndash-wrapper,
.learndash-wrapper *,
#learndash_lessons,
#learndash_quizzes {
  font-family: var(--hw-font-body);
  color: var(--hw-text);
}

.learndash-wrapper h1,
.learndash-wrapper h2,
.learndash-wrapper h3,
.learndash-wrapper h4,
.learndash-wrapper .ld-heading,
.learndash-wrapper .ld-section-heading,
.learndash-wrapper .ld-course-title,
.learndash-wrapper .ld-lesson-title {
  font-family: var(--hw-font-heading);
  font-weight: 700;
  color: var(--hw-text);
  line-height: 1.3;
}


/* ==========================================================================
   2. Course Page — Hero / Featured Image
   ========================================================================== */

body.single-sfwd-courses .page-header-image-single,
body.single-sfwd-courses .featured-image {
  max-height: 260px;
  overflow: hidden;
  margin-bottom: 0;
}

body.single-sfwd-courses .page-header-image-single img,
body.single-sfwd-courses .featured-image img,
body.single-sfwd-courses .wp-post-image {
  max-height: 260px;
  width: 100%;
  object-fit: cover;
  border-radius: var(--hw-radius-lg, 16px);
  display: block;
  margin: 0 auto 1.5rem;
}

body.single-sfwd-courses .entry-title,
body.single-sfwd-courses .learndash-wrapper .ld-course-title {
  font-family: var(--hw-font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--hw-green);
  margin-bottom: 0.75rem;
}


/* ==========================================================================
   3. Course Status / Progress
   ========================================================================== */

.learndash-wrapper .ld-course-status {
  background: var(--hw-bg-warm);
  border: 1px solid var(--hw-border-light);
  border-radius: var(--hw-radius-lg, 16px);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.learndash-wrapper .ld-progress .ld-progress-bar {
  background: rgba(0, 145, 58, 0.12);
  border-radius: 20px;
  height: 10px;
  overflow: hidden;
}

.learndash-wrapper .ld-progress .ld-progress-bar .ld-progress-bar-percentage {
  background: linear-gradient(135deg, var(--hw-green) 0%, var(--hw-green-light) 100%);
  border-radius: 20px;
  height: 100%;
  transition: width 0.6s ease;
}

.learndash-wrapper .ld-progress .ld-progress-stats .ld-progress-percentage {
  color: var(--hw-green);
  font-weight: 700;
  font-size: 0.85rem;
}


/* ==========================================================================
   4. Hide LD30 Native Tile Grid
   ========================================================================== */

body.single-sfwd-courses .ld-course-list-items {
  display: none !important;
}


/* ==========================================================================
   5. Custom Lesson Tile Grid (hw_custom_lesson_tiles PHP)
   ========================================================================== */

.hw-lesson-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.hw-lesson-tile {
  background: #fff;
  border: 1px solid var(--hw-border-light);
  border-radius: var(--hw-radius-lg, 16px);
  overflow: hidden;
  box-shadow: var(--hw-shadow-sm);
  transition: box-shadow 0.3s, transform 0.3s;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.hw-lesson-tile:visited {
  color: inherit;
}

.hw-lesson-tile:hover {
  box-shadow: var(--hw-shadow-hover);
  transform: translateY(-2px);
}

.hw-lesson-tile__thumb {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  height: 0;
  overflow: hidden;
  background-color: var(--hw-bg-cream);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hw-lesson-tile__thumb--empty {
  background-image: linear-gradient(135deg, var(--hw-bg-cream) 0%, var(--hw-bg-warm) 100%);
}

.hw-tile-badge {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  font-family: var(--hw-font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  color: #fff;
  line-height: 1.3;
}

.hw-tile-badge--complete { background: var(--hw-green); }
.hw-tile-badge--progress { background: var(--hw-gold, #F2C867); }
.hw-tile-badge--new      { background: var(--hw-gray, #C1C6C3); }

.hw-lesson-tile__body {
  padding: 0.85rem 1rem 1rem;
  flex: 1;
}

.hw-lesson-tile__title {
  font-family: var(--hw-font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--hw-text);
  margin: 0;
}

.hw-lesson-tile:hover .hw-lesson-tile__title {
  color: var(--hw-green);
}

@media (max-width: 900px) {
  .hw-lesson-tiles { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}

@media (max-width: 540px) {
  .hw-lesson-tiles { grid-template-columns: 1fr; }
}


/* ==========================================================================
   6. Course Content — Expandable Lesson List
   ========================================================================== */

.learndash-wrapper .ld-item-list .ld-item-list-item {
  border: 1px solid var(--hw-border-light);
  border-radius: var(--hw-radius-sm, 8px);
  margin-bottom: 0.5rem;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.learndash-wrapper .ld-item-list .ld-item-list-item:hover {
  border-color: var(--hw-green-light);
  box-shadow: 0 1px 4px rgba(0, 145, 58, 0.08);
}

.learndash-wrapper .ld-item-list .ld-item-list-item .ld-item-list-item-preview {
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.learndash-wrapper .ld-item-list .ld-item-name {
  font-family: var(--hw-font-body);
  font-weight: 600;
  font-size: 1rem;
}

.learndash-wrapper .ld-item-list .ld-item-name a {
  color: var(--hw-text);
  text-decoration: none;
}

.learndash-wrapper .ld-item-list .ld-item-name a:hover {
  color: var(--hw-green);
}

.learndash-wrapper .ld-item-list .ld-item-list-section-heading {
  font-family: var(--hw-font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hw-green);
  background: rgba(0, 145, 58, 0.08);
  border-radius: var(--hw-radius-sm, 8px);
  padding: 0.65rem 1.25rem;
  margin: 1rem 0 0.5rem;
}

.learndash-wrapper .ld-status.ld-status-complete .ld-status-icon { color: var(--hw-green); }
.learndash-wrapper .ld-status.ld-status-incomplete .ld-status-icon { color: var(--hw-border); }
.learndash-wrapper .ld-status.ld-status-progress .ld-status-icon { color: var(--hw-gold, #F2C867); }

.learndash-wrapper .ld-item-list .ld-item-list-item-expanded {
  background: var(--hw-bg-warm);
  border-top: 1px solid var(--hw-border-light);
  padding: 0.5rem 0;
}

.learndash-wrapper .ld-item-list .ld-item-list-item-expanded .ld-table-list-item {
  padding: 0.55rem 1.25rem 0.55rem 2.75rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--hw-border-light);
}

.learndash-wrapper .ld-item-list .ld-item-list-item-expanded .ld-table-list-item:last-child {
  border-bottom: none;
}

.learndash-wrapper .ld-item-list .ld-item-list-item-expanded .ld-table-list-item a {
  color: var(--hw-text-light);
  text-decoration: none;
  padding: 0;
}

.learndash-wrapper .ld-item-list .ld-item-list-item-expanded .ld-table-list-item a:hover {
  color: var(--hw-green);
}

.learndash-wrapper .ld-expand-button {
  background: transparent;
  border: 1px solid var(--hw-border);
  border-radius: var(--hw-radius-sm, 8px);
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  color: var(--hw-text-light);
  cursor: pointer;
}

.learndash-wrapper .ld-expand-button:hover {
  border-color: var(--hw-green-light);
  color: var(--hw-green);
  background: rgba(0, 145, 58, 0.06);
}


/* ==========================================================================
   7. Lesson / Topic / Quiz Pages — Layout & Sidebar Removal
   ========================================================================== */

body.single-sfwd-lessons .is-right-sidebar,
body.single-sfwd-topic .is-right-sidebar,
body.single-sfwd-quiz .is-right-sidebar {
  display: none !important;
}

body.single-sfwd-lessons .site-content .content-area,
body.single-sfwd-topic .site-content .content-area,
body.single-sfwd-quiz .site-content .content-area {
  width: 100% !important;
}

body.single-sfwd-lessons .entry-content,
body.single-sfwd-topic .entry-content,
body.single-sfwd-quiz .entry-content {
  max-width: 800px;
  margin: 0 auto;
}


/* ==========================================================================
   8. Lesson Page — Side-by-Side Hero (Image 2/5 + Title 3/5)

   GeneratePress .inside-article contains:
     .featured-image.page-header-image-single.grid-container.grid-parent
     header.entry-header > h1.entry-title
     .entry-content

   Hero area: cream background band (280px from top) with rounded top corners.
   Image container: 240px tall, centered, with gradient mask on all edges.
   Title: split via PHP into .hw-lesson-number + .hw-lesson-name spans.
   Content: starts below cream band on white background.
   ========================================================================== */

body.single-sfwd-lessons .inside-article {
  display: grid;
  grid-template-columns: 2fr 3fr;
  grid-template-rows: auto auto 1fr;
  gap: 0 2rem;
  align-items: start;
  max-width: 800px;
  margin: 1.5rem auto;
  padding: 20px 20px 0;
  background: transparent;
  border-radius: 0;
  position: relative;
}

/* Cream background — limited to hero area, all corners rounded */
body.single-sfwd-lessons .inside-article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(240px + 20px);
  background-color: var(--hw-bg-cream, #EBEDDF);
  border-radius: var(--hw-radius-lg, 16px);
  z-index: 0;
  pointer-events: none;
}

/* Ensure all grid children sit above the cream pseudo-element */
body.single-sfwd-lessons .inside-article > * {
  position: relative;
  z-index: 1;
}

/* Image container — left column, spans rows 1-2, transparent on cream band */
body.single-sfwd-lessons .inside-article .page-header-image-single,
body.single-sfwd-lessons .inside-article .featured-image {
  grid-column: 1;
  grid-row: 1 / 3;
  height: 240px;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  positive: relative;
}

/* Soft cream fade on image edges via inset shadow overlay */
body.single-sfwd-lessons .inside-article .page-header-image-single::after,
body.single-sfwd-lessons .inside-article .featured-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 0;
  box-shadow: inset 0 0 30px 15px var(--hw-bg-cream, #EBEDDF);
  pointer-events: none;
  z-index: 2;
}

/* Strip GeneratePress grid-container/grid-parent padding */
body.single-sfwd-lessons .inside-article .featured-image.grid-container,
body.single-sfwd-lessons .inside-article .featured-image.grid-parent {
  padding: 0 !important;
}

/* Image — responsive, no cropping, soft gradient mask on all edges */
body.single-sfwd-lessons .inside-article .page-header-image-single img,
body.single-sfwd-lessons .inside-article .featured-image img,
body.single-sfwd-lessons .inside-article .wp-post-image {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 0;
  border-radius: var(--hw-radius-md, 12px);
}

/* Title — right column, vertically centered */
body.single-sfwd-lessons .inside-article .entry-header {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: start;
  margin: 0 !important;
  padding: 3.5rem 0 0 0 !important;
}

/* Lesson title — split into number + name (via PHP filter) */
body.single-sfwd-lessons .entry-title {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
}

body.single-sfwd-lessons .entry-title .hw-lesson-number {
  display: block;
  font-family: var(--hw-font-ui);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hw-green);
  margin-bottom: 0.35rem;
}

body.single-sfwd-lessons .entry-title .hw-lesson-name {
  display: block;
  font-family: var(--hw-font-heading);
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  line-height: 1.3;
  color: var(--hw-brown);
}

/* Content — full width below the hero row */
body.single-sfwd-lessons .inside-article .entry-content {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 0.75rem !important;
  padding-top: 0 !important;
}

/* Collapse spacing inside entry-content down to breadcrumb bar */
body.single-sfwd-lessons .entry-content .learndash_post_sfwd-lessons,
body.single-sfwd-lessons .entry-content .learndash-wrapper,
body.single-sfwd-lessons .entry-content .ld-lesson-status,
body.single-sfwd-lessons .entry-content .ld-breadcrumbs {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Fallback: if no featured image, collapse to single column */
body.single-sfwd-lessons .inside-article .entry-header:first-child {
  grid-column: 1 / -1;
}

body.single-sfwd-lessons .inside-article .entry-header:first-child ~ .entry-content {
  grid-column: 1 / -1;
  grid-row: 2;
}

/* Topic pages — standard stacked layout */
body.single-sfwd-topic .page-header-image-single,
body.single-sfwd-topic .featured-image {
  max-height: 200px !important;
  overflow: hidden !important;
  margin-bottom: 0.5rem !important;
}

body.single-sfwd-topic .page-header-image-single img,
body.single-sfwd-topic .featured-image img,
body.single-sfwd-topic .wp-post-image {
  max-height: 200px !important;
  width: 100% !important;
  object-fit: cover !important;
  border-radius: var(--hw-radius-lg, 16px);
}

/* Responsive — stack on mobile */
@media (max-width: 768px) {
  body.single-sfwd-lessons .inside-article {
    grid-template-columns: 1fr;
    padding: 20px;
    background: var(--hw-bg-cream, #EBEDDF);
    border-radius: var(--hw-radius-lg, 16px);
  }

  body.single-sfwd-lessons .inside-article .page-header-image-single,
  body.single-sfwd-lessons .inside-article .featured-image {
    grid-column: 1;
    grid-row: auto;
    max-width: 70% !important;
    height: 180px;
    margin: 0 auto 1rem !important;
  }

  body.single-sfwd-lessons .inside-article .entry-header {
    grid-column: 1;
  }

  body.single-sfwd-lessons .inside-article .entry-content {
    grid-column: 1;
  }
}


/* ==========================================================================
   9. Lesson Page — Whitespace Removal
   ========================================================================== */

body.single-sfwd-lessons .entry-content p:empty,
body.single-sfwd-lessons .entry-content p:has(> br:only-child),
body.single-sfwd-lessons .entry-content .wp-block-spacer,
body.single-sfwd-topic .entry-content p:empty,
body.single-sfwd-topic .entry-content p:has(> br:only-child),
body.single-sfwd-topic .entry-content .wp-block-spacer {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  line-height: 0 !important;
}

body.single-sfwd-lessons .entry-content br + br,
body.single-sfwd-topic .entry-content br + br {
  display: none;
}

body.single-sfwd-lessons .entry-content hr,
body.single-sfwd-topic .entry-content hr {
  margin: 1.5rem 0;
}

body.single-sfwd-lessons .entry-content h2,
body.single-sfwd-lessons .entry-content h3,
body.single-sfwd-topic .entry-content h2,
body.single-sfwd-topic .entry-content h3 {
  margin-top: 1.5rem;
}


/* ==========================================================================
   10. Lesson / Topic Content Styling
   ========================================================================== */

.learndash-wrapper .ld-tab-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.learndash-wrapper .ld-tab-content h2,
.learndash-wrapper .ld-tab-content h3,
.learndash-wrapper .ld-tab-content h4 {
  font-family: var(--hw-font-heading);
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.learndash-wrapper .ld-tab-content img {
  border-radius: var(--hw-radius-sm, 8px);
  max-width: 100%;
  height: auto;
}


/* ==========================================================================
   11. Lesson Content Box Header
   ========================================================================== */

.learndash-wrapper .ld-table-list-header,
.learndash-wrapper .ld-table-list-header.ld-primary-background {
  background-color: var(--hw-green) !important;
  color: #fff !important;
  border-radius: var(--hw-radius-sm, 8px) var(--hw-radius-sm, 8px) 0 0;
}

.learndash-wrapper .ld-table-list-header .ld-text,
.learndash-wrapper .ld-table-list-header .ld-icon {
  color: #fff !important;
}


/* ==========================================================================
   12. Navigation Buttons
   ========================================================================== */

.learndash-wrapper .ld-content-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hw-border-light);
}

.learndash-wrapper .ld-button:not([disabled]):not(.ld-button-reverse):not(.ld-button-transparent):not(.ld--ignore-inline-css),
.learndash-wrapper #sfwd-mark-complete input[type="submit"],
.learndash-wrapper input[type="submit"].learndash_mark_complete_button,
.learndash-wrapper .learndash_mark_complete_button:not(.ld--ignore-inline-css) {
  background-color: var(--hw-green) !important;
  color: #fff !important;
  font-family: var(--hw-font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: var(--hw-radius-sm, 8px);
  cursor: pointer;
}

.learndash-wrapper .ld-button:hover:not([disabled]):not(.ld-button-transparent):not(.ld--ignore-inline-css) {
  background-color: var(--hw-green-dark) !important;
  opacity: 1 !important;
}

.learndash-wrapper .ld-button.ld-button-transparent {
  background: transparent !important;
  color: var(--hw-green) !important;
  border: 1px solid var(--hw-green);
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border-radius: var(--hw-radius-sm, 8px);
}

.learndash-wrapper .ld-button.ld-button-transparent:hover {
  background: rgba(0, 145, 58, 0.06) !important;
}


/* ==========================================================================
   13. Quizzes
   ========================================================================== */

.learndash-wrapper .wpProQuiz_content .wpProQuiz_header {
  font-family: var(--hw-font-heading);
  font-size: 1.4rem;
  border-bottom: 2px solid rgba(0, 145, 58, 0.12);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_question {
  background: #fff;
  border: 1px solid var(--hw-border-light);
  border-radius: var(--hw-radius-md, 12px);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem {
  padding: 0.65rem 1rem;
  margin-bottom: 0.4rem;
  border: 1px solid var(--hw-border-light);
  border-radius: var(--hw-radius-sm, 8px);
  cursor: pointer;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_questionListItem:hover {
  border-color: var(--hw-green-light);
  background: rgba(0, 145, 58, 0.06);
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_button,
.learndash-wrapper .wpProQuiz_content .wpProQuiz_button2 {
  background: var(--hw-green) !important;
  color: #fff !important;
  font-weight: 600 !important;
  border: none !important;
  border-radius: var(--hw-radius-sm, 8px) !important;
  padding: 0.65rem 1.5rem !important;
}

.learndash-wrapper .wpProQuiz_content .wpProQuiz_correct { color: var(--hw-green); font-weight: 600; }
.learndash-wrapper .wpProQuiz_content .wpProQuiz_incorrect { color: #a63d2f; font-weight: 600; }


/* ==========================================================================
   14. Focus Mode
   ========================================================================== */

.learndash-wrapper .ld-focus .ld-focus-sidebar {
  background: var(--hw-bg-warm);
  border-right: 1px solid var(--hw-border-light);
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-course-navigation-heading {
  font-family: var(--hw-font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--hw-border-light);
}

.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-lesson-item.ld-is-current-lesson,
.learndash-wrapper .ld-focus .ld-focus-sidebar .ld-topic-item.ld-is-current-topic {
  background: rgba(0, 145, 58, 0.08);
  border-left: 3px solid var(--hw-green);
}

.learndash-wrapper .ld-focus .ld-focus-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  font-size: 1.05rem;
  line-height: 1.8;
}


/* ==========================================================================
   15. Tabs
   ========================================================================== */

.learndash-wrapper .ld-tabs .ld-tabs-navigation {
  border-bottom: 2px solid var(--hw-border-light);
  margin-bottom: 1.25rem;
}

.learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--hw-text-light);
  padding: 0.65rem 1.25rem;
  border: none;
  background: transparent;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab.ld-active {
  color: var(--hw-green);
  border-bottom-color: var(--hw-green);
}


/* ==========================================================================
   16. Alerts
   ========================================================================== */

.learndash-wrapper .ld-alert {
  border-radius: var(--hw-radius-sm, 8px);
  padding: 0.85rem 1.15rem;
  margin-bottom: 1.25rem;
  border-left: 4px solid;
}

.learndash-wrapper .ld-alert.ld-alert-success { background: rgba(0, 145, 58, 0.08); border-left-color: var(--hw-green); color: var(--hw-green-dark); }
.learndash-wrapper .ld-alert.ld-alert-warning { background: #faf5e8; border-left-color: #b8860b; color: #8b6914; }
.learndash-wrapper .ld-alert.ld-alert-danger  { background: #fdf2f0; border-left-color: #a63d2f; color: #a63d2f; }


/* ==========================================================================
   17. Payment Prompts
   ========================================================================== */

.learndash-wrapper .ld-payment-buttons {
  background: var(--hw-bg-warm);
  border: 1px solid var(--hw-border-light);
  border-radius: var(--hw-radius-md, 12px);
  padding: 1.75rem;
  text-align: center;
}

.learndash-wrapper .ld-payment-buttons .btn-join,
.learndash-wrapper .ld-payment-buttons .ld-button {
  background: var(--hw-green);
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: var(--hw-radius-sm, 8px);
  border: none;
}


/* ==========================================================================
   18. Breadcrumbs
   ========================================================================== */

.learndash-wrapper .ld-breadcrumbs {
  font-size: 0.85rem;
  color: var(--hw-text-muted);
  margin-bottom: 1.25rem;
}

.learndash-wrapper .ld-breadcrumbs a:hover { color: var(--hw-green); }


/* ==========================================================================
   19. Certificate
   ========================================================================== */

.learndash-wrapper .ld-certificate-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #faf5e8;
  border: 1px solid var(--hw-gold, #F2C867);
  border-radius: var(--hw-radius-sm, 8px);
  padding: 0.6rem 1.15rem;
  font-weight: 600;
  color: #8b6914;
  text-decoration: none;
}

.learndash-wrapper .ld-certificate-link:hover {
  background: var(--hw-gold, #F2C867);
  color: #fff;
}


/* ==========================================================================
   20. Bunny.net Video Wrapper
   ========================================================================== */

.hw-video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: var(--hw-radius-sm, 8px);
  background: #000;
  margin: 1.5rem 0;
}

.hw-video-wrapper iframe,
.hw-video-wrapper video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* Fix double-wrapped video embeds (PHP filter runs on both the_content and learndash_content) */
div[style*="padding-top"] > .hw-video-wrapper {
  padding-bottom: 0;
  height: auto;
  position: static;
  background: none;
  margin: 0;
  border-radius: 0;
  overflow: visible;
}

.hw-video-wrapper .hw-video-wrapper {
  padding-bottom: 0;
  height: auto;
  position: static;
  background: none;
  margin: 0;
  border-radius: 0;
  overflow: visible;
}


/* ==========================================================================
   21. Global LD30 Accent Override
   ========================================================================== */

.learndash-wrapper .ld-primary-color,
.learndash-wrapper a.ld-primary-color-hover:hover,
.learndash-wrapper .ld-tabs .ld-tabs-navigation .ld-tab.ld-active {
  color: var(--hw-green) !important;
}

.learndash-wrapper .ld-primary-background {
  background-color: var(--hw-green) !important;
}

.learndash-wrapper .ld-secondary-background,
.learndash-wrapper .ld-status-complete {
  background-color: var(--hw-green-light) !important;
}


/* ==========================================================================
   22. Responsive — Course Pages
   ========================================================================== */

@media (max-width: 768px) {
  .learndash-wrapper .ld-content-actions {
    flex-direction: column;
    align-items: stretch;
  }

  body.single-sfwd-courses .page-header-image-single img,
  body.single-sfwd-courses .wp-post-image {
    max-height: 180px;
  }
}

@media (max-width: 480px) {
  body.single-sfwd-courses .page-header-image-single img,
  body.single-sfwd-courses .wp-post-image {
    max-height: 140px;
  }
}
