/* AiNex Edu — 전체 교육과정 / 검색 결과 (hrdedu/educourse/course_list.html), 2026-10 redesign. Prefix .clx-
   Blue hero + search, category tabs, field chips with counts, course card grid, pagination, help band. */

.clx {
  --clx-ink: #12141a;
  --clx-text: #3b4252;
  --clx-muted: #6b7385;
  --clx-line: #e3e7ec;
  --clx-accent: #0d3f76;
  --clx-bg: #f6f7fb;
  background: var(--clx-bg);
  color: var(--clx-text);
}

.clx-in { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.clx-srOnly { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- hero ---------- */
.clx-hero {
  position: relative;
  overflow: hidden;
  padding: 30px 0 46px;
  background:
    radial-gradient(800px 380px at 92% -20%, rgb(255 255 255 / 0.16), transparent 60%),
    var(--p);
  color: #fff;
  isolation: isolate;
}

.clx-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(90deg, transparent, #000 50%, transparent);
  pointer-events: none;
}

.clx-crumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 26px; padding: 0; list-style: none; font-size: 13.5px; font-weight: 600; }
.clx-crumb li { display: inline-flex; gap: 6px; color: rgb(255 255 255 / 0.72); }
.clx-crumb li + li::before { content: "›"; color: rgb(255 255 255 / 0.45); }
.clx-crumb a { color: inherit; text-decoration: none; }
.clx-crumb a:hover, .clx-crumb li[aria-current] { color: #fff; }

.clx-heroGrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: 40px; align-items: end; }
.clx-eyebrow { margin: 0 0 10px; color: rgb(255 255 255 / 0.7); font-size: 13px; font-weight: 800; letter-spacing: 0.14em; }

.clx-title {
  margin: 0;
  color: #fff;
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.2;
  word-break: keep-all;
}

.clx-desc { max-width: 640px; margin: 14px 0 0; color: rgb(255 255 255 / 0.84); font-size: 16.5px; line-height: 1.6; word-break: keep-all; }

.clx-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 60px;
  padding: 6px 6px 6px 20px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 50px -24px rgb(10 20 80 / 0.55);
}

.clx-search svg { flex: none; width: 20px; height: 20px; fill: none; stroke: #8b93a7; stroke-width: 2; stroke-linecap: round; }

.clx-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--clx-ink);
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
}

.clx-search input::placeholder { color: #98a2b3; font-weight: 500; }
.clx-search:focus-within { box-shadow: 0 0 0 4px rgb(255 255 255 / 0.35), 0 24px 50px -24px rgb(10 20 80 / 0.55); }

.clx-search button {
  flex: none;
  height: 100%;
  padding: 0 22px;
  border: 0;
  border-radius: 6px;
  background: var(--clx-accent);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.clx-search button:hover { background: #0a3260; }

/* ---------- category tabs ---------- */
.clx-tabs {
  position: sticky;
  top: 72px;
  z-index: 5;
  border-bottom: 1px solid var(--clx-line);
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: blur(12px);
}

.clx-tabs .clx-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }

.clx-tabs a {
  position: relative;
  flex: none;
  padding: 18px 16px 17px;
  color: var(--clx-muted);
  font-size: 15.5px;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease;
}

.clx-tabs a:hover { color: var(--clx-ink); }
.clx-tabs a[aria-current] { color: var(--clx-ink); font-weight: 800; }

.clx-tabs a[aria-current]::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--clx-accent);
}

/* ---------- body ---------- */
.clx-body { padding: 28px 0 96px; }

.clx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }

