/* Fixes de renderizado para contenido de blog - no cambia identidad visual */

/* 9. Desbordes de palabras/enlaces largos */
.post-description {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* 5. Justificado con guiones en escritorio; izquierda en móvil */
@media (max-width: 767px) {
    .single-post .post-description p,
    .single-post .post-description li,
    .single-post .post-description blockquote {
        text-align: left;
        hyphens: auto;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
    }
}
.post-description pre,
.post-description code {
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
}

/* 1. Listas dentro del contenido */
.post-description ul,
.post-description ol {
    padding-left: 1.6em;
    margin: 0 0 1em;
}
.post-description ul {
    list-style: disc;
}
.post-description ol {
    list-style: decimal;
}
.post-description li {
    margin-bottom: 0.35em;
}
/* El tema oculta la viñeta en cada elemento, no solo en la lista */
.post-description ul > li { list-style: disc outside; }
.post-description ol > li { list-style: decimal outside; }
.post-description ul ul > li { list-style-type: circle; }
.post-description ul ul ul > li { list-style-type: square; }
.post-description ul ul,
.post-description ol ol,
.post-description ul ol,
.post-description ol ul {
    margin-top: 0.35em;
    margin-bottom: 0.35em;
}
.post-description ul ul { list-style: circle; }
.post-description ul ul ul { list-style: square; }

/* 2. Tablas */
.post-description table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    font-size: inherit;
}
.post-description th,
.post-description td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}
.post-description th {
    background: #f7f7f7;
    font-weight: 600;
}
@media (max-width: 767px) {
    .post-description table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* 3. Imágenes, iframes y videos */
.post-description img {
    max-width: 100%;
    height: auto !important;
    margin: 0.75em 0;
}
.post-description p > img:only-child {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
/* Los emoticonos del editor siguen en línea con el texto */
.post-description p > img[src*="/smiley/"] {
    display: inline;
    margin: 0 2px;
    vertical-align: middle;
}
.post-description iframe,
.post-description video,
.post-description embed,
.post-description object {
    max-width: 100%;
}

/* 4. Encabezados dentro del contenido */
.post-description h1,
.post-description h2,
.post-description h3,
.post-description h4 {
    margin-top: 28px;
    margin-bottom: 0.75em;
}
.post-description > h1:first-child,
.post-description > h2:first-child,
.post-description > h3:first-child,
.post-description > h4:first-child {
    margin-top: 0;
}

/* 6. Contenido pegado con estilos en línea */
.post-description p span[style],
.post-description li span[style] {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
}
.post-description pre span[style],
.post-description code span[style] {
    font-family: revert !important;
    font-size: revert !important;
    line-height: revert !important;
    color: revert !important;
}

/* 7. Bloques de código (Prism oscuro) */
.post-description pre[class*="language-"] {
    font-size: 13px;
    border-radius: .5em;
    overflow-x: auto;
    max-width: 100%;
}
.post-description pre[class*="language-"] code,
.post-description pre[class*="language-"] .token {
    text-shadow: none !important;
}
.post-description .token.comment,
.post-description .token.prolog,
.post-description .token.doctype,
.post-description .token.cdata {
    color: #c5b9a8;
    text-shadow: none !important;
}
/* El tema tiene clases como .comment que chocan con las del resaltado */
.post-description pre .token {
    display: inline !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
    letter-spacing: normal !important;
}
/* Tablas: las palabras no se parten; si no caben, la tabla se desplaza */
.post-description table {
    display: block;
    overflow-x: auto;
}
.post-description th,
.post-description td {
    word-break: normal;
    overflow-wrap: normal;
    -webkit-hyphens: manual;
    hyphens: manual;
}
/* Código en línea fuera de pre */
.post-description :not(pre) > code {
    background: #f5f5f5;
    color: #333;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    font-size: 0.9em;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

/* 8. Sidebar: títulos largos no desbordan */
.widget-tabs .widget-content {
    display: table;
    table-layout: fixed;
    width: 100%;
}
.widget-tabs .widget-thumb {
    display: table-cell;
    width: 85px;
    padding-right: 23px;
}
.widget-tabs .widget-text {
    display: table-cell;
    vertical-align: middle;
    width: auto;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.widget-tabs .widget-text h5,
.widget-tabs .widget-text h5 a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/*
 * 10. Distribución del blog.
 * Criterio de lectura: líneas de unos 65 a 80 caracteres.
 * Desde 1440 px: contenido y columna lateral lado a lado, centrados.
 * Por debajo: una sola columna centrada y la columna lateral al final.
 */
.blog-ancho .post-description p,
.blog-ancho .post-description li {
    font-size: 16px;
    line-height: 1.75;
}
.blog-ancho .post-description p,
.blog-ancho .post-description li,
.blog-ancho .post-description blockquote {
    text-align: left;
}
.blog-ancho .post-description h1,
.blog-ancho .post-description h2,
.blog-ancho .post-description h3,
.blog-entrada .post-content > h3 {
    text-wrap: balance;
}
@media (min-width: 768px) {
    .blog-ancho .post-description p,
    .blog-ancho .post-description li {
        font-size: 17px;
    }
    .blog-ancho .sub-home-pages .container {
        width: 100%;
        max-width: 1040px;
        padding-left: 24px;
        padding-right: 24px;
    }
    .blog-entrada .sub-home-pages .container {
        max-width: 834px;
    }
    .blog-ancho .blog-page > .row > .col-lg-8,
    .blog-ancho .blog-page > .row > .col-lg-4 {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .blog-ancho .sidebar.right {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        grid-gap: 24px;
        align-items: start;
        padding-left: 0;
    }
    .blog-ancho .sidebar.right > .widget {
        margin: 0;
        min-width: 0;
    }
    .blog-ancho .blog-grid-flex > .blog-item {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }
}
@media (min-width: 768px) and (max-width: 991px) {
    .blog-ancho .blog-grid-flex > .blog-item {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
@media (min-width: 1440px) {
    .blog-ancho .sub-home-pages .container {
        max-width: 1300px;
        padding-left: 15px;
        padding-right: 15px;
    }
    .blog-entrada .sub-home-pages .container {
        max-width: 1150px;
    }
    .blog-ancho .blog-page > .row > .col-lg-8 {
        flex: 1 1 0%;
        width: auto;
    }
    .blog-ancho .blog-page > .row > .col-lg-4 {
        flex: 0 0 330px;
        width: 330px;
        max-width: 330px;
    }
    .blog-ancho .sidebar.right {
        display: block;
        padding-left: 15px;
    }
    .blog-ancho .sidebar.right > .widget {
        margin-bottom: 30px;
    }
}
@media (min-width: 1440px) and (max-width: 1599px) {
    .blog-ancho .blog-grid-flex > .blog-item {
        flex: 0 0 50%;
        max-width: 50%;
    }
}
