/* CSS aislado para Lazy Block: Novedades por categoría + Lo más leído */

#lb-category-news.section-categoria-mas-leido {
    padding: 60px 0 30px;
}

@media (min-width: 1100px) {
    #lb-category-news.section-categoria-mas-leido {
        padding: 100px 0 40px;
    }
}

#lb-category-news .categoria-mas-leido {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 1100px) {
    #lb-category-news .categoria-mas-leido {
        padding-left: 20px;
    }
}

#lb-category-news .section-categoria {
    padding-bottom: 30px;
    position: relative;
}

@media (min-width: 600px) {
    #lb-category-news .section-categoria {
        margin: 0 30px;
    }
}

@media (min-width: 768px) {
    #lb-category-news .section-categoria {
        margin: 0 60px 0 0;
    }
}

@media (min-width: 1100px) {
    #lb-category-news .section-categoria {
        margin: 0 -10px 0 0;
    }
}

#lb-category-news .section-categoria_titulo {
    font-size: 32px;
    line-height: 40px;
    color: #019df4;
    font-weight: 700;
    text-align: center;
    width: 300px;
    margin: 0 auto 30px;
}

@media (min-width: 1100px) {
    #lb-category-news .section-categoria_titulo {
        text-align: left;
        font-size: 40px;
        line-height: 50px;
        width: 100%;
    }
}

/* Novedades: 2×2 en editor y desktop; 1 col solo en móvil estrecho */
#lb-category-news .section-categoria .blog-card_list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px 40px;
    justify-content: center;
    justify-items: center;
    align-items: stretch;
    max-width: 722px;
    margin: 0 auto;
    width: 100%;
}

@media (min-width: 600px) {
    #lb-category-news .section-categoria .blog-card_list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: flex-start;
    }
}

/* Lista genérica (más leído usa columna) */
#lb-category-news .section-mas-leido .blog-card_list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    width: 100%;
}

/* Editor Gutenberg: forzar 2×2 aunque el canvas sea estrecho */
.editor-styles-wrapper #lb-category-news .section-categoria .blog-card_list,
.block-editor-block-list__layout #lb-category-news .section-categoria .blog-card_list,
.is-root-container #lb-category-news .section-categoria .blog-card_list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px 24px !important;
    max-width: 100% !important;
}

.editor-styles-wrapper #lb-category-news .section-categoria .blog-card__3,
.block-editor-block-list__layout #lb-category-news .section-categoria .blog-card__3,
.is-root-container #lb-category-news .section-categoria .blog-card__3 {
    width: 100% !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
}

#lb-category-news .section-categoria_vertodo {
    display: flex;
    justify-content: center;
    font-size: 20px;
    line-height: 25px;
}

@media (min-width: 1100px) {
    #lb-category-news .section-categoria_vertodo {
        position: absolute;
        top: 15px;
        right: 40px;
    }
}

#lb-category-news .section-categoria_vertodo a {
    text-decoration: underline !important;
    color: #019df4;
}

#lb-category-news .section-categoria .blog-card__3 {
    margin-bottom: 30px;
}

@media (min-width: 1100px) {
    #lb-category-news .section-categoria .blog-card__3 {
        margin-right: 40px;
    }
}

/* Lo más leído */

#lb-category-news .section-mas-leido {
    width: 100%;
}

@media (min-width: 600px) {
    #lb-category-news .section-mas-leido {
        width: 380px;
        padding: 0 25px;
    }
}

@media (min-width: 768px) {
    #lb-category-news .section-mas-leido {
        width: 420px;
        padding: 0;
    }
}

@media (min-width: 1100px) {
    #lb-category-news .section-mas-leido {
        width: 400px;
        margin: 0;
        padding: 0 20px 10px;
        padding-right: 0;
    }
}

@media (min-width: 600px) {
    #lb-category-news .section-mas-leido .container-general {
        width: 100%;
        padding: 0 20px 10px;
    }
}

#lb-category-news .section-mas-leido_content {
    background-color: #f5f5f5;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
    padding-bottom: 10px;
}

@media (min-width: 600px) {
    #lb-category-news .section-mas-leido_content {
        border-radius: 16px;
    }
}

@media (min-width: 1100px) {
    #lb-category-news .section-mas-leido_content {
        padding-top: 50px;
        padding-bottom: 11px;
    }
}

#lb-category-news .section-mas-leido_titulo {
    font-size: 32px;
    line-height: 40px;
    color: #019df4;
    font-weight: 700;
    text-align: center;
    margin-bottom: 23px;
}

@media (min-width: 900px) {
    #lb-category-news .section-mas-leido_titulo {
        margin-bottom: 34px;
    }
}

#lb-category-news .section-mas-leido .blog-card__4 {
    margin-bottom: 27px;
}

@media (min-width: 600px) {
    #lb-category-news .section-mas-leido .blog-card__4 {
        width: 100%;
    }
}

/* Blog cards generales */

#lb-category-news .blog-card {
    width: 320px;
    padding: 30px 0;
}

