/* Ajustes puntuales sobre style.css (que es un archivo compilado). */

/* ===== Tabla de contenidos plegable (celular y computador) ===== */
.toc-franja { margin-bottom: 2rem; }
.toc-franja > summary {
	display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
	padding: 0.75rem 1rem; cursor: pointer; list-style: none; user-select: none;
	background-color: hsl(var(--primary) / 0.12); border-radius: 0.625rem;
	font-weight: 700; font-size: 1rem; line-height: 1.3; color: hsl(var(--foreground));
}
.toc-franja > summary::-webkit-details-marker { display: none; }
.toc-franja > summary::marker { content: ""; }
.toc-franja .toc-flecha { width: 1.25rem; height: 1.25rem; flex-shrink: 0; transition: transform 0.2s ease; }
.toc-franja[open] .toc-flecha { transform: rotate(180deg); }
.toc-franja[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.toc-franja ol {
	list-style: none; margin: 0; padding: 0.85rem 1rem 1rem;
	display: flex; flex-direction: column; gap: 0.5rem;
	background-color: hsl(var(--primary) / 0.05); border-radius: 0 0 0.625rem 0.625rem;
}
.toc-franja ol a { color: hsl(var(--primary)); text-decoration: none; font-size: 0.9375rem; line-height: 1.4; }
.toc-franja ol a:hover { text-decoration: underline; }
.blog-content h2[id] { scroll-margin-top: 100px; }

/* ===== Autor y fecha: en computador va en una línea, en celular en dos ===== */
.byline-linea { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 0.4rem; }
.byline-sep { opacity: 0.4; }

@media (max-width: 767px) {
	/* --- Breadcrumb: menos aire arriba (logo), abajo (H1), entre separadores y entre líneas --- */
	#main-content main:has(nav[aria-label="Breadcrumb"]),
	#main-content section:has(nav[aria-label="Breadcrumb"]) { padding-top: 92px !important; }
	nav[aria-label="Breadcrumb"] { margin-bottom: 0.6rem !important; }
	div:has(> nav[aria-label="Breadcrumb"]:only-child) { margin-bottom: 0.6rem !important; }
	div:has(> nav[aria-label="Breadcrumb"]:only-child) > nav { margin-bottom: 0 !important; }
	nav[aria-label="Breadcrumb"] ol { gap: 0 0.3rem !important; font-size: 0.8125rem !important; line-height: 1.35 !important; }
	nav[aria-label="Breadcrumb"] ol li:last-child { max-width: 100% !important; }

	/* --- H1 de posts: 27px, negrita, siempre mayor que los H2 --- */
	.post-h1 { font-size: 1.6875rem !important; line-height: 1.22 !important; font-weight: 800 !important; margin-bottom: 0.5rem !important; }
	.blog-content h2 { font-size: 1.375rem; line-height: 1.3; margin-top: 2rem; margin-bottom: 0.875rem; }
	.blog-content h3 { font-size: 1.1875rem; line-height: 1.3; }

	/* Imagen destacada con el H1 encima: más baja para que la introducción se vea antes */
	.post-hero { margin-bottom: 0.75rem !important; }
	.post-hero img { height: 220px !important; }
	.post-hero > div { padding: 1rem !important; }
	.post-header { margin-bottom: 1.25rem !important; }

	/* --- Autor y fecha en 2 líneas, pegado al H1 y a la tabla de contenidos --- */
	.post-meta { font-size: 0.8125rem !important; gap: 0.1rem 0 !important; margin-top: 0.5rem !important; margin-bottom: 0.875rem !important; padding-bottom: 0.75rem !important; line-height: 1.45; }
	.post-meta .byline-linea { flex: 0 0 100%; }
	.post-meta[style*="justify-content: center"] .byline-linea { justify-content: center; }
	.post-meta .byline-sep-grupos, .post-meta .byline-extra { display: none; }

	.toc-franja { margin-bottom: 1.25rem; }
	.toc-franja > summary { padding: 0.65rem 0.875rem; font-size: 0.9375rem; }
}
