/* Sacando la lengua · componentes base. Solo usa var(--sll-*); los colores viven en style.css. */

/* ---------- Texto accesible ---------- */
.sll-solo-lectores {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---------- Logotipo ---------- */
.sll-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

.sll-logo-enlace {
	display: inline-flex;
	align-items: center;
	min-height: var(--sll-objetivo);
	text-decoration: none;
	line-height: 0;
}

.sll-logo {
	height: clamp(48px, 7vw, 64px);
	width: auto;
	aspect-ratio: 292 / 104;
}

/* Colores del rótulo según el modo (las variables heredan hacia el <use>). */
.sll-lg-sac {
	fill: var(--sll-texto);
}

.sll-lg-leng {
	fill: var(--sll-acento);
}

/* Animación de la lengua (dentro del sprite: el selector no puede depender del contenedor). */
.sll-lengua {
	transform-origin: 60px 54px;
	animation: sll-lengua 1.6s ease-in-out 0.3s var(--sll-lengua-veces, 2) both;
}

@keyframes sll-lengua {
	0%, 100% { transform: rotate(0) scaleY(1); }
	25% { transform: rotate(-7deg) scaleY(1.06); }
	75% { transform: rotate(7deg) scaleY(0.97); }
}

/* ---------- Interruptor de modo ---------- */
.sll-modo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: var(--sll-objetivo);
	min-width: var(--sll-objetivo);
	padding: 0.5rem 0.9rem;
	font: 700 1rem/1 var(--sll-fuente-texto);
	color: var(--sll-texto);
	background: var(--sll-superficie);
	border: 2px solid var(--sll-borde);
	border-radius: 999px;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.sll-modo[hidden] {
	display: none;
}

.sll-modo:hover {
	border-color: var(--sll-violeta-texto);
	transform: translateY(-1px);
}

.sll-modo__icono {
	flex: none;
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid currentColor;
	border-radius: 50%;
	background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.sll-modo[aria-pressed="true"] .sll-modo__icono {
	background: linear-gradient(270deg, currentColor 50%, transparent 50%);
}

:root body #masthead > .sll-modo {
	position: absolute;
	top: 50%;
	right: 1rem;
	margin-top: calc(var(--sll-objetivo) / -2);
	z-index: 20;
}

.sll-modo__texto {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (min-width: 640px) {
	.sll-modo__texto {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip-path: none;
	}
}

/* ---------- Botones ---------- */
.sll-boton,
:root body .wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: var(--sll-objetivo);
	padding: 0.7rem 1.4rem;
	font: 700 1.0625rem/1.2 var(--sll-fuente-texto);
	color: var(--sll-boton-texto);
	background-color: var(--sll-boton-fondo);
	border: 2px solid var(--sll-boton-fondo);
	border-radius: 999px;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sll-boton:hover,
:root body .wp-block-button .wp-block-button__link:hover {
	color: var(--sll-boton-texto);
	background-color: var(--sll-boton-hover);
	border-color: var(--sll-boton-hover);
	transform: translateY(-2px);
	box-shadow: 0 8px 18px var(--sll-sombra);
}

.sll-boton--secundario,
:root body .wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--sll-violeta-texto);
	background-color: transparent;
	border-color: var(--sll-violeta-texto);
}

.sll-boton--secundario:hover,
:root body .wp-block-button.is-style-outline .wp-block-button__link:hover {
	color: var(--sll-boton-texto);
	background-color: var(--sll-boton-fondo);
	border-color: var(--sll-boton-fondo);
}

