/* Course detail page only. Loaded after styles.css, from views/course-detail.ejs. */

:root {
  --cp-navy: #003f69;
  --cp-navy-deep: #06294a;
  --cp-blue: #1764a4;
  --cp-gold: #f2b705;
  --cp-gold-hover: #ffc61a;
  --cp-ink: #1d2b3a;
  --cp-muted: #5b6b7b;
  --cp-line: #dfe6ee;
  --cp-tint: #f3f7fb;
  --cp-green: #12805c;
  --cp-green-tint: #e4f5ee;
  --cp-radius: 16px;
  --cp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-padding-top: var(--cp-scroll-offset, 150px); }

/* Register button */
.cp-register {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0 0.6rem 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--cp-gold);
  color: #16202b;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 8px 18px -10px rgba(190, 140, 0, 0.9);
  transition: background-color 180ms ease, box-shadow 220ms ease, transform 160ms var(--cp-ease);
}
.cp-register:hover { background: var(--cp-gold-hover); color: #16202b; box-shadow: 0 12px 22px -10px rgba(190, 140, 0, 1); }
.cp-register:active { transform: scale(0.97); }
.cp-register:focus-visible,
.cp-format:focus-visible,
.cp-chip:focus-visible,
.cp-more:focus-visible,
.cp-venue:focus-visible,
.cp-nav-links a:focus-visible { outline: 3px solid var(--cp-blue); outline-offset: 2px; }
.cp-register .cp-register-arrow {
  width: 30px;
  height: 30px;
  padding: 8px;
  border-radius: 50%;
  background: #16202b;
  color: var(--cp-gold);
  transition: transform 260ms var(--cp-ease);
}
.cp-register:hover .cp-register-arrow { transform: translateX(3px); }
.cp-register:not(:has(.cp-register-arrow)) { padding: 0 1.4rem; }
.cp-hero-register { min-height: 50px; }

/* Sticky section navigation */
.cp-nav {
  position: sticky;
  top: var(--cp-header-height, 70px);
  z-index: 40;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--cp-line);
  box-shadow: 0 10px 22px -20px rgba(6, 41, 74, 0.55);
}
.cp-nav-row { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 64px; }
.cp-nav-links { display: flex; align-items: stretch; align-self: stretch; gap: 0.25rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cp-nav-links::-webkit-scrollbar { display: none; }
.cp-nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 0.8rem;
  color: var(--cp-muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: color 160ms ease;
}
.cp-nav-links a::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--cp-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--cp-ease);
}
.cp-nav-links a:hover,
.cp-nav-links a.is-current { color: var(--cp-navy); }
.cp-nav-links a.is-current::after { transform: scaleX(1); }
.cp-nav-cta { display: flex; flex: none; align-items: center; gap: 0.9rem; }
.cp-nav-price { display: grid; text-align: right; line-height: 1.15; }
.cp-nav-price small { color: var(--cp-muted); font-size: 0.72rem; font-weight: 600; }
.cp-nav-price strong { color: var(--cp-navy); font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cp-nav-cta .cp-register { min-height: 42px; }
.cp-nav-cta .cp-register-arrow { width: 26px; height: 26px; padding: 7px; }

/* Booking desk */
.cp-book { padding: 1.5rem 0 1.75rem; background: var(--cp-tint); }
.cp-kicker { margin: 0 0 0.6rem; color: var(--cp-blue); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.cp-book-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.cp-book-head h2 { margin: 0; color: var(--cp-navy); font-size: 1.3rem; font-weight: 800; line-height: 1.2; }
.cp-book-facts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.9rem; margin: 0; padding: 0; list-style: none; }
.cp-book-facts li { display: inline-flex; align-items: center; gap: 0.3rem; color: var(--cp-ink); font-size: 0.8rem; font-weight: 700; white-space: nowrap; }
.cp-fact-icon { width: 13px; height: 13px; color: var(--cp-blue); }

.cp-formats { display: none; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.cp-js .cp-formats { display: grid; }
.cp-format {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--cp-line);
  border-radius: 10px;
  background: #ffffff;
  color: var(--cp-ink);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease, transform 160ms var(--cp-ease);
}
.cp-format:hover { border-color: var(--cp-blue); }
.cp-format:active { transform: scale(0.99); }
.cp-format.is-active { border-color: var(--cp-navy); background: var(--cp-navy); color: #ffffff; }
.cp-format-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; background: var(--cp-tint); color: var(--cp-navy); transition: background-color 200ms ease, color 200ms ease; }
.cp-format.is-active .cp-format-icon { background: var(--cp-gold); color: #16202b; }
.cp-format-svg { width: 17px; height: 17px; }
.cp-format-copy,
.cp-format-meta { display: grid; gap: 0.05rem; min-width: 0; line-height: 1.2; }
.cp-format-copy strong { font-size: 0.98rem; font-weight: 800; }
.cp-format-copy small,
.cp-format-meta small { color: var(--cp-muted); font-size: 0.76rem; font-weight: 600; transition: color 200ms ease; }
.cp-format.is-active small { color: #c7dbec; }
.cp-format-meta { text-align: right; }
.cp-format-meta b { font-size: 0.86rem; font-weight: 800; }

.cp-panel { margin-top: 0.6rem; padding: 0.55rem 0.8rem; border: 1px solid var(--cp-line); border-radius: 10px; background: #ffffff; }
.cp-js .cp-panel:not(.is-active) { display: none; }
.cp-panel.is-entering { animation: cp-panel-in 240ms var(--cp-ease); }
.cp-panel-title { margin: 0 0 0.5rem; color: var(--cp-navy); font-size: 1rem; font-weight: 800; }
.cp-js .cp-panel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes cp-panel-in { from { transform: translateY(6px); } to { transform: none; } }

.cp-filters { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.1rem 0 0.5rem; border-bottom: 1px solid var(--cp-line); }
.cp-chip { display: inline-flex; align-items: center; gap: 0.3rem; min-height: 28px; padding: 0 0.6rem; border: 1px solid var(--cp-line); border-radius: 999px; background: #ffffff; color: var(--cp-ink); font-family: inherit; font-size: 0.78rem; font-weight: 700; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease; }
.cp-chip i { color: var(--cp-muted); font-size: 0.7rem; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.cp-chip:hover { border-color: var(--cp-blue); color: var(--cp-navy); }
.cp-chip.is-active { border-color: var(--cp-navy); background: var(--cp-navy); color: #ffffff; }
.cp-chip.is-active i { color: #c7dbec; }

.cp-rows { margin: 0; padding: 0; list-style: none; }
.cp-row {
  display: grid;
  grid-template-columns: 145px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: 0.32rem 0.45rem;
  border-bottom: 1px solid var(--cp-line);
  transition: background-color 180ms ease;
}
.cp-row:last-child { border-bottom: 0; }
.cp-row:hover { background: var(--cp-tint); }
.cp-row.is-next { background: #fff9e8; }
.cp-row[hidden] { display: none; }
.cp-js [data-cp-rows]:not(.is-expanded):not(.is-filtered) .cp-row-more { display: none; }

.cp-date { color: var(--cp-muted); font-size: 0.82rem; font-weight: 600; white-space: nowrap; }
.cp-date strong { color: var(--cp-navy); font-size: 0.98rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.cp-date-icon { display: none; }

.cp-where { display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.6rem; min-width: 0; }
.cp-where h4 { margin: 0; color: var(--cp-ink); font-size: 0.95rem; font-weight: 800; line-height: 1.25; }
.cp-badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.cp-badge-next { background: #16202b; color: var(--cp-gold); }
.cp-badge-fee { background: var(--cp-green-tint); color: var(--cp-green); }
.cp-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #ff4d4f; animation: cp-pulse 1.8s ease-in-out infinite; }
@keyframes cp-pulse { 50% { opacity: 0.35; } }
.cp-venue { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0; border: 0; background: none; color: var(--cp-blue); font-family: inherit; font-size: 0.76rem; font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: text-decoration-color 160ms ease; }
.cp-venue:hover { text-decoration-color: currentColor; }
.cp-venue-icon { width: 11px; height: 11px; }

.cp-fee { display: flex; align-items: baseline; justify-content: flex-end; gap: 0.25rem; }
.cp-fee strong { color: var(--cp-navy); font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cp-fee small { color: var(--cp-muted); font-size: 0.72rem; font-weight: 600; white-space: nowrap; }

.cp-row .cp-register { gap: 0.4rem; min-height: 36px; padding: 0 0.35rem 0 0.9rem; font-size: 0.84rem; box-shadow: none; }
.cp-row .cp-register-arrow { width: 24px; height: 24px; padding: 6px; }

.cp-status { margin: 0.4rem 0 0.1rem; color: var(--cp-muted); font-size: 0.8rem; text-align: center; }
.cp-status:empty { display: none; }
.cp-more { display: none; align-items: center; justify-content: center; gap: 0.35rem; width: 100%; min-height: 34px; margin-top: 0.15rem; border: 0; border-top: 1px solid var(--cp-line); background: none; color: var(--cp-navy); font-family: inherit; font-size: 0.82rem; font-weight: 800; cursor: pointer; transition: background-color 160ms ease; }
.cp-js .cp-more { display: flex; }
.cp-js .cp-more[hidden] { display: none; }
.cp-more:hover { background: var(--cp-tint); }
.cp-more-icon { width: 14px; height: 14px; transform: rotate(90deg); transition: transform 240ms var(--cp-ease); }
.cp-more[aria-expanded="true"] .cp-more-icon { transform: rotate(-90deg); }

.cp-empty { display: grid; justify-items: center; gap: 0.35rem; padding: 1.1rem 1rem; text-align: center; }
.cp-empty strong { color: var(--cp-navy); font-size: 1rem; }
.cp-empty p { margin: 0 0 0.3rem; color: var(--cp-muted); font-size: 0.9rem; }

/* Course content */
.section-detail-body { background: var(--cp-tint); }
.section-detail-body .detail-grid { align-items: start; }
.detail-content .course-info-card { border: 1px solid var(--cp-line); border-top: 1px solid var(--cp-line); border-radius: var(--cp-radius); background: #ffffff; box-shadow: 0 18px 40px -36px rgba(6, 41, 74, 0.5); }
.course-info-card .course-info-icon { background: var(--cp-navy); color: var(--cp-gold); }
.course-info-card .detail-section-kicker { color: var(--cp-blue); letter-spacing: 0.12em; }
.course-info-card .detail-section-title { color: var(--cp-navy); font-weight: 800; }

.detail-content #objectives .course-info-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.7rem; counter-reset: cp-goal; }
.detail-content #objectives .course-info-list > li { position: relative; display: block; margin: 0; padding: 0.95rem 1rem 0.95rem 3.3rem; border: 1px solid var(--cp-line); border-radius: 12px; background: var(--cp-tint); color: var(--cp-ink); font-weight: 600; line-height: 1.4; counter-increment: cp-goal; }
.detail-content #objectives .course-info-list-icon { display: none; }
.detail-content #objectives .course-info-list > li::before { content: counter(cp-goal, decimal-leading-zero); position: absolute; top: 0.9rem; left: 0.95rem; color: var(--cp-blue); font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.detail-content #audience .course-info-list,
.detail-content #methodology .course-info-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.detail-content #audience .course-info-list > li,
.detail-content #methodology .course-info-list > li { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.55rem 0.9rem 0.55rem 0.6rem; border: 1px solid var(--cp-line); border-radius: 999px; background: #ffffff; color: var(--cp-ink); font-weight: 600; }
.detail-content #audience .course-info-list-icon,
.detail-content #methodology .course-info-list-icon { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: var(--cp-tint); color: var(--cp-blue); }

.action-card { display: block; padding: 0; overflow: hidden; border: 1px solid var(--cp-line); border-radius: var(--cp-radius); background: #ffffff; box-shadow: 0 18px 40px -36px rgba(6, 41, 74, 0.5); }
.action-card > .eyebrow,
.action-card > h3,
.action-card > p { padding-right: 1.4rem; padding-left: 1.4rem; background: var(--cp-navy); color: #ffffff; }
.action-card > .eyebrow { display: flex; width: auto; margin: 0; padding-top: 1.4rem; color: var(--cp-gold); }
.action-card > .eyebrow::before { background: var(--cp-gold); }
.action-card > h3 { margin: 0; padding-top: 0.5rem; padding-bottom: 0.5rem; font-size: 1.35rem; font-weight: 800; }
.action-card > p:not(.eyebrow) { margin: 0; padding-bottom: 1.4rem; color: #d3e2ef; }
.action-card .action-list { padding: 1.2rem 1.4rem 0; }
.action-card .certificate-card { margin: 1.2rem 1.4rem; border: 1px solid var(--cp-line); border-radius: 12px; background: var(--cp-tint); }

/* Course outline: ruled notebook paper. Every text line is one --cp-rule tall so words sit on the printed lines. */
#agenda { background: var(--cp-tint); }
.agenda-card {
  --cp-rule: 32px;
  --cp-margin: 128px;
  --cp-rule-color: rgba(23, 100, 164, 0.24);
  --cp-margin-color: rgba(214, 55, 70, 0.6);
  position: relative;
  padding: var(--cp-rule) 16px var(--cp-rule) 0;
  border: 0;
  border-radius: 3px 8px 8px 3px;
  background-color: #ffffff;
  background-image:
    linear-gradient(to right, transparent calc(var(--cp-margin) - 2px), var(--cp-margin-color) calc(var(--cp-margin) - 2px), var(--cp-margin-color) var(--cp-margin), transparent var(--cp-margin)),
    linear-gradient(to bottom, transparent calc(var(--cp-rule) - 1px), var(--cp-rule-color) calc(var(--cp-rule) - 1px));
  background-position: 0 0, 0 -5px;
  background-repeat: no-repeat, repeat-y;
  background-size: 100% 100%, 100% var(--cp-rule);
  box-shadow: 0 1px 2px rgba(6, 41, 74, 0.18), 0 7px 0 -3px #ffffff, 0 8px 2px -3px rgba(6, 41, 74, 0.18), 0 18px 28px -18px rgba(6, 41, 74, 0.4);
}
.agenda-card:hover { box-shadow: 0 1px 2px rgba(6, 41, 74, 0.18), 0 7px 0 -3px #ffffff, 0 8px 2px -3px rgba(6, 41, 74, 0.18), 0 22px 30px -18px rgba(6, 41, 74, 0.5); }
.agenda-card::before,
.agenda-card::after {
  content: "";
  position: absolute;
  left: 9px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--cp-tint);
  box-shadow: inset 0 1px 2px rgba(60, 50, 20, 0.35);
}
.agenda-card::before { top: 40px; }
.agenda-card::after { bottom: 40px; }
.agenda-card h3,
.agenda-card h4 { margin: 0; padding-left: calc(var(--cp-margin) + 12px); line-height: var(--cp-rule); }
.agenda-timeline { display: block; margin: 0; }
.agenda-timeline li { grid-template-columns: var(--cp-margin) minmax(0, 1fr); gap: 0; padding: 0; border: 0; line-height: var(--cp-rule); }
.agenda-timeline time { padding-left: 30px; }
.agenda-timeline li > span { padding-left: 12px; }
.agenda-timeline li.is-break { border: 0; background: none; }
.agenda-timeline li.is-break strong { padding: 0 0.35em; background: linear-gradient(transparent 22%, rgba(255, 221, 80, 0.85) 22%, rgba(255, 221, 80, 0.85) 82%, transparent 82%); }
.agenda-timeline .agenda-continuation { line-height: 1; }
.agenda-card .simple-list { display: block; margin: 0; padding: 0 0 0 calc(var(--cp-margin) + 12px); }
.agenda-card .simple-list li { margin: 0; padding: 0; border: 0; line-height: var(--cp-rule); }

/* Closing call to action */
.cp-closing { padding: 0 0 clamp(3rem, 6vw, 5rem); background: #ffffff; }
.cp-closing-card { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 2rem; overflow: hidden; padding: clamp(1.6rem, 4vw, 2.75rem); border-radius: 22px; background: linear-gradient(120deg, var(--cp-navy-deep) 0%, var(--cp-navy) 60%, var(--cp-blue) 130%); color: #ffffff; }
.cp-closing-card > * { position: relative; }
.cp-closing-card::before { content: ""; position: absolute; right: -80px; top: -130px; width: 340px; height: 340px; border: 56px solid rgba(242, 183, 5, 0.14); border-radius: 50%; }
.cp-closing .cp-kicker { color: var(--cp-gold); }
.cp-closing h2 { margin: 0; color: #ffffff; font-size: clamp(1.5rem, 3vw, 2.15rem); font-weight: 800; line-height: 1.15; text-wrap: balance; }
.cp-closing-next { margin: 0.6rem 0 0; color: #d3e2ef; }
.cp-closing-next strong { color: #ffffff; }
.cp-closing-actions { display: flex; flex: none; flex-wrap: wrap; gap: 0.65rem; }
.cp-closing-ghost { display: inline-flex; align-items: center; min-height: 46px; padding: 0 1.25rem; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 999px; background: none; color: #ffffff; font-family: inherit; font-size: 0.95rem; font-weight: 800; cursor: pointer; transition: background-color 160ms ease, border-color 160ms ease; }
.cp-closing-ghost:hover { border-color: #ffffff; background: rgba(255, 255, 255, 0.1); }

@media (max-width: 820px) {
  .cp-nav-price { display: none; }
  .cp-nav-row { min-height: 54px; gap: 0.6rem; }
  .cp-nav-links a { font-size: 0.82rem; padding: 0 0.55rem; }
  .cp-nav-links a::after { left: 0.55rem; right: 0.55rem; }
  .cp-nav-cta .cp-register { min-height: 38px; padding: 0 0.95rem; font-size: 0.86rem; }
  .cp-nav-cta .cp-register-arrow { display: none; }
  .cp-closing-card { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 680px) {
  .agenda-card { --cp-margin: 116px; padding-right: 10px; }
  .agenda-card::before,
  .agenda-card::after { left: 5px; width: 11px; height: 11px; }
  .agenda-timeline time { padding-left: 21px; }

  .cp-book { padding: 1.1rem 0 1.25rem; }
  .cp-book-head h2 { font-size: 1.15rem; }
  .cp-book-facts { display: none; }

  .cp-formats { gap: 0.4rem; }
  .cp-format { grid-template-columns: 1fr; gap: 0; padding: 0.45rem 0.65rem; }
  .cp-format-icon,
  .cp-format-copy small,
  .cp-format-meta b { display: none; }
  .cp-format-copy strong { font-size: 0.92rem; }
  .cp-format-meta { text-align: left; }

  .cp-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .cp-chip { flex: none; }

  .cp-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date fee" "where register"; gap: 0.15rem 0.6rem; padding: 0.5rem 0.2rem; }
  .cp-row.is-next { padding-right: 0.4rem; padding-left: 0.4rem; }
  .cp-date { grid-area: date; }
  .cp-where { grid-area: where; }
  .cp-fee { grid-area: fee; }
  .cp-row .cp-register { grid-area: register; justify-self: end; min-height: 38px; }

  .detail-content #objectives .course-info-list { grid-template-columns: 1fr; }
  .cp-closing-actions { width: 100%; }
  .cp-closing-actions > * { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .cp-register,
  .cp-register-arrow,
  .cp-format,
  .cp-more-icon,
  .cp-nav-links a::after { transition: none; }
  .cp-panel.is-entering,
  .cp-live-dot { animation: none; }
}
