/* ============================================
   BLOG LATEST POSTS - SECCIÓN LO ÚLTIMO
   ============================================ */

/* Sección principal */
#lb-latest-posts.section-lo-ultimo {
    margin-bottom: 30px;
}

/* ============================================
   TÍTULO PRINCIPAL (H1)
   ============================================ */
#lb-latest-posts .blog_title {
    width: 320px;
    margin: 25px auto 30px;
    font-size: 32px;
    line-height: 40px;
    font-weight: 300;
    color: #019df4;
    text-align: center;
}

@media (min-width: 900px) {
    #lb-latest-posts .blog_title {
        font-size: 48px;
        line-height: 60px;
        width: 750px;
        margin: 25px auto 80px;
    }
}

/* ============================================
   CONTENEDOR GENERAL
   ============================================ */
#lb-latest-posts .container-general {
    padding: 0 10px;
}

@media (min-width: 768px) {
    #lb-latest-posts .container-general {
        padding: 0 20px;
    }
}

@media (min-width: 900px) {
    #lb-latest-posts .container-general {
        max-width: 1110px;
        padding: 0 20px;
        margin: 0 auto;
    }
}

@media (min-width: 1200px) {
    #lb-latest-posts .container-general {
        padding: 0;
    }
}

/* ============================================
   SUBTÍTULO (H2)
   ============================================ */
#lb-latest-posts .blog_subtitle {
    padding-bottom: 10px;
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    color: #019df4;
    width: 320px;
    margin: 0 auto;
    border-bottom: 1px solid #d3d4d3;
    margin-bottom: 20px;
}

@media (min-width: 900px) {
    #lb-latest-posts .blog_subtitle {
        font-size: 40px;
        line-height: 50px;
        width: 100%;
        padding-bottom: 20px;
    }
}

#lb-latest-posts .blog_subtitle a {
    color: #019df4;
}

#lb-latest-posts .blog_subtitle a:hover {
    text-decoration: underline !important;
}

/* ============================================
   LISTA DE TARJETAS (3 COLUMNAS)
   ============================================ */
#lb-latest-posts .blog-card_list {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

@media (min-width: 768px) {
    #lb-latest-posts .blog-card_list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }
}

@media (min-width: 900px) {
    #lb-latest-posts .blog-card_list {
        justify-content: flex-start;
        gap: 15px;
    }
}

@media (min-width: 1200px) {
    #lb-latest-posts .blog-card_list {
        gap: 20px;
    }
}

/* ============================================
   TARJETA INDIVIDUAL
   ============================================ */
#lb-latest-posts .blog-card {
    width: 320px;
    padding: 30px 0;
}

@media (min-width: 768px) {
    #lb-latest-posts .blog-card {
        width: calc(50% - 12px);
    }
}

@media (min-width: 900px) {
    #lb-latest-posts .blog-card {
        width: calc(33.333% - 10px);
        max-width: 350px;
    }
}

@media (min-width: 1200px) {
    #lb-latest-posts .blog-card {
        width: calc(33.333% - 14px);
        max-width: 360px;
    }
}

/* ============================================
   TÍTULO DE TARJETA (H3) - 2 LÍNEAS MAX
   ============================================ */
#lb-latest-posts .blog-card .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-latest-posts .blog-card .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;
}

/* ============================================
   IMAGEN DE TARJETA
   ============================================ */
#lb-latest-posts .blog-card .blog-card_image {
    width: 100%;
    height: 200px;
    margin-bottom: 30px;
    position: relative;
}

@media (min-width: 900px) {
    #lb-latest-posts .blog-card .blog-card_image {
        height: 250px;
    }
}

#lb-latest-posts .blog-card .blog-card_image a {
    display: block;
    width: 100%;
    height: 100%;
}

#lb-latest-posts .blog-card .blog-card_image picture {
    width: 100%;
    height: 100%;
    display: block;
}

#lb-latest-posts .blog-card .blog-card_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* ── Placeholder para posts sin imagen destacada ── */
#lb-latest-posts .blog-card .blog-card_image--no-thumb,
#lb-latest-posts .blog-card .blog-card_image--no-thumb a {
    border-radius: 10px;
    overflow: hidden;
    background-color: #e8eaec;
}

#lb-latest-posts .blog-card .blog-card_image-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #e8eaec;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b0b7bc'%3E%3Cpath d='M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 48px 48px;
    border-radius: 10px;
}

/* ============================================
   EXCERPT - 5 LÍNEAS FIJAS
   ============================================ */
#lb-latest-posts .blog-card .blog-card_info {
    font-weight: 400;
    font-size: 18px;
    color: #50535a;
    margin-bottom: 10px;
    min-height: 110px;
    max-height: 110px;
}

@media (min-width: 768px) {
    #lb-latest-posts .blog-card .blog-card_info {
        min-height: 120px;
        max-height: 120px;
        font-size: 18px;
        line-height: 24px;
    }
}

#lb-latest-posts .blog-card .blog-card_info * {
    margin: 0;
}

#lb-latest-posts .blog-card .blog-card_info p {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 18px;
    line-height: 22px;
}

/* ============================================
   ENLACE "LEER MÁS"
   ============================================ */
#lb-latest-posts .blog-card .blog-card_enlace-content {
    margin-bottom: 30px;
}

#lb-latest-posts .blog-card .blog-card_enlace-content .blog-card_enlace {
    color: #019df4;
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
}

#lb-latest-posts .blog-card .blog-card_enlace-content .blog-card_enlace span {
    margin-left: 10px;
}

/* ============================================
   CATEGORÍAS
   ============================================ */
#lb-latest-posts .blog-card .blog-card_categorias {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #d3d4d3;
}

#lb-latest-posts .blog-card .blog-card_categorias .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-latest-posts .blog-card .blog-card_categorias .blog-card_categoria:hover {
    opacity: 1;
}

/* ============================================
   EFECTO HOVER EN TÍTULO
   ============================================ */
#lb-latest-posts .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%;
}

/* ============================================
   PAGINACIÓN — cuadros con esquinas curvadas
   ============================================ */
#lb-latest-posts .mlt-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    padding: 20px 0;
}

#lb-latest-posts .mlt-page-number,
#lb-latest-posts .mlt-page-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid #d3d4d3;
    background-color: #fff;
    color: #0b2739;
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

#lb-latest-posts .mlt-page-number:hover,
#lb-latest-posts .mlt-page-arrow:hover {
    border-color: #019df4;
    color: #019df4;
    background-color: #fff;
    transform: none;
}

#lb-latest-posts .mlt-page-number.active {
    background-color: #019df4;
    border-color: #019df4;
    color: #fff;
    font-weight: 400;
    cursor: default;
}

#lb-latest-posts .mlt-page-arrow.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 768px) {
    #lb-latest-posts .mlt-page-number,
    #lb-latest-posts .mlt-page-arrow {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        font-size: 14px;
        border-radius: 6px;
    }

    #lb-latest-posts .mlt-pagination {
        gap: 6px;
    }
}

/* ── Mobile scroll-snap carousel (1 card visible) ── */
@media (max-width: 767px) {
  #lb-latest-posts .blog-card_list {
    flex-direction: row !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 12px;
    scrollbar-width: none;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 12px;
  }
  #lb-latest-posts .blog-card_list::-webkit-scrollbar {
    display: none;
  }
  #lb-latest-posts .blog-card {
    flex: 0 0 85vw !important;
    max-width: 85vw !important;
    width: 85vw !important;
    scroll-snap-align: center;
    padding: 20px 0;
  }
}
