/**
 * TurboJet - Estilos para o Shortcode [tj_lista_posts]
 *
 * @version 1.2.1
 * @package TurboJet
 */

.tj-list-posts-wrapper { width: 100%; margin: 20px 0; }
.tj-list-content-area { transition: opacity 0.3s; }
.tj-list-content-area.loading { opacity: 0.5; }

.tj-posts-list-container {
    display: flex;
    flex-direction: column;
    gap: var(--item-vertical-gap, 30px);
}

.tj-post-list-item,
.tj-post-list-item * {
    box-sizing: border-box;
}

.tj-post-list-item {
    display: flex;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Efeitos de Hover */
.tj-post-list-item.hover-effect-grow:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}
.tj-post-list-item.hover-effect-shrink:hover {
    transform: scale(0.98);
}

.tj-list-item-image-col {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    position: relative; /* Para o overlay */
}

.tj-list-item-content-col {
    flex: 1 1 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2; /* Garante que o texto fique acima de qualquer fundo indesejado */
}

.tj-list-item-image-link {
    flex: 1 1 100%;
    width: 100%;
    min-height: 250px;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}
.tj-post-list-item.hover-effect-grow:hover .tj-list-item-image-link,
.tj-post-list-item.hover-effect-shrink:hover .tj-list-item-image-link {
    transform: scale(1.05);
}

/* Efeito Overlay */
.tj-post-list-item.hover-effect-overlay .tj-list-item-image-col::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--tj-card-overlay-color);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}
.tj-post-list-item.hover-effect-overlay:hover .tj-list-item-image-col::after {
    opacity: 1;
}

/* Alinhamento dos Itens (com classes em português e inglês para compatibilidade) */
.tj-post-list-item.align-esquerda .tj-list-item-image-col,
.tj-post-list-item.align-left .tj-list-item-image-col { 
    order: 1; 
}
.tj-post-list-item.align-esquerda .tj-list-item-content-col,
.tj-post-list-item.align-left .tj-list-item-content-col { 
    order: 2; 
}

.tj-post-list-item.align-direita .tj-list-item-image-col,
.tj-post-list-item.align-right .tj-list-item-image-col { 
    order: 2; 
}
.tj-post-list-item.align-direita .tj-list-item-content-col,
.tj-post-list-item.align-right .tj-list-item-content-col { 
    order: 1; 
}

/* Conteúdo */
.tj-list-item-title { margin: 0 0 10px 0; font-weight: 700; line-height: 1.3; }
.tj-list-item-title a { text-decoration: none; transition: color 0.2s ease; }
.tj-list-item-meta { margin-bottom: 15px; font-style: italic; }
.tj-meta-separator { margin: 0 8px; }
.tj-list-item-excerpt { margin-bottom: 20px; line-height: 1.7; }
.tj-list-item-read-more { margin-top: auto; }

/* Responsividade */
@media (max-width: 768px) {
    .tj-post-list-item,
    .tj-post-list-item.align-esquerda,
    .tj-post-list-item.align-direita,
    .tj-post-list-item.align-left,
    .tj-post-list-item.align-right {
        flex-direction: column;
    }

    .tj-list-item-image-col,
    .tj-list-item-content-col {
        flex: none; /* Previne bug do flex-basis: 100% calcular como height:100% e sumir com conteúdo */
        width: 100%;
        box-sizing: border-box;
    }

    .tj-list-item-image-col {
        min-height: 250px;
    }

    .tj-list-item-content-col {
        /* Garante que o padding não cause overflow caso o width 100% não estivesse com border-box */
        padding: 20px !important; /* Overrides inline padding on mobile for better fit */
    }

    .tj-post-list-item .tj-list-item-image-col,
    .tj-post-list-item .tj-list-item-content-col {
        order: initial !important; /* Reseta a ordem no mobile */
    }
}
