/* Savia — web definitiva (v4). Catálogo de cursos. Va después de savia.css.
   Cabecera baja y barra de filtros del boceto 3; resultados del boceto 2, en calendario (por meses, filas que se
   despliegan) o en tarjetas (por áreas). */

/* ---------- cabecera baja (boceto 3) ---------- */
.chero { min-height: 0; }
.chero .hero-in { padding-top: 116px; padding-bottom: 34px; align-items: center; }
.chero h1 { font-size: clamp(44px, 5.2vw, 80px); line-height: .96; margin: 18px 0 16px; }
.chero h1 em { font-style: normal; color: var(--lime); }
.chero .lede { margin-bottom: 26px; }
.chero .stage { height: 330px; min-height: 0; }
.chero .stage-cap { bottom: 0; }

/* ---------- una sola barra de filtros, fija arriba al bajar (boceto 3) ---------- */
.fbar { position: sticky; top: 0; z-index: 50; background: rgba(243, 245, 238, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); transition: top .45s var(--ease); }
body:has(.hdr.scrolled) .fbar { top: 86px; }
.fbar .wrap { display: flex; align-items: center; gap: 10px; padding-top: 12px; padding-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.fbar .wrap::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px 0 11px; border-radius: 999px; background: var(--white); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--ink-2); white-space: nowrap; flex: none; transition: background .2s, color .2s, box-shadow .2s; }
.chip i { font-size: 18px; color: var(--lime-ink); transition: color .2s; }
.chip:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); box-shadow: none; }
.chip[aria-pressed="true"] i { color: var(--lime); }
.fbar .areas { display: contents; }
.fbar .sep { width: 1px; height: 26px; background: var(--line); flex: none; margin: 0 4px; }

