
/* =============================================================
   PLAN DE ESTUDIOS — 24 sesiones · pastilla + recuadro
   Hereda los estilos base de .tabs / .tab-btn / .tab-panel /
   .tab-meta / .tab-body / .sn-card / .sn-chips de styles.css
   Aquí solo añadimos los ajustes necesarios para 24 pastillas y
   las micro-mejoras del recuadro.
   ============================================================= */

/* ── Stats compactos arriba del strip de pastillas ── */
.plan-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
  margin: 0 auto 2.5rem;
  padding: 1.4rem 2rem;
  max-width: 720px;
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 6px 18px -8px rgba(0,0,0,0.08);
}
.plan-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-align: center;
}
.plan-stat-num {
  font-size: clamp(1.7rem, 4.5vw, 2.3rem);
  font-weight: 800;
  color: #8B0000;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #8B0000, #cc1f1a);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.plan-stat-label {
  font-size: 0.74rem;
  color: var(--ink-mute, #5a5d66);
  font-weight: 600;
  line-height: 1.25;
}
.plan-stat-sep {
  display: block;
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.12), transparent);
}
@media (max-width: 640px) {
  .plan-stats { padding: 1rem 0.5rem; gap: 0.6rem; }
  .plan-stat-sep { height: 28px; }
  .plan-stat-label { font-size: 0.66rem; }
}

/* ── Toggle "Plan de Estudios / Horarios" — cards con acento lateral ── */
.plan-vista-toggle {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 0 auto 1.5rem;
  width: fit-content;
}

.plan-vista-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  font-family: var(--sans);
  background: #fff;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  padding: 0.85rem 1.5rem 0.85rem 1.25rem;
  cursor: pointer;
  min-width: 175px;
  position: relative;
  text-align: left;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px -6px rgba(0,0,0,0.06);
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
  isolation: isolate;
}

