.metadescripcion {
    display: block;
    display: -webkit-box;
    max-width: 100%;
    height: 110px;
    margin: 0 auto;
    font-size: 14px;

    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.imagen-con-zoom {
    width: 100%;
    /* O ajusta el ancho según lo que necesites */
    height: 300px;
    overflow: hidden;
    position: relative;
}

.imagen-con-zoom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.categoria_articulo {
    background-color: #ff3b00 !important;
    font-size: 12px;
    border-radius: 7px;
    padding: 3px 10px;
    text-align: left;
    /* Alignment requested to be left */
}

.categoria_articulo a {
    color: white !important;
}

.meta-date {
    font-size: 10px;
}

/*PORTADA*/
.no-padding {
    padding: 0 !important;
    margin-top: 100px;
}

.grid-articles .post-entry-overlay {
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    pointer-events: none;
    /* Allows clicks to pass through to the background image link */
}

.grid-articles .post-entry-overlay * {
    pointer-events: auto;
    /* Re-enable pointer events for links and content inside the overlay */
}

.grid-articles .post-entry .post-entry-meta {
    height: auto;
    bottom: 0;
    left: 0;
    padding: 0 30px 30px;
    position: absolute;
    width: 100%;
    z-index: 2;
    background: #000000a3;
    text-align: left;
    /* Explicitly left-aligned */
}

.grid-articles .post-date {
    color: #fff;
    opacity: 0.6;
}

.grid-articles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.grid-articles-main {
    grid-row: span 2;
    /* El primer artículo ocupa toda la altura */
}

.grid-articles-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
}

.post-entry-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 10px;
    background: #00000033;
    /* Asegura que el fondo negro transparente se aplique */
}

.post-entry-meta-title h2 {
    font-size: 1.5rem;
    /* Ajusta el tamaño de la fuente */
    margin: 0;
}

.post-entry {
    position: relative;
    overflow: hidden;
}

.grid-articles-main .post-entry {
    width: 100%;
    /* El primer artículo ocupará todo el ancho de su columna */
}

.grid-articles-side .post-entry {
    width: 100%;
    height: 100%;
    /* Asegura que los artículos secundarios llenen su celda */
}

.links_importantes_p {
    color: white;
    font-size: 18px;
}

.links_importantes {
    color: white;
    font-size: 16px;
}

.galeria_imagenes_temporales,
.galeria_imagenes_temporales1 {
    width: 100%;
    display: flex;
}

.imagenes_temporales {
    width: 150px;
    flex: 1;
    padding: 10px;
}

