/* Course detail — extends home-landing design tokens */

html,
body.lu-page {
  margin: 0;
  padding: 0;
}

.cp-hero {
  background: var(--lu-ink);
  color: #fff;
  padding: 28px 0 40px;
  position: relative;
  z-index: 0;
}

.cp-hero .lu-container {
  max-width: var(--lu-max);
}

.cp-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--lu-hero-muted);
  margin-bottom: 36px;
}

.cp-breadcrumb a {
  color: var(--lu-hero-muted);
  text-decoration: underline;
}

.cp-breadcrumb span[aria-current] {
  color: #fff;
}

.cp-hero__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 760px;
}

.cp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cp-badge {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
}

.cp-badge--lime {
  background: var(--lu-lime);
  color: var(--lu-ink);
  font-weight: 700;
}

.cp-badge--outline {
  border: 1px solid rgb(56, 60, 85);
  color: #fff;
}

.cp-hero__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: -2px;
  margin: 0;
}

.cp-hero__lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--lu-hero-muted);
  margin: 0;
}

.cp-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  font-size: 15px;
  color: var(--lu-nav-muted);
  padding-top: 8px;
}

.cp-hero__meta strong {
  color: #fff;
  font-weight: 700;
}

.cp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-areas: 'main aside';
  align-items: start;
  gap: 40px;
  padding-bottom: 80px;
  position: relative;
  isolation: isolate;
}

.cp-main {
  grid-area: main;
  min-width: 0;
  padding-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 56px;
  position: relative;
  z-index: 1;
}

.cp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--lu-line);
  margin: 0;
  padding: 0;
}

.cp-tabs a {
  display: block;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 600;
  color: var(--lu-muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}

.cp-tabs a:hover {
  color: var(--lu-ink);
}

.cp-tabs a.is-active {
  color: var(--lu-ink);
  font-weight: 700;
  border-bottom-color: var(--lu-purple);
}

.cp-section h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -1px;
  margin: 0 0 14px;
}

.cp-section h2.cp-h2-sm {
  font-size: 28px;
  letter-spacing: -0.5px;
}

.cp-prose {
  font-size: 17px;
  line-height: 1.7;
  color: #33384f;
}

.cp-prose p {
  margin: 0 0 1em;
}

.cp-card {
  background: #fff;
  border: 1px solid var(--lu-line);
  border-radius: 24px;
  padding: 32px;
}

.cp-learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cp-learn-grid li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 16px;
  line-height: 1.5;
}

.cp-learn-grid svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.cp-audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.cp-audience-card {
  border-radius: 16px;
  padding: 20px;
  font-size: 15px;
  line-height: 1.5;
}

.cp-audience-card:nth-child(3n + 1) {
  background: #e6e0ff;
}

.cp-audience-card:nth-child(3n + 2) {
  background: #eef9c4;
}

.cp-audience-card:nth-child(3n) {
  background: #d5f3ee;
}

.cp-audience-card strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}

.cp-syllabus details {
  background: #fff;
  border: 1px solid var(--lu-line);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 12px;
}

.cp-syllabus details[open] {
  padding-bottom: 20px;
}

.cp-syllabus summary {
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  list-style-position: inside;
}

.cp-syllabus details p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lu-muted);
}

.cp-cert-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px;
  background: var(--lu-purple);
  color: #fff;
  border-radius: 24px;
  padding: 32px;
}

.cp-cert-band h2 {
  color: #fff;
  margin-bottom: 10px;
}

.cp-cert-band p {
  color: #e6e0ff;
  line-height: 1.6;
  margin: 0;
}

.cp-cert-preview {
  flex: 1 1 280px;
  min-height: 160px;
  background: #fff;
  color: var(--lu-muted);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.cp-educator {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--lu-line);
  border-radius: 24px;
  padding: 28px;
}

.cp-educator__photo {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--lu-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--lu-muted);
  flex-shrink: 0;
}

.cp-educator__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--lu-purple-dark);
  margin: 0 0 4px;
}

.cp-educator h2 {
  font-size: 20px;
  margin: 0 0 4px;
}

.cp-reviews-placeholder {
  border: 1px dashed #c3c5d6;
  border-radius: 16px;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lu-muted);
  font-size: 14px;
}

.cp-faq details {
  background: #fff;
  border: 1px solid var(--lu-line);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 12px;
}

