

/* ------------------------------
   TOPIC VISIBILITY
   ------------------------------ */

/* All topics hidden by default */
.course-topic,
.course-quiz,
.course-cert {
    display: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Intro visible on load */
.course-intro {
    display: block;
}

/* Active topic visible */
.course-topic.active,
.course-quiz.active,
.course-cert.active {
    display: block;
    opacity: 1;
}

/* ------------------------------
   TOPIC BUTTONS
   ------------------------------ */

.course-btn {
    display: inline-block;
    position: relative;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Disabled state */
.course-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: auto; /* allow hover for tooltip */
}

/* Tooltip for disabled buttons */
.course-btn.disabled:hover::after {
    content: "Complete all items to continue";
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 999;
    pointer-events: none;
}

.course-btn.disabled:hover::before {
    content: "";
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    pointer-events: none;
}

/* Enabled state */
.course-btn.enabled {
    opacity: 1;
    cursor: pointer;
    pointer-events: auto;
}

/* ------------------------------
   ORIENTATION MODE SWITCHING
   ------------------------------ */

/* Portrait mode = no buttons */
@media (orientation: portrait) {
    .course-btn {
        display: none !important;
    }
}

/* Landscape mode = buttons visible */
@media (orientation: landscape) {
    .course-btn {
        display: inline-block !important;
    }
}

/* Sticky warning for portrait mode */
.scroll-warning {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffcc00;
    color: #000;
    padding: 12px 16px;
    text-align: center;
    font-weight: bold;
    z-index: 9999;
}

/* Only show in portrait */
@media (orientation: portrait) {
    .scroll-warning.active {
        display: block;
    }
}

/* Prevent header overlap when scrolling to anchors */
[id^="topic-"],
#intro {
    scroll-margin-top: 80px;
}




/* =========================================================
   END COURSE ENGINE CSS
   ========================================================= */

/*====================================
   GRASP 1.4 - Course Engine CSS
=================================== */
/* ========== Layout basics ========== */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: #222;
  background: #fff;
  margin: 0;
  padding: 0;
}

#course-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

#course-progress {
  max-width: 800px;
  margin: 1rem auto 0.5rem;
  padding: 0 1rem;
}

/* ========== Sections (progressive reveal) ========== */

.course-section {
  display: none;
  margin-bottom: 2.5rem;
}

.course-section.revealed {
  display: block;
}

.course-section h2 {
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
}

/* ========== Progress bar ========== */

.course-progress-bar {
  width: 100%;
  height: 8px;
  background: #eee;
  border-radius: 4px;
  overflow: hidden;
}

.course-progress-fill {
  height: 100%;
  width: 0;
  background: #6c5ce7;
  transition: width 0.3s ease;
}

/* ========== Mini progress (mobile) ========== */

.mini-progress {
  display: none;
}

@media (max-width: 600px) {
  .mini-progress {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #eee;
    z-index: 9999;
  }

  .mini-progress-fill {
    height: 100%;
    width: 0;
    background: #6c5ce7;
    transition: width 0.3s ease;
  }
}

/* ========== Next button (per section) ========== */

.course-next-btn {
  margin: 1.5rem auto 0;
  display: block;
  width: 50%;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: none;
  background: #6c5ce7;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.3s ease, background 0.2s ease, transform 0.1s ease;
}

.course-next-btn:hover:not([disabled]) {
  background: #5844d6;
  transform: translateY(-1px);
}

.course-next-btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  position: relative;
}

.course-next-btn.enabled {
  opacity: 1;
}

/* Tooltip on disabled Next */
.course-next-btn[disabled]:hover::after {
  content: "Please complete all items";
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 1;
  z-index: 999;
}

.course-next-btn[disabled]:hover::before {
  content: "";
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
  opacity: 1;
  z-index: 999;
}

/* ========== Section complete badge ========== */

.section-complete-badge {
  display: inline-block;
  background: #2ecc71;
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.5rem;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.4s ease, transform 0.3s ease;
}

.section-complete-badge.show {
  opacity: 1;
  transform: scale(1);
}

