/**
 * Aula de cursos — formato CEMCI.
 *
 * Hoja propia, y no un bloque más en aula.css, por la lección de la sala en
 * directo: aula.css lleva reglas genéricas (`.avo-panel{display:none}`) que
 * chocan en cuanto se carga en otro sitio. Todo lo de aquí cuelga de
 * `.avo-cursos` y usa nombres que no existen en ninguna otra hoja.
 *
 * Colores de recurso como en Moodle, que es lo que los alumnos ya conocen:
 * documentos en verde azulado, evaluación en rosa, tareas en naranja,
 * comunicación en violeta.
 */

.avo-cursos {
	--cc-borde: var(--avo-gris-l,#ece1cd);
	--cc-texto: var(--gris-900,#2e2820);
	--cc-suave: var(--gris-500,#7e7466);
	--cc-enlace: var(--avo-azul2,#a94728);
	--cc-radio: 18px;
	--ico-pdf: #16786f;
	--ico-cuest: #a63a5d;
	--ico-tarea: #bb5522;
	--ico-foro: #5b4ba8;
	--ico-otro: #6b6255;
	color: var(--cc-texto);
}

/* --- Tarjeta general del curso ---------------------------------------- */

.avo-cc {
	background:var(--avo-papel,#fdfaf3);
	border: 1px solid var(--cc-borde);
	border-radius: var(--cc-radio);
	padding: clamp(1.2rem, 3vw, 2rem) clamp(1rem, 3vw, 1.8rem);
	margin-bottom: 1.4rem;
}

.avo-cc__cab { text-align: center; padding-bottom: 1.6rem; border-bottom: 1px solid var(--cc-borde); }
.avo-cc__portada img { display: block; width: 100%; max-height: 280px; object-fit: cover; border-radius: 14px; margin: 0 0 1.4rem; }
.avo-cc__titulo {
	margin: 0; font-size: clamp(1.45rem, 3.2vw, 2.1rem); line-height: 1.3; font-weight: 700;
	color: var(--cc-texto); letter-spacing: -.01em;
}
.avo-cc__fechas { display: block; margin-top: .3rem; font-size: .8em; }
.avo-cc__lema {
	margin: .9rem 0 0; font-size: .82rem; font-weight: 700; letter-spacing: .14em;
	color: var(--avo-oro-osc, var(--avo-oro-osc,#a9761f)); text-transform: uppercase;
}

.avo-cc__equipo { padding: 1.4rem 0 .4rem; border-bottom: 1px solid var(--cc-borde); }
.avo-cc__grupo { margin: 0 0 .9rem; font-weight: 700; text-transform: uppercase; font-size: .95rem; letter-spacing: .01em; }
.avo-cc__persona { margin: 0 0 1rem; line-height: 1.55; }
.avo-cc__persona + .avo-cc__grupo { margin-top: 1.4rem; }

.avo-cc__obl { padding: 1.3rem 0 .3rem; }
.avo-cc__obl p { margin: 0 0 .7rem; }
.avo-cc__obl ul { margin: 0; padding-left: 1.3rem; }
.avo-cc__obl li { margin-bottom: .35rem; line-height: 1.5; }

/* El bloque de clases en directo vive dentro de la tarjeta general. */
.avo-cc .avo-directo { margin-top: 1.4rem; }

/* --- Filas de recurso -------------------------------------------------- */

.avo-rec { list-style: none; margin: 0; padding: 0; }
.avo-rec__fila {
	display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
	gap: .5rem 1rem; padding: 1rem .2rem; border-bottom: 1px solid var(--cc-borde);
}
.avo-rec__fila:first-child { border-top: 1px solid var(--cc-borde); }
.avo-cc__cab + .avo-rec .avo-rec__fila:first-child,
.avo-cc__equipo + .avo-rec .avo-rec__fila:first-child { border-top: 0; }
.avo-rec + .avo-rec .avo-rec__fila:first-child { border-top: 0; }
.avo-rec__ancla { display: none; }
.avo-rec__ancla + .avo-rec__fila { border-top: 0; }

.avo-rec__fila > a {
	display: inline-flex; align-items: center; gap: .9rem;
	color: var(--cc-enlace); text-decoration: none; font-size: 1.08rem; line-height: 1.35;
}
.avo-rec__fila > a:hover .avo-rec__nombre { text-decoration: underline; text-underline-offset: 3px; }
.avo-rec__estado { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem; }

.avo-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; }
.avo-ico svg { width: 36px; height: 36px; }
.avo-ico--pdf     { color: var(--ico-pdf); }
.avo-ico--archivo { color: var(--ico-pdf); }
.avo-ico--cuestionario { color: var(--ico-cuest); }
.avo-ico--tarea   { color: var(--ico-tarea); }
.avo-ico--foro    { color: var(--ico-foro); }
.avo-ico--enlace, .avo-ico--video, .avo-ico--carpeta { color: var(--ico-otro); }

/* Chips de estado. */
.avo-cursos .avo-chip {
	display: inline-block; padding: .18rem .6rem; border-radius: 99px;
	font-size: .74rem; font-weight: 700; letter-spacing: .02em;
	background: var(--avo-gris-l,#ece1cd); color: var(--cc-suave);
}
.avo-cursos .avo-chip--obl   { background: #fde8ef; color: #b02a5b; }
.avo-cursos .avo-chip--ok    { background: #e3f6ec; color: #16794b; }
.avo-cursos .avo-chip--ko    { background: #fff1e6; color: #b34d0d; }
.avo-cursos .avo-chip--curso { background: var(--avo-azul-cl,#fbf0e7); color: var(--avo-azul,#123d58); }

/* --- Tarjetas plegables (presentación y unidades) -------------------- */

.avo-cu {
	background:var(--avo-papel,#fdfaf3);
	border: 1px solid var(--cc-borde);
	border-radius: var(--cc-radio);
	margin-bottom: 1.4rem;
}
.avo-cu > summary {
	display: flex; align-items: center; gap: 1rem;
	padding: 1.3rem clamp(1rem, 3vw, 1.6rem);
	cursor: pointer; list-style: none;
	font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 500; color: var(--cc-texto); letter-spacing: -.01em;
}
.avo-cu > summary::-webkit-details-marker { display: none; }
.avo-cu__chev {
	display: inline-grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px;
	border-radius: 11px; background: var(--avo-azul-cl,#fbf0e7); color: var(--cc-enlace);
	transition: transform .18s ease;
}
.avo-cu:not([open]) .avo-cu__chev { transform: rotate(-90deg); }
.avo-cu > summary:hover .avo-cu__chev { background: var(--avo-gris-f,#f5ebda); }

.avo-cu__cuerpo { padding: 0 clamp(1rem, 3vw, 1.6rem) 1.2rem; }

.avo-cu__titulo { margin: 0 0 1rem; font-size: 1.08rem; line-height: 1.5; }
.avo-cu__idea {
	margin: -.3rem 0 1.1rem; padding-left: .9rem; border-left: 3px solid var(--avo-oro, #d9a441);
	font-style: italic; color: var(--cc-suave); line-height: 1.5;
}

.avo-cu__indice { margin-bottom: 1.2rem; line-height: 1.55; }
.avo-cu__indice > ul, .avo-cu__indice > ol { margin: 0; padding-left: 1.4rem; }
.avo-cu__indice li { margin-bottom: .25rem; }
.avo-cu__indice ul ul { list-style: circle; margin: .25rem 0 .45rem; padding-left: 1.4rem; }
.avo-cu__indice > ul > li { margin-bottom: .45rem; }

/* Presentación: texto largo, medida de lectura. */
.avo-prosa { line-height: 1.7; max-width: 76ch; }
.avo-prosa h3 { margin: 1.8rem 0 .6rem; font-size: 1.15rem; color: var(--avo-azul-osc, var(--avo-azul-osc,#0b2a3e)); }
.avo-prosa h3:first-child { margin-top: 0; }
.avo-prosa p { margin: 0 0 1rem; }
.avo-prosa ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.avo-prosa li { margin-bottom: .4rem; }
.avo-prosa table { width: 100%; border-collapse: collapse; margin: .4rem 0 1.4rem; font-size: .95rem; }
.avo-prosa th, .avo-prosa td { border: 1px solid var(--cc-borde); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.avo-prosa thead th { background: var(--avo-gris-f,#f5ebda); font-weight: 700; }
.avo-prosa .avo-caja {
	margin: .6rem 0 1.4rem; padding: 1rem 1.2rem; border-radius: 12px;
	background: var(--avo-gris-f,#f5ebda); border: 1px solid var(--avo-gris-f,#f5ebda);
}
.avo-prosa .avo-caja p:last-child, .avo-prosa .avo-caja ul:last-child { margin-bottom: 0; }
.avo-prosa .avo-lema-grande {
	text-align: center; font-weight: 800; letter-spacing: .12em; font-size: 1.05rem;
	color: var(--avo-azul-osc, var(--avo-azul-osc,#0b2a3e)); margin: .2rem 0 1.2rem;
}

/* --- Migas ---------------------------------------------------------------- */

.avo-migas { margin: 0 0 1rem; }
.avo-migas a { color: var(--cc-enlace); text-decoration: none; font-weight: 600; }
.avo-migas a:hover { text-decoration: underline; }

/* --- Cuestionario ------------------------------------------------------- */

.avo-q {
	background:var(--avo-papel,#fdfaf3); border: 1px solid var(--cc-borde); border-radius: var(--cc-radio);
	padding: clamp(1.2rem, 3vw, 2rem) clamp(1rem, 3vw, 1.8rem);
}
.avo-q__cab { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.avo-q__cab h2 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.8rem); line-height: 1.25; }
.avo-q__icono .avo-ico { width: 52px; height: 52px; flex-basis: 52px; }
.avo-q__icono .avo-ico svg { width: 46px; height: 46px; }
.avo-q__datos { margin: .3rem 0 0; color: var(--cc-suave); }

.avo-q__lista { list-style: none; margin: 0 0 1.4rem; padding: 0; counter-reset: none; }
.avo-q__preg { padding: 1.3rem 0; border-top: 1px solid var(--cc-borde); }
.avo-q__enun { display: flex; gap: .8rem; margin: 0 0 .9rem; font-weight: 600; line-height: 1.5; font-size: 1.04rem; }
.avo-q__num {
	flex: 0 0 auto; display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.9rem;
	border-radius: 8px; background: var(--avo-gris-l,#ece1cd); color: var(--cc-suave); font-size: .88rem;
}
.avo-q__ops { display: grid; gap: .5rem; padding-left: 2.7rem; }
.avo-q__op {
	display: flex; align-items: flex-start; gap: .7rem; padding: .65rem .8rem;
	border: 1px solid var(--cc-borde); border-radius: 10px; line-height: 1.45; cursor: pointer;
	transition: border-color .12s, background .12s;
}
.avo-q__op:hover { border-color: #b9cdf0; background:var(--avo-crema,#fbf6ee); }
.avo-q__op input { margin: .2rem 0 0; accent-color: var(--cc-enlace); flex: 0 0 auto; }
.avo-q__op:has(input:checked) { border-color: var(--cc-enlace); background:var(--avo-azul-cl,#fbf0e7); }
.avo-q__letra { font-weight: 800; color: var(--cc-suave); min-width: 1.1rem; }

/* Revisión. */
.avo-q__op--ver { cursor: default; }
.avo-q__op--ver:hover { border-color: var(--cc-borde); background: none; }
.avo-q__op.es-bien     { border-color: #7ccba0; background: #effaf4; }
.avo-q__op.es-mal      { border-color: #f0a3a3; background: #fdf1f1; }
.avo-q__op.es-correcta { border-color: #7ccba0; background: #effaf4; border-style: dashed; }
.avo-q__marca { margin-left: auto; font-style: normal; font-size: .8rem; font-weight: 700; white-space: nowrap; padding-left: .6rem; }
.es-bien .avo-q__marca, .es-correcta .avo-q__marca { color: #16794b; }
.es-mal .avo-q__marca { color: #b42323; }
.avo-q__preg--ok .avo-q__num { background: #e3f6ec; color: #16794b; }
.avo-q__preg--ko .avo-q__num { background: #fde8e8; color: #b42323; }
.avo-q__exp {
	margin: .8rem 0 0 2.7rem; padding: .75rem .95rem; border-radius: 10px;
	background: var(--avo-gris-f,#f5ebda); color: #2b3a4d; line-height: 1.55; font-size: .95rem;
}

.avo-q__res {
	display: flex; align-items: center; gap: 1.2rem; margin: 0 0 1.2rem;
	padding: 1.1rem 1.3rem; border-radius: 14px; line-height: 1.5;
}
.avo-q__res--ok { background: #e3f6ec; color: #0f5a37; }
.avo-q__res--ko { background: #fff1e6; color: #7a3408; }
.avo-q__nota { font-size: 2.2rem; font-weight: 800; line-height: 1; min-width: 3.5rem; text-align: center; }
.avo-q__aviso { margin: 0 0 1rem; }

.avo-q__pie {
	position: sticky; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
	padding: .9rem 0 .2rem; background: linear-gradient(to top, var(--avo-papel,#fdfaf3) 75%, rgba(253,250,243,0));
}
.avo-q__cuenta { color: var(--cc-suave); font-weight: 600; }
.avo-q__empezar { margin-top: 1.2rem; }
.avo-q__empezar p { margin: 0 0 1rem; color: var(--cc-suave); max-width: 65ch; line-height: 1.55; }
.avo-q__bloqueo {
	margin-top: 1rem; padding: .9rem 1.1rem; border-radius: 12px;
	background:var(--avo-gris-f,#f5ebda); color: var(--cc-suave); font-weight: 600;
}
.avo-aviso--mal { background: #fdf1f1; color: #8a1f1f; border: 1px solid #f3c4c4; }

/* --- Reto ------------------------------------------------------------------ */

.avo-t .avo-rec { margin-bottom: 1rem; }
.avo-t__entrega { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--cc-borde); }
.avo-t__entrega h3 { margin: 0 0 .8rem; font-size: 1.15rem; }
.avo-t__estado p { margin: 0 0 .6rem; }
.avo-t__texto { margin: .6rem 0 1rem; padding: .7rem 1rem; border-left: 3px solid var(--cc-borde); color: var(--cc-suave); }
.avo-t__form { display: grid; gap: 1rem; max-width: 560px; margin-top: 1rem; }
.avo-t__campo { display: grid; gap: .35rem; }
.avo-t__campo > span { font-weight: 600; }
.avo-t__campo em { font-weight: 400; color: var(--cc-suave); font-style: normal; }
.avo-t__campo small { color: var(--cc-suave); }
.avo-t__campo input[type=file] { padding: .6rem; border: 1px dashed #b9c3d0; border-radius: 10px; background:var(--avo-crema,#fbf6ee); }
.avo-t__campo textarea { font: inherit; padding: .6rem .7rem; border: 1px solid var(--cc-borde); border-radius: 10px; }
.avo-t__form .avo-btn { justify-self: start; }

/* --- Móvil ----------------------------------------------------------------- */

@media (max-width: 640px) {
	.avo-cu > summary { gap: .7rem; }
	.avo-cu__chev { width: 38px; height: 38px; flex-basis: 38px; }
	.avo-rec__fila > a { font-size: 1rem; }
	.avo-q__ops { padding-left: 0; }
	.avo-q__exp { margin-left: 0; }
	.avo-q__marca { display: block; margin: .3rem 0 0; padding: 0; }
	.avo-q__op--ver { flex-wrap: wrap; }
}

/* La tabla de la presentación: en un teléfono, se desplaza ella y no la página. */
@media (max-width: 700px) {
	.avo-prosa table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
	.avo-prosa th, .avo-prosa td { min-width: 8.5rem; }
}

/* --- Pantalla de entrada al curso (V42) ------------------------------------ */
.avo-pant { display: flex; justify-content: center; padding: 2rem 0 3rem; }
.avo-pant__caja { width: 100%; max-width: 720px; text-align: center; background: #fff; border: 1px solid var(--cc-borde, #e3dccf); border-radius: 16px; padding: 2.2rem 1.6rem 2rem; box-shadow: 0 8px 30px rgba(20,30,50,.06); }
.avo-pant__logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.4rem 2.2rem; margin: 0 0 1.8rem; }
.avo-pant__logos img { display: block; max-height: 78px; max-width: 250px; width: auto; height: auto; object-fit: contain; }
.avo-pant__texto { text-align: left; line-height: 1.65; font-size: 1.05rem; }
.avo-pant__texto p { margin: 0 0 1rem; }
.avo-pant__accion { margin: 1.8rem 0 0; }
.avo-pant__accion .avo-btn { min-width: 220px; font-size: 1.1rem; padding: .9rem 2rem; }
@media (max-width: 640px) {
	.avo-pant { padding: 1rem 0 2rem; }
	.avo-pant__caja { padding: 1.6rem 1.1rem 1.5rem; border-radius: 12px; }
	.avo-pant__logos img { max-height: 56px; max-width: 42vw; }
	.avo-pant__accion .avo-btn { width: 100%; }
}
.avo-pant__titulo { margin: 0 0 1.1rem; text-align: center; font-size: 1.3rem; letter-spacing: .04em; color: var(--cc-titulo, #12304c); }

/* Foro: borrar lo propio */
.avo-foro-borrar { margin: .6rem 0 0; }
.avo-foro-borrar__btn { background: none; border: 0; padding: 0; font: inherit; font-size: .85rem; color: #9a3412; text-decoration: underline; cursor: pointer; }
.avo-foro-borrar__btn:hover { color: #7c2d12; }
