/* =====================================================================
   DISEÑO 2.0 — «Horizonte académico»
   Se carga DESPUÉS de aula.css y lo afina: más aire, tarjetas con sombra
   suave, colores por tipo de recurso, cabecera de programa con progreso y
   navegación inferior en el celular. Pensado primero para el teléfono.
   ===================================================================== */
:root {
  --radio: 16px;
  --radio-sm: 10px;
  --sombra-suave: 0 1px 2px rgba(18, 54, 41, .05), 0 4px 16px rgba(18, 54, 41, .06);
  --sombra-media: 0 8px 30px rgba(18, 54, 41, .12);
  --fondo: #F4F6F3;
  --borde: #E5E9E4;
  --tinta-suave: #6B7470;
  --barra-alto: 68px;
}
body { background: var(--fondo); -webkit-font-smoothing: antialiased; }
a { text-underline-offset: 3px; }
.panel, .cifra { border-color: transparent; box-shadow: var(--sombra-suave); }
.btn { border-radius: 12px; padding: .5rem 1rem; }
.btn-sm { border-radius: 9px; padding: .3rem .7rem; }
.btn-lg { border-radius: 14px; padding: .7rem 1.4rem; }
.btn-verde { box-shadow: 0 2px 8px rgba(27, 77, 62, .25); }
.btn-acento { box-shadow: 0 2px 8px rgba(201, 162, 39, .35); font-weight: 600; }
.form-control, .form-select { border-radius: 12px; border-color: #D9DED8; padding: .55rem .85rem; }
.form-control-sm, .form-select-sm { border-radius: 9px; padding: .3rem .6rem; }

/* ---------- Barra superior ---------- */
.barra { border-bottom: 0; box-shadow: 0 1px 0 var(--borde), 0 2px 12px rgba(18, 54, 41, .04); min-height: var(--barra-alto); }
.barra .navbar-brand img { height: 42px; }
.barra .nav-link { border-radius: 10px; }
.barra .dropdown-menu { border: 0; border-radius: 14px; box-shadow: var(--sombra-media); padding: .4rem; }
.barra .dropdown-item { border-radius: 9px; padding: .5rem .75rem; }
.barra .navbar-toggler { border: 0; padding: .4rem .5rem; border-radius: 10px; }
.barra .navbar-toggler:focus { box-shadow: 0 0 0 3px var(--verde-claro); }
@media (max-width: 991.98px) {
  .barra .navbar-collapse { padding: .5rem 0 .75rem; }
  .barra .nav-link { padding: .65rem .8rem !important; }
}
@media (max-width: 575.98px) {
  :root { --barra-alto: 60px; }
  .barra .navbar-brand img { height: 34px; }
  .contenido { padding: 1rem 0 2rem; }
  .panel { padding: 1.1rem; border-radius: 14px; }
  h1 { font-size: 1.7rem; }
  .container { padding-left: 14px; padding-right: 14px; }
}

/* ---------- Navegación inferior (celular) ---------- */
.nav-inferior { display: none; }
@media (max-width: 991.98px) {
  body.con-nav-inferior { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  body.con-nav-inferior .pie-aula { display: none; }
  .nav-inferior {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030;
    background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 -1px 0 var(--borde), 0 -6px 20px rgba(18, 54, 41, .06);
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
  }
  .nav-inferior a, .nav-inferior button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: .1rem;
    background: none; border: 0; color: var(--tinta-suave); font-size: .7rem; font-weight: 600;
    text-decoration: none; padding: .3rem 0; border-radius: 12px; position: relative;
  }
  .nav-inferior .bi { font-size: 1.3rem; line-height: 1.1; }
  .nav-inferior .activo, .nav-inferior .active { color: var(--verde); }
  .nav-inferior .activo::before, .nav-inferior .active::before {
    content: ""; position: absolute; top: -.35rem; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--verde);
  }
  .nav-inferior .punto { position: absolute; top: .15rem; right: calc(50% - 1.1rem); width: .6rem; height: .6rem; border-radius: 50%; background: #D9534F; border: 2px solid #fff; }
}

/* ---------- Cabecera del programa ---------- */
.hero-programa {
  position: relative; overflow: hidden; border-radius: 22px; color: #fff; padding: 1.75rem 2rem;
  background:
    radial-gradient(circle at 92% -10%, rgba(201, 162, 39, .35) 0, transparent 38%),
    radial-gradient(circle at -5% 120%, rgba(255, 255, 255, .10) 0, transparent 40%),
    linear-gradient(135deg, #1F5947 0%, #1B4D3E 45%, #123629 100%);
  box-shadow: var(--sombra-media);
}
.hero-programa::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07;
  background-image: radial-gradient(#fff 1px, transparent 1.2px); background-size: 18px 18px;
}
.hero-programa > * { position: relative; z-index: 1; }
.hero-programa .volver { color: rgba(255, 255, 255, .8); text-decoration: none; font-size: .88rem; }
.hero-programa .volver:hover { color: #fff; }
.hero-programa .tipo { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #F0DB8F; margin: .8rem 0 .35rem; }
.hero-programa h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.1; margin: 0 0 .9rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; padding: .32rem .75rem; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .16); }
.chip .bi { color: #F0DB8F; }
.hero-metricas { display: flex; gap: 1rem; flex-shrink: 0; }
.anillo {
  --valor: 0; --color: #F0DB8F;
  width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--color) calc(var(--valor) * 1%), rgba(255, 255, 255, .16) 0);
}
.anillo > div { width: 78px; height: 78px; border-radius: 50%; background: #17463A; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.anillo strong { font-size: 1.25rem; line-height: 1; font-weight: 700; }
.anillo span { font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .78); margin-top: .25rem; }
.anillo.alerta { --color: #FF8A80; }
@media (max-width: 767.98px) {
  .hero-programa { border-radius: 18px; padding: 1.2rem 1.1rem; }
  .hero-metricas { width: 100%; margin-top: 1.1rem; gap: .75rem; }
  .anillo { width: 76px; height: 76px; } .anillo > div { width: 61px; height: 61px; } .anillo strong { font-size: 1.02rem; }
  .chip { font-size: .76rem; padding: .28rem .6rem; }
}

/* ---------- Próxima clase ---------- */
.clase-proxima { display: flex; align-items: center; gap: 1rem; background: #fff; border-radius: var(--radio); padding: 1rem 1.25rem; box-shadow: var(--sombra-suave); }
.clase-proxima.en-vivo { box-shadow: 0 0 0 2px var(--acento), var(--sombra-media); background: #FFFCF2; }
.clase-proxima .info { flex: 1; min-width: 0; }
.clase-proxima .etiqueta-mini { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--acento-texto); }
.clase-proxima h2 { font-size: 1.3rem; margin: .1rem 0 .15rem; line-height: 1.2; }
.clase-proxima small { color: var(--tinta-suave); }
.fecha-tile { width: 58px; flex-shrink: 0; border-radius: 14px; overflow: hidden; text-align: center; background: #fff; box-shadow: 0 0 0 1px var(--borde); }
.fecha-tile span { display: block; background: var(--verde); color: #fff; font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .18rem 0; }
.fecha-tile strong { display: block; font-size: 1.45rem; font-weight: 700; color: var(--verde); line-height: 1.5; }
.en-vivo-punto { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #E53935; margin-right: .35rem; animation: latido 1.4s infinite; }
@keyframes latido { 0%, 100% { box-shadow: 0 0 0 0 rgba(229, 57, 53, .5); } 50% { box-shadow: 0 0 0 6px rgba(229, 57, 53, 0); } }
@media (max-width: 575.98px) {
  .clase-proxima { flex-wrap: wrap; padding: .9rem; gap: .8rem; }
  .clase-proxima h2 { font-size: 1.12rem; }
  .clase-proxima .accion { width: 100%; }
  .clase-proxima .accion .btn { width: 100%; }
}

/* ---------- Pestañas segmentadas (fijas al hacer scroll) ---------- */
.segmentos {
  display: flex; gap: .25rem; padding: .3rem; background: #fff; border-radius: 14px; box-shadow: var(--sombra-suave);
  overflow-x: auto; scrollbar-width: none; position: sticky; top: calc(var(--barra-alto) + .5rem); z-index: 1010; list-style: none; margin: 0;
}
.segmentos::-webkit-scrollbar { display: none; }
.segmentos li { flex: 1 0 auto; }
.segmentos .nav-link { width: 100%; border: 0; border-radius: 10px; color: var(--tinta-suave); font-weight: 600; font-size: .92rem; padding: .55rem 1rem; white-space: nowrap; display: flex; align-items: center; justify-content: center; gap: .45rem; background: none; }
.segmentos .nav-link:hover { color: var(--verde); background: var(--fondo); }
.segmentos .nav-link.active { background: var(--verde); color: #fff; box-shadow: 0 2px 8px rgba(27, 77, 62, .25); }
.segmentos .contador { font-size: .7rem; background: rgba(0, 0, 0, .08); border-radius: 999px; padding: .05rem .45rem; }
.segmentos .nav-link.active .contador { background: rgba(255, 255, 255, .22); }
@media (max-width: 991.98px) { .con-nav-inferior .segmentos { display: none; } }

/* ---------- Módulos (acordeón) ---------- */
.modulo-card { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra-suave); margin-bottom: 1rem; overflow: hidden; }
.modulo-card.oculto { background: repeating-linear-gradient(135deg, #fff 0 14px, #FAFBF9 14px 28px); }
.modulo-cabecera { display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left; background: none; border: 0; padding: 1.15rem 1.35rem; color: inherit; }
.modulo-cabecera:hover { background: #FAFCFA; }
.modulo-numero { width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: 1.05rem; color: var(--verde); background: var(--verde-claro); }
.modulo-numero.completo { background: var(--verde); color: #fff; }
.modulo-cabecera .antes { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--acento-texto); }
.modulo-cabecera h2 { font-size: 1.3rem; margin: .05rem 0 0; line-height: 1.2; }
.modulo-cabecera .meta { display: flex; align-items: center; gap: .6rem; font-size: .8rem; color: var(--tinta-suave); margin-top: .35rem; }
.modulo-cabecera .flecha { margin-left: auto; color: var(--tinta-suave); transition: transform .2s; flex-shrink: 0; font-size: 1.1rem; }
.modulo-cabecera[aria-expanded="true"] .flecha { transform: rotate(180deg); }
.mini-barra { height: 5px; width: 90px; border-radius: 999px; background: #E9EDE8; overflow: hidden; flex-shrink: 0; }
.mini-barra span { display: block; height: 100%; background: var(--verde); border-radius: 999px; }
.modulo-cuerpo { padding: 0 1.35rem 1.35rem; }
.modulo-cuerpo .descripcion { color: var(--tinta-suave); white-space: pre-line; margin: 0 0 .75rem; }
.subtitulo-seccion { font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--tinta-suave); margin: 1.1rem 0 .55rem; }
.subtitulo-seccion:first-child { margin-top: 0; }
@media (max-width: 575.98px) {
  .modulo-cabecera { padding: 1rem; gap: .75rem; }
  .modulo-numero { width: 40px; height: 40px; border-radius: 12px; font-size: .95rem; }
  .modulo-cabecera h2 { font-size: 1.12rem; }
  .modulo-cuerpo { padding: 0 1rem 1rem; }
}

/* ---------- Filas de recursos y actividades ---------- */
.recursos { display: flex; flex-direction: column; gap: .5rem; }
.recurso { position: relative; display: flex; align-items: center; gap: .85rem; padding: .75rem .85rem; border-radius: 14px; background: #F8FAF8; border: 1px solid transparent; transition: background .15s, border-color .15s, box-shadow .15s; }
.recurso:hover { background: #fff; border-color: var(--borde); box-shadow: var(--sombra-suave); }
.recurso .cuerpo-recurso { flex: 1; min-width: 0; }
.recurso .titulo { font-weight: 600; color: var(--texto); text-decoration: none; display: block; line-height: 1.3; }
.recurso a.titulo::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.recurso .detalle { font-size: .8rem; color: var(--tinta-suave); margin-top: .12rem; }
.recurso .derecha { flex-shrink: 0; position: relative; z-index: 1; }
.recurso.bloque { flex-wrap: wrap; }
.recurso.bloque .extra { flex-basis: 100%; margin-top: .35rem; position: relative; z-index: 1; }
.recurso .extra .texto-material { background: #fff; margin: 0; }
.tile { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; font-size: 1.2rem; }
.tile-pdf { background: #FDECEA; color: #C62828; }
.tile-doc { background: #E8F0FE; color: #1A56DB; }
.tile-hoja { background: #E6F4EA; color: #1E7B34; }
.tile-presentacion { background: #FEF0E6; color: #D9480F; }
.tile-imagen { background: #F3E8FD; color: #7B2CBF; }
.tile-audio { background: #E7F5FF; color: #1971C2; }
.tile-archivo { background: #EEF0F2; color: #495057; }
.tile-enlace { background: #E6F4F7; color: #0B7285; }
.tile-video { background: #FDE8F0; color: #C2185B; }
.tile-texto { background: #EEF0F2; color: #495057; }
.tile-tarea { background: #FFF4E5; color: #B26A00; }
.tile-foro { background: #E6F6F1; color: #0F7B5F; }
.tile-evaluacion { background: #ECEBFD; color: #4C3FD1; }
.tile-grupal { background: #FCE8F3; color: #A61E73; }
.pill { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 600; padding: .28rem .65rem; border-radius: 999px; white-space: nowrap; }
.pill-ok { background: #E3F2EA; color: #1F6B45; }
.pill-info { background: #E8F0FE; color: #1A56DB; }
.pill-alerta { background: #FFF4E5; color: #9A5B00; }
.pill-peligro { background: #FDECEA; color: #C62828; }
.pill-neutro { background: #EEF0F2; color: #495057; }
@media (max-width: 575.98px) {
  .recurso { padding: .7rem; gap: .7rem; flex-wrap: wrap; }
  .tile { width: 38px; height: 38px; font-size: 1.05rem; border-radius: 11px; }
  .recurso .cuerpo-recurso { flex-basis: calc(100% - 38px - .7rem); }
  .recurso .derecha { padding-left: calc(38px + .7rem); margin-top: -.2rem; }
}

/* ---------- Columna lateral ---------- */
.lateral-sticky { position: sticky; top: calc(var(--barra-alto) + 1rem); }
.tarjeta-lado { background: #fff; border-radius: var(--radio); box-shadow: var(--sombra-suave); padding: 1.15rem 1.25rem; margin-bottom: 1rem; }
.tarjeta-lado h3 { font-family: var(--fuente-texto); font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-suave); margin: 0 0 .85rem; }
.pendiente { display: flex; gap: .75rem; align-items: center; padding: .6rem 0; border-top: 1px solid var(--borde); text-decoration: none; color: inherit; }
.pendiente:first-of-type { border-top: 0; padding-top: 0; }
.pendiente:hover strong { color: var(--verde); }
.pendiente .tile { width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; }
.pendiente strong { display: block; font-size: .88rem; font-weight: 600; line-height: 1.25; }
.pendiente small { color: var(--tinta-suave); }
.pendiente .vence-pronto { color: #C62828; font-weight: 600; }
.persona { display: flex; align-items: center; gap: .75rem; }
.persona .avatar { width: 46px; height: 46px; font-size: .95rem; }
.persona strong { display: block; line-height: 1.25; }
.persona small { color: var(--tinta-suave); }

/* ---------- Clases (agenda) ---------- */
.agenda { display: flex; flex-direction: column; gap: .6rem; }
.agenda-item { display: flex; align-items: center; gap: 1rem; background: #fff; border-radius: 14px; padding: .85rem 1rem; box-shadow: var(--sombra-suave); }
.agenda-item.pasada { background: #FAFBFA; box-shadow: none; border: 1px solid var(--borde); }
.agenda-item.pasada .fecha-tile span { background: #8A938E; }
.agenda-item.pasada .fecha-tile strong { color: #6B7470; }
.agenda-item .info { flex: 1; min-width: 0; }
.agenda-item .info strong { display: block; font-weight: 600; line-height: 1.3; }
.agenda-item .info small { color: var(--tinta-suave); }
.agenda-item .acciones { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.agenda-titulo { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--tinta-suave); margin: 1.25rem 0 .6rem; }
.agenda-titulo:first-child { margin-top: 0; }
@media (max-width: 575.98px) {
  .agenda-item { flex-wrap: wrap; gap: .75rem; padding: .8rem; }
  .agenda-item .info { flex-basis: calc(100% - 58px - .75rem); }
  .agenda-item .acciones { width: 100%; justify-content: flex-start; padding-left: calc(58px + .75rem); }
}

/* ---------- Avisos destacados ---------- */
.aviso { display: flex; align-items: center; gap: 1rem; border-radius: var(--radio); padding: 1rem 1.25rem; background: #fff; box-shadow: var(--sombra-suave); }
.aviso > .bi { font-size: 1.7rem; flex-shrink: 0; }
.aviso .texto { flex: 1; min-width: 0; }
.aviso .texto strong { display: block; }
.aviso .texto span { font-size: .88rem; color: var(--tinta-suave); }
.aviso-dorado { background: linear-gradient(135deg, #FFF8E1, #FFFCF2); box-shadow: 0 0 0 1px #F0DB8F, var(--sombra-suave); }
.aviso-dorado > .bi { color: var(--acento-oscuro); }
.aviso-gris > .bi { color: var(--tinta-suave); }
.aviso-verde { background: linear-gradient(135deg, #E8F5EE, #F6FBF8); box-shadow: 0 0 0 1px #BFDDCB, var(--sombra-suave); }
.aviso-verde > .bi { color: #1F6B45; }
@media (max-width: 575.98px) { .aviso { flex-wrap: wrap; padding: .95rem; } .aviso .btn { width: 100%; } }

/* ---------- Mi progreso ---------- */
.resumen-progreso { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.resumen-progreso > div { background: #fff; border-radius: 14px; box-shadow: var(--sombra-suave); padding: 1rem; text-align: center; }
.resumen-progreso strong { display: block; font-size: 1.7rem; font-weight: 700; color: var(--verde); line-height: 1.1; }
.resumen-progreso span { font-size: .78rem; color: var(--tinta-suave); }
@media (max-width: 575.98px) { .resumen-progreso { gap: .5rem; } .resumen-progreso > div { padding: .8rem .4rem; } .resumen-progreso strong { font-size: 1.35rem; } .resumen-progreso span { font-size: .7rem; } }
.lista-notas { list-style: none; padding: 0; margin: .75rem 0 0; }
.lista-notas li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--borde); }
.lista-notas li .cuerpo-recurso { flex: 1; min-width: 0; }
.lista-notas li a { font-weight: 600; color: var(--texto); text-decoration: none; }
.lista-notas li a:hover { color: var(--verde); }
.lista-notas .nota { font-weight: 700; white-space: nowrap; }

/* ---------- Mi aula (inicio del estudiante) ---------- */
.saludo { margin-bottom: 1.5rem; }
.saludo h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin: 0; }
.saludo p { color: var(--tinta-suave); margin: .25rem 0 0; }
.tarjeta-programa { background: #fff; border-radius: 20px; box-shadow: var(--sombra-suave); overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: transform .2s, box-shadow .2s; position: relative; }
.tarjeta-programa:hover { transform: translateY(-3px); box-shadow: var(--sombra-media); }
.tarjeta-programa .portada {
  position: relative; min-height: 116px; padding: 1rem 1.15rem; color: #fff; display: flex; flex-direction: column; justify-content: space-between; gap: .5rem;
  background: radial-gradient(circle at 100% 0, rgba(201, 162, 39, .45) 0, transparent 45%), linear-gradient(135deg, #22604D, #123629);
}
.tarjeta-programa .portada::after { content: ""; position: absolute; inset: 0; opacity: .08; background-image: radial-gradient(#fff 1px, transparent 1.2px); background-size: 16px 16px; }
.tarjeta-programa .portada > * { position: relative; z-index: 1; }
.tarjeta-programa .portada .tipo { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #F0DB8F; }
.tarjeta-programa .portada .icono-fondo { position: absolute; right: .8rem; bottom: -.9rem; font-size: 4.6rem; opacity: .13; z-index: 0; }
.tarjeta-programa .portada h2 { color: #fff; font-size: 1.35rem; line-height: 1.15; margin: 0; }
.tarjeta-programa .cuerpo { padding: 1rem 1.15rem 1.15rem; display: flex; flex-direction: column; flex: 1; gap: .75rem; }
.tarjeta-programa .datos { list-style: none; padding: 0; margin: 0; font-size: .85rem; color: var(--tinta-suave); }
.tarjeta-programa .datos li { display: flex; gap: .5rem; margin-bottom: .3rem; }
.tarjeta-programa .datos .bi { color: var(--verde); }
.barra-avance { height: 8px; border-radius: 999px; background: #E9EDE8; overflow: hidden; }
.barra-avance span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2E7D57, #1B4D3E); }
.avance-texto { display: flex; justify-content: space-between; font-size: .78rem; color: var(--tinta-suave); margin-bottom: .3rem; }
.avance-texto strong { color: var(--verde); }

/* ---------- Ajustes finos para el celular ---------- */
.modulo-cabecera .meta { flex-wrap: wrap; row-gap: .25rem; }
@media (max-width: 767.98px) {
  .anillo span { font-size: .5rem; letter-spacing: .04em; }
}
@media (max-width: 575.98px) {
  .solo-pc { display: none !important; }
  .mini-barra { width: 70px; }
  .recurso .derecha:empty { display: none; }
}
.subtitulo-seccion { font-family: var(--fuente-texto); }

/* ---------- Cabecera de actividad ---------- */
.cabecera-actividad { background: #fff; border-radius: 20px; box-shadow: var(--sombra-suave); padding: 1.25rem 1.5rem; position: relative; overflow: hidden; }
.cabecera-actividad::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, var(--verde), var(--acento)); }
.cabecera-actividad .volver { font-size: .85rem; color: var(--tinta-suave); text-decoration: none; }
.cabecera-actividad .volver:hover { color: var(--verde); }
.cabecera-actividad .antes { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--acento-texto); }
.cabecera-actividad h1 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); line-height: 1.15; margin: .15rem 0 .7rem; }
.tile-grande { width: 58px; height: 58px; border-radius: 16px; font-size: 1.6rem; }
.chips-claro { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-claro { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 500; padding: .3rem .7rem; border-radius: 999px; background: var(--fondo); color: var(--texto); }
.chip-claro .bi { color: var(--verde); }
.chip-claro.chip-alerta { background: #FFF4E5; color: #9A5B00; }
.chip-claro.chip-alerta .bi { color: #9A5B00; }
@media (max-width: 575.98px) {
  .cabecera-actividad { padding: 1rem 1rem 1rem 1.15rem; border-radius: 16px; }
  .tile-grande { width: 46px; height: 46px; font-size: 1.3rem; border-radius: 13px; }
}
