/* css/course.css
   Course pages: feature/role, outcome, grid, detail hero/blocks, apply panel.
   Split from styles.css (Phase 4, boundary-corrected); linked in source order to preserve the cascade. */
.course-feature {
  max-width: 1080px;
}

.course-catalog-intro {
  padding-top: 74px;
  background:
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface-2) 54%, var(--bg) 54%, var(--bg) 100%);
}

.title-row--compact {
  margin-top: 54px;
}

.course-guide-grid {
  display: grid;
  gap: 12px;
}

.course-guide-grid--roles {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.course-role-card,
.course-problem-row {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.course-role-card:hover,
.course-role-card.is-active,
.course-problem-row:hover,
.course-problem-row.is-active {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.course-role-card {
  display: flex;
  min-height: 174px;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  overflow: hidden;
}

.course-role-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 4px;
  background: var(--brand-soft);
}

.course-role-card.is-active {
  background: var(--brand);
  color: white;
}

.course-role-card.is-active::after {
  background: var(--accent);
}

.course-role-card__mark,
.course-problem-row__index {
  color: var(--muted-2);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
}

.course-guide-copy {
  display: grid;
  min-width: 0;
  gap: 9px;
}

.course-guide-copy strong {
  color: var(--brand);
  font-family: var(--font-sans);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
}

.course-guide-copy small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.course-guide-count {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-top: auto;
}

.course-guide-count strong {
  color: var(--accent-2);
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}

.course-guide-count small {
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 11px;
}

.course-role-card.is-active .course-role-card__mark,
.course-role-card.is-active .course-guide-copy strong,
.course-role-card.is-active .course-guide-copy small,
.course-role-card.is-active .course-guide-count strong,
.course-role-card.is-active .course-guide-count small {
  color: white;
}

.course-problem-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.course-problem-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 16px;
  align-items: center;
  min-height: 94px;
  gap: 16px;
  padding: 17px 18px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--brand-soft) 48%, white) 0%, var(--surface) 42%);
}

.course-problem-row::after {
  content: "›";
  justify-self: end;
  color: var(--muted-2);
  font-size: 24px;
  line-height: 1;
}

.course-problem-row .course-guide-count {
  justify-self: end;
  margin-top: 0;
}

.course-problem-row .course-guide-copy strong {
  font-size: 19px;
}

.course-problem-row.is-active {
  background: var(--surface);
  border-color: var(--accent-2);
}

.course-problem-row.is-active .course-problem-row__index,
.course-problem-row.is-active .course-guide-copy strong,
.course-problem-row.is-active .course-guide-count strong {
  color: var(--accent-2);
}


/* ---------------------------------------------------------------------------
   교육 과정 안내 (#curriculum)
   직무별 트랙 카드 + 형태별 수강 동선 표. 시안의 신규 페이지.
   --------------------------------------------------------------------------- */
.curriculum-hero {
  padding-bottom: 56px;
}

.curriculum-hero p {
  max-width: 720px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.curriculum-track-section {
  padding-top: 48px;
}

/* 트랙은 6개라 3열 2행이 가장 깔끔하다(시안은 4열 placeholder). */
.curriculum-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.curriculum-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.curriculum-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.curriculum-card__no {
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.curriculum-card h2 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.curriculum-card > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.curriculum-steps {
  display: grid;
  gap: 8px;
  margin: 6px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  counter-reset: curriculum-step;
}

.curriculum-steps li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  font-size: 14px;
  line-height: 1.55;
}

/* 순서가 있는 커리큘럼이라 불릿 대신 단계 번호를 쓴다. */
.curriculum-steps li::before {
  counter-increment: curriculum-step;
  content: counter(curriculum-step);
  color: var(--brand);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.75;
}

.curriculum-card__cta {
  width: 100%;
  margin-top: auto;
  padding-top: 12px;
  padding-bottom: 12px;
  justify-content: center;
  font-size: 14px;
}

.curriculum-format-section {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.curriculum-format-section h2 {
  font-size: 32px;
  font-weight: 500;
}

.curriculum-table {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.curriculum-table__row {
  display: grid;
  grid-template-columns: 190px repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.curriculum-table__row + .curriculum-table__row {
  margin-top: 1px;
}

.curriculum-table__cell {
  padding: 16px 18px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
}

.curriculum-table__row--head .curriculum-table__cell {
  padding: 14px 18px;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
}

.curriculum-table__cell--type {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.curriculum-format-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

@media (max-width: 1080px) {
  .curriculum-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .curriculum-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .curriculum-format-section h2 {
    font-size: 26px;
  }

  /* 좁은 화면에서는 표를 행 단위 카드로 바꾼다. 가로 스크롤보다 읽기 쉽다. */
  .curriculum-table {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .curriculum-table__row--head {
    display: none;
  }

  .curriculum-table__row {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
  }

  .curriculum-table__cell {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 12px;
    align-items: baseline;
  }

  .curriculum-table__cell + .curriculum-table__cell {
    border-top: 1px solid var(--line);
  }

  .curriculum-table__cell::before {
    content: attr(data-label);
    color: var(--muted);
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 800;
  }

  .curriculum-table__cell--type {
    background: var(--surface-2);
  }
}

/* 강의 목록 머리 — 큰 히어로(2줄 제목 + 설명)는 목록이 첫 화면 밖으로 밀려나고,
   바로 아래 결과 제목과 같은 말을 두 번 했다. 시안대로 한 줄로 줄인다. */
.courses-head {
  padding: 44px 0 32px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.courses-head h1 {
  font-size: 40px;
  font-weight: 500;
  line-height: 1.22;
}

.courses-head p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.courses-head p strong {
  color: var(--ink);
  font-weight: 700;
}

/* 머리글 바로 아래가 필터다 — .section 기본 96px 여백은 빈 화면만 만든다. */
#course-results {
  padding-top: 36px;
}

.courses-head .breadcrumb {
  margin-bottom: 16px;
}

/* 필터가 걸렸을 때만 나오는 상태 줄. */
.course-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.course-results-head strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
}

.course-results-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.course-results-head .btn {
  flex: none;
}