/* ========== Accordion ========== */

.accordion-group {
  margin: 1.25rem 0;
}

.accordion-group > h3 {
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}

.accordion-item {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  background: #fff;
}

.accordion-header {
  padding: 0.6rem 0.8rem;
  background: #f7f7f7;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-header::after {
  content: "▾";
  font-size: 0.8rem;
  opacity: 0.7;
}

.accordion-item.open .accordion-header::after {
  content: "▴";
}

.accordion-body {
  display: none;
  padding: 0.6rem 0.8rem 0.8rem;
  font-size: 0.95rem;
}

.accordion-item.open .accordion-body {
  display: block;
}

/* ========== Quiz ========== */

.quiz-block {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0.8rem 0.9rem;
  margin: 1.25rem 0;
  background: #FFF1D5;
}

.quiz-block > p {
  margin: 0 0 0.5rem;
  font-weight: 600;
}

.quiz-option {
  padding: 0.45rem 0.6rem;
  border-radius: 4px;
  margin-top: 0.3rem;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.05s ease;
}

.quiz-option:hover {
  background: #f2f2ff;
}

.quiz-option.correct {
  background: #d4edda;
}

.quiz-option.incorrect {
  background: #f8d7da;
}

/* ========== Reflection ========== */

.reflect-block {
  border-left: 4px solid #6c5ce7;
  padding: 0.7rem 0.9rem;
  margin: 1.25rem 0;
  background: #f9f7ff;
  font-size: 0.95rem;
}

.reflect-block strong {
  display: block;
  margin-bottom: 0.35rem;
}

/* ========== Activity (card style) ========== */

.activity-block {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  margin: 1.25rem 0;
  background: #fddef8;
  font-size: 0.95rem;
}

.activity-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.activity-done-btn {
  margin-top: 0.8rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  border: none;
  background: #6c5ce7;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.05s ease;
}

.activity-done-btn:hover {
  background: #5844d6;
  transform: translateY(-1px);
}

.activity-done-btn.completed {
  background: #2ecc71;
  opacity: 0.95;
}

/* Default checkbox icon */
.activity-done strong::before {
    content: "☐ ";
    margin-right: 6px;
	color: red;
    display: inline-block;
}

.activity-done.selected strong::before {
    content: "✔️ ";
    color: #00c853;
    font-weight: bold;
}



/* ========== Callouts (tip / warning / example) ========== */

p.tip,
p.warning,
p.example {
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  margin: 0.9rem 0;
  font-size: 0.95rem;
}

p.tip {
  background: #e8f7ff;
  border-left: 4px solid #3498db;
}

p.warning {
  background: #fff4e5;
  border-left: 4px solid #e67e22;
}

p.example {
  background: #f4f9f4;
  border-left: 4px solid #27ae60;
}

/* ========== Generic content ========== */

.course-section p {
  margin: 0.6rem 0;
}

.course-section ul,
.course-section ol {
  margin: 0.6rem 0 0.6rem 1.4rem;
}

/* ========== Return to top button ========== */

.return-top-btn {
  position: fixed;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);   /* centers the button */
  width: 50%;                    /* your requirement */
  max-width: 400px;              /* optional: prevents it getting too wide */
  background: #6c5ce7;
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  display: none;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
	
	opacity: 1;
  transition: opacity 0.4s ease;
}


/* ========== Small screen tweaks ========== */

@media (max-width: 600px) {
  #course-content,
  #course-progress {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .course-section h2 {
    font-size: 1.4rem;
  }

  .course-next-btn {
    width: 100%;
  }
}

.section-card-wrapper {
  margin-bottom: 2rem;
}


.grasp-card {
  background: #ffffff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1.5rem 1.2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.course-print-btn {
	
  display: block;
  margin-left: auto;
	margin-right: auto;/* centres horizontally */
  padding: 8px 14px;
  /* background: #6c5ce7; */
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s ease;
  text-align: center;
}

.course-print-btn:hover {
	color: white;
  background: #FEAD00;
}


.h2-product {
    color: var(--nv-primary-accent) !important;
}