/* Barra lateral izquierda — gris en estado normal, roja en activo */
.plan-vista-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  transition: background 0.22s ease;
  z-index: 1;
}
.plan-vista-btn:hover:not(.is-active)::before {
  background: var(--line-strong, #d1d5db);
}
.plan-vista-btn.is-active::before {
  background: var(--ie-accent, #cc1f1a);
}

/* Estado activo: borde ligeramente más oscuro + leve elevación */
.plan-vista-btn.is-active {
  border-color: rgba(204, 31, 26,0.18);
  box-shadow: 0 2px 6px rgba(204,31,26,0.08), 0 10px 24px -10px rgba(204,31,26,0.18);
}

/* Hover suave en inactivo */
.plan-vista-btn:hover:not(.is-active) {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06), 0 8px 20px -8px rgba(0,0,0,0.1);
}

/* Etiquetas */
.plan-vista-btn .pvb-label {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink-soft, #555);
  transition: color 0.22s ease;
  letter-spacing: -0.01em;
}
.plan-vista-btn.is-active .pvb-label {
  color: var(--ink, #111);
}
.plan-vista-btn .pvb-hint {
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--ink-mute, #9ca3af);
  transition: color 0.22s ease;
  letter-spacing: 0.02em;
}
.plan-vista-btn.is-active .pvb-hint {
  color: var(--ink-mute, #6b6b6b);
}

@media (max-width: 480px) {
  .plan-vista-toggle { gap: 0.5rem; }
  .plan-vista-btn { min-width: 145px; padding: 0.75rem 1rem 0.75rem 1rem; }
}

/* ── Wrapper para la fila de chips con indicador de scroll horizontal (móvil) ── */
.cats-scroll-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Hint minimalista: flecha + "Desliza para ver más" debajo de los chips, alineado a la derecha */
.cats-scroll-hint {
  display: none;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-end;
  margin: -2.25rem 0 0.6rem;
  padding-right: 0.5rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-mute, #9ca3af);
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cats-scroll-hint svg {
  flex-shrink: 0;
  animation: catsHintArrow 1.8s ease-in-out infinite;
}

/* Solo visible en móvil */
@media (max-width: 720px) {
  .cats-scroll-hint { display: inline-flex; }
}

/* Ocultar cuando el usuario ya hizo scroll (clase añadida por JS) */
.cats-scroll-wrap.is-scrolled .cats-scroll-hint {
  opacity: 0;
}

@keyframes catsHintArrow {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .cats-scroll-hint svg { animation: none; }
}

/* ── Vista wrappers ── */
.plan-vista { display: block; }
.plan-vista[hidden] { display: none !important; }
.plan-vista.is-active { animation: planVistaIn 0.38s cubic-bezier(0.2, 0.7, 0.3, 1); }
@keyframes planVistaIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Vista "Por Técnicas": pastillas horizontales + recuadro inferior
   con título, descripción y chips de la categoría. ── */

/* Strip horizontal de pastillas de categoría */
.tabs-nav--cats {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start;
  gap: 10px !important;
  padding: 0.5rem 0 0.85rem !important;
  margin-bottom: 1.5rem !important;
  overflow-x: auto !important;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, black 0%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, black 0%, black 92%, transparent 100%);
}
.tabs-nav--cats::after {
  content: "";
  flex: 0 0 1.5rem;
  pointer-events: none;
}
.tabs-nav--cats::-webkit-scrollbar { height: 4px; }
.tabs-nav--cats::-webkit-scrollbar-thumb {
  background: rgba(139, 0, 0, 0.25);
  border-radius: 999px;
}
.tabs-nav--cats .tab-btn {
  flex-shrink: 0;
  scroll-snap-align: start;
  padding: 0.6rem 1.05rem !important;
  font-size: 0.84rem !important;
  gap: 8px !important;
  min-width: 0;
}
.tabs-nav--cats .tab-btn .cat-pill-icon {
  font-size: 1rem;
  line-height: 1;
}
.tabs-nav--cats .tab-btn .tab-name {
  font-weight: 700;
}
.tabs-nav--cats .tab-btn .tab-count {
  font-size: 0.7rem !important;
  background: #ececf1;
  color: var(--ink-mute, #5a5d66);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 22px;
  text-align: center;
}
.tabs-nav--cats .tab-btn.is-active .tab-count,
.tabs-nav--cats .tab-btn[aria-selected="true"] .tab-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}


/* ── Reducir espacio entre descripción y la card de chips
   (aplica a ambas vistas: Por Sesión y Por Técnicas) ── */
.tabs .tab-body {
  gap: 0.85rem !important;
  padding: 1.5rem 1.5rem 1.5rem !important;
}
.tabs .tab-intro h3 {
  margin-bottom: 0.5rem !important;
}
.tabs .tab-intro p {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Chips dentro del recuadro de categoría — hereda todo de .sn-chips / .sn-chip */

/* ── En desktop mostrar las 8 pastillas sin scroll, wrappeadas y centradas ── */
@media (min-width: 720px) {
  .tabs-nav--cats {
    flex-wrap: wrap !important;
    overflow-x: visible !important;
    justify-content: center !important;
    row-gap: 12px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .tabs-nav--cats::after { display: none !important; }
  /* Break invisible que fuerza wrap exacto 6 + 2 en desktop */
  .tabs-nav-break {
    flex-basis: 100% !important;
    height: 0 !important;
    margin: 0 !important;
  }
}
/* En móvil ocultar el break (los chips quedan en un solo strip scrolleable) */
@media (max-width: 719px) {
  .tabs-nav-break { display: none !important; }
}

/* ── Chip clickable de técnica — abre modal con descripción ── */
.sn-chip--clickable {
  cursor: pointer;
  position: relative;
  font-family: inherit;
  text-align: left;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.18s, border-color 0.18s, background 0.18s;
}
.sn-chip--clickable::after {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, rgba(139,0,0,0.08), rgba(204,31,26,0.12)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%238B0000'><circle cx='8' cy='4.5' r='1'/><rect x='7' y='6.5' width='2' height='6' rx='0.5'/></svg>");
  background-size: 100% 100%, 60% 60%;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px solid rgba(139, 0, 0, 0.15);
  flex-shrink: 0;
  margin-left: auto;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.sn-chip--clickable:hover {
  transform: translateY(-1px);
  border-color: rgba(139, 0, 0, 0.35);
  background: linear-gradient(135deg, rgba(204, 31, 26,0.04), rgba(139, 0, 0, 0.04));
}
.sn-chip--clickable:hover::after {
  border-color: rgba(139, 0, 0, 0.45);
  transform: scale(1.1);
}
.sn-chip--clickable:focus-visible {
  outline: 2px solid #8B0000;
  outline-offset: 2px;
}
.sn-chip--clickable:active {
  transform: translateY(0);
}

/* Ajuste tipo-de-sesión accent cuando es Modelo de Práctica */
.tab-meta-item--ie-accent .tmi-num {
  color: #ffd166 !important;
}

/* ── Transición suave al cambiar de sesión ── */
.tab-content.is-fading-in .tab-body,
.tab-content.is-fading-in .tab-meta {
  animation: planFadeIn 0.32s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@keyframes planFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════════════════════
   HORARIOS — vista inline (sin modal)
   ═══════════════════════════════════════════════════════════════ */
.horarios-inline {
  background: #fff;
  border: 1px solid var(--line, rgba(10,10,10,0.08));
  border-radius: var(--radius-xl, 32px);
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow-md, 0 4px 16px rgba(0,0,0,0.08));
}
.hi-titulo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink, #0a0a0a);
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
  text-align: center;
}
.hi-sub {
  font-size: 0.92rem;
  color: var(--ink-mute, #5a5d66);
  margin: 0 0 1.5rem;
  line-height: 1.5;
  text-align: center;
}
.hi-grupo {
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.2rem;
  background: var(--bg-2, #f7f7f8);
  border: 1px solid var(--line, rgba(10,10,10,0.08));
  border-radius: 14px;
}
.hi-grupo:last-of-type { margin-bottom: 1rem; }
.hi-grupo-header {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.95rem;
}
.hi-grupo-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
}
.hi-grupo-badge--semana {
  color: #fff;
  background: linear-gradient(135deg, #8B0000, #cc1f1a);
}
.hi-grupo-badge--finde {
  color: #5a4400;
  background: linear-gradient(135deg, #f5d76b, #d9a64a);
}
.hi-grupo-dias {
  font-size: 0.82rem;
  color: var(--ink-mute, #5a5d66);
  font-weight: 500;
  line-height: 1.4;
}
.hi-turnos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
.hi-turno {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.95rem;
  background: #fff;
  border: 1px solid var(--line, rgba(10,10,10,0.08));
  border-radius: 10px;
  transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}
.hi-turno:hover {
  border-color: rgba(139, 0, 0, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(139, 0, 0, 0.08);
}
.hi-turno-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink, #0a0a0a);
}
.hi-turno-hora {
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #8B0000;
  letter-spacing: 0.01em;
}
.hi-nota {
  font-size: 0.82rem;
  color: var(--ink-mute, #5a5d66);
  text-align: center;
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}
@media (min-width: 600px) {
  .horarios-inline { padding: 2.5rem 2rem; }
  .hi-turnos { grid-template-columns: repeat(3, 1fr); }
  .hi-grupo:last-of-type .hi-turnos { grid-template-columns: repeat(2, 1fr); }
  .hi-turno { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
}


