/* ============================================================
   Course detail pages (course-*.html) — modern, conversion-focused
   redesign. Scoped under .cd- classes so no other page is affected.
   Builds on the brand tokens defined in redesign.css (--vd-*).
   ============================================================ */

:root {
  --cd-sky: #0ea5e9;
  --cd-sky-soft: #e0f2fe;
}

/* Hide the generic page banner on redesigned course pages */
.course-page .page-banner { display: none !important; }

.course-page {
  background: var(--vd-bg, #f6f8fc);
}

/* ---------- HERO ---------- */
.cd-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 111, 0, 0.18), transparent 60%),
    linear-gradient(135deg, #1a237e 0%, #141a5e 60%, #0f1448 100%);
}
.cd-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
  pointer-events: none;
}
.cd-hero .container {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  padding: 92px 20px 84px;
}
.cd-hero-text { max-width: 720px; margin: 0 auto; }
.cd-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd9b3;
  background: rgba(255, 111, 0, 0.16);
  border: 1px solid rgba(255, 173, 110, 0.35);
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.cd-hero-eyebrow svg { width: 15px; height: 15px; flex: none; }
.cd-hero h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  line-height: 1.08;
  font-weight: 700;
  margin: 18px 0 14px;
  letter-spacing: -0.02em;
}
.cd-hero-tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 54ch;
  margin: 0 auto 30px;
}
.cd-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 34px;
}
.cd-fact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  padding: 9px 14px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cd-fact svg { width: 18px; height: 18px; opacity: 0.85; flex: none; }
.cd-fact strong { font-weight: 700; }

.cd-hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* ---------- BUTTONS ---------- */
.cd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 26px;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease;
  will-change: transform;
}
.cd-btn svg { width: 18px; height: 18px; }
.cd-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
  box-shadow: 0 10px 24px rgba(247, 121, 30, 0.35);
}
.cd-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(247, 121, 30, 0.45); }
.cd-btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.35);
}
.cd-btn-ghost:hover { background: rgba(255, 255, 255, 0.16); }
.cd-btn-block { width: 100%; }

/* ---------- BODY LAYOUT ---------- */
.cd-body { padding: 64px 0 80px; }
.cd-body .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: start;
}

.cd-main { display: flex; flex-direction: column; gap: 24px; }

