/* Local site-specific styles */

/* Hide the registration complete message initially */
#register-complete {
  display: none;
}

/* Lead magnet form styles */
/* .register-button { */
/*   display: inline-block; */
/*   padding: 15px 30px; */
/*   background: #4a90e2; */
/*   color: white; */
/*   text-decoration: none; */
/*   border-radius: 8px; */
/*   font-weight: bold; */
/*   font-size: 18px; */
/*   transition: background 0.3s ease; */
/* } */

/* .register-button:hover { */
/*   background: #357abd; */
/*   color: white; */
/*   text-decoration: none; */
/* } */

/* Lead form container */
.lead-form {
  background: #f8f9fa;
  border: 2px solid #4a90e2;
  border-radius: 8px;
  padding: 20px;
  margin: 20px auto;
  max-width: 400px;
}

.lead-form h3 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.lead-form form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.lead-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.lead-form input[type="text"],
.lead-form input[type="email"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.lead-form button[type="submit"] {
  background: #4a90e2;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.lead-form button[type="submit"]:hover {
  background: #357abd;
}

/* ============================================================
   Course Lesson Layout
   ============================================================ */

/* Break out of the narrow .container for course pages */
.course-lesson-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 72rem;
  width: calc(100vw - 3rem);
  margin-left: 50%;
  transform: translateX(-50%);
}

/* Navigation sidebar */
.course-nav {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a3d52 transparent;
  border-right: 1px solid #3a3d52;
  padding-right: 1rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.course-nav::-webkit-scrollbar {
  width: 4px;
}

.course-nav::-webkit-scrollbar-track {
  background: transparent;
}

.course-nav::-webkit-scrollbar-thumb {
  background: #3a3d52;
  border-radius: 2px;
}

.course-nav-header a {
  font-weight: bold;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.75rem;
}

.course-nav-lessons {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.course-nav-lessons li {
  margin-bottom: 0.15rem;
}

/* Chapter headings — bold, no indent */
.course-nav-lessons li.chapter > a {
  font-weight: bold;
  margin-top: 0.75rem;
}

/* Section links — indented under chapters */
.course-nav-lessons li.section > a {
  padding-left: 1.25rem;
}

.course-nav-lessons li a {
  display: block;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-decoration: none;
}

.course-nav-lessons li a:hover {
  background: #2a2d40;
}

.course-nav-lessons li.current a {
  background: #232635;
  border-left: 3px solid #c3e88d;
  font-weight: bold;
}

/* Lesson content area */
.lesson-content {
  min-width: 0;
  max-width: 50rem;
}

.lesson-body pre {
  overflow-x: auto;
  max-width: 100%;
}

/* Mobile nav toggle — hidden on desktop */
.course-nav-toggle {
  display: none;
}

.course-nav-toggle-btn {
  display: none;
}

/* Responsive: collapsible sidebar on narrow screens */
@media (max-width: 900px) {
  .course-lesson-layout {
    grid-template-columns: 1fr;
    margin-left: 0;
    transform: none;
    width: 100%;
  }

  .course-nav-toggle-btn {
    display: block;
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 101;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #232635;
    border: 1px solid #3a3d52;
    font-size: 1.4rem;
    line-height: 3rem;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    user-select: none;
  }

  .course-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    max-width: 80vw;
    max-height: none;
    overflow-y: auto;
    z-index: 100;
    background: #1a1c2a;
    border-right: 1px solid #3a3d52;
    padding: 1rem;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  /* Show nav when toggle is checked */
  .course-nav-toggle:checked ~ .course-nav {
    transform: translateX(0);
  }

  /* Dim overlay behind nav */
  .course-nav-toggle:checked ~ .course-nav-toggle-btn {
    left: calc(280px + 1rem);
  }
}

/* Course cards on index/detail pages */
.course-card {
  border: 1px solid #3a3d52;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.course-action.enrolled {
  background: #1a2a1a;
  border: 1px solid #c3e88d;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* Enrollment banner (client-side, from localStorage) */
.course-enrolled-banner {
  background: #232635;
  border: 2px solid;
  border-image: linear-gradient(45deg, #82b84b, #c3e88d, #66d9a0) 1;
  padding: 1.75rem 2rem;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.course-enrolled-banner p {
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
  font-weight: bold;
  color: #c3e88d;
}

/* Free-preview pages: top banner + bottom call-to-action */
.preview-banner {
  background: #232635;
  border-left: 4px solid #89aaeb;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0 4px 4px 0;
}

.preview-banner p {
  margin: 0;
  font-size: 0.95rem;
  color: #b0bec5;
}

.preview-banner strong {
  color: #89aaeb;
}

.preview-cta {
  background: #232635;
  border: 2px solid #89aaeb;
  border-radius: 8px;
  padding: 1.75rem 2rem;
  margin-top: 2.5rem;
  text-align: center;
}

.preview-cta p {
  margin: 0 0 1rem 0;
  font-size: 1.05rem;
}

.preview-cta a.course-cta-button {
  font-size: 1.1rem;
  padding: 0.75rem 2rem;
  margin-top: 0.5rem;
}

/* Free-preview tag inline in the Course Outline list */
.preview-tag {
  margin-left: 0.4rem;
  font-size: 0.9rem;
  font-style: italic;
  color: #c3e88d;
}
