.site-header a {
    color: white;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
}

.course-hero {
  position: relative;
  margin-top: 64px; /* Start below the fixed nav (nav height is 64px) */
  min-height: 280px;          /* adjust to taste */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #fff;
}

/* Adjust course-hero margin for landscape phones (nav height is 48px) */
@media (max-height: 500px) and (orientation: landscape) {
  .course-hero {
    margin-top: 48px; /* Nav height is 48px in landscape */
  }
}

.course-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1);    /* darken so text pops */
}

.course-hero__content {
   color: white;
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem;
}

.course-hero__content h1 {
   color: white;    
  font-size: clamp(2.5rem, 4vw, 4rem);
  margin-bottom: 0.75rem;
}

.course-hero__content p {
       color: white;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 300;
  margin: 0;
}


/* Course Container */
.course-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.course-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.course-listing {
    max-width: 1200px;
    margin: 3rem auto 4rem;
    padding: 0 1.5rem;
}

.course-listing__inner {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.course-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(93, 38, 193, 0.12);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(93, 38, 193, 0.18);
}

.course-card__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.course-card__link {
    text-decoration: none;
    color: inherit;
}

.course-card__link:hover {
    color: #5d26c1;
}

.course-card__description {
    margin: 0;
    color: #555;
    line-height: 1.5;
    flex: 1;
}

.course-card__cta {
    align-self: flex-start;
    font-weight: 600;
    color: #5d26c1;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.course-card__cta:hover {
    color: #3b1585;
}

@media (max-width: 600px) {
    .course-listing {
        padding: 0 1rem;
    }

    .course-card {
        padding: 1.25rem;
    }
}

.lesson-breadcrumb {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    display: flex;
    gap: 0.4rem;
    align-items: center;
    padding: 0 1.5rem;
    font-size: 0.95rem;
    color: #555;
    background-color: #F5F5F5;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 998;
    height: 40px;
    box-sizing: border-box;
    text-transform: uppercase; /* Make all breadcrumb text uppercase */
}

.lesson-breadcrumb span {
    color: #999;
    text-transform: uppercase; /* Make span text uppercase */
}

.lesson-breadcrumb a {
    color: #757575;
    text-decoration: none;
    font-size:smaller;
    font-weight: 300;
    text-transform: uppercase;
}
.lesson-breadcrumb a:hover {
    text-decoration: underline;
    text-transform: uppercase;
}

/* Reduce breadcrumb height in landscape orientation on small screens */
@media (max-height: 500px) and (orientation: landscape) {
  .lesson-breadcrumb {
    height: 32px; /* Reduced from 40px */
    top: 48px; /* Adjusted to match reduced nav height */
  }
}