.clx-chips a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 8px 0 16px;
  border: 1px solid #e3e7ef;
  border-radius: 4px;
  background: #fff;
  color: var(--clx-text);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.clx-chips a em {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  padding: 0 7px;
  border-radius: 4px;
  background: #f2f4f7;
  color: var(--clx-muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.clx-chips a:hover { border-color: #b8c7ff; color: var(--clx-ink); }
.clx-chips a.is-zero { color: #98a2b3; }
.clx-chips a[aria-current] { border-color: var(--clx-accent); background: var(--clx-accent); color: #fff; }
.clx-chips a[aria-current] em { background: rgb(255 255 255 / 0.2); color: #fff; }

.clx-resultBar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.clx-resultBar p { margin: 0; color: var(--clx-muted); font-size: 15px; font-weight: 600; }
.clx-resultBar b { color: var(--clx-ink); font-weight: 800; }
.clx-clear { color: var(--clx-accent); font-size: 14px; font-weight: 700; text-decoration: none; }

/* ---------- cards ---------- */
.clx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clx-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--clx-line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.clx-card:hover {
  border-color: #d6defa;
  box-shadow: 0 28px 50px -34px rgb(16 30 90 / 0.55);
  transform: translateY(-4px);
}

.clx-card:focus-visible { outline: 3px solid rgba(13,63,118,0.4); outline-offset: 3px; }

.clx-cover {
  --c1: #226ec1; --c2: #0a3260;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(140deg, var(--c1), var(--c2));
  isolation: isolate;
}

.clx-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 85% 15%, rgb(255 255 255 / 0.28), transparent 45%),
    repeating-linear-gradient(135deg, rgb(255 255 255 / 0.06) 0 2px, transparent 2px 14px);
}

.clx-cover.has-img::before { display: none; }
.clx-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.clx-card:hover .clx-cover img { transform: scale(1.04); }

.clx-tone-blue  { --c1: #4f7bff; --c2: #0a3260; }
.clx-tone-teal  { --c1: #19b3a6; --c2: #0b7f83; }
.clx-tone-navy  { --c1: #3c5bd6; --c2: #1d2c7a; }
.clx-tone-amber { --c1: #ffb238; --c2: #f0712c; }
.clx-tone-sky   { --c1: #38bdf8; --c2: #0d3f76; }
.clx-tone-green { --c1: #2fc28a; --c2: #0e8a63; }

.clx-coverNum {
  position: absolute;
  right: 14px;
  bottom: -18px;
  color: transparent;
  font-size: 110px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  -webkit-text-stroke: 1.5px rgb(255 255 255 / 0.45);
  transition: transform 0.3s ease;
}

.clx-card:hover .clx-coverNum { transform: translateY(-6px); }

.clx-coverLabel {
  position: absolute;
  left: 18px;
  bottom: 16px;
  max-width: 60%;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.35;
  word-break: keep-all;
}

.clx-badges { position: absolute; top: 14px; left: 14px; display: flex; flex-wrap: wrap; gap: 5px; }

.clx-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 4px;
  background: rgb(255 255 255 / 0.94);
  color: var(--clx-ink);
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 4px 12px -6px rgb(0 0 0 / 0.3);
}

.clx-badge.cl-badgeRefund { color: #0e8a63; }
.clx-badge.cl-badgeAi { color: #0d3f76; }
.clx-badge.cl-badgePractice { color: #c25a12; }
.clx-badge.cl-badgeTalk { color: #0b7f83; }
.clx-badge.cl-badgeLive { color: #e5484d; }

.clx-cardBody { display: flex; flex: 1; flex-direction: column; padding: 18px 20px 20px; }

.clx-cardTitle {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--clx-ink);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.45;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.clx-summary {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--clx-muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.clx-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}

.clx-metaFacts { display: flex; gap: 6px; }

.clx-metaFacts span {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--clx-bg);
  color: var(--clx-text);
  font-size: 12.5px;
  font-weight: 700;
}

.clx-price { color: var(--clx-ink); font-size: 17px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.clx-price small { margin-left: 1px; font-size: 13px; }

/* ---------- empty / pagination / help ---------- */
.clx-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 72px 24px;
  border: 1px solid var(--clx-line);
  border-radius: 6px;
  background: #fff;
  text-align: center;
}

.clx-emptyIcon { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 6px; border-radius: 6px; background: #eef3f9; }
.clx-emptyIcon svg { width: 28px; height: 28px; fill: none; stroke: var(--clx-accent); stroke-width: 1.8; stroke-linecap: round; }
.clx-empty strong { color: var(--clx-ink); font-size: 19px; font-weight: 800; }
.clx-empty p { margin: 0; color: var(--clx-muted); font-size: 15px; }
.clx-emptyActions { display: flex; gap: 8px; margin-top: 14px; }

.clx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.clx-btnPrimary { background: var(--clx-accent); color: #fff; }
.clx-btnPrimary:hover { background: #0a3260; }
.clx-btnLine { border-color: #d9dee6; background: #fff; color: var(--clx-ink); }
.clx-btnLine:hover { border-color: var(--clx-accent); color: var(--clx-accent); }

.clx-pagination { display: flex; justify-content: center; gap: 6px; margin: 40px 0 0; }

.clx-pagination a {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  border: 1px solid #e3e7ef;
  border-radius: 6px;
  background: #fff;
  color: var(--clx-text);
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
}

.clx-pagination a:hover { border-color: var(--clx-accent); color: var(--clx-accent); }
.clx-pagination a[aria-current] { border-color: var(--clx-accent); background: var(--clx-accent); color: #fff; }
.clx-pagination a[aria-disabled] { opacity: 0.4; pointer-events: none; }

.clx-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 48px 0 0;
  padding: 26px 30px;
  border: 1px solid #e3e7ec;
  border-radius: 6px;
  background: linear-gradient(120deg, #eef3f9 0%, #fff 70%);
}

.clx-help strong { display: block; color: var(--clx-ink); font-size: 19px; font-weight: 800; letter-spacing: -0.03em; }
.clx-help p { margin: 4px 0 0; color: var(--clx-muted); font-size: 14.5px; }

/* ---------- responsive ---------- */
@media (width <= 1080px) {
  .clx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .clx-heroGrid { grid-template-columns: 1fr; gap: 24px; }
}

@media (width <= 640px) {
  .clx-in { width: calc(100% - 32px); }
  .clx-hero { padding: 22px 0 32px; }
  .clx-crumb ol { margin-bottom: 18px; }
  .clx-search { height: 54px; border-radius: 6px; }
  .clx-search button { padding: 0 16px; }
  .clx-tabs { top: 60px; }
  .clx-tabs a { padding: 15px 12px 14px; font-size: 14.5px; }
  .clx-chips { flex-wrap: nowrap; margin-right: -16px; padding-right: 16px; overflow-x: auto; scrollbar-width: none; }
  .clx-chips a { flex: none; }
  .clx-grid { grid-template-columns: 1fr; gap: 14px; }
  .clx-help { flex-direction: column; align-items: stretch; padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .clx-card, .clx-card:hover, .clx-cover img, .clx-coverNum { transition: none; transform: none; }
}
