/* /formacion/cursos-compactos — test de demanda de cursos compactos.
   Tokens de styles.css (--ink, --line, --bg-card, --radius, …). */

/* ── Hero (compacto: los cursos deben verse cuanto antes) ── */
.cc-hero { padding: clamp(28px, 3.5vw, 48px) 0 clamp(12px, 1.5vw, 18px); }
.cc-hero h1 {
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 10px 0 10px;
}
.cc-hero__sub { font-size: 16px; color: var(--ink-2); line-height: 1.55; margin: 0 0 14px; }
.cc-steps { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cc-chip {
  background: var(--navy-soft); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 6px 14px; font-size: 13.5px; color: var(--ink-2);
}
.cc-chip strong { color: var(--navy); margin-right: 4px; }
.cc-chip--cert {
  background: var(--amber-soft); border-color: var(--amber);
  color: var(--ink); font-weight: 700;
}

/* ── Layout: catálogo + panel lateral ── */
.cc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(24px, 3vw, 44px); align-items: start; }

/* ── Categorías ── */
.cc-cat { margin-bottom: clamp(36px, 4vw, 56px); }
.cc-cat__head h2 { font-size: clamp(20px, 2.2vw, 27px); letter-spacing: -0.015em; margin: 0 0 6px; }
.cc-cat__head p { font-size: 14.5px; color: var(--ink-3); margin: 0 0 18px; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(265px, 1fr)); gap: 18px; }

/* ── Tarjeta ── */
.cc-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.cc-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px -20px rgba(10, 14, 26, .3); }
.cc-card--on { border-color: var(--navy-2); box-shadow: 0 0 0 3px var(--navy-soft); }

/* Miniatura: gradiente por categoría + icono grande (sustituible por foto) */
.cc-thumb {
  aspect-ratio: 16 / 9; position: relative; display: flex;
  align-items: center; justify-content: center; overflow: hidden;
}
.cc-thumb::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, .22) 0, transparent 34%),
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, .12) 0, transparent 42%);
}
.cc-thumb--sm  { background: linear-gradient(135deg, #0f3d35, #2f7a4e); }
.cc-thumb--po  { background: linear-gradient(135deg, #16306b, #3f6fd8); }
.cc-thumb--okr { background: linear-gradient(135deg, #74450f, #e09a2d); }
.cc-thumb--ia  { background: linear-gradient(135deg, #371d5e, #8b5cf6); }
.cc-thumb__icon { font-size: 46px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)); position: relative; }
.cc-thumb__hours {
  position: absolute; left: 10px; bottom: 10px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 600;
  color: #fff; background: rgba(0, 0, 0, .38); border-radius: 999px; padding: 3px 10px;
}
.cc-thumb__price {
  position: absolute; right: 10px; bottom: 10px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 700;
  color: var(--ink); background: var(--amber); border-radius: 999px; padding: 3px 10px;
}
.cc-thumb__rank {
  position: absolute; right: 10px; top: 10px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--ink); background: #fff; border-radius: 999px; padding: 3px 9px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

.cc-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cc-meta { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-4); margin: 0; }
.cc-title { font-size: 16.5px; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; margin: 0; }
.cc-body > p:not(.cc-meta) { font-size: 13.8px; color: var(--ink-2); line-height: 1.55; margin: 0; }
.cc-toggle { margin-top: auto; align-self: flex-start; }

/* ── Panel lateral ── */
.cc-panel {
  position: sticky; top: 86px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: 0 18px 44px -30px rgba(10, 14, 26, .35);
}
.cc-panel__title { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.cc-panel__hint { font-size: 13.5px; color: var(--ink-3); line-height: 1.5; margin: 0 0 14px; }

.cc-rank { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 8px; }
.cc-rank__item {
  display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.cc-rank__item--dragging {
  background: var(--navy-soft); border-color: var(--navy-2);
  box-shadow: 0 8px 22px -10px rgba(10, 14, 26, .4);
}
.cc-rank__handle {
  cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  color: var(--ink-4); font-size: 15px; line-height: 1; padding: 4px 2px;
}
.cc-rank__item--dragging .cc-rank__handle { cursor: grabbing; }
.cc-rank__num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: #fff;
  background: var(--navy); border-radius: 999px;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
}
.cc-rank__title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.cc-rank__btns { display: flex; gap: 3px; }
.cc-rank__btns button {
  font: inherit; font-size: 12px; line-height: 1; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--bg-card); color: var(--ink-2);
  border-radius: 6px; width: 24px; height: 24px;
}
.cc-rank__btns button:hover:not(:disabled) { background: var(--navy-soft); }
.cc-rank__btns button:disabled { opacity: .35; cursor: default; }
.cc-rank__btns .cc-rank__del:hover { background: var(--coral-soft); color: var(--coral); border-color: var(--coral); }

.cc-form { display: flex; flex-direction: column; gap: 9px; }
.cc-form input, .cc-form textarea {
  font: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  padding: 9px 12px; background: var(--bg); resize: vertical;
}
.cc-form input:focus, .cc-form textarea:focus { outline: 2px solid var(--navy-2); outline-offset: -1px; }
.cc-submit { justify-content: center; }
.cc-submit:disabled { opacity: .55; cursor: default; }
.cc-err { font-size: 13px; color: var(--coral); margin: 0; }
.cc-privacy { font-size: 12px; color: var(--ink-4); line-height: 1.5; margin: 2px 0 0; }
.cc-privacy a { color: inherit; }

.cc-sent {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--green-soft); border: 1px solid var(--navy-2); border-radius: var(--radius-sm);
  padding: 14px; font-size: 14px; line-height: 1.5;
}
.cc-sent p { margin: 0; }

/* ── Móvil: barra inferior + drawer ── */
.cc-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: var(--bg-card); border-top: 1px solid var(--line-2);
  padding: 10px var(--pad-x); align-items: center; justify-content: space-between; gap: 12px;
  box-shadow: 0 -10px 30px -18px rgba(10, 14, 26, .35);
}
.cc-bar span { font-size: 13.5px; font-weight: 600; color: var(--ink-2); }

.cc-drawer {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(10, 14, 26, .45); display: flex; align-items: flex-end;
}
.cc-drawer__sheet {
  position: relative; width: 100%; max-height: 86vh; overflow-y: auto;
  background: var(--bg-card); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 22px 18px 26px;
}
.cc-drawer__close {
  position: absolute; top: 12px; right: 14px; font: inherit; font-size: 15px;
  border: none; background: var(--bg); border-radius: 999px;
  width: 32px; height: 32px; cursor: pointer; color: var(--ink-2);
}

@media (max-width: 980px) {
  .cc-layout { grid-template-columns: 1fr; }
  .cc-panel { display: none; }
  .cc-bar { display: flex; }
  body { padding-bottom: 64px; } /* hueco para la barra fija */
}