@media (min-width: 900px) {
    #lb-category-news .blog-card {
        width: 360px;
    }
}

#lb-category-news .blog-card_title {
    font-size: 24px;
    line-height: 30px;
    color: #0b2739;
    margin-bottom: 30px;
    min-height: 60px;
}

#lb-category-news .blog-card_title a {
    color: #0b2739;
    text-decoration: none;
    transition: all ease 0.4s;
    background-image: linear-gradient(transparent, transparent), linear-gradient(transparent, transparent), linear-gradient(#019df4, #019df4);
    background-size: 20px 2px, 100% 2px, 0 2px;
    background-position: -20px 100%, 100% 100%, 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.25s linear, background-position 0.25s linear, color 0.25s ease-out;
}

#lb-category-news .blog-card_image {
    width: 100%;
    height: 200px;
    margin-bottom: 30px;
    position: relative;
}

@media (min-width: 900px) {
    #lb-category-news .blog-card_image {
        height: 250px;
    }
}

#lb-category-news .blog-card_image a {
    display: block;
    width: 100%;
    height: 100%;
}

#lb-category-news .blog-card_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

#lb-category-news .blog-card_info {
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    color: #50535a;
    margin-bottom: 10px;
}

@media (min-width: 768px) {
    #lb-category-news .blog-card_info {
        min-height: 88px;
    }
}

#lb-category-news .blog-card_info * {
    margin: 0;
}

#lb-category-news .blog-card_enlace-content {
    margin-bottom: 30px;
}

#lb-category-news .blog-card_enlace {
    color: #019df4;
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
}

#lb-category-news .blog-card_enlace span {
    margin-left: 10px;
}

#lb-category-news .blog-card_categorias {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #d3d4d3;
}

#lb-category-news .blog-card_categoria {
    color: #019df4;
    font-size: 12px;
    line-height: 15px;
    padding: 3px 10px;
    background-color: #f5f5f5;
    border-radius: 3px;
    margin-right: 10px;
    margin-bottom: 10px;
    opacity: 0.8;
}

#lb-category-news .blog-card_categoria:hover {
    opacity: 1;
}

/* Blog card tipo 3 - Novedades por categoría */

#lb-category-news .blog-card__3 {
    width: 250px;
    box-shadow: 0 6px 15px rgba(55, 63, 65, 0.1);
    border-radius: 16px;
    padding: 20px;
    background-color: #fff;
}

#lb-category-news .blog-card__3 .blog-card_image {
    height: 148px;
    margin-bottom: 20px;
}

/* Título de las cards de categorías: mismo tamaño/fuente que blog-latest-posts (24px, máx. 2 líneas). */
#lb-category-news .blog-card__3 .blog-card_title {
    font-size: 24px;
    line-height: 30px;
    color: #0b2739;
    margin-bottom: 30px;
    min-height: 60px;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

#lb-category-news .blog-card__3 .blog-card_enlace-content {
    margin-bottom: 20px;
}

@media (min-width: 900px) {
    #lb-category-news .blog-card__3 {
        width: 320px;
    }

    #lb-category-news .blog-card__3 .blog-card_info {
        font-size: 16px;
        min-height: 66px;
    }
}

/* Blog card tipo 4 - Lo más leído */

#lb-category-news .blog-card__4 {
    background-color: #fff;
    padding: 16px 20px;
    box-shadow: 0 6px 15px rgba(55, 63, 65, 0.1);
    border-radius: 16px;
}

#lb-category-news .blog-card__4 .blog-card_top {
    display: flex;
}

#lb-category-news .blog-card__4 .blog-card_image {
    min-width: 54px;
    width: 54px;
    height: 54px;
    margin-right: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
}

#lb-category-news .blog-card__4 .blog-card_title {
    font-size: 14px;
    line-height: 18px;
    color: #484848;
    min-height: auto;
    font-weight: 400;
    margin-bottom: 0;
}

#lb-category-news .blog-card__4 .blog-card_title a {
    color: #484848;
}

#lb-category-news .blog-card:hover .blog-card_title a {
    color: #019df4;
    background-size: 20px 2px, 0 2px, 100% 2px;
    background-position: calc(100% + 20px) 100%, 100% 100%, 0 100%;
}


/* ============================================================
   blog-card_info — SECTION-CATEGORIA alineada con blog-latest-posts
   (NO aplica a section-mas-leido / .blog-card__4)
   ============================================================ */
#lb-category-news .blog-card__3 .blog-card_info {
    font-weight: 400;
    font-size: 18px;
    line-height: 22px;
    color: #50535a;
    margin-bottom: 10px;
    min-height: 110px;
    max-height: 110px;
}

@media (min-width: 768px) {
    #lb-category-news .blog-card__3 .blog-card_info {
        min-height: 120px;
        max-height: 120px;
        font-size: 20px;
        line-height: 24px;
    }
}

#lb-category-news .blog-card__3 .blog-card_info * {
    margin: 0;
}

#lb-category-news .blog-card__3 .blog-card_info p {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