/* ---------- recuento y forma de verlos ---------- */
.res { padding-top: 28px; min-height: 60vh; }
.res-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.res-head .count { margin: 0; font-size: 15px; color: var(--ink-2); }
.res-head .count b { font: 500 26px/1 var(--f-display); letter-spacing: -.02em; color: var(--ink); }
.seg { display: inline-flex; background: var(--white); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 1px var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 999px; font-size: 14px; color: var(--ink-2); transition: background .2s, color .2s; }
.seg button i { font-size: 18px; color: var(--lime-ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-dark); }
.seg button[aria-pressed="true"] i { color: var(--lime); }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 999px; background: var(--lime-soft); color: #3c520a; white-space: nowrap; justify-self: start; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime-ink); }
.pill[data-s="planned"] { background: var(--paper); color: var(--ink-2); }
.pill[data-s="planned"]::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--grey); }
.pill[data-s="waitlist"] { background: #fbf1d3; color: #6b5a14; }
.pill[data-s="waitlist"]::before { background: #d9a41f; }
.code { font: 500 11.5px var(--f-mono); letter-spacing: .04em; color: var(--ink-2); background: var(--paper); border-radius: 6px; padding: 2px 7px; }

/* ---------- vista calendario (boceto 2): un bloque por mes; cada convocatoria, una fila que se despliega ---------- */
.month { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 30px; padding-top: 48px; }
.m-label { position: sticky; top: 160px; align-self: start; }
.m-label .mi { width: 52px; height: 52px; border-radius: 16px; background: var(--lime); color: var(--forest); display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 16px; }
.m-label h2 { font: 500 44px/1 var(--f-display); letter-spacing: -.035em; margin: 0; }
.m-label span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
.m-label .dots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 16px; max-width: 170px; }
.m-label .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.m-label .dots i.p { background: transparent; box-shadow: inset 0 0 0 1.5px #a9b69a; }
.rows { display: grid; gap: 10px; align-content: start; }   /* sin estirar las filas a la altura de la etiqueta del mes */
.crow { background: var(--white); border-radius: 22px; overflow: hidden; transition: box-shadow .4s, transform .4s var(--ease); }
.crow:hover { box-shadow: 0 24px 50px -34px rgba(20, 40, 25, .5); }
.crow.open { box-shadow: 0 30px 60px -36px rgba(20, 40, 25, .55); }
.c-main { width: 100%; text-align: left; display: grid; grid-template-columns: 104px minmax(0, 1fr) 190px 170px 40px; gap: 22px; align-items: center; padding: 12px 16px 12px 12px; }
.thumb { position: relative; width: 104px; height: 92px; border-radius: 16px; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.crow:hover .thumb img { transform: scale(1.08); }
.thumb .dt { position: absolute; left: 6px; bottom: 6px; background: var(--white); border-radius: 10px; padding: 5px 8px 4px; text-align: center; line-height: 1; }
.thumb .dt b { display: block; font: 500 20px/1 var(--f-display); letter-spacing: -.02em; }
.thumb .dt small { font: 500 9.5px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.c-title .h { display: block; font: 500 18px/1.3 var(--f-text); margin: 0 0 8px; letter-spacing: -.01em; transition: color .2s; }
.crow:hover .c-title .h { color: var(--lime-ink); }
.c-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; color: var(--muted); }
.c-meta span { display: inline-flex; align-items: center; gap: 5px; }
.c-meta i { font-size: 15px; color: var(--lime-ink); }
.c-mod { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.c-mod span { display: inline-flex; gap: 7px; align-items: center; }
.c-mod i { font-size: 18px; color: var(--lime-ink); }
.chev { width: 40px; height: 40px; border-radius: 50%; background: var(--paper); display: flex; align-items: center; justify-content: center; font-size: 18px; transition: transform .4s var(--ease), background .2s; }
.crow.open .chev { transform: rotate(180deg); background: var(--ink); color: var(--lime); }
.c-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.crow.open .c-more { grid-template-rows: 1fr; }
.c-more > div { overflow: hidden; }
.c-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, auto); gap: 24px; padding: 6px 20px 20px 138px; }
.c-in p { margin: 0 0 16px; color: var(--ink-2); font-size: 15.5px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 8px; }
.fact { background: var(--paper); border-radius: 14px; padding: 12px 14px; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.fact.wide { grid-column: span 2; }
.fact i { font-size: 22px; color: var(--lime-ink); flex: none; }
.fact small { display: block; font-size: 11.5px; color: var(--muted); }
.fact b { font-weight: 500; font-size: 14px; }
.c-act { display: grid; gap: 8px; align-content: end; }
.c-act .btn { width: 100%; }
.c-act .note { font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- vista tarjetas (boceto 2): por áreas, un curso con todas sus variantes ---------- */
.agroup { padding-top: 48px; }
.agroup-h { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.agroup-h .mi { width: 48px; height: 48px; border-radius: 14px; background: var(--lime); color: var(--forest); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.agroup-h h2 { font: 500 34px/1 var(--f-display); letter-spacing: -.03em; margin: 0; }
.agroup-h span { color: var(--muted); font-size: 14px; margin-left: 4px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cgrid .card { flex: none; }
.variants { display: flex; flex-wrap: wrap; gap: 6px; }
.variants span { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; background: var(--paper); color: var(--ink-2); }
.variants span i { font-size: 14px; color: var(--lime-ink); }
.card .nextd { font-size: 13px; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.card .nextd i { color: var(--lime-ink); font-size: 16px; }
.card .nextd.none { color: var(--muted); }

/* ---------- sin resultados y ayuda (boceto 3) ---------- */
.empty { text-align: center; padding: 60px 16px 20px; }
.empty .art { width: 110px; height: 110px; margin: 0 auto 22px; border-radius: 50%; background: var(--sage); display: flex; align-items: center; justify-content: center; font-size: 52px; color: var(--lime-ink); }
.empty h2 { font: 500 clamp(28px, 3vw, 38px)/1.05 var(--f-display); letter-spacing: -.03em; margin: 0 0 10px; }
.empty p { color: var(--ink-2); margin: 0 0 22px; }
.help { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 30px; align-items: center; padding: clamp(30px, 4.4vw, 56px); border-radius: var(--r-xl); background: radial-gradient(80% 120% at 90% 0%, var(--forest-4) 0%, var(--forest) 60%); color: var(--on-dark); }
.help .sym { position: absolute; right: 24%; top: -70px; width: 230px; opacity: .07; pointer-events: none; }
.help h2 { font: 500 clamp(32px, 3.8vw, 54px)/.98 var(--f-display); letter-spacing: -.04em; margin: 14px 0 14px; }
.help h2 em { font-style: normal; color: var(--lime); }
.help p { margin: 0; color: var(--on-dark-2); max-width: 44ch; font-size: 17px; }
.help .acts { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .month { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .m-label { position: static; display: flex; align-items: center; gap: 14px; }
  .m-label .mi { margin: 0; }
  .m-label .dots { display: none; }
  .m-label span { margin: 0; }
  .c-main { grid-template-columns: 104px minmax(0, 1fr) 170px 40px; }
  .c-main .c-mod { display: none; }
  .c-in { padding-left: 20px; }
}
@media (max-width: 980px) {
  .chero .stage { height: 220px; }
  .help { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .c-main { grid-template-columns: 88px minmax(0, 1fr) 40px; gap: 14px; align-items: start; }
  .thumb { width: 88px; height: 88px; }
  .c-main .pill { grid-column: 2; grid-row: 2; margin-top: -4px; }
  .c-main .chev { grid-column: 3; grid-row: 1; }
  .c-in { grid-template-columns: minmax(0, 1fr); padding: 4px 14px 16px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact { padding: 12px; }
}
@media (max-width: 620px) {
  .chero .hero-in { padding-top: 100px; padding-bottom: 26px; }
  /* en el móvil, los resultados antes que la figura: queda solo la savia de fondo */
  .chero .stage { display: none; }
  .seg button { padding: 0 11px; }
  .c-title .h { font-size: 16px; }
}
