/* LeoVilhena Posts - Estilos Otimizados v2.0.2 */

.leovilhena-top-posts {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.lv-posts-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lv-period-badge {
    font-size: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.lv-posts-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Layout Lista */
.list-layout .lv-post-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.list-layout .lv-post-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.list-layout .lv-post-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.lv-post-rank {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-layout .lv-post-thumbnail {
    width: 100%;
    order: 1;
}

.lv-post-thumbnail {
    flex-shrink: 0;
}

.list-layout .lv-post-thumbnail img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 0;
}

.lv-post-thumbnail img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.list-layout .lv-post-content {
    order: 2;
    padding: 15px;
}

.lv-post-content {
    flex: 1;
}

.lv-post-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.lv-post-title a {
    color: #24292e;
    text-decoration: none;
    transition: color 0.2s;
}

.lv-post-title a:hover {
    color: #667eea;
}

.lv-post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #586069;
}

.lv-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lv-post-meta .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Layout Grid */
.grid-layout .lv-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.grid-layout .lv-post-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

/* Reordenar elementos: foto primeiro, depois conteúdo */
.grid-layout .lv-post-thumbnail {
    order: 1;
}

.grid-layout .lv-post-content {
    order: 2;
}

.grid-layout .lv-post-item:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.grid-layout .lv-post-rank {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.grid-layout .lv-post-thumbnail {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.grid-layout .lv-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-layout .lv-post-item:hover .lv-post-thumbnail img {
    transform: scale(1.05);
}

.grid-layout .lv-post-content {
    padding: 15px;
}

.grid-layout .lv-post-title {
    font-size: 16px;
    margin-bottom: 12px;
}

.grid-layout .lv-post-meta {
    flex-direction: column;
    gap: 8px;
}

/* Responsivo */
@media (max-width: 768px) {
    .lv-posts-title {
        font-size: 20px;
    }
    
    .grid-layout .lv-posts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .lv-post-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lv-post-item {
    animation: fadeIn 0.4s ease forwards;
}

.lv-post-item:nth-child(1) { animation-delay: 0.1s; }
.lv-post-item:nth-child(2) { animation-delay: 0.2s; }
.lv-post-item:nth-child(3) { animation-delay: 0.3s; }
.lv-post-item:nth-child(4) { animation-delay: 0.4s; }
.lv-post-item:nth-child(5) { animation-delay: 0.5s; }
