/* ==========================================================================
   Stonebridge English · programs.css — Mapa de programas por meta
   docs/12-ux-seccion-programas.md (alternativa B) + docs/11 (prueba social y WhatsApp por programa).
   Home §5 (.prog) y /programas/ (.prog--full / .prog-map--full). Sin botón rojo en la sección.
   Motivo de marca: las piedras ovaladas del puente del escudo (rótulos, niveles, placeholder).
   ========================================================================== */

/* ---- Estructura (mobile-first: intro → mapa → nota) ----------------------- */
.prog__grid { display: grid; gap: 28px; }
.prog__side { display: contents; }
.prog__intro { order: 1; margin-bottom: 0; }
.prog__grid > .prog-map { order: 2; min-width: 0; }
.prog-note { order: 3; }
.prog__lead { max-width: 46ch; margin-bottom: 0; }
.prog__intro h2 { margin-bottom: 12px; }

@media (min-width: 1024px) {
  .prog__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; align-items: start; }
  .prog__side { display: grid; gap: 32px; position: sticky; top: calc(var(--hdr) + 24px); }
  .prog__intro { padding-top: 6px; }
}

/* ---- Grupo por meta -------------------------------------------------------- */
.prog-group { border-top: 2px solid var(--navy); scroll-margin-top: calc(var(--hdr) + 16px); }
.prog-group + .prog-group { margin-top: 28px; }
.prog-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0 4px; }
.prog-group__label { display: flex; align-items: center; gap: 10px; margin: 0; font: 700 1rem/1.1 var(--font-c); letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
/* Tres piedras ovaladas del escudo como prefijo del rótulo */
.prog-group__label::before { content: ""; flex: none; width: 26px; height: 7px; background: radial-gradient(closest-side, var(--brick) 94%, transparent) 0 0 / 9px 7px repeat-x; }
.prog-group__count { margin: 0; font: 600 .8125rem/1 var(--font-c); letter-spacing: .08em; text-transform: uppercase; color: var(--slate); white-space: nowrap; }
.prog-group:target .prog-group__label { text-decoration: underline 3px var(--brick); text-underline-offset: 6px; }

@media (min-width: 768px) {
  .prog-group { display: grid; grid-template-columns: 11rem minmax(0, 1fr); column-gap: 24px; }
  .prog-group + .prog-group { margin-top: 36px; }
  .prog-group__head { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 10px; padding: 22px 0 0; }
  .prog-group__label { align-items: flex-start; flex-direction: column; gap: 10px; font-size: 1.0625rem; }
}

/* ---- Fila de programa: UN enlace, toda la fila clicable -------------------- */
.prog-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 24px;
  grid-template-areas: "name arrow" "tag tag" "lvl lvl";
  gap: 4px 12px; align-items: center; min-height: 72px; padding: 18px 16px;
  border-bottom: 1px solid var(--line); border-radius: 2px;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.prog-row__name { grid-area: name; margin: 0; font: 700 clamp(1.2rem, .6vw + 1rem, 1.45rem)/1.15 var(--font-h); color: var(--navy); letter-spacing: -.01em; }
.prog-row__link { color: inherit; text-decoration: none; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--brick); }
.prog-row__link:hover { color: inherit; }
.prog-row__link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.prog-row__tag { grid-area: tag; margin: 0; max-width: 52ch; font: 400 .975rem/1.5 var(--font-b); color: var(--slate); }
.prog-row__arrow { grid-area: arrow; justify-self: end; display: inline-flex; color: var(--slate); transition: transform .15s ease, color .15s ease; }
.prog-row__arrow .ic { width: 22px; height: 22px; }

/* Nivel en lenguaje humano + piedras de nivel (A1…C2). El texto es lo que cuenta; las piedras son decorativas. */
.prog-row__lvl { grid-area: lvl; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 6px 0 0; }
.prog-row__from { font: 600 .875rem/1.3 var(--font-b); color: var(--ink); }
.prog-row__range { display: inline-flex; align-items: center; gap: 8px; font: 700 .875rem/1 var(--font-c); letter-spacing: .06em; color: var(--navy); white-space: nowrap; }
.prog-stones { display: inline-flex; gap: 3px; }
.prog-stones i { width: 10px; height: 7px; border-radius: 50%; background: var(--lav-l); }
.prog-stones i.is-on { background: var(--brick); }
.prog-row__fit { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--pill); background: var(--success-bg); color: var(--success-fg); font: 700 .75rem/1.2 var(--font-c); letter-spacing: .06em; text-transform: uppercase; }
.prog-row__fit .ic { width: 14px; height: 14px; }