.cp-faq summary {
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.cp-faq details p {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lu-muted);
}

/* Sidebar — right column; no negative overlap into hero */
.cp-aside {
  grid-area: aside;
  width: 100%;
  max-width: 380px;
  justify-self: end;
  margin: 40px 0 0;
  position: sticky;
  top: 96px;
  align-self: start;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--lu-line);
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 18, 34, 0.08);
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 2;
}

.cp-aside__visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  border-radius: 16px;
  background: #e6e0ff;
  color: var(--lu-purple-dark);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 72px;
  font-weight: 800;
  overflow: hidden;
}

.cp-aside__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 170px;
}

.cp-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.cp-price {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 44px;
  font-weight: 800;
}

.cp-price-note {
  font-size: 14px;
  color: var(--lu-muted);
}

.cp-btn-enrol {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px;
  background: var(--lu-purple);
  color: #fff !important;
  font-weight: 700;
  font-size: 17px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.cp-btn-enrol:hover {
  background: var(--lu-purple-dark);
  opacity: 1;
}

.cp-btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  border: 2px solid var(--lu-ink);
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  color: var(--lu-ink) !important;
}

.cp-aside__perks {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: #33384f;
}

.cp-aside__footer {
  font-size: 14px;
  color: var(--lu-muted);
  padding-top: 14px;
  border-top: 1px solid var(--lu-line);
  margin: 0;
}

.cp-aside__footer a {
  color: var(--lu-purple-dark);
  text-decoration: underline;
}

/* Related courses */
.cp-related {
  background: #fff;
  border-top: 1px solid var(--lu-line);
  padding: 72px 0;
}

.cp-related h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -1px;
  margin: 0 0 24px;
}

.cp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.cp-related-card {
  display: flex;
  gap: 18px;
  padding: 16px;
  background: var(--lu-bg);
  border-radius: 18px;
  align-items: flex-start;
}

.cp-related-card__icon {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 30px;
  font-weight: 800;
  background: #e6e0ff;
  color: var(--lu-purple-dark);
}

.cp-related-card:nth-child(3n + 2) .cp-related-card__icon {
  background: #ffebc7;
  color: #8a4b00;
}

.cp-related-card:nth-child(3n) .cp-related-card__icon {
  background: var(--lu-ink);
  color: var(--lu-lime);
}

.cp-testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.cp-testimonial {
  background: #fff;
  border: 1px solid var(--lu-line);
  border-radius: 16px;
  padding: 20px;
  font-size: 15px;
  line-height: 1.5;
  color: #33384f;
}

.cp-testimonial cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: var(--lu-ink);
  margin-bottom: 4px;
  font-size: 14px;
}

.cp-testimonial .cp-testimonial__role {
  font-size: 13px;
  color: var(--lu-muted);
  font-weight: 500;
}

.cp-related-card__meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--lu-muted);
}

.cp-related-card__title {
  font-size: 18px;
  font-weight: 700;
  display: block;
  margin: 6px 0;
}

.cp-related-card__sub {
  font-size: 14px;
  color: var(--lu-muted);
}

.cp-footer--course {
  background: var(--lu-ink);
  color: var(--lu-hero-muted);
}

.cp-footer--course .lu-footer__legal {
  border-top-color: #262a42;
}

/* Generation overlay (shared with legacy behaviour) */
.generation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.generation-overlay .gen-panel {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  max-width: 24rem;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.progress-container {
  width: 100%;
  background: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}

#progress-bar {
  height: 8px;
  background: var(--lu-purple);
  width: 0%;
  transition: width 0.5s ease;
}

.loader {
  border: 4px solid rgba(91, 61, 245, 0.2);
  border-radius: 50%;
  border-top: 4px solid var(--lu-purple);
  width: 40px;
  height: 40px;
  animation: cp-spin 1s linear infinite;
  margin: 0 auto 12px;
}

@keyframes cp-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .cp-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
    gap: 28px;
  }

  .cp-aside {
    max-width: 320px;
  }
}

@media (max-width: 720px) {
  .cp-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      'aside'
      'main';
  }

  .cp-aside {
    margin: 24px 0 0;
    max-width: none;
    justify-self: stretch;
    position: static;
  }

  .cp-main {
    padding-top: 24px;
  }
}