/* ============================================
   Travel Latest Blog Posts Block
   Grid de 2 columnas en desktop, slider en mobile
   Basado en estilos de form-modal.html
============================================ */

/* === GRID DESKTOP === */
.tlbp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 1320px;
    margin: 0 auto;
}

/* === CARD === */
.tlbp-card {
    background-color: white;
    padding: 6px;
    border-radius: 20px;
}

.tlbp-card__image-wrapper {
    position: relative;
    display: block;
    text-decoration: none;
    overflow: hidden;
    border-radius: 20px;
}

.tlbp-card__image {
    max-width: 100%;
    border-radius: 20px;
    display: block;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.tlbp-card__image-wrapper:hover .tlbp-card__image {
    transform: scale(1.05);
}

.tlbp-card__content {
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: start;
}

.tlbp-card h3 {
    font-size: 24px;
    line-height: 26px;
    margin-top: 4px;
    margin-bottom: 8px;
    color: #202C2E;
    /* Truncar a 3 líneas con altura fija */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: calc(26px * 3);
}

.tlbp-card p {
    font-size: 15px;
    color: #202C2E;
    margin-top: 0;
    margin-bottom: 21px;
    /* Truncar a 2 líneas con ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

.tlbp-card__button {
    color: #E78C85;
    background: transparent;
    font-weight: 600;
    padding: 12px 0 0 0;
    border: none;
    font-size: 14px;
    position: relative;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease;
}

.tlbp-card__button:hover {
    color: #d97168;
}

.tlbp-card__button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background: #E78C85;
}

/* === RESPONSIVE === */

/* Desktop: Mostrar grid, ocultar swiper */
@media (min-width: 1024px) {
    .travel-latest-blog-posts-block .desktop-only {
        display: grid;
    }

    .travel-latest-blog-posts-block .mobile-only {
        display: none;
    }
}

/* Mobile: Ocultar grid, mostrar swiper */
@media (max-width: 1023px) {
    .travel-latest-blog-posts-block .desktop-only {
        display: none;
    }

    .travel-latest-blog-posts-block .mobile-only {
        display: block;
    }

    /* Mobile: 1 slide por vez */
    .tlbp-swiper-mobile .swiper-slide {
        width: 100%;
    }
}

/* === MOBILE SWIPER ADJUSTMENTS === */
.tlbp-swiper-mobile .swiper-wrapper {
    display: flex;
}

.tlbp-swiper-mobile .swiper-slide {
    height: auto;
}