.cd-section {
  background: var(--vd-surface, #fff);
  border: 1px solid var(--vd-border, #e2e8f0);
  border-radius: var(--vd-radius, 16px);
  box-shadow: var(--vd-shadow-sm);
  padding: 30px 32px;
}
.cd-section h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--vd-ink, #0f172a);
  margin: 0 0 16px;
}
.cd-section h2 .cd-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--cd-sky-soft);
  color: #0369a1;
  flex: none;
}
.cd-section h2 .cd-ico svg { width: 20px; height: 20px; }
.cd-section p {
  color: var(--vd-muted, #475569);
  line-height: 1.75;
  font-size: 1.02rem;
  margin: 0 0 14px;
}
.cd-section p:last-child { margin-bottom: 0; }

/* check / feature lists */
.cd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cd-list.cd-two { grid-template-columns: 1fr 1fr; }
.cd-list li {
  display: flex;
  gap: 11px;
  color: var(--vd-ink, #0f172a);
  line-height: 1.55;
  font-size: 0.99rem;
}
.cd-list li svg { width: 20px; height: 20px; color: #16a34a; flex: none; margin-top: 2px; }
.cd-list.cd-req li svg { color: #0ea5e9; }

/* steps */
.cd-steps { counter-reset: step; display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.cd-steps li { display: flex; gap: 16px; align-items: flex-start; }
.cd-steps li::before {
  counter-increment: step;
  content: counter(step);
  flex: none;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #1a237e, #3949ab);
  box-shadow: 0 4px 10px rgba(26, 35, 126, 0.3);
}
.cd-steps li h3 { font-size: 1.02rem; font-weight: 700; margin: 4px 0 4px; color: var(--vd-ink, #0f172a); }
.cd-steps li p { margin: 0; font-size: 0.96rem; }

/* FAQ accordion */
.cd-faq details {
  border: 1px solid var(--vd-border, #e2e8f0);
  border-radius: 12px;
  padding: 0 18px;
  margin-bottom: 10px;
  background: #fff;
  transition: border-color 0.2s ease;
}
.cd-faq details[open] { border-color: #c7d2fe; }
.cd-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 600;
  color: var(--vd-ink, #0f172a);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.cd-faq summary::-webkit-details-marker { display: none; }
.cd-faq summary .cd-chev { transition: transform 0.2s ease; flex: none; }
.cd-faq details[open] summary .cd-chev { transform: rotate(180deg); }
.cd-faq details p { color: var(--vd-muted, #475569); line-height: 1.7; padding: 0 0 16px; margin: 0; }

/* ---------- STICKY ENROLL CARD ---------- */
.cd-aside { position: sticky; top: 100px; }
.cd-card {
  background: var(--vd-surface, #fff);
  border: 1px solid var(--vd-border, #e2e8f0);
  border-radius: var(--vd-radius, 16px);
  box-shadow: var(--vd-shadow-md);
  padding: 26px 24px;
  overflow: hidden;
}
.cd-card-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.cd-card-price .cd-amount { font-size: 2.6rem; font-weight: 700; color: var(--vd-ink, #0f172a); letter-spacing: -0.02em; }
.cd-card-price .cd-orig { font-size: 1.4rem; font-weight: 600; color: var(--vd-muted, #475569); text-decoration: line-through; text-decoration-color: rgba(231, 76, 60, 0.7); }
.cd-card-price .cd-amount.cd-promo { color: #e74c3c; }
.cd-card-price .cd-unit { color: var(--vd-muted, #475569); font-size: 0.95rem; }
.cd-card-save { display: inline-block; margin-top: 10px; font-size: 0.82rem; font-weight: 700; color: #166534; background: #dcfce7; border-radius: 8px; padding: 4px 10px; }
.cd-card-sub { color: var(--vd-muted, #475569); font-size: 0.92rem; margin: 10px 0 20px; }
.cd-card-highlights { list-style: none; margin: 0 0 22px; padding: 18px 0; border-top: 1px solid var(--vd-border); border-bottom: 1px solid var(--vd-border); display: grid; gap: 12px; }
.cd-card-highlights li { display: flex; gap: 10px; align-items: center; font-size: 0.95rem; color: var(--vd-ink, #0f172a); }
.cd-card-highlights li svg { width: 18px; height: 18px; color: #f7931e; flex: none; }
.cd-card .cd-btn { margin-bottom: 12px; }
.cd-card-trust { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--vd-muted, #475569); font-size: 0.85rem; }
.cd-card-trust svg { width: 16px; height: 16px; color: #16a34a; }
.cd-card-contact { text-align: center; margin: 14px 0 0; font-size: 0.9rem; color: var(--vd-muted); }
.cd-card-contact a { color: #1a237e; font-weight: 600; text-decoration: none; }
.cd-card-contact a:hover { text-decoration: underline; }

/* ---------- FINAL CTA ---------- */
.cd-final {
  background: linear-gradient(135deg, #1a237e 0%, #141a5e 100%);
  color: #fff;
  text-align: center;
}
.cd-final .container { padding: 64px 20px; }
.cd-final h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; margin: 0 0 12px; }
.cd-final p { color: rgba(255, 255, 255, 0.8); font-size: 1.05rem; max-width: 52ch; margin: 0 auto 28px; line-height: 1.6; }

/* ---------- reveal animation ---------- */
.cd-reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.cd-reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .cd-hero .container { padding: 66px 20px 58px; }
  .cd-body .container { grid-template-columns: 1fr; }
  .cd-aside { position: static; }
  .cd-card { max-width: 520px; }
}
@media (max-width: 560px) {
  .cd-list.cd-two { grid-template-columns: 1fr; }
  .cd-section { padding: 24px 20px; }
  .cd-hero-actions .cd-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cd-reveal { opacity: 1; transform: none; transition: none; }
  .cd-btn, .cd-btn-primary:hover { transition: none; transform: none; }
}