/* Responsivo */
@media (max-width: 1024px) {
    .no-padding {
        margin-top: 0px;
    }

    .grid-articles {
        grid-template-columns: 1fr;
    }

    .grid-articles-main {
        grid-row: auto;
        /* El primer artículo no ocupa más de una fila */
    }

    .grid-articles-side {
        grid-template-columns: 1fr 1fr;
        /* Dos columnas en pantallas medianas */
        grid-template-rows: auto;
    }

    .post-entry-meta-title h2 {
        font-size: 1.2rem;
    }

    .links_importantes_p {
        font-size: 14px;
    }

    .links_importantes {
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    .grid-articles {
        grid-template-columns: 1fr;
        gap: 0px;
    }

    .grid-articles-main {
        grid-row: auto;
        /* El primer artículo ya no ocupa más de una fila */
    }

    .grid-articles-side {
        grid-template-columns: 1fr;
        /* Una columna en pantallas pequeñas */
        grid-template-rows: auto;
        gap: 0px;
    }

    .post-entry-meta-title h2 {
        font-size: 1.2rem;
    }

    .links_importantes_p {
        font-size: 18px;
    }

    .links_importantes {
        font-size: 18px;
    }

    .grid-articles .post-date {
        font-size: 14px;
    }

    .blog_dtl_content h1 {
        font-size: 25px;
        /* Ajuste para que el h1 no se vea tan grande en móviles */
        line-height: 1.2;
    }

    .blog_dtl_content h2 {
        font-size: 22px;
        /* Ajuste para h2 */
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .post-entry-meta-title h2 {
        font-size: 1.1rem;
    }

    .links_importantes_p {
        font-size: 16px;
    }

    .links_importantes {
        font-size: 16px;
    }

    .grid-articles .post-date {
        font-size: 13px;
    }

    .post-entry-overlay {
        padding: 5px;
    }
}

/* =====================================================
   ESTILOS DE CONTENIDO CKEditor 5
   Estos estilos replican el formato del editor en la
   vista publica del articulo (blog_individual.php).
   Scoped a .blog_dtl_content para evitar conflictos.
   ===================================================== */

/* --- Tipografía base del contenido --- */
.blog_dtl_content {
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.blog_dtl_content p {
    margin-bottom: 1em;
    line-height: 1.7;
}

/* h2 y h3 ya están definidos en style.css (35px y 24px).
   Solo definimos h1 y h4 que no tienen estilos previos. */
.blog_dtl_content h4 {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0.8em 0 0.4em;
    line-height: 1.3;
}

/* --- Imágenes (figure / figure.image) --- */
.blog_dtl_content figure.image {
    display: table;
    clear: both;
    text-align: center;
    margin: 0.9em auto;
    min-width: 50px;
}

.blog_dtl_content figure.image img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    /* min-width quitado: respetar dimensiones de CKEditor al redimensionar */
    height: auto;
}

.blog_dtl_content figure.image-inline {
    display: inline-flex;
    max-width: 100%;
    align-items: flex-start;
}

.blog_dtl_content figure.image-inline picture {
    display: flex;
}

.blog_dtl_content figure.image-inline picture,
.blog_dtl_content figure.image-inline img {
    flex-grow: 1;
    flex-shrink: 1;
    max-width: 100%;
}

/* Imagen con tamaño redimensionado - CKEditor pone style="width: 50%" en el figure */
.blog_dtl_content figure.image.image_resized {
    display: block !important;
    box-sizing: border-box;
    max-width: 100%;
}

.blog_dtl_content .image_resized img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

.blog_dtl_content .image_resized > figcaption {
    display: block;
}

/* Imagen alineada a la izquierda */
.blog_dtl_content .image-style-side,
.blog_dtl_content .image-style-align-left {
    float: left;
    margin-right: 1.5em;
    max-width: 50%;
}

/* Imagen alineada a la derecha */
.blog_dtl_content .image-style-align-right {
    float: right;
    margin-left: 1.5em;
    max-width: 50%;
}

/* Imagen centrada (block center) */
.blog_dtl_content .image-style-align-center,
.blog_dtl_content .image-style-block-align-middle {
    margin-left: auto;
    margin-right: auto;
}

/* Figcaption */
.blog_dtl_content figure.image > figcaption {
    display: table-caption;
    caption-side: bottom;
    word-break: break-word;
    color: #555;
    background-color: #f7f7f7;
    padding: 0.6em;
    font-size: 0.85em;
    outline-offset: -1px;
    text-align: center;
}

/* --- Tablas --- */
.blog_dtl_content figure.table {
    display: table;
    margin: 0.9em auto;
}

.blog_dtl_content figure.table > figcaption {
    display: table-caption;
    caption-side: top;
    word-break: break-word;
    text-align: center;
    color: #555;
    background-color: #f7f7f7;
    padding: 0.6em;
    font-size: 0.85em;
    outline-offset: -1px;
}

.blog_dtl_content table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
    border: 1px double #b3b3b3;
}

.blog_dtl_content table td,
.blog_dtl_content table th {
    min-width: 2em;
    padding: 0.4em;
    border: 1px solid #bfbfbf;
}

.blog_dtl_content table th {
    font-weight: bold;
    background: rgba(0, 0, 0, 0.05);
}

/* --- Blockquote --- */
.blog_dtl_content blockquote {
    overflow: hidden;
    padding-right: 1.5em;
    padding-left: 1.5em;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    border-left: 5px solid #ccc;
    color: #555;
    background: #f9f9f9;
    padding-top: 0.8em;
    padding-bottom: 0.8em;
    margin-top: 1em;
    margin-bottom: 1em;
}

.blog_dtl_content blockquote blockquote {
    border-left-color: #a3a3a3;
}

.blog_dtl_content blockquote blockquote blockquote {
    border-left-color: #7a7a7a;
}

/* --- Listas --- */
.blog_dtl_content ol,
.blog_dtl_content ul {
    padding-left: 2em;
    margin-bottom: 1em;
}

.blog_dtl_content ol ol,
.blog_dtl_content ol ul,
.blog_dtl_content ul ol,
.blog_dtl_content ul ul {
    margin-bottom: 0;
}

.blog_dtl_content li {
    margin-bottom: 0.3em;
}

/* Listas de tareas (to-do) CKEditor */
.blog_dtl_content .todo-list {
    list-style: none;
    padding-left: 0;
}

.blog_dtl_content .todo-list li {
    margin-bottom: 4px;
}

.blog_dtl_content .todo-list li .todo-list {
    margin-top: 4px;
}

.blog_dtl_content .todo-list .todo-list__label > input {
    -webkit-appearance: none;
    appearance: none;
    display: inline-block;
    position: relative;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    border: 0;
    left: -24px;
    margin-right: -16px;
    right: 0;
    margin-left: 0;
}

.blog_dtl_content .todo-list .todo-list__label > input::before {
    display: block;
    position: absolute;
    box-sizing: border-box;
    content: "";
    width: 100%;
    height: 100%;
    border: 1px solid #999;
    border-radius: 2px;
    transition: box-shadow 250ms ease-in-out;
}

.blog_dtl_content .todo-list .todo-list__label > input::after {
    display: block;
    position: absolute;
    box-sizing: content-box;
    pointer-events: none;
    content: "";
    left: 4px;
    top: 1px;
    width: 6px;
    height: 10px;
    border: solid transparent;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.blog_dtl_content .todo-list .todo-list__label > input[checked]::before {
    background: #26ab33;
    border-color: #26ab33;
}

.blog_dtl_content .todo-list .todo-list__label > input[checked]::after {
    border-color: #fff;
}

.blog_dtl_content .todo-list .todo-list__label .todo-list__label__description {
    vertical-align: middle;
}

.blog_dtl_content
    .todo-list
    .todo-list__label.todo-list__label_without-description
    input[type="checkbox"] {
    position: absolute;
}

/* --- Código --- */
.blog_dtl_content code {
    background-color: hsla(0, 0%, 78%, 0.3);
    padding: 0.15em;
    border-radius: 2px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
}

.blog_dtl_content pre {
    padding: 1em;
    color: #353535;
    background: hsla(0, 0%, 78%, 0.3);
    border: 1px solid #c4c4c4;
    border-radius: 2px;
    text-align: left;
    direction: ltr;
    tab-size: 4;
    white-space: pre-wrap;
    font-size: 0.85em;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    margin-bottom: 1em;
    overflow-x: auto;
}

.blog_dtl_content pre code {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

/* --- Alineación de texto --- */
.blog_dtl_content .text-tiny {
    font-size: 0.7em;
}

.blog_dtl_content .text-small {
    font-size: 0.85em;
}

.blog_dtl_content .text-big {
    font-size: 1.4em;
}

.blog_dtl_content .text-huge {
    font-size: 1.8em;
}

/* --- Horizontal Rule --- */
.blog_dtl_content hr {
    margin: 15px 0;
    height: 4px;
    background: #dedede;
    border: 0;
}

/* --- Media embed --- */
.blog_dtl_content .media {
    clear: both;
    margin: 0.9em 0;
    display: block;
    min-width: 15em;
}

.blog_dtl_content .media .ck-media__wrapper {
    margin: 0 auto;
}

/* Iframes de video responsive */
.blog_dtl_content iframe {
    max-width: 100%;
}

.blog_dtl_content .raw-html-embed {
    margin: 1em 0;
    clear: both;
}

/* --- Pen marker / Highlight --- */
.blog_dtl_content mark,
.blog_dtl_content .marker-yellow {
    background-color: var(--ck-highlight-marker-yellow, #fdfd77);
}

.blog_dtl_content .marker-green {
    background-color: var(--ck-highlight-marker-green, #63f963);
}

.blog_dtl_content .marker-pink {
    background-color: var(--ck-highlight-marker-pink, #fc7999);
}

.blog_dtl_content .marker-blue {
    background-color: var(--ck-highlight-marker-blue, #72ccfd);
}

.blog_dtl_content .pen-red {
    color: var(--ck-highlight-pen-red, #e91313);
    background-color: transparent;
}

.blog_dtl_content .pen-green {
    color: var(--ck-highlight-pen-green, #118800);
    background-color: transparent;
}

/* --- Mention --- */
.blog_dtl_content .mention {
    background: var(--ck-color-mention-background, rgba(153, 0, 48, 0.1));
    color: var(--ck-color-mention-text, #990030);
}

/* --- Page break --- */
.blog_dtl_content .page-break {
    position: relative;
    clear: both;
    padding: 5px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog_dtl_content .page-break::after {
    content: "";
    position: absolute;
    border-bottom: 2px dashed #c4c4c4;
    width: 100%;
}

/* --- Clearfix para imágenes flotantes --- */
.blog_dtl_content::after {
    content: "";
    display: table;
    clear: both;
}

/* --- Responsive para contenido CKEditor --- */
@media (max-width: 768px) {
    .blog_dtl_content .image-style-side,
    .blog_dtl_content .image-style-align-left,
    .blog_dtl_content .image-style-align-right {
        float: none;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
    }

    .blog_dtl_content figure.image {
        margin-left: 0;
        margin-right: 0;
    }

    .blog_dtl_content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .blog_dtl_content pre {
        font-size: 0.8em;
    }
}

@media (max-width: 480px) {
    .blog_dtl_content {
        font-size: 15px;
    }

    .blog_dtl_content h1 {
        font-size: 1.6em;
    }

    .blog_dtl_content h2 {
        font-size: 1.3em;
    }

    .blog_dtl_content h3 {
        font-size: 1.15em;
    }
}

/*PORTADA*/

/* Escritorio: Todo alineado a la izquierda (según solicitud) */
@media (min-width: 992px) {
    .text_center,
    .text-center,
    .widget-title,
    .text_center *,
    .text-center *,
    .single_subscribe_contact .text_center,
    .subscribe_form_send,
    .quote_btn {
        text-align: left !important;
    }

    .text_center,
    .text-center {
        display: block !important;
    }

    /* Newsletter section */
    .subscribe_content_title.text_center {
        text-align: left !important;
    }
}

/* Promo calculadora (blog.php): misma rejilla portada post-entry y listado single_blog — inclusion/funciones.php */
.blog-promo-calculadora-mirror.post-entry .post-entry-overlay a.badge-danger {
    color: #fff;
}