@media (min-width: 600px) {
  .prog-row { grid-template-columns: minmax(0, 1fr) auto 24px; grid-template-areas: "name lvl arrow" "tag lvl arrow"; column-gap: 20px; }
  .prog-row__lvl { flex-direction: column; align-items: flex-end; justify-content: center; gap: 6px; margin: 0; text-align: right; }
}

/* Estados: hover (puntero), foco (toda la fila), pulsado */
@media (hover: hover) {
  .prog-row:hover { background: #fff; box-shadow: inset 4px 0 0 var(--brick); }
  .prog-row:hover .prog-row__link { text-decoration-line: underline; }
  .prog-row:hover .prog-row__arrow { transform: translateX(4px); color: var(--navy); }
}
.prog-row:focus-within .prog-row__link:focus-visible { text-decoration-line: underline; }
@supports selector(:has(*)) {
  .prog-row__link:focus-visible { outline: none; }
  .prog-row:has(.prog-row__link:focus-visible) { outline: 3px solid var(--blue); outline-offset: 2px; background: #fff; box-shadow: inset 4px 0 0 var(--brick); }
  .prog-row:has(.prog-row__link:focus-visible) .prog-row__arrow { transform: translateX(4px); color: var(--navy); }
}
.prog-row:active { background: rgba(199, 196, 223, .35); box-shadow: inset 6px 0 0 var(--brick); }

/* ---- Prueba social real por meta ------------------------------------------- */
.prog-proof { position: relative; margin: 14px 0 0; padding: 4px 16px 4px 44px; display: grid; gap: 6px; }
.prog-proof::before { content: "“"; position: absolute; left: 12px; top: -6px; font: 700 3rem/1 var(--font-h); color: var(--lav); }
.prog-proof__quote { margin: 0; }
.prog-proof__quote p { margin: 0; font: italic 700 1.02rem/1.45 var(--font-h); color: var(--ink); max-width: 56ch; }
.prog-proof__by { font: 700 .8125rem/1.2 var(--font-c); letter-spacing: .06em; text-transform: uppercase; color: var(--slate); }
.prog-proof__stars { display: inline-flex; gap: 2px; }
.prog-proof__stars i { width: 12px; height: 12px; background: var(--brick); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.prog-proof--note { display: flex; gap: 10px; align-items: flex-start; padding-left: 16px; font-size: .9375rem; line-height: 1.5; color: var(--slate); max-width: 64ch; }
.prog-proof--note::before { content: none; }
.prog-proof--note .ic { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--navy); }

/* ---- Nota de David (ayuda para elegir) ------------------------------------- */
.prog-note { position: relative; isolation: isolate; overflow: hidden; display: grid; gap: 16px; justify-items: start; padding: 26px 22px 22px; border-radius: var(--r-lg); background: var(--night); color: #fff; box-shadow: var(--shadow-h); }
.prog-note__stripes { position: absolute; z-index: -1; top: 0; right: 18px; display: flex; gap: 6px; width: 58px; height: 88px; transform: skewX(-8deg); }
.prog-note__stripes i { flex: 1; border-radius: 0 0 4px 4px; }
.prog-note__stripes i:nth-child(1) { background: linear-gradient(180deg, rgba(143, 141, 190, .7), rgba(143, 141, 190, 0)); }
.prog-note__stripes i:nth-child(2) { background: linear-gradient(180deg, rgba(199, 196, 223, .55), rgba(199, 196, 223, 0)); }
.prog-note__stripes i:nth-child(3) { background: linear-gradient(180deg, rgba(230, 40, 53, .9), rgba(230, 40, 53, 0)); }
.prog-note__who { display: flex; align-items: center; gap: 16px; padding-right: 64px; }
.prog-note__avatar { flex: none; width: 64px; height: 64px; margin: 5px; border-radius: 50%; object-fit: cover; background: var(--navy); box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brick); }
.prog-note__by { display: grid; gap: 4px; margin: 0; }
.prog-note__by b { font: 700 1.05rem/1.15 var(--font-h); color: #fff; }
.prog-note__by span { font: 600 .8125rem/1.2 var(--font-c); letter-spacing: .08em; text-transform: uppercase; color: var(--lav-l); }
.prog-note__quote { margin: 0; font: italic 700 1.1rem/1.45 var(--font-h); color: #fff; }
.prog-note__wa { min-height: 48px; padding: 0 22px; background: var(--green); color: #fff; border-color: #4CC497; }
.prog-note__wa:hover { background: #17684B; color: #fff; border-color: #4CC497; }
.prog-note__wa .ic { width: 20px; height: 20px; }
.prog-note__micro { margin: -6px 0 0; font-size: .8125rem; line-height: 1.45; color: var(--muted-dark); }
.prog-note :focus-visible { outline-color: var(--sky); }

/* ---- /programas/: variante --full ------------------------------------------ */
.prog--full { padding-top: 40px; }
.prog__grid--full .prog__main { min-width: 0; }
.prog__aside { display: grid; gap: 16px; align-content: start; }
.prog__help { margin: 0; }
.prog__aside .prog-note { order: 0; }
@media (min-width: 1024px) {
  .prog__grid--full { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
  .prog__aside { position: sticky; top: calc(var(--hdr) + 24px); }
}

.prog-jump { margin: 4px 0 28px; }
.prog-jump ul { display: flex; flex-wrap: wrap; gap: 8px; }
.prog-jump__chip { background: #fff; border: 2px solid var(--line); color: var(--navy); font-weight: 600; text-decoration: none; }
.prog-jump__chip .ic { color: var(--brick); }
.prog-jump__chip:hover { border-color: var(--navy); color: var(--navy); }

.prog-map--full .prog-row {
  grid-template-columns: minmax(0, 1fr) 24px;
  grid-template-areas: "thumb thumb" "name arrow" "tag tag" "lvl lvl" "out out" "wa wa";
  align-items: start; padding: 20px 16px;
}
.prog-map--full .prog-row__arrow { align-self: center; }
@media (hover: hover) { .prog-map--full .prog-row:hover { background: var(--mist); } }
@supports selector(:has(*)) { .prog-map--full .prog-row:has(.prog-row__link:focus-visible) { background: var(--mist); } }

.prog-row__thumb { grid-area: thumb; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; margin-bottom: 12px; background: var(--navy); }
.prog-row__thumb--brand { display: grid; place-items: center; }
.prog-row__thumb--brand svg { width: min(46%, 120px); height: auto; }
.prog-row__thumb--brand .stones ellipse { fill: var(--brick); }
.prog-row__thumb--brand .water path { fill: none; stroke: var(--lav-l); stroke-width: 3; stroke-linecap: round; }

.prog-row__outcomes { grid-area: out; display: grid; gap: 4px; margin: 10px 0 0; }
.prog-row__outcomes li { position: relative; padding-left: 22px; font-size: .9375rem; line-height: 1.45; color: var(--ink); }
.prog-row__outcomes li::before { content: "★"; content: "★" / ""; position: absolute; left: 0; top: 0; color: var(--brick); font-size: .875rem; }
.prog-row__wa { grid-area: wa; margin: 12px 0 0; }
.prog-wa-link { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 2px solid var(--green); border-radius: var(--pill); color: var(--green); font-weight: 600; font-size: .9375rem; text-decoration: none; background: #fff; transition: background-color .15s ease, color .15s ease; }
.prog-wa-link:hover { background: var(--green); color: #fff; }
.prog-wa-link .ic { width: 18px; height: 18px; }

/* En --full el nivel va bajo el beneficio (fila, alineado a la izquierda) y el rótulo de meta encabeza el grupo. */
.prog-map--full .prog-group { display: block; }
.prog-map--full .prog-group__head { flex-direction: row; align-items: baseline; justify-content: space-between; padding: 16px 0 4px; }
.prog-map--full .prog-group__label { flex-direction: row; align-items: center; }
@media (min-width: 600px) {
  .prog-map--full .prog-row {
    grid-template-columns: minmax(0, 1fr) 24px;
    grid-template-areas: "thumb thumb" "name arrow" "tag arrow" "lvl arrow" "out arrow" "wa arrow";
  }
  .prog-map--full .prog-row__lvl { flex-direction: row; align-items: center; justify-content: flex-start; margin-top: 6px; text-align: left; }
}
@media (min-width: 768px) {
  .prog-map--full .prog-row {
    grid-template-columns: 200px minmax(0, 1fr) 24px; column-gap: 24px;
    grid-template-areas: "thumb name arrow" "thumb tag arrow" "thumb lvl arrow" "thumb out arrow" "thumb wa arrow";
  }
  .prog-row__thumb { aspect-ratio: 4 / 3; margin: 2px 0 0; align-self: start; }
}

/* ---- Movimiento reducido: sin desplazamientos ni transiciones ------------- */
@media (prefers-reduced-motion: reduce) {
  .prog-row, .prog-row__arrow, .prog-wa-link { transition: none; }
  .prog-row:hover .prog-row__arrow, .prog-row:has(.prog-row__link:focus-visible) .prog-row__arrow { transform: none; }
}
