/* Guías técnicas: listado, guía y recursos descargables (guias-tecnicas.php) */
/* ---------- Guías técnicas (índice, tarjetas y recursos descargables) ---------- */
.bf-guias-filtros { margin: 0 0 32px; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.bf-guias-rejilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.bf-guia { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: 16px; border: 1px solid var(--bf-line, #E3EAEF); background: var(--bf-paper, #FFFFFF); transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.bf-guia:hover, .bf-descarga:hover { border-color: #6CCFF6; box-shadow: 0 12px 32px rgba(0, 62, 99, .10); transform: translateY(-3px); }
.bf-guia h3, .bf-descarga h3 { margin: 0; font-size: 19px; line-height: 1.35; font-weight: 600; letter-spacing: -0.015em; }
.bf-guia h3 a, .bf-descarga h3 a { color: inherit; text-decoration: none; }
.bf-guia h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.bf-guia { position: relative; }
.bf-guia h3 a:focus-visible { outline: none; }
.bf-guia:focus-within { outline: 2px solid #6CCFF6; outline-offset: 3px; }
.bf-guia-meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bf-guia-tec { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bf-accent, #06607F); }
.bf-guia-ej { font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: #6B5300; background: #FFF3C4; border-radius: 999px; padding: 2px 8px; }
.bf-guia-r { margin: 0; font-size: 15px; line-height: 1.6; color: var(--bf-ink-3, #4A5A66); }
.bf-guia-pie { margin: auto 0 0; padding-top: 12px; border-top: 1px solid var(--bf-line, #E3EAEF); display: flex; justify-content: space-between; gap: 12px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--bf-ink-4, #5C6D79); }
.bf-guias-vacio { margin: 0; padding: 40px; border-radius: 16px; border: 1px dashed var(--bf-line-2, #D5DFE6); text-align: center; color: var(--bf-ink-3, #4A5A66); }
.bf-descargas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.bf-descarga { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; align-items: start; padding: 28px; border-radius: 16px; border: 1px solid var(--bf-line, #E3EAEF); background: var(--bf-paper, #FFFFFF); transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.bf-descarga > div { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.bf-descarga:hover .bf-ico-box { background: #003E63; color: #6CCFF6; }
.bf-dark .bf-guia-ej { color: #FFD84D; background: rgba(255, 216, 77, .14); }
@media (prefers-reduced-motion: reduce) { .bf-guia:hover, .bf-descarga:hover { transform: none; } }
@media (max-width: 1000px) { .bf-guias-rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .bf-guias-rejilla, .bf-descargas { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Guías: README.md descargable a la izquierda y bloques de código (2026-11-18) ---------- */
.bf-guia-cols.con-readme { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start; }
.bf-guia-cols.con-readme .bf-art { margin: 0; }
.bf-readme { position: sticky; top: 151px; } /* bajo la cabecera y la barra de lectura */
.bf-readme-caja { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 16px; border: 1px solid var(--bf-line, #E3EAEF); background: var(--bf-paper-2, #F4F7F9); }
.bf-readme-k { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--bf-accent, #06607F); }
.bf-readme-f { margin: 0; display: flex; align-items: center; gap: 8px; font-family: 'IBM Plex Mono', monospace; font-size: 17px; font-weight: 500; color: var(--bf-ink, #0E1A22); }
.bf-readme-d { margin: 0; font-size: 14.5px; line-height: 1.55; color: var(--bf-ink-3, #4A5A66); }
.bf-readme-i { margin: 0; list-style: none; padding: 12px 0 0; border-top: 1px solid var(--bf-line, #E3EAEF); display: grid; gap: 6px; font-size: 13.5px; line-height: 1.45; color: var(--bf-ink-2, #2C3E4B); }
.bf-readme-b { justify-content: center; margin-top: 4px; }
.bf-readme-p { margin: 0; text-align: center; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--bf-ink-4, #5C6D79); }
.bf-prosa pre { margin: 0 0 22px; padding: 18px 20px; border-radius: 12px; background: #00263D; color: #E8F0F5; overflow-x: auto; font-size: 14px; line-height: 1.65; }
.bf-prosa pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.bf-prosa code { font-family: 'IBM Plex Mono', monospace; font-size: .88em; padding: 2px 6px; border-radius: 5px; background: var(--bf-tag, #EEF4F8); color: var(--bf-tag-ink, #00405F); }
.bf-prosa ul, .bf-prosa ol { padding-left: 24px; }
.bf-prosa li + li { margin-top: 6px; }
.bf-dark .bf-prosa pre { background: #061620; border: 1px solid var(--bf-line, #1E3444); }
@media (max-width: 1000px) {
  .bf-guia-cols.con-readme { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .bf-readme { position: static; }
}

/* Índice de la guía: lleva a cada apartado y marca el que se lee */
.bf-readme-i a { display: block; padding: 3px 0 3px 10px; border-left: 2px solid transparent; color: var(--bf-ink-3, #4A5A66); text-decoration: none; transition: color .2s ease, border-color .2s ease; }
.bf-readme-i a:hover { color: var(--bf-accent, #06607F); }
.bf-readme-i a[aria-current="true"] { color: var(--bf-ink, #0E1A22); font-weight: 600; border-left-color: #6CCFF6; }
.bf-readme-i { gap: 2px; }
.bf-prosa h2[id] { scroll-margin-top: 55px; } /* + 96 px de scroll-padding del tema: bajo la barra de lectura */
/* Pasos (H3) dentro de «Paso a paso» en el índice de la guía */
.bf-readme-sub a { padding-left: 22px; font-size: 12.5px; }
.bf-prosa h3[id] { scroll-margin-top: 55px; }
/* Filtro al momento: las tarjetas que vuelven a aparecer entran con un fundido */
.bf-guia { transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease, opacity .3s ease; }
.bf-guia.bf-guia-entra { opacity: 0; transform: translateY(10px); }
/* Nivel de dificultad: etiqueta con 1 a 3 barras */
.bf-guia-nivel { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 7px; border-radius: 999px; border: 1px solid var(--bf-line-2, #D5DFE6); font-family: 'IBM Plex Mono', monospace; font-size: 11px; letter-spacing: .04em; color: var(--bf-ink-2, #2C3E4B); }
.bf-guia-barras { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.bf-guia-barras i { display: block; width: 3px; border-radius: 1px; background: var(--bf-line-2, #D5DFE6); }
.bf-guia-barras i:nth-child(1) { height: 5px; }
.bf-guia-barras i:nth-child(2) { height: 8px; }
.bf-guia-barras i:nth-child(3) { height: 11px; }
.bf-guia-nivel-1 .bf-guia-barras i:nth-child(-n+1),
.bf-guia-nivel-2 .bf-guia-barras i:nth-child(-n+2),
.bf-guia-nivel-3 .bf-guia-barras i:nth-child(-n+3) { background: var(--bf-accent, #06607F); }
.bf-dark .bf-guia-nivel-1 .bf-guia-barras i:nth-child(-n+1),
.bf-dark .bf-guia-nivel-2 .bf-guia-barras i:nth-child(-n+2),
.bf-dark .bf-guia-nivel-3 .bf-guia-barras i:nth-child(-n+3) { background: #6CCFF6; }
/* Llamada a la acción al final de cada guía */
.bf-guia-cta { margin: 48px 0 0; padding: 32px; border-radius: 16px; background: radial-gradient(120% 140% at 0% 0%, #00507E 0%, #003E63 50%, #00263D 100%); color: #FFFFFF; }
.bf-guia-cta-k { margin: 0 0 10px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #6CCFF6; }
.bf-guia-cta-t { margin: 0; font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; color: #FFFFFF; }
.bf-guia-cta-d { margin: 12px 0 0; font-size: 16px; line-height: 1.65; color: #CFE3EF; max-width: 62ch; }
.bf-guia-cta-b { margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 600px) { .bf-guia-cta { padding: 24px; } .bf-guia-cta-b .bf-btn { width: 100%; justify-content: center; } }
/* Tablas de las guías: marco completo (la última fila quedaba sin borde) */
.bf-guia-cols .bf-prosa .wp-block-table { overflow-x: auto; }
.bf-guia-cols .bf-prosa .wp-block-table table { display: table; width: 100%; border: 1px solid var(--bf-line-2, #D5DFE6); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
.bf-guia-cols .bf-prosa .wp-block-table thead { border: 0; }
.bf-guia-cols .bf-prosa .wp-block-table th,
.bf-guia-cols .bf-prosa .wp-block-table td { border: 0; border-bottom: 1px solid var(--bf-line, #E3EAEF); border-right: 1px solid var(--bf-line, #E3EAEF); }
.bf-guia-cols .bf-prosa .wp-block-table th { border-bottom: 2px solid var(--bf-line-2, #D5DFE6); }
.bf-guia-cols .bf-prosa .wp-block-table tr > :last-child { border-right: 0; }
.bf-guia-cols .bf-prosa .wp-block-table tbody tr:last-child td { border-bottom: 0; }
/* Carrusel de otras guías: tarjeta entera clicable, nivel y «Leer la guía» */
.bf-carr-pista > .bf-post { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 24px; transition: border-color .25s ease, box-shadow .25s ease; }
.bf-carr-pista > .bf-post > * { padding: 0 !important; margin: 0; }
.bf-carr-pista > .bf-post h3 { font-size: 18px; line-height: 1.35; font-weight: 600; }
.bf-carr-guia-a { color: inherit; text-decoration: none; }
.bf-carr-guia-a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.bf-carr-pista > .bf-post:hover { border-color: #6CCFF6; box-shadow: 0 12px 32px rgba(0, 62, 99, .10); }
.bf-carr-guia-pie { margin-top: auto !important; padding-top: 12px !important; border-top: 1px solid var(--bf-line, #E3EAEF); display: flex; justify-content: space-between; gap: 12px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--bf-ink-4, #5C6D79); }
.bf-carr-guia-leer { display: inline-flex; align-items: center; gap: 6px; font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 14px; font-weight: 600; color: var(--bf-accent, #06607F); }
.bf-carr-pista > .bf-post:hover .bf-carr-guia-leer svg { transform: translateX(3px); }
.bf-carr-guia-leer svg { transition: transform .2s ease; }
/* Dos filtros (sección y nivel) con su rótulo */
.bf-guias-filtrado { display: flex; flex-wrap: wrap; gap: 16px 40px; margin: 0 0 32px; }
.bf-guias-grupo { display: flex; flex-direction: column; gap: 10px; }
.bf-guias-grupo-t { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--bf-ink-4, #5C6D79); }
.bf-guias-filtrado .bf-guias-filtros { margin: 0; }
.bf-chip-nivel .bf-guia-nivel { padding: 0; border: 0; font-family: inherit; font-size: inherit; letter-spacing: 0; color: inherit; }
.bf-chip-nivel.is-activo .bf-guia-barras i { background: rgba(0, 39, 63, .3) !important; }
.bf-chip-nivel.is-activo .bf-guia-nivel-1 .bf-guia-barras i:nth-child(-n+1),
.bf-chip-nivel.is-activo .bf-guia-nivel-2 .bf-guia-barras i:nth-child(-n+2),
.bf-chip-nivel.is-activo .bf-guia-nivel-3 .bf-guia-barras i:nth-child(-n+3) { background: #00273F !important; }

/* Filtros en una línea: secciones como botones y nivel como desplegable (2026-11-18) */
.bf-guias-filtrado { align-items: flex-end; justify-content: space-between; }
.bf-guias-filtrado .bf-guias-grupo-t { display: none; }
.bf-gsel { position: relative; }
.bf-gsel > summary { list-style: none; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 18px; border: 1px solid var(--bf-line, #E3EAEF); border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 15px; color: var(--bf-ink, #0E1A22); background: var(--bf-paper, #FFFFFF); transition: border-color .15s ease; }
.bf-gsel > summary::-webkit-details-marker { display: none; }
.bf-gsel > summary:hover, .bf-gsel[open] > summary { border-color: var(--bf-accent, #06607F); }
.bf-gsel-t { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; color: var(--bf-ink-4, #5C6D79); }
.bf-gsel-v .bf-guia-nivel, .bf-gsel-op .bf-guia-nivel { padding: 0; border: 0; font-family: inherit; font-size: inherit; letter-spacing: 0; color: inherit; background: none; }
.bf-gsel-chev { transition: transform .2s ease; }
.bf-gsel[open] .bf-gsel-chev { transform: rotate(180deg); }
.bf-gsel-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; min-width: 220px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--bf-line, #E3EAEF); border-radius: 14px; background: var(--bf-paper, #FFFFFF); box-shadow: 0 16px 40px rgba(0, 39, 63, .16); }
.bf-gsel-op { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border-radius: 10px; color: var(--bf-ink, #0E1A22); text-decoration: none; font-weight: 500; font-size: 15px; }
.bf-gsel-op:hover { background: var(--bf-paper-2, #F4F7F9); color: var(--bf-ink, #0E1A22); }
.bf-gsel-op.is-activo { color: var(--bf-accent, #06607F); font-weight: 600; }
.bf-gsel-op.is-activo::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--bf-accent, #06607F); }
@media (max-width: 720px) { .bf-gsel-menu { left: 0; right: auto; } }

/* Ventajas junto al formulario de descarga: entran escalonadas y el check se dibuja (2026-11-18) */
.bf-checks { margin: 32px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.bf-checks > li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border: 1px solid rgba(108, 207, 246, .18); border-radius: 12px; background: rgba(255, 255, 255, .04); font-size: 16px; line-height: 1.45; color: #E6F1F7; transition: border-color .2s ease, background-color .2s ease, translate .2s ease; }
.bf-checks > li:hover { border-color: rgba(108, 207, 246, .55); background: rgba(108, 207, 246, .08); translate: 4px 0; }
.bf-check-ico { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(108, 207, 246, .16); color: #6CCFF6; box-shadow: 0 0 0 0 rgba(108, 207, 246, .45); }
.bf-check-ico path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.bf-checks.bf-revela-listo > li { opacity: 0; translate: -18px 0; transition: opacity .5s ease var(--bf-d, 0ms), translate .5s ease var(--bf-d, 0ms), border-color .2s ease, background-color .2s ease; }
.bf-checks.bf-revela-listo .bf-check-ico path { stroke-dashoffset: 1; transition: stroke-dashoffset .45s ease calc(var(--bf-d, 0ms) + 300ms); }
.bf-checks.bf-revela-listo.is-visto > li { opacity: 1; translate: 0 0; }
.bf-checks.bf-revela-listo.is-visto > li:hover { translate: 4px 0; }
.bf-checks.bf-revela-listo.is-visto .bf-check-ico path { stroke-dashoffset: 0; }
.bf-checks.bf-revela-listo.is-visto .bf-check-ico { animation: bf-check-pulso .9s ease-out calc(var(--bf-d, 0ms) + 650ms) 1 both; }
@keyframes bf-check-pulso { from { box-shadow: 0 0 0 0 rgba(108, 207, 246, .45); } to { box-shadow: 0 0 0 10px rgba(108, 207, 246, 0); } }
@media (prefers-reduced-motion: reduce) { .bf-checks > li, .bf-checks > li:hover { translate: none; } }

/* Buscador de guías, a la derecha junto al nivel (2026-11-18) */
.bf-guias-der { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.bf-gbusca { position: relative; margin: 0; }
.bf-gbusca-ico { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--bf-ink-4, #5C6D79); pointer-events: none; }
.bf-gbusca-campo { width: 290px; min-height: 44px; margin: 0; padding: 0 18px 0 44px; border: 1px solid var(--bf-line, #E3EAEF); border-radius: 999px; background: var(--bf-paper, #FFFFFF); color: var(--bf-ink, #0E1A22); font: inherit; font-size: 15px; transition: border-color .15s ease, box-shadow .15s ease, width .25s ease; }
.bf-gbusca-campo::placeholder { color: var(--bf-ink-4, #5C6D79); }
.bf-gbusca-campo:hover { border-color: var(--bf-accent, #06607F); }
.bf-gbusca-campo:focus { outline: none; border-color: var(--bf-accent, #06607F); box-shadow: 0 0 0 3px rgba(108, 207, 246, .35); }
@media (min-width: 1100px) { .bf-gbusca-campo:focus { width: 330px; } }
@media (max-width: 720px) { .bf-guias-der, .bf-gbusca { width: 100%; } .bf-gbusca-campo { width: 100%; } .bf-gbusca-campo:focus { width: 100%; } }

/* Compartir y «Más guías sobre» en una fila fija: las categorías bajan de línea en su columna (2026-11-18) */
.bf-art-pie { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px 48px; align-items: start; }
.bf-art-pie .bf-chips { flex-wrap: wrap; }
@media (max-width: 640px) { .bf-art-pie { grid-template-columns: minmax(0, 1fr); } }
.bf-art-pie .bf-chip { min-height: 44px; padding: 0 18px; font-size: 14.5px; }

/* Cabecera de la guía sin imagen: la fecha y el tiempo de lectura no quedan en el borde del banner (2026-11-18) */
.bf-art-cab:not(:has(.bf-art-img)) { padding-bottom: 56px !important; }
.bf-art-cab:not(:has(.bf-art-img)) .bf-art-meta { margin-bottom: 0; }
.bf-art-cab:not(:has(.bf-art-img)) + .bf-section { padding-top: 64px !important; }
@media (max-width: 720px) { .bf-art-cab:not(:has(.bf-art-img)) { padding-bottom: 40px !important; } .bf-art-cab:not(:has(.bf-art-img)) + .bf-section { padding-top: 48px !important; } }
