/* =================================================================
   Willow — Social media courses and certificates
   (social-media-courses-and-certificates.html + NL)

   The courses' own page (Kjell, 2026-11-26), replacing the course grid on
   the Academy hub. Built from global components: .page-head, .section,
   .sec-head, .feat-pair/.feat-tile, .card, .btn, .cta-card. What is here:

   - The course card (.card.course), moved as-is from page-resources.css
     now that the hub no longer shows it, plus its progress line.
   - The "how it works" pair: the certificate preview image beside three
     numbered steps.
   - The per-course detail: what you'll learn beside a facts card.
   ================================================================= */

.page-head-ctas { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- Course cards (moved from page-resources.css) ---- */
  .course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
  .course {
  /* shell from .card in styles.css (markup: `card course`). Same arrangement
     as .ebook-card: padding 0 so the cover reaches the card edge, overflow
     hidden so it does not poke square corners out of the rounded card, and
     the text below carries its own inset. */
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 12px;
  }
  .course .cover {
    aspect-ratio: 4/3;
    /* No radius of its own — the card clips the top corners. Same reasoning as
       .ebook-card .cover. */
    border-radius: 0;
    background: var(--paper);
    position: relative;
    overflow: hidden;
  }
  .course .cover img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
  }
  .course .row1,
  .course h3,
  .course .desc { padding-left: 20px; padding-right: 20px; }
  /* margin, not padding: .audience carries a dashed border-top, and padding
     would let that rule run edge to edge instead of sitting inset like it did
     when the card itself was padded. */
  .course .audience { margin: 0 20px 20px; }
  .course > .cover + * { margin-top: 4px; }
  .course:hover { border-color: var(--ink); transform: translateY(-2px); }
  .course .row1 { display: flex; justify-content: space-between; align-items: center; }
  .course .level {
    font-family: var(--mono); font-size: var(--t-micro); padding: 3px 8px; border-radius: 4px;
    background: var(--blue-soft); color: var(--blue);
    letter-spacing: 0.06em; text-transform: uppercase;
  }
  .course .level.advanced { background: rgba(184,104,70,0.12); color: var(--clay); }
  .course .level.intermediate { background: rgba(123,224,164,0.18); color: #1b6b3b; }
  .course .modules { font-family: var(--mono); font-size: var(--t-micro); color: var(--ink-3); letter-spacing: 0.04em; }
  .course h3 { font-size: 18px; letter-spacing: -0.012em; line-height: 1.2; }
  .course .desc { font-size: 13px; color: var(--ink-2); line-height: 1.5; flex: 1; }
  .course .audience { font-family: var(--mono); font-size: var(--t-micro); color: var(--ink-3); padding-top: 14px; border-top: 1px dashed var(--rule); letter-spacing: 0.02em; }
  .course .audience b { color: var(--ink); font-weight: 500; }


/* Academy progress on a started course card (course-progress.js). The bar
   itself is the global .academy-bar; this only places it inside the card's
   20px text inset, above the dashed .audience rule. */
.course .academy-card-progress { margin: 0 20px; display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: var(--t-micro); color: var(--ink-3); letter-spacing: 0.02em; white-space: nowrap; }
.course .academy-card-progress .academy-bar { flex: 1; }

  @media (max-width: 1100px) { .course-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 720px) { .course-grid { grid-template-columns: 1fr; } }
.course-grid { margin-top: 32px; }

/* ---- How it works: certificate preview + steps ---- */
/* The one band in --paper, to set the certificate apart. */
.how { background: var(--paper); }
.how-grid { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.cert-preview { margin: 0; }
.cert-preview img { display: block; width: 100%; height: auto; border-radius: var(--r-lg); box-shadow: 0 24px 56px -24px rgba(12,19,56,0.35); }
.how-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 24px; }
.how-steps li { display: grid; grid-template-columns: 40px 1fr; gap: 16px; align-items: start; }
.how-n {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600;
}
.how-steps h3 { font-size: 20px; letter-spacing: -0.014em; line-height: 1.2; }
.how-steps p { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--ink-2); }

/* ---- One section per course (section#fundamentals, #six-pillars, #personal-branding) ---- */
/* Each course: left the title, its line and one card; right what's inside
   (Kjell 2026-11-26). The outline uses the course page's own rows
   (guide-hub.css .module/.lesson, loaded on this page for that), so a passed
   module gets the same tick. The card has two parts: the facts, then the
   visitor's status and buttons in a band of their own. The band's static HTML
   is the first-visit state (Start the course); course-progress.js
   (renderCourseStatus) turns it into progress + Continue, Get your
   certificate, or Completed + View your certificate. */
/* The title spans the first row on its own, so the outline starts level with
   the line under it (Kjell 2026-11-26), whatever the title's length. */
.course-detail-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  grid-template-areas: "title ." "intro outline";
  gap: 18px 64px; align-items: start;
}
.course-detail-grid > h2 { grid-area: title; }
.course-intro { grid-area: intro; }
.course-intro > p { margin: 0 0 32px; max-width: 56ch; }
.course-outline { grid-area: outline; margin: 0; padding: 0; list-style: none; }
.course-facts dl { margin: 0; display: grid; gap: 20px; }
.course-facts dl > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid var(--rule); }
.course-facts dl > div:last-child { padding-bottom: 0; border-bottom: 0; }
.course-facts dt { font-size: 14px; color: var(--ink-3); }
.course-facts dd { margin: 0; font-size: 14px; color: var(--ink); font-weight: 500; }
.course-status {
  margin: 24px -28px -28px; padding: 24px 28px 28px;
  border-top: 1px solid var(--rule); background: var(--paper);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.course-status .academy-status { margin: 0 0 20px; display: grid; gap: 10px; }
.course-status .academy-status-title { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -0.012em; color: var(--ink); }
.course-status .academy-status-line { margin: 0; font-size: 14px; color: var(--ink-3); }
.course-status .academy-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 900px) {
  .how-grid { grid-template-columns: 1fr; gap: 32px; }
  .course-detail-grid { grid-template-columns: 1fr; grid-template-areas: "title" "intro" "outline"; gap: 18px; }
  .course-outline { margin-top: 14px; }
}