/* ---------- Enlace de descarga ---------- */
.sll-descarga {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: var(--sll-objetivo);
	font-weight: 700;
	color: var(--sll-enlace);
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

.sll-descarga::before {
	content: "";
	flex: none;
	width: 1.1em;
	height: 1.1em;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v11m0 0l-4.5-4.5M12 14l4.5-4.5M4 17v3h16v-3' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3v11m0 0l-4.5-4.5M12 14l4.5-4.5M4 17v3h16v-3' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sll-descarga:hover {
	color: var(--sll-acento-texto);
}

/* ---------- Tarjeta ---------- */
.sll-tarjeta {
	background: var(--sll-superficie);
	color: var(--sll-texto);
	border: 1px solid var(--sll-linea);
	border-radius: var(--sll-radio);
	padding: 1.5rem;
	box-shadow: 0 2px 6px var(--sll-sombra);
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.sll-tarjeta:hover,
.sll-tarjeta:focus-within {
	transform: translateY(-4px);
	box-shadow: 0 14px 28px var(--sll-sombra);
	border-color: var(--sll-violeta-texto);
}

.sll-tarjeta > :first-child {
	margin-top: 0;
}

.sll-tarjeta > :last-child {
	margin-bottom: 0;
}

.sll-rejilla {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
	gap: 1.5rem;
}

/* ---------- Bocadillo (cita o consejo con cola) ---------- */
.sll-bocadillo {
	position: relative;
	margin: 0 0 2rem;
	padding: 1.25rem 1.5rem;
	color: var(--sll-texto);
	background: var(--sll-superficie);
	border: 2px solid var(--sll-violeta-texto);
	border-radius: 24px;
}

.sll-bocadillo::after {
	content: "";
	position: absolute;
	left: 2rem;
	bottom: -14px;
	width: 24px;
	height: 24px;
	background: var(--sll-superficie);
	border-right: 2px solid var(--sll-violeta-texto);
	border-bottom: 2px solid var(--sll-violeta-texto);
	border-bottom-right-radius: 6px;
	transform: rotate(45deg);
}

.sll-bocadillo > :first-child {
	margin-top: 0;
}

.sll-bocadillo > :last-child {
	margin-bottom: 0;
}

.sll-bocadillo--pista {
	color: var(--sll-pista-texto);
	background: var(--sll-pista-fondo);
	border-color: var(--sll-pista-borde);
}

.sll-bocadillo--pista::after {
	background: var(--sll-pista-fondo);
	border-color: var(--sll-pista-borde);
}

/* ---------- Estados funcionales ---------- */
.sll-pista {
	padding: 0.1em 0.4em;
	color: var(--sll-pista-texto);
	background: var(--sll-pista-fondo);
	border-bottom: 2px solid var(--sll-pista-borde);
	border-radius: 4px;
}

.sll-acierto {
	color: var(--sll-ok);
	font-weight: 700;
}

/* ---------- Pie ---------- */
@media (max-width: 480px) {
	:root body .ast-footer-copyright {
		text-align: left;
	}
}

/* ==========================================================================
   SLL-0C1 · Bloques, cursos, materiales y patrones
   ========================================================================== */

/* ---------- Color funcional de cada bloque (variables en style.css) ---------- */
[class*="sll-bloque--"] { --sll-bloque: var(--sll-violeta); }
.sll-bloque--ortografia { --sll-bloque: var(--bloque-ortografia); }
.sll-bloque--gramatica { --sll-bloque: var(--bloque-gramatica); }
.sll-bloque--lexico-semantica { --sll-bloque: var(--bloque-lexico-semantica); }
.sll-bloque--comunicacion { --sll-bloque: var(--bloque-comunicacion); }
.sll-bloque--comprension-lectora { --sll-bloque: var(--bloque-comprension-lectora); }
.sll-bloque--literatura { --sll-bloque: var(--bloque-literatura); }
.sll-bloque--escritura { --sll-bloque: var(--bloque-escritura); }
.sll-bloque--pau { --sll-bloque: var(--bloque-pau); }
.sll-bloque--general { --sll-bloque: var(--bloque-general); }

/* ---------- Sobretítulo (con punto del color del bloque) ---------- */
.sll-sobretitulo {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.5rem;
	font: 700 1rem/1.2 var(--sll-fuente-texto);
	color: var(--sll-texto-suave);
}

.sll-sobretitulo::before {
	content: "";
	flex: none;
	width: 0.9rem;
	height: 0.9rem;
	border-radius: 50%;
	background: var(--sll-bloque, var(--sll-violeta));
}

/* ---------- Cabecera de archivo (bloque, curso, tipo, currículo) ---------- */
.sll-cabecera-archivo {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 1.5rem 3rem;
	align-items: end;
	margin: 0 0 2rem;
	padding: clamp(1.5rem, 4vw, 3rem) 0 1.5rem;
	border-bottom: 2px solid var(--sll-linea);
}

@media (min-width: 768px) {
	.sll-cabecera-archivo--con-imagen {
		grid-template-columns: minmax(0, 1fr) 12rem;
	}
}

:root body .sll-cabecera-archivo__titulo {
	margin: 0 0 0.75rem;
}

.sll-cabecera-archivo__descripcion {
	max-width: 62ch;
	font-size: 1.1875rem;
	color: var(--sll-texto-suave);
}

.sll-cabecera-archivo__descripcion > :last-child {
	margin-bottom: 0;
}

.sll-cabecera-archivo__imagen {
	width: 100%;
	max-width: 12rem;
	height: auto;
}

/* ---------- Filtro por enlaces ---------- */
.sll-filtro {
	margin: 0 0 2rem;
}

.sll-filtro__titulo {
	margin: 0 0 0.5rem;
	font-weight: 700;
}

.sll-filtro__lista {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sll-filtro__lista a {
	display: inline-flex;
	align-items: center;
	min-height: var(--sll-objetivo);
	padding: 0.4rem 1rem;
	font-weight: 700;
	color: var(--sll-texto);
	text-decoration: none;
	background: var(--sll-superficie);
	border: 2px solid var(--sll-borde);
	border-radius: 999px;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.sll-filtro__lista a:hover {
	border-color: var(--sll-violeta-texto);
}

.sll-filtro__lista a[aria-current="true"] {
	color: var(--sll-boton-texto);
	background: var(--sll-boton-fondo);
	border-color: var(--sll-boton-fondo);
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

/* ---------- Chips (bloque con punto de color, curso redondo, tipo con esquinas rectas) ---------- */
.sll-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.sll-chips > li {
	margin: 0;
}

.sll-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	padding: 0.2rem 0.75rem;
	font: 700 0.9375rem/1.3 var(--sll-fuente-texto);
	color: var(--sll-texto);
	text-decoration: none;
	border: 2px solid var(--sll-borde);
	border-radius: 999px;
}

.sll-chip--tipo {
	border-radius: 8px;
}

.sll-chip--bloque::before {
	content: "";
	flex: none;
	width: 0.7rem;
	height: 0.7rem;
	border-radius: 50%;
	background: var(--sll-bloque, var(--sll-violeta));
}

:root body a.sll-chip {
	min-height: var(--sll-objetivo);
	padding-inline: 1rem;
	text-decoration: none;
}

:root body a.sll-chip:hover {
	color: var(--sll-texto);
	border-color: var(--sll-violeta-texto);
}

/* ---------- Tarjeta de material (todo el recuadro es el enlace del título) ---------- */
.sll-material {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	border-top: 6px solid var(--sll-bloque, var(--sll-violeta));
}

.sll-material .sll-sobretitulo {
	margin: 0;
}

:root body :is(h2, h3).sll-material__titulo {
	margin: 0;
	font-size: clamp(1.25rem, 1vw + 1rem, 1.5rem);
	line-height: 1.2;
}

.sll-material__enlace,
.sll-material__enlace:hover {
	color: var(--sll-texto);
	text-decoration: none;
}

.sll-material__enlace:hover {
	text-decoration: underline;
	text-decoration-thickness: 0.08em;
	text-underline-offset: 0.2em;
}

.sll-material__enlace::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: var(--sll-radio);
}

:root body .sll-material__enlace:focus-visible {
	outline: none;
}

.sll-material:has(.sll-material__enlace:focus-visible) {
	outline: 3px solid var(--sll-foco);
	outline-offset: 3px;
}

.sll-material__resumen {
	margin: 0;
	color: var(--sll-texto-suave);
}

.sll-material__datos {
	margin: 0;
	font-weight: 700;
}

.sll-material > .sll-chips {
	margin-top: auto;
}

.sll-vacio {
	max-width: 62ch;
	padding: 1.5rem 0;
	color: var(--sll-texto-suave);
}

/* Paginación */
:root body .navigation.pagination {
	margin: 2.5rem 0 0;
}

:root body .navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

:root body .navigation.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--sll-objetivo);
	min-height: var(--sll-objetivo);
	padding: 0.4rem 1rem;
	font-weight: 700;
	color: var(--sll-texto);
	text-decoration: none;
	background: var(--sll-superficie);
	border: 2px solid var(--sll-borde);
	border-radius: 999px;
}

:root body .navigation.pagination .page-numbers.current {
	color: var(--sll-boton-texto);
	background: var(--sll-boton-fondo);
	border-color: var(--sll-boton-fondo);
	text-decoration: underline;
}

/* ---------- Página de un material ---------- */
.sll-material__cabecera {
	margin: 0 0 2rem;
	padding: clamp(1rem, 3vw, 2rem) 0 1.5rem;
	border-bottom: 2px solid var(--sll-linea);
}

:root body .sll-material__cabecera .entry-title {
	margin: 0 0 1rem;
	max-width: 24ch;
}

.sll-material__contenido > :is(p, ul, ol, h2, h3, h4, blockquote) {
	max-width: 70ch;
}

.sll-curriculo {
	margin: 2rem 0 0;
	font-size: 1rem;
	color: var(--sll-texto-suave);
}

.sll-relacionados {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 2px solid var(--sll-linea);
}

/* ---------- Plantilla de pantalla ancha ---------- */
:root body.sll-ancho #content .ast-container {
	max-width: 90rem;
}

.sll-ancho__contenido iframe {
	max-width: 100%;
}

/* ---------- Patrones ---------- */
.sll-franja-docente {
	padding: clamp(1.5rem, 4vw, 2.5rem);
	color: var(--sll-texto);
	background: var(--sll-superficie);
	border: 2px solid var(--sll-violeta-texto);
	border-radius: var(--sll-radio);
}

.sll-franja-docente > :first-child {
	margin-top: 0;
}

.sll-franja-docente > :last-child {
	margin-bottom: 0;
}

.sll-descarga-bloque {
	padding: 1rem 1.25rem;
	color: var(--sll-texto);
	background: var(--sll-superficie);
	border: 1px solid var(--sll-linea);
	border-left: 6px solid var(--sll-violeta-texto);
	border-radius: 12px;
}

.sll-descarga-bloque > p {
	margin: 0.25rem 0;
}

.sll-descarga-datos {
	font-size: 1rem;
	color: var(--sll-texto-suave);
}

.sll-tarjeta--juego {
	border-top: 6px solid var(--sll-acento);
}
