/* ===== Estilos de las páginas de ejercicios (sem1-5, estiramiento, fortalecimiento) =====
 * Generado al unificar el CSS que estaba repetido en cada página.
 * Las reglas comunes aplican a todas; las particulares se limitan con :where(body.pg-<pagina>)
 * (especificidad 0, así el orden de cascada es el mismo que antes). Cada <body> lleva class="pg-<pagina>". */

.fisioterapia { padding: 4rem 2rem; background: #fff; border-radius: var(--radius); box-shadow: var(--sombra); margin: 3rem auto; max-width: 1100px; }
.fisioterapia h1 { font-size: 2.6rem; color: var(--color-primario); margin-bottom: 1rem; text-align: center; }
.fisioterapia p { font-size: 1.6rem; text-align: center; max-width: 900px; margin: 0 auto 2rem; color: var(--color-secundario); }
.rutinas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.rutina-card { background: #fffafc; border: 1px solid var(--color-borde); border-radius: var(--radius); box-shadow: var(--sombra); padding: 2rem; text-align: center; display: flex; flex-direction: column; height: 100%; }
.rutina-card h2 { font-size: 1.8rem; color: var(--color-primario); margin: 0 0 1rem 0; word-wrap: break-word; overflow-wrap: break-word; hyphens: auto; }
.rutina-card p { font-size: 1.4rem; color: var(--color-secundario); margin: 0 0 1rem 0; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3,body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .bloqueo { font-size: 1.4rem; color: #ff69b4; font-weight: 600; }
.video-wrapper { position: relative; width: 100%; padding-top: 56.25%; margin-bottom: 1rem; overflow: hidden; border-radius: 8px; flex-shrink: 0; }
.video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.overlay-bloqueo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 1rem; box-sizing: border-box; z-index: 10; border-radius: 8px; }
.overlay-titulo { font-size: 1.4rem; font-weight: bold; margin-bottom: 0.5rem; }
.overlay-texto { font-size: 1.2rem; margin-bottom: 1rem; }
.overlay-botones { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.btn-video { background: #4CAF50; color: white; padding: 0.5rem 1rem; text-decoration: none; border-radius: 4px; font-size: 1.2rem; }
.btn-video.btn-secundario { background: #555; }
.usuario-autenticado .rutina-card.bloqueada .overlay-bloqueo { display: none; }
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .progreso-container { background: #f0f0f0; border-radius: 10px; padding: 1.5rem; margin-bottom: 1.5rem; text-align: center; }
:where(body.pg-fortalecimiento) .dias-container { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: center; margin: 1.5rem 0 2rem; }
:where(body.pg-fortalecimiento) .dias-botones { display: flex; gap: 0.8rem; flex-wrap: wrap; justify-content: center; }
:where(body.pg-fortalecimiento) .btn-dia { border: 1px solid var(--color-borde); background: #fff; color: var(--color-secundario); padding: 0.8rem 1.2rem; border-radius: 999px; cursor: pointer; font-size: 1.4rem; box-shadow: var(--sombra); }
:where(body.pg-fortalecimiento) .btn-dia.activo { background: var(--color-primario); color: #fff; border-color: var(--color-primario); }
:where(body.pg-fortalecimiento) .btn-dia:disabled { opacity: 0.6; cursor: not-allowed; }
:where(body.pg-fortalecimiento) .btn-finalizar-dia { border: none; background: #4CAF50; color: #fff; padding: 0.9rem 1.4rem; border-radius: 10px; cursor: pointer; font-size: 1.4rem; box-shadow: var(--sombra); }
:where(body.pg-fortalecimiento) .btn-finalizar-dia:disabled { opacity: 0.6; cursor: not-allowed; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3,body.pg-fortalecimiento) .progreso-container { background: #f0f0f0; border-radius: 10px; padding: 1.5rem; margin-bottom: 2rem; text-align: center; }
.progreso-barra { width: 100%; height: 20px; background: #ddd; border-radius: 10px; margin: 1rem 0; overflow: hidden; }
.progreso-llenado { height: 100%; background: var(--color-primario); width: 0%; transition: width 0.3s ease; }
.progreso-texto { font-size: 1.4rem; color: var(--color-secundario); font-weight: bold; }
.completado-check { margin-top: 1rem; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.completado-check input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; }
.completado-check label { font-size: 1.4rem; color: var(--color-secundario); cursor: pointer; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3,body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .rutina-card.completada { opacity: 0.8; background: #e8f5e8; border-color: #4CAF50; }
:where(body.pg-fortalecimiento) .rutina-card.completada { opacity: 0.85; background: #e8f5e8; border-color: #4CAF50; }
.btn-reiniciar { background: #ff4444; color: white; border: none; padding: 0.8rem 1.5rem; border-radius: 5px; font-size: 1.4rem; cursor: pointer; margin-top: 1rem; }
.btn-reiniciar:hover { background: #cc0000; }
.felicitaciones { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8); display: none; justify-content: center; align-items: center; z-index: 1000; animation: fadeIn 0.5s; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3) .felicitaciones-contenido { background: white; padding: 2rem; border-radius: 20px; text-align: center; max-width: 400px; animation: scaleIn 0.3s; }
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .felicitaciones-contenido { background: white; padding: 2rem; border-radius: 20px; text-align: center; max-width: 420px; animation: scaleIn 0.3s; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3,body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .felicitaciones .emoji { font-size: 4rem; display: block; margin-bottom: 1rem; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3,body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .felicitaciones h2 { color: var(--color-primario); font-size: 2rem; margin-bottom: 1rem; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3,body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .felicitaciones p { font-size: 1.4rem; margin-bottom: 0.5rem; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3,body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .btn-cerrar { background: var(--color-primario); color: white; border: none; padding: 0.8rem 2rem; border-radius: 5px; font-size: 1.4rem; cursor: pointer; margin-top: 1rem; }
:where(body.pg-fortalecimiento) .felicitaciones-contenido { background: white; padding: 2.5rem; border-radius: 20px; text-align: center; max-width: 500px; animation: scaleIn 0.3s; }
:where(body.pg-fortalecimiento) .felicitaciones .emoji { font-size: 5rem; display: block; margin-bottom: 1rem; }
:where(body.pg-fortalecimiento) .felicitaciones h2 { color: var(--color-primario); font-size: 2.4rem; margin-bottom: 1rem; }
:where(body.pg-fortalecimiento) .felicitaciones p { font-size: 1.6rem; margin-bottom: 0.8rem; color: #333; }
:where(body.pg-fortalecimiento) .felicitaciones .mensaje-final { font-size: 1.8rem; font-weight: bold; color: #4CAF50; margin: 1.5rem 0; }
:where(body.pg-fortalecimiento) .btn-cerrar { background: var(--color-primario); color: white; border: none; padding: 1rem 2.5rem; border-radius: 5px; font-size: 1.6rem; cursor: pointer; margin-top: 1rem; }
.btn-cerrar:hover { background: #4a0e6e; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3,body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .navegacion-semanas { display: flex; justify-content: space-between; margin-top: 3rem; padding: 0 1rem; }
:where(body.pg-fortalecimiento) .navegacion-semanas { display: flex; justify-content: flex-start; margin-top: 3rem; padding: 0 1rem; }
.btn-nav { display: inline-block; padding: 0.8rem 1.5rem; background-color: var(--color-primario); color: white; text-decoration: none; border-radius: 5px; font-size: 1.4rem; transition: background-color 0.3s; }
.btn-nav:hover { background-color: #4a0e6e; text-decoration: none; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3,body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .btn-nav.siguiente { margin-left: auto; }
@media (max-width: 480px) {
  :where(body.pg-sem1,body.pg-sem2) .rutina-card { padding: 1rem; }
  :where(body.pg-sem1,body.pg-sem2) .rutina-card h2 { font-size: 1.6rem; }
  :where(body.pg-sem1,body.pg-sem2) .rutina-card p { font-size: 1.3rem; }
  :where(body.pg-sem1,body.pg-sem2) .navegacion-semanas { flex-direction: column; gap: 1rem; align-items: center; }
  :where(body.pg-sem1,body.pg-sem2) .btn-nav.siguiente { margin-left: 0; }
}
:where(body.pg-sem3) #selectorDia { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin: 1rem 0 1rem; }
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .dias-container { display: none; max-width: 1100px; margin: 0 auto 1.2rem; padding: 0 0.5rem; text-align: center; }
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .dias-titulo { font-size: 1.4rem; color: var(--color-secundario); margin-bottom: 0.8rem; font-weight: 700; }
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .selector-dia { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.8rem; }
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .dia-btn { border: 1px solid var(--color-borde); background: #fff; border-radius: 999px; padding: 0.9rem 1.2rem; min-width: 92px; font-size: 1.4rem; cursor: pointer; box-shadow: var(--sombra); }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .dia-btn.activo { outline: 2px solid var(--color-primario); font-weight: 700; }
:where(body.pg-sem1,body.pg-sem2) .dia-btn.done { background: #e8f5e8; border: 1px solid #4CAF50; }
:where(body.pg-sem1,body.pg-sem2) #selectorDia { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3) .dia-btn { min-width: 90px; padding: 0.9rem 1.2rem; font-size: 1.4rem; font-weight: 600; border-radius: 12px; border: 1px solid var(--color-borde); background: #fff; cursor: pointer; transition: all 0.2s ease; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3) .dia-btn.activo { outline: 2px solid var(--color-primario); background: #fce4f4; transform: scale(1.05); }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3) .dia-btn.done { background: #e8f5e8; border: 2px solid #4CAF50; }
:where(body.pg-sem1,body.pg-sem2,body.pg-sem3) .dia-btn:hover { background: #f9f0f7; }
@media (max-width: 768px) {
  :where(body.pg-sem1,body.pg-sem2,body.pg-sem3) .dia-btn { min-width: 80px; padding: 1rem 0.8rem; font-size: 1.3rem; }
}
@media (max-width: 480px) {
  :where(body.pg-sem1,body.pg-sem2) #selectorDia { gap: 0.8rem; }
  :where(body.pg-sem1,body.pg-sem2) .dia-btn { min-width: 75px; padding: 0.9rem 0.7rem; font-size: 1.2rem; }
}
@media (max-width: 480px) {
  :where(body.pg-sem3) .rutina-card { padding: 1rem; }
  :where(body.pg-sem3) .rutina-card h2 { font-size: 1.6rem; }
  :where(body.pg-sem3) .rutina-card p { font-size: 1.3rem; }
  :where(body.pg-sem3) .navegacion-semanas { flex-direction: column; gap: 1rem; align-items: center; }
  :where(body.pg-sem3) .btn-nav.siguiente { margin-left: 0; }
  :where(body.pg-sem3) #selectorDia { gap: 0.8rem; }
  :where(body.pg-sem3) .dia-btn { min-width: 75px; padding: 0.9rem 0.7rem; font-size: 1.2rem; }
}
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .dia-btn.done { background: #e8f5e8; border: 1px solid #4CAF50; font-weight: 700; }
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .dia-actions { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center; align-items: center; }
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .btn-finalizar-dia { background: var(--color-primario); color: #fff; border: none; padding: 0.9rem 1.5rem; border-radius: 8px; font-size: 1.4rem; cursor: pointer; }
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .btn-finalizar-dia:disabled { opacity: 0.5; cursor: not-allowed; }
:where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .txt-dia-completado { font-size: 1.4rem; color: #2e7d32; font-weight: 700; }
@media (max-width: 480px) {
  :where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .rutina-card { padding: 1rem; }
  :where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .rutina-card h2 { font-size: 1.6rem; }
  :where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .rutina-card p { font-size: 1.3rem; }
  :where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .navegacion-semanas { flex-direction: column; gap: 1rem; align-items: center; }
  :where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .btn-nav.siguiente { margin-left: 0; }
  :where(body.pg-sem4,body.pg-sem5,body.pg-estiramiento) .dia-btn { min-width: 86px; padding: 0.9rem 1rem; }
}
@media (max-width: 480px) {
  :where(body.pg-fortalecimiento) .rutina-card { padding: 1rem; }
  :where(body.pg-fortalecimiento) .rutina-card h2 { font-size: 1.6rem; }
  :where(body.pg-fortalecimiento) .rutina-card p { font-size: 1.3rem; }
}

/* Cuentas sin Seguimiento (estudiantes, enfermería, médicos, nutrición): ven los ejercicios y videos,
   pero no los controles para registrar avance. La clase la pone includes/pagina.php en <body>. */
body.sin-seguimiento :is(#selectorDia, .dias-container, .completado-check, .progreso-container, .btn-reiniciar, #btnFinalizarDia, .btn-finalizar-dia, #txtDiaCompletado) {
  display: none !important;
}
