/* Estilos específicos del blog (/blog y /blog/slug) */

.blog-wrap { padding-top: 10px; padding-bottom: 60px; }
/* Bajo 768px el wrapper se oculta (style.css) y .cont-categoria añade 80px que se
   sumarían a los del breadcrumb: basta con la separación que ya da .amigables. */
@media (max-width: 768px) {
    .blog-wrap { margin-top: 0 !important; }
}
/* La ficha del post no lleva wrapper de cabecera: mismo espaciado superior que
   .cont-producto en css/pages/alquiler.css (alquiler.php?material=). Va después
   del bloque anterior para ganarle en el tramo 575-768px. */
.blog-wrap--post {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
@media (min-width: 575px) {
    .blog-wrap--post { margin-top: 84px !important; }
}

/* Fondo del wrapper de cabecera (includes/wrapper.php) */
.fondoBlog {
    /* El velo oscuro va en el propio fondo: los focos de la foto son muy
       brillantes y el título blanco necesita contraste. */
    background-image: linear-gradient(rgba(0, 20, 45, 0.72), rgba(0, 20, 45, 0.72)),
                      url("../../images/wrapper-blog.webp");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
}
/* Sin la trama de puntos que style.css pone en #slider */
.fondoBlog #slider { background-image: none; }

/* ---------- Aside de categorías (reutiliza .menu de alquileres) ---------- */
.blog-aside ul li a.is-active {
    background: linear-gradient(90deg, #eef5fd, #f7fbff);
    font-weight: 700;
}
.blog-aside ul li a.is-active::before { opacity: 1; }
.blog-aside ul li a.is-active::after { border-color: #0057b4; }

/* ---------- Índice del post (aside izquierdo) ----------
   La caja hereda el estilo de #indice/#indice-corporativos (css/style.css);
   aquí solo se ajusta a la columna estrecha y se queda fija al hacer scroll.
   Los saltos con # ya los compensa el scroll-margin-top global de style.css. */
.blog-indice {
    position: sticky;
    top: 96px;                              /* navbar fixed-top + aire */
    margin: 20px 0 24px !important;
    padding: 16px 18px !important;
    /* Índices largos: la caja no pasa de la pantalla y hace scroll ella sola. */
    max-height: calc(100vh - 130px);
    overflow-y: auto;
}
.blog-indice > p:first-child { margin-bottom: 10px !important; }
.blog-indice li {
    font-size: 0.9rem !important;
    /* Alto de línea en px para poder alinear el número con la primera línea. */
    line-height: 20px;
    padding: 7px 0 7px 30px !important;
}
/* El círculo se centra respecto a la PRIMERA línea del texto: si la entrada
   ocupa una sola línea queda centrado; si ocupa varias, arriba.
   7px de padding + (20px de línea - 22px de círculo) / 2 = 6px. */
.blog-indice li:before { top: 6px; }
/* En móvil el aside cae debajo del artículo, así que el índice no se muestra. */
@media (max-width: 767.98px) {
    .blog-indice { display: none !important; }
}

/* ---------- Listado (las tarjetas usan .servicio de css/pages/servicios.css) ---------- */
/* Breadcrumb en una sola línea: si no cabe, el último nivel se recorta con "…" */
.blog-wrap .amigables { flex-wrap: nowrap; }
.blog-wrap .amigables a { flex-shrink: 0; }
.blog-wrap .amigables a:last-child {
    display: block;
    flex: 0 1 auto;
    min-width: 0;
    line-height: 32px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Tarjeta del blog ----------
   Parte de .servicio (css/pages/servicios.css), que pone el título sobre la foto con
   un degradado. En el blog la foto va limpia y el título debajo, sobre blanco.
   Filas: 1 foto / 2 título / 3 resumen (elástica) / 4 fecha y lectura / 5 enlace,
   así el pie queda alineado en todas las tarjetas de una misma fila.
   Todo va bajo .blog-wrap para no alterar la página de servicios. */
.blog-wrap .servicio {
    grid-template-rows: auto auto 1fr auto auto !important;
    align-items: start !important;
    border-color: #e6eaf0 !important;
    border-radius: 16px !important;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 4px 14px -6px rgba(16, 24, 40, 0.08);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.blog-wrap .servicio::after { display: none; }
.blog-wrap .servicio:hover {
    border-color: #d5dce5 !important;
    box-shadow: 0 2px 4px rgba(16, 24, 40, 0.05), 0 18px 34px -14px rgba(16, 24, 40, 0.22);
    transform: translateY(-4px);
}

.blog-wrap .servicio > a:first-child { aspect-ratio: 16 / 10 !important; }

.blog-wrap .servicio > a:nth-of-type(2) {
    grid-row: 2 !important;
    align-self: start !important;
    padding: 18px 20px 0 !important;
    background: none !important;
    text-shadow: none !important;
}
.blog-wrap .servicio > a:nth-of-type(2) h2 {
    color: #16202e !important;
    font-size: 1.16rem !important;
    font-weight: 700 !important;
    line-height: 1.32 !important;
    letter-spacing: -0.01em;
    text-shadow: none !important;
    transition: color 0.2s ease;
}
.blog-wrap .servicio:hover > a:nth-of-type(2) h2 { color: #0057b4 !important; }
.blog-wrap .servicio > a:nth-of-type(2):hover h2 { text-decoration: none; }

.blog-wrap .servicio > p {
    grid-row: 3 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 10px 20px 18px !important;
    padding: 0 !important;
    color: #5b6675 !important;
    font-size: 0.93rem !important;
    line-height: 1.55 !important;
}

/* Categoría sobre la foto (último enlace del marcado: no altera los nth-of-type) */
.blog-card__cat {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    max-width: calc(100% - 24px);
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #0057b4 !important;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.18);
    transition: background 0.2s ease, color 0.2s ease;
}
.blog-card__cat:hover,
.blog-card__cat:focus { background: #0057b4; color: #fff !important; }

.blog-card__meta {
    grid-row: 4;
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 0 20px;
    padding-top: 14px;
    border-top: 1px solid #eef1f5;
    color: #7a8594;
    font-size: 0.8rem;
}
.blog-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.blog-card__meta .icon { flex-shrink: 0; opacity: 0.7; }

.blog-card__cta {
    grid-row: 5;
    grid-column: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 20px 18px;
    color: #0057b4 !important;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
}
.blog-card__cta .icon { transition: transform 0.2s ease; }
.servicio:hover .blog-card__cta .icon { transform: translateX(4px); }

@media (max-width: 767.98px) {
    /* En móvil la tarjeta es content-sized (servicios.css), sin fila elástica. */
    .blog-wrap .servicio { grid-template-rows: auto auto auto auto auto !important; }
    .blog-wrap .servicio > p { -webkit-line-clamp: 4; }
}

@media (prefers-reduced-motion: reduce) {
    .blog-wrap .servicio,
    .blog-wrap .servicio:hover,
    .blog-wrap .servicio:hover > a:first-child img { transform: none; transition: none; }
}

.blog-vacio {
    padding: 50px 20px;
    text-align: center;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
}

.blog-paginacion {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}
.blog-paginacion a,
.blog-paginacion span {
    min-width: 42px;
    padding: 9px 14px;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    text-align: center;
    font-weight: 600;
    line-height: 1.2;
    color: #0057b4 !important;
    text-decoration: none !important;
    transition: border-color .2s ease, background .2s ease;
}
.blog-paginacion a:hover { border-color: #0057b4; background: #eef5fd; }
.blog-paginacion .is-active { background: #0057b4; border-color: #0057b4; color: #fff !important; }

/* ---------- Post ---------- */
.blog-aviso-borrador {
    margin: 10px 0;
    padding: 10px 16px;
    border-radius: 8px;
    background: #fff3cd;
    color: #856404;
    font-size: 0.9rem;
}

/* Ocupa todo el ancho del .container, alineado con el breadcrumb */
.blog-post { width: 100%; }

.blog-post__cabecera { margin: 4px 0 32px; }
.blog-post__titulo {
    margin: 0 0 12px !important;
    font-size: 2.6rem !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    letter-spacing: -0.015em;
}
.blog-post__fecha {
    margin: 0 !important;
    color: #6b7785;
    font-size: 1rem;
    line-height: 1.4;
}

.blog-post__destacada { margin: 0 0 40px; }
.blog-post__destacada img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 560px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
}

/* Contenido de CKEditor */
.blog-post__contenido {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #2b3440;
}
.blog-bloque-texto::after { content: ""; display: table; clear: both; }
.blog-bloque-texto > :first-child { margin-top: 0 !important; }
.blog-bloque-texto > :last-child { margin-bottom: 0 !important; }
.blog-bloque-texto + .blog-bloque-texto { margin-top: 1.4em; }
/* Un subtítulo que abre un bloque tras otro bloque de texto lleva el mismo aire que dentro de un bloque */
.blog-bloque-texto + .blog-bloque-texto > h1:first-child,
.blog-bloque-texto + .blog-bloque-texto > h2:first-child { margin-top: 2.6rem !important; }
.blog-bloque-texto + .blog-bloque-texto > h3:first-child { margin-top: 2.2rem !important; }
.blog-bloque-texto + .blog-bloque-texto:has(> h1:first-child, > h2:first-child, > h3:first-child) { margin-top: 0; }
.blog-bloque-texto p {
    margin: 0 0 1.4em !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit;
}
.blog-bloque-texto h1,
.blog-bloque-texto h2 {
    margin: 2.6rem 0 1rem !important;
    font-size: 1.85rem !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}
.blog-bloque-texto h3 {
    margin: 2.2rem 0 .8rem !important;
    font-size: 1.4rem !important;
    line-height: 1.35 !important;
    font-weight: 700 !important;
}
.blog-bloque-texto ul,
.blog-bloque-texto ol { margin: 0 0 1.4em !important; padding: 0 !important; }
.blog-bloque-texto ul { list-style: none !important; }
.blog-bloque-texto li {
    position: relative;
    margin: 0 0 .6em;
    padding-left: 1.6em;
    font-size: inherit;
    line-height: 1.7;
}
.blog-bloque-texto ul li::before {
    content: "";
    position: absolute;
    left: .3em;
    top: .72em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0057b4;
}
.blog-bloque-texto ol { list-style: none !important; counter-reset: blog-ol; }
.blog-bloque-texto ol li { counter-increment: blog-ol; }
.blog-bloque-texto ol li::before {
    content: counter(blog-ol) ".";
    position: absolute;
    left: 0;
    font-weight: 700;
    color: #0057b4;
}
.blog-bloque-texto a { color: #0057b4 !important; text-decoration: underline; text-underline-offset: 2px; }
.blog-bloque-texto strong,
.blog-bloque-texto b { color: #1c2733; font-weight: 700; }
.blog-bloque-texto img { max-width: 100%; height: auto; border-radius: 10px; }
.blog-bloque-texto blockquote {
    margin: 0 0 1.4em;
    padding: 16px 24px;
    border-left: 4px solid #0057b4;
    border-radius: 0 10px 10px 0;
    background: #f5f8fc;
    font-style: italic;
}
.blog-bloque-texto table { width: 100%; margin: 0 0 1.4em; border-collapse: collapse; display: block; overflow-x: auto; }
.blog-bloque-texto td,
.blog-bloque-texto th { padding: 10px 14px; border: 1px solid #dee2e6; }
.blog-bloque-texto pre { margin: 0 0 1.4em; padding: 16px; background: #f5f8fc; border-radius: 10px; overflow-x: auto; }

.blog-bloque-imagen { margin: 2.6rem 0; }
.blog-bloque-imagen img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: 14px;
}
.blog-bloque-imagen figcaption {
    margin-top: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6b7785;
}

/* Bloque CTA (añadido desde el admin) */
.blog-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px 32px;
    margin: 2.6rem 0;
    padding: 26px 32px;
    border: 1px solid #dee2e6;
    border-left: 4px solid #0057b4;
    border-radius: 12px;
    background: #fff;
}
.blog-cta__textos { flex: 1 1 360px; }
.blog-cta p { margin: 0 !important; }
.blog-cta .blog-cta__titulo {
    font-size: 1.35rem !important;
    line-height: 1.3 !important;
    font-weight: 700;
    color: #0057b4;
}
.blog-cta .blog-cta__texto {
    margin-top: 6px !important;
    font-size: 1.05rem !important;
    line-height: 1.6 !important;
    color: #495057;
}
.blog-cta .btn { padding: 11px 22px; font-size: 1.05rem; font-weight: 600; border-radius: 6px; white-space: nowrap; }
.blog-post__contenido > .blog-cta:last-child { margin-bottom: 0; }

/* Bloque de vídeo (fachada: la miniatura y, al pulsar, el iframe) */
.blog-bloque-video { margin: 2.6rem 0; }
.blog-video {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, #1c2733, #33465c);
}
.blog-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.blog-video__boton {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.blog-video__boton img {
    width: 100%;
    height: 100%;
    object-fit: cover;  /* recorta las bandas negras de la miniatura de YouTube */
    display: block;
}
.blog-video__boton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .05) 40%, rgba(0, 0, 0, .55) 100%);
    transition: background .2s ease;
}
.blog-video__boton:hover::after { background: linear-gradient(180deg, rgba(0, 0, 0, .15) 40%, rgba(0, 0, 0, .6) 100%); }
.blog-video__play {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 78px;
    height: 78px;
    margin: -39px 0 0 -39px;
    border: 3px solid #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    transition: transform .2s ease, background .2s ease;
}
.blog-video__play::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-38%, -50%);
    border-style: solid;
    border-width: 13px 0 13px 22px;
    border-color: transparent transparent transparent #fff;
}
.blog-video__boton:hover .blog-video__play { transform: scale(1.08); background: #0057b4; }
.blog-video__boton:focus-visible { outline: 3px solid #0057b4; outline-offset: 3px; }
.blog-video__titulo {
    position: absolute;
    z-index: 2;
    left: 20px;
    right: 20px;
    bottom: 16px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
.blog-video__enlace {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-weight: 600;
}
.blog-bloque-video figcaption {
    margin-top: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #6b7785;
}

/* Caja destacada (aviso, consejo, dato…) */
.blog-aviso {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin: 2.6rem 0;
    padding: 22px 26px;
    border: 1px solid #dee2e6;
    border-left: 4px solid #0057b4;
    border-radius: 12px;
    background: #fff;
}
.blog-aviso__icono { flex: 0 0 auto; line-height: 0; margin-top: 2px; }
.blog-aviso__icono svg { width: 26px; height: 26px; }
.blog-aviso__texto { flex: 1 1 auto; min-width: 0; }
.blog-aviso p { margin: 0 !important; font-size: 1.05rem !important; line-height: 1.65 !important; color: #495057; }
.blog-aviso .blog-aviso__titulo {
    margin-bottom: 4px !important;
    font-size: 1.15rem !important;
    font-weight: 700;
}
.blog-aviso--consejo { border-left-color: #f0a202; background: #fffaf0; }
.blog-aviso--consejo .blog-aviso__icono,
.blog-aviso--consejo .blog-aviso__titulo { color: #a56a00; }
.blog-aviso--aviso { border-left-color: #d9480f; background: #fff5f1; }
.blog-aviso--aviso .blog-aviso__icono,
.blog-aviso--aviso .blog-aviso__titulo { color: #c2410c; }
.blog-aviso--dato { border-left-color: #0057b4; background: #f4f8fd; }
.blog-aviso--dato .blog-aviso__icono,
.blog-aviso--dato .blog-aviso__titulo { color: #0057b4; }
.blog-aviso--exito { border-left-color: #2b8a3e; background: #f3faf4; }
.blog-aviso--exito .blog-aviso__icono,
.blog-aviso--exito .blog-aviso__titulo { color: #2b8a3e; }

/* Tabla comparativa */
.blog-tabla { margin: 2.6rem 0; }
.blog-tabla .blog-tabla__titulo {
    margin-bottom: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1c2733;
}
.blog-tabla__scroll {
    overflow-x: auto;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
}
.blog-tabla table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 1rem;
}
.blog-tabla th,
.blog-tabla td {
    padding: 12px 18px;
    text-align: left;
    vertical-align: top;
    line-height: 1.5;
    border-bottom: 1px solid #e9ecef;
}
.blog-tabla thead th {
    background: #f4f8fd;
    color: #0057b4;
    font-weight: 700;
    white-space: nowrap;
}
.blog-tabla tbody tr:last-child td { border-bottom: 0; }
.blog-tabla tbody tr:nth-child(even) td { background: #fbfcfe; }
.blog-tabla td:first-child { font-weight: 600; color: #1c2733; }
.blog-tabla .blog-tabla__pie {
    margin: 10px 0 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    color: #6b7785;
}

/* Galería de imágenes */
.blog-galeria { margin: 2.6rem 0; }
.blog-galeria .blog-galeria__titulo {
    margin-bottom: 12px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1c2733;
}
.blog-galeria__rejilla {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.blog-galeria--2 .blog-galeria__rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.blog-galeria--4 .blog-galeria__rejilla { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.blog-galeria__item {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f8fc;
    cursor: zoom-in;
}
.blog-galeria__item img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .35s ease;
}
.blog-galeria__item:hover img { transform: scale(1.04); }
.blog-galeria__item:focus-visible { outline: 3px solid #0057b4; outline-offset: 2px; }
.blog-galeria__pie {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 10px 8px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .65));
    color: #fff;
    font-size: .82rem;
    line-height: 1.35;
    text-align: left;
}
.blog-galeria .blog-galeria__nota {
    margin: 10px 0 0 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    color: #6b7785;
}

/* Visor de la galería */
.blog-visor {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background: rgba(10, 18, 32, .92);
}
.blog-visor[hidden] { display: none; }
.blog-visor__figura { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.blog-visor__figura img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    border-radius: 8px;
}
.blog-visor__figura figcaption { margin-top: 12px; color: #dbe3ef; font-size: .95rem; }
.blog-visor__cerrar,
.blog-visor__nav {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}
.blog-visor__cerrar {
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
}
.blog-visor__nav {
    top: 50%;
    width: 48px;
    height: 64px;
    margin-top: -32px;
    border-radius: 8px;
    font-size: 22px;
}
.blog-visor__nav--prev { left: 18px; }
.blog-visor__nav--next { right: 18px; }
.blog-visor__cerrar:hover,
.blog-visor__nav:hover { background: rgba(255, 255, 255, .25); }

/* Material relacionado (mismas tarjetas que alquileres.php, sin precio) */
.blog-materiales { margin: 2.6rem 0; }
.blog-materiales .blog-materiales__titulo {
    margin: 0 0 16px !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}
.blog-materiales .row.cont { margin-left: -8px; margin-right: -8px; }
.blog-materiales .producto { display: flex; margin-bottom: 16px; padding-left: 8px; padding-right: 8px; }
.blog-materiales .producto-card__body { padding: 14px 14px 16px; }
.blog-materiales .producto-card__body > p { font-size: 0.86rem !important; }

/* Preguntas frecuentes */
/* ---------- Bloque de pasos numerados ----------
   Tarjetas con el número en grande y apagado: nada que ver con la caja azul
   del índice del aside, que usa círculos pequeños sobre fondo claro. */
.blog-pasos { margin: 2.6rem 0; }
.blog-pasos .blog-pasos__titulo {
    margin: 0 0 16px !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}
.blog-pasos__lista {
    list-style: none !important;
    counter-reset: blog-paso;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 !important;
    padding: 0 !important;
}
.blog-pasos__item {
    counter-increment: blog-paso;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin: 0 !important;
    padding: 18px 22px;
    border: 1px solid #e3e8ef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 30, 60, 0.05);
}
/* "01", "02"… grande y en azul muy claro, como marca de agua del paso. */
.blog-pasos__item::before {
    content: counter(blog-paso, decimal-leading-zero);
    flex: 0 0 auto;
    min-width: 46px;
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.05;
    color: #c3d6ee;
    letter-spacing: -0.02em;
}
/* Paso sin detalle: solo hay título, así que va centrado con el número. */
.blog-pasos__item--simple { align-items: center; }
.blog-pasos__contenido { min-width: 0; }
.blog-pasos .blog-pasos__paso {
    margin: 0 0 4px !important;
    font-size: 1.12rem !important;
    font-weight: 700 !important;
    line-height: 1.35 !important;
    color: #1a1a1a !important;
}
.blog-pasos .blog-pasos__texto {
    margin: 0 !important;
    /* Mismo gris apagado que los pies de foto y demás textos secundarios */
    color: #6b7785 !important;
}

.blog-faq { margin: 2.6rem 0; }
.blog-faq .blog-faq__titulo {
    margin: 0 0 16px !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
}
.blog-faq__item {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    margin-bottom: 10px;
    overflow: hidden;
}
.blog-faq__item[open] { border-color: #0057b4; }
.blog-faq__item > summary {
    position: relative;
    padding: 16px 52px 16px 22px;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1c2733;
    cursor: pointer;
    list-style: none;
}
.blog-faq__item > summary::-webkit-details-marker { display: none; }
.blog-faq__item > summary:hover { color: #0057b4; }
.blog-faq__item > summary::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 24px;
    width: 9px;
    height: 9px;
    margin-top: -6px;
    border-right: 2px solid #0057b4;
    border-bottom: 2px solid #0057b4;
    transform: rotate(45deg);
    transition: transform .2s ease;
}
.blog-faq__item[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.blog-faq__respuesta {
    padding: 0 22px 18px;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #495057;
}

.blog-post__volver {
    display: inline-block;
    margin-top: 40px;
    font-weight: 600;
    color: #0057b4 !important;
    text-decoration: none !important;
}
.blog-post__volver:hover { text-decoration: underline !important; }

.blog-relacionados { margin-top: 64px; min-height: 0; }
.blog-relacionados > h2 {
    margin: 0 0 24px !important;
    font-size: 1.85rem !important;
    font-weight: 700 !important;
}

@media (max-width: 767.98px) {
    .blog-post__cabecera { margin-bottom: 24px; }
    .blog-post__titulo { font-size: 1.9rem !important; }
    .blog-post__destacada { margin-bottom: 28px; }
    .blog-post__destacada img { aspect-ratio: 4 / 3; border-radius: 12px; }
    .blog-post__contenido { font-size: 1.0625rem; line-height: 1.75; }
    .blog-bloque-texto h1,
    .blog-bloque-texto h2 { margin-top: 2rem !important; font-size: 1.5rem !important; }
    .blog-bloque-texto h3 { font-size: 1.25rem !important; }
    .blog-bloque-imagen { margin: 2rem 0; }
    .blog-cta { padding: 22px; margin: 2rem 0; }
    .blog-cta .btn { width: 100%; white-space: normal; }
    .blog-bloque-video { margin: 2rem 0; }
    .blog-video { border-radius: 12px; }
    .blog-video__play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
    .blog-video__play::before { border-width: 10px 0 10px 17px; }
    .blog-video__titulo { font-size: .95rem; left: 14px; right: 14px; bottom: 12px; }
    .blog-aviso { margin: 2rem 0; padding: 18px 20px; gap: 12px; }
    .blog-aviso p { font-size: 1rem !important; }
    .blog-tabla { margin: 2rem 0; }
    .blog-galeria { margin: 2rem 0; }
    .blog-galeria__rejilla,
    .blog-galeria--4 .blog-galeria__rejilla { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .blog-galeria--2 .blog-galeria__rejilla { grid-template-columns: 1fr; }
    .blog-visor { padding: 12px; }
    .blog-visor__nav { width: 40px; height: 54px; }
    .blog-materiales,
    .blog-pasos,
    .blog-faq { margin: 2rem 0; }
    .blog-materiales .blog-materiales__titulo,
    .blog-pasos .blog-pasos__titulo,
    .blog-faq .blog-faq__titulo { font-size: 1.3rem !important; }
    .blog-pasos__item { gap: 14px; padding: 14px 16px; }
    .blog-pasos__item::before { min-width: 34px; font-size: 1.6rem; }
    .blog-pasos .blog-pasos__paso { font-size: 1.05rem !important; }
    .blog-faq__item > summary { padding: 14px 44px 14px 16px; font-size: 1rem; }
    .blog-faq__item > summary::after { right: 18px; }
    .blog-faq__respuesta { padding: 0 16px 16px; font-size: 1rem; }
    /* Con cabecera, la tabla se apila en tarjetas: cada fila es una tarjeta y
       cada dato muestra su etiqueta a la izquierda y el valor a la derecha. */
    .blog-tabla__scroll:has(thead) { overflow: visible; border: 0; border-radius: 0; background: transparent; }
    .blog-tabla__scroll:has(thead) table,
    .blog-tabla__scroll:has(thead) tbody,
    .blog-tabla__scroll:has(thead) tbody tr,
    .blog-tabla__scroll:has(thead) tbody td { display: block; width: 100%; }
    .blog-tabla__scroll:has(thead) thead { display: none; }
    .blog-tabla__scroll:has(thead) tbody tr {
        margin-bottom: 12px;
        padding: 4px 2px;
        border: 1px solid #dee2e6;
        border-radius: 12px;
        background: #fff;
        overflow: hidden;
    }
    .blog-tabla__scroll:has(thead) tbody tr:last-child { margin-bottom: 0; }
    .blog-tabla__scroll:has(thead) tbody td {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 16px;
        padding: 10px 16px;
        border-bottom: 1px solid #eef1f4;
        font-weight: 400;
        color: #1c2733;
    }
    .blog-tabla__scroll:has(thead) tbody tr td:last-child { border-bottom: 0; }
    .blog-tabla__scroll:has(thead) tbody tr:nth-child(even) td { background: transparent; }
    .blog-tabla__scroll:has(thead) tbody td[data-col]::before {
        content: attr(data-col);
        flex: 0 0 auto;
        font-size: .78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        color: #6b7785;
    }
    /* La celda sin etiqueta (columnas extra) ocupa toda la línea a la derecha */
    .blog-tabla__scroll:has(thead) tbody td:not([data-col]) { justify-content: flex-end; }
    .blog-tabla__scroll:has(thead) tbody td:first-child {
        font-weight: 700;
        background: #f4f8fd;
    }
    .blog-relacionados { margin-top: 56px; }
}

/* ---------- Subtemas: filtros internos dentro de una categoría ---------- */
.blog-subtemas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}
.blog-subtemas a {
    padding: 6px 14px;
    border: 1px solid #d5dce5;
    border-radius: 999px;
    background: #fff;
    color: #0057b4;
    font-size: 0.95rem;
    line-height: 1.3;
    text-decoration: none;
}
.blog-subtemas a:hover,
.blog-subtemas a:focus { border-color: #0057b4; text-decoration: none; }
.blog-subtemas a.is-active,
.blog-subtemas a.is-active:hover,
.blog-subtemas a.is-active:focus {
    border-color: #0057b4;
    background: #0057b4;
    color: #fff !important;
}

/* Crédito de fotografías con licencia libre */
.blog-credito { color: #6b7785; font-size: 0.85rem; }
.blog-credito a { color: inherit; text-decoration: underline; }