/* Lesson page background - gradient from top to bottom */
body:has(.lesson-layout) {
    background: linear-gradient(to bottom, #BDBDBD, #E6E6E6);
}

.lesson-layout {
    display: grid;
    grid-template-columns: 1fr;/*minmax(240px, 300px) minmax(0, 1fr);*/
    gap: 1rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto 2rem;
    padding: 0 1rem;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

.lesson-layout__sidebar {
    display: none;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.lesson-layout__main {
    max-width: 1400px;
    width: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow */
    box-sizing: border-box;
}

.lesson-body {
    position: relative;
    background: #EEEEEE;
    padding: 0;
    border-radius: 6px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.12);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Prevent horizontal overflow - table-responsive will handle its own scrolling */
    box-sizing: border-box;
}

/* Position dropdown at top center of lesson-body */
.lesson-body .lesson-quick-nav-wrap {
    position: absolute;
    top: 134px; /* Position below nav (64px) + breadcrumbs (40px) + 30px = 134px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* Adjust dropdown position in landscape orientation on small screens */
@media (max-height: 500px) and (orientation: landscape) {
  .lesson-body .lesson-quick-nav-wrap {
    top: 110px; /* Position below nav (48px) + breadcrumbs (32px) + 30px = 110px */
  }
}

.two-columns {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      /* Allows columns to wrap if needed */
    }

    .column {
      flex: 1;
      margin: 10px 20px;
    }

    .two-columns-h3 {
      text-align: center;
    }

@media (max-width: 960px) {
    .lesson-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0;
        max-width: 100% !important;
    }

    .lesson-layout__sidebar {
        order: 2;
        width: 100%;
    }

    .lesson-layout__main {
        order: 1;
        width: 100%;
        max-width: 100% !important;
    }

    .lesson-body {
        padding: 0rem;
        max-width: 100% !important;
    }
    
    /* Ensure light-block uses full width on mobile */
    .light-block {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

@media (max-width: 768px) {
    .lesson-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0 !important; /* Remove all padding on mobile */
        max-width: 100% !important;
    }

    .lesson-layout__sidebar {
        display: none;
    }

    .lesson-layout__main {
        width: 100%;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .lesson-body {
        padding: 0 !important;
        max-width: 100% !important;
    }
    
    /* Ensure light-block uses full width on mobile */
    .light-block {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

.course-sidebar {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
}   

.course-page-container {
    flex: 1;
    padding: 0px;
    display: flex;
    flex-direction: column;
    align-items: center; /* This centers children horizontally */
}

.course_content_wrap {
    max-width: 768px;

}

.centered-lesson-content {
    margin-left: auto;
    margin-right: auto;
    max-width: 768px; /* or whatever width you prefer */
}

.course-header {
    background: linear-gradient(90deg, #5d26c1, #a17fe0, #59c173);
    color: white;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.course-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.course-description {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.course-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.95rem;
    opacity: 0.85;
}

.course-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* lessons list */

#courses-list {
    padding: 2.5rem 0;
    margin: 0 auto;
    max-width: 960px;
}

#courses-list h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
}

.list-container {
    background: #fff;
    box-shadow: 0 20px 40px rgba(93, 38, 193, 0.12);
    overflow: hidden;
}

.course-lesson-flow {
    margin: 2.5rem 0;
    width: 100%;
}

.course-lesson-flow .section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.course-lesson-flow .section:last-child {
    border-bottom: none;
}

.course-lesson-flow .lesson {
    background: #ffffff;
    cursor: pointer;
}

.course-lesson-flow .lesson:hover {
    background: #f5f5f5;
}

.course-lesson-flow .lesson-text {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.lesson-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background: rgba(93, 38, 193, 0.15);
    color: #5d26c1;
}

.section {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.section:last-child {
    border-bottom: none;
}

.section-header {
    background: linear-gradient(90deg, #80CBC4 0%, #F5F5F5 100%);
    color: #ffffff;
    padding: 1rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    gap: 0.5rem;
}

.section-header span {
    margin-left: 10px;
}

.lesson {
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
    background: #f0f0f0;
}

.lesson-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: inherit;
    width: 100%;
    cursor: pointer;
}

.lesson:hover {
    background: #e2e2e2;
}

.circle {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    border: 2px solid #ccc;
    border-radius: 50%;
    text-align: center;
    font-size: 9px;
    line-height: 18px;
    color: #999;
    transition: all 0.3s ease;
}

.lesson.completed .circle {
    border-color: #4CAF50;
    color: #4CAF50;
}

.lesson.completed .lesson-text {
    color: #4CAF50;
}

.lesson-text {
    flex: 1;
    margin-left: 12px;
    font-size: 1rem;
}

.arrow {
    font-size: 1rem;
    color: #bbb;
}

.lesson:hover .arrow {
    color: #5d26c1;
}

@media (max-width: 768px) {
    .course-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .lesson {
        padding: 12px 16px;
    }
}


.course-sidebar h2 {
    background-color: #f63;
    color: white;
    padding: 15px 35px;
    font-size: 32px;
    text-transform: uppercase;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.course-sidebar .list-container {
    background-color: white;
    color: #333;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.course-sidebar .section-header {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background-color: #f63;
    color: white;
    letter-spacing: 1px;
    text-transform: uppercase;
  }

    .course-sidebar .section-header span {
    margin-left: 15px;
  }

  .course-sidebar   .lesson {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
  }
  .course-sidebar   .lesson a {
    text-decoration: none;
    color: inherit;
  }

  .course-sidebar   .lesson:hover {
    background: #f0f0f0;
  }

  .course-sidebar   .circle {
    display: none;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    border: 2px solid #ccc;
    border-radius: 50%;
    text-align: center;
    font-size: 7px;
    line-height: 9px;
    color: white;
  }

  .course-sidebar   .checked {
    background-color: #f63;
    border-color: #f63;
    color: white;
  }

  .course-sidebar   .lesson-text {
    flex: 1;
    margin-left: 24px;
    font-size: 16px;
  }

  .course-sidebar   .arrow {
    font-size: 9px;
    color: #888;
  }

/* END Course Side Menu */

  /* lesson */
      .learndash_content_wrap {
        padding: 20px;
        background-color: #fff;
        border-radius: 5px;
    }
    .lesson-number-dot-container {
        display: flex;
        justify-content: center;
        margin: 100px 0 20px 20px; /* Reduced bottom margin from 40px to 20px to halve space above h1 */
    }
.lesson-number-dot {
    background-color: #FF5722;
    display: inline-block;
    width: 75px;
    height: 75px;
    line-height: 75px;
    border-radius: 50%;
    font-size: 30px;
    color: #fff;
    text-align: center;
    margin-top: 150px;

}
    .lesson-body h1,
    article.lesson-body h1 {
    font-size: 1.9 rem;
    line-height: 2.4 rem;
    color: #212121;
    font-weight: normal;
    margin-top: 0.5em !important; /* Halve the default margin-top (typically 1em) */
    /* Width constraints for main heading - match intro text width */
    max-width: 70ch !important; /* Match intro text width for consistency */
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
    box-sizing: border-box !important;
}

h4 {
    border-bottom: 1px solid #eee;
    color: #212121;
    font-size: 16px;
    line-height: 24px;
    padding-bottom: 0px;
    margin-bottom: 0px;
    font-weight: 900;
    margin-top: 30px;
}

.lesson-intro {
    font-size: 1.25rem;
    line-height: 1.75rem; /* Increased proportionally to match 18px base font-size */
    color: #212121;
    text-align: center;
    margin-bottom: 30px !important;
    font-weight: 400; /* Changed from 300 for better senior readability */
    letter-spacing: 0.01em; /* Added for better character recognition */
    font-style: italic;
    box-sizing: border-box; /* Include padding in width calculation */
    /* Responsive width constraints */
    max-width: 70ch; /* Optimal reading width for intro text */
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Responsive width constraints for headings and intro text */
/* Large desktop (1200px and above) */
@media (min-width: 1200px) {
    .lesson-body h1,
    article.lesson-body h1 {
        max-width: 75ch !important; /* Match intro text width on large screens */
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
    
    .lesson-intro {
        max-width: 75ch !important; /* Wider intro text on large screens */
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

/* Desktop (900px to 1199px) - default styles apply (70ch) */
/* Tablet (600px to 899px) */
@media (max-width: 899px) and (min-width: 600px) {
    .lesson-body h1,
    article.lesson-body h1 {
        max-width: 65ch !important; /* Match intro text width on tablets */
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    
    .lesson-intro {
        max-width: 65ch !important; /* Narrower intro text on tablets */
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

/* Mobile (below 600px) */
@media (max-width: 599px) {
    .lesson-body h1,
    article.lesson-body h1 {
        max-width: 100% !important; /* Full width on mobile */
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    .lesson-intro {
        max-width: 100% !important; /* Full width on mobile */
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

.light-block {
    font-size: 1rem;
    line-height: 1.8rem; /* Increased proportionally to match 18px base font-size */
    color: #212121;
    font-weight: 300; /* Light weight for body text within light-block */
    letter-spacing: 0.01em; /* Added for better character recognition */
    background-color: #f5f5f5;
    padding: 26px;
    margin: 20px auto; /* Center with auto margins */
    max-width: 65ch; /* Match width constraint used in typography-improvements-test.css */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* Override twoColumns to use single column inside light-block */
.light-block .twoColumns {
    column-count: 1 !important;
}

.light-block p,
.light-block div,
.light-block span,
.light-block .twoColumns,
.light-block .twoColumns > * {
    font-weight: 300; /* Light weight for all text content within light-block */
}

.bright-block {
    background-color: #FB8C00;
    color: white;
    padding: 26px;
}

/* Fix for hand cards overlapping text in bright-block */
.bright-block .hand {
    margin-top: 0 !important;
    margin-bottom: 100px !important;
    overflow: visible !important;
    padding-top: 0 !important;
    padding-bottom: 40px !important;
    width: fit-content !important; /* Ensure width fits content */
    min-width: 200px !important; /* Prevent collapse - minimum width for card display */
    max-width: 100% !important; /* Prevent overflow on mobile */
}

.bright-block .realhand {
    overflow: visible !important;
    position: relative !important;
}

/* Ensure tables inside bright-block have readable text */
.bright-block table,
.bright-block .table-responsive table,
.bright-block .table-responsive .table {
    background-color: white !important;
    color: #212121 !important;
}

.bright-block table th,
.bright-block table td,
.bright-block .table-responsive .table th,
.bright-block .table-responsive .table td {
    background-color: white !important;
    color: #212121 !important;
    border-color: #ddd !important;
}

/* Ensure striped rows are still visible but readable */
.bright-block .table-striped tbody tr:nth-child(odd) td,
.bright-block .table-responsive .table-striped tbody tr:nth-child(odd) td {
    background-color: #f9f9f9 !important;
    color: #212121 !important;
}

.bright-block .table-striped tbody tr:nth-child(even) td,
.bright-block .table-responsive .table-striped tbody tr:nth-child(even) td {
    background-color: white !important;
    color: #212121 !important;
}

/* Table headers should have darker background for contrast */
.bright-block table thead th,
.bright-block .table-responsive .table thead th {
    background-color: #e0e0e0 !important;
    color: #212121 !important;
    font-weight: 600 !important;
}

.bright-block-details, .bridgeNotation {
    color: #212121;
    margin: 0px 5% 40px 5%;
    background-color: white;
    padding: 30px;
    font-weight: lighter;
}

.bright-block-details ul {
    padding: 0;
    list-style-type: none;
}


.practice-game-link-panel {
    background-color: #FF5722;
    color: white;
    padding: 30px 0px;
    text-align: center;
}

.practice-game-link-panel a {
    color: white !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700 !important; /* Bold text */
}

.practice-game-link-panel-play {
  display: inline-block;
  margin-top: 1rem;
  padding: 6px 34px;
  background-color: #f7ba45;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 45px;
  text-decoration: none;
  font-weight: 700 !important; /* Bold text - override any other styles */
}

.practice-game-link-panel a:hover {
    color: white !important;
}

.practice-game-link-panel .glossary-link,
.practice-game-link-panel .glossary-link a,
.practice-game-link-panel .glossary-link a:hover,
.practice-game-link-panel .glossary-underline,
.practice-game-link-panel .glossary-only-link,
.practice-game-link-panel .glossary-tooltip,
.practice-game-link-panel .tooltip-container {
    color: inherit !important;
    text-transform: none;
    letter-spacing: normal;
}

/* Make the underline inherit the text color */
.practice-game-link-panel .tooltip-container {
    border-bottom-color: currentColor !important;
}

/* Ensure tooltip popup content is not affected by color inheritance - it should use its own styling */
.practice-game-link-panel .tooltip-container .tooltip-text {
    color: #fff !important; /* Tooltip text should be white on dark background */
}

.practice-game-link-panel .tooltip-container .tooltip-text strong {
    color: #00BFA5 !important; /* Teal to match site styling */
}





#cta-container {
    max-width: 960px;
    margin: 45px auto;
    background: linear-gradient(90deg, #FBC2EB 0%, #A6C1EE 100%);
    border-radius: 24px;
    color: #fff;
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 3rem;
    padding: 40px 60px;
    box-shadow: 0 25px 45px rgba(161, 127, 224, 0.25);
}

#cta-container h2 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin: 0 0 1.5rem 0;
}

#cta-container p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.callout {
    background: rgba(255, 255, 255, 0.18);
    padding: 20px;
    border-radius: 16px;
    font-weight: 500;
}

#cta-container .callout p {
    margin: 0;
}

#cta-container .callout strong {
    display: block;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.button {
    background: white;
    color: #5d26c1;
    padding: 14px 32px;
    border-radius: 999px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 15px 25px rgba(93, 38, 193, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 30px rgba(93, 38, 193, 0.35);
}

.button span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(93, 38, 193, 0.15);
    border-radius: 999px;
}

/* END CTA */

.centered-lesson-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.centered-lesson-content p {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.centered-lesson-content ul {
    margin-left: 1rem;
    padding-left: 1.5rem;
}

.centered-lesson-content ul li {
    margin-bottom: 0.75rem;
}

.centered-lesson-content blockquote {
    background: rgba(93, 38, 193, 0.08);
    border-left: 4px solid rgba(93, 38, 193, 0.4);
    padding: 1rem 1.5rem;
    font-style: italic;
    margin: 2rem 0;
}

.centered-lesson-content img {
    max-width: 100%;
    border-radius: 16px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    margin: 2rem 0;
}

.centered-lesson-content .callout {
    background: linear-gradient(90deg, rgba(93, 38, 193, 0.12), rgba(89, 193, 115, 0.12));
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.centered-lesson-content .callout p {
    margin: 0;
}


/* Select any <div> that directly contains a checkbox */
div:has(> input[type="checkbox"]) {
    /* Add some padding to make the hover area larger */
    padding: 4px 8px;
    border-radius: 5px;
    
    /* Change the cursor to a pointer to show it's clickable */
    cursor: pointer;
    
    /* Add a smooth transition for the background color */
    transition: background-color 0.2s ease-in-out;
}

/* Change the background color when the <div> is hovered */
div:has(> input[type="checkbox"]):hover {
    background-color: #f0f0f0; /* A subtle slightly darker grey */
}


@media (max-width: 768px) {
    #cta-container {
        grid-template-columns: 1fr;
        padding: 2.5rem;
    }

    .callout {
        margin: 1rem 0;
    }
}

@media (max-width: 767.98px) {
  
  /* * ===================================================================
   * PART 1: FIX THE COLUMN COLLAPSE (Corrected Version)
   * This overrides your theme's 'display: block;' by
   * restoring the *correct* table display properties.
   * ===================================================================
  */

  .table-responsive .table {
    display: table !important;
    width: 100%;
    /* We also add the shrinking styles here */
    font-size: 0.85rem; 
  }

  .table-responsive .table tbody {
    display: table-row-group !important;
  }

  .table-responsive .table tr {
    display: table-row !important; /* <--- THIS WAS THE FIX */
  }

  .table-responsive .table th,
  .table-responsive .table td {
    display: table-cell !important;
    vertical-align: middle;
    /* We also add the padding shrink here */
    padding: 0.5rem 0.3rem;
  }

  /* * ===================================================================
   * PART 2: SHRINK HEADER TEXT
   * ===================================================================
  */

  .table-responsive .table th h4 {
    font-size: 0.9rem; 
    margin: 0;
  }
}

/* Make table content smaller and allow horizontal scroll on very small screens (phones) */
@media (max-width: 500px) {
  .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto; /* Allow horizontal scrolling within the container */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    display: block;
    box-sizing: border-box;
    /* Ensure container doesn't expand beyond viewport */
    position: relative;
  }
  
  .table-responsive .table {
    font-size: 0.65rem; /* Much smaller base font */
    min-width: 500px; /* Minimum width to prevent excessive cramping */
    width: auto; /* Let table be wider than container if needed */
    table-layout: auto; /* Allow columns to shrink naturally */
    margin: 0; /* Remove any margins that could cause overflow */
  }
  
  .table-responsive .table th,
  .table-responsive .table td {
    padding: 0.3rem 0.2rem; /* Very tight padding */
    font-size: 0.65rem;
    white-space: nowrap; /* Prevent wrapping so table can scroll horizontally */
    line-height: 1.2;
  }
  
  .table-responsive .table th h4 {
    font-size: 0.7rem;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
  }
  
  /* Make header cells even more compact */
  .table-responsive .table thead th {
    padding: 0.25rem 0.15rem;
  }
}

/* Fix for quiz tables - make them fully responsive on mobile */
@media (max-width: 500px) {
  /* Quiz tables in forms should fit viewport width, not force horizontal scroll */
  form .table-responsive,
  .light-block form .table-responsive,
  .quiz-panel-form .table-responsive {
    overflow-x: visible !important; /* Don't force horizontal scroll */
  }
  
  form .table-responsive .table,
  .light-block form .table-responsive .table,
  .quiz-panel-form .table-responsive .table {
    min-width: 0 !important; /* Remove the 500px minimum width */
    width: 100% !important; /* Fit container width */
    max-width: 100% !important; /* Don't exceed container */
    table-layout: auto; /* Allow natural column sizing */
  }
  
  form .table-responsive .table th,
  form .table-responsive .table td,
  .light-block form .table-responsive .table th,
  .light-block form .table-responsive .table td,
  .quiz-panel-form .table-responsive .table th,
  .quiz-panel-form .table-responsive .table td {
    white-space: normal !important; /* Allow text wrapping */
    word-wrap: break-word; /* Break long words if needed */
    overflow-wrap: break-word; /* Modern property for word breaking */
  }
  
  form .table-responsive .table th h4,
  .light-block form .table-responsive .table th h4,
  .quiz-panel-form .table-responsive .table th h4 {
    white-space: normal !important; /* Allow heading text to wrap */
  }
}

/* Lesson tables with responsive wrapper */
.table-responsive .table {
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border: 1px solid rgba(93, 38, 193, 0.18);
    box-shadow: 0 6px 18px rgba(93, 38, 193, 0.08);
    overflow: hidden;
}

.table-responsive .table thead th {
    background-color: #e0e0e0;
    color: #212121;
    font-weight: 600;
}

.table-responsive .table th,
.table-responsive .table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(55, 55, 56, 0.22);
}

.table-responsive .table tbody tr:nth-child(odd) {
    background: rgba(188, 206, 214, 0.25);
}

.table-responsive .table tbody tr:nth-child(even) {
    background: rgba(207, 216, 220, 0.55);
}

.table-responsive .table tbody tr:hover {
    background: rgba(180, 172, 195, 0.12);
}

.table-responsive .table tbody tr:last-child td {
    border-bottom: none;
}

.table-responsive .table th {
    background: rgba(207, 216, 220, 1);;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.4px;
}

