/* LeoVilhena Posts - Estilos */

.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: bold;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

/* Layout em Lista */
.list-layout .lv-posts-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.list-layout .lv-post-item {
    display: flex;
    gap: 15px;
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.list-layout .lv-post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.lv-post-rank {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.list-layout .lv-post-thumbnail {
    flex-shrink: 0;
    width: 150px;
    height: 100px;
    overflow: hidden;
    border-radius: 8px;
}

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

.list-layout .lv-post-thumbnail:hover img {
    transform: scale(1.1);
}

.lv-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.lv-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.lv-post-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
    flex-wrap: wrap;
}

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

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

.lv-views {
    color: #667eea;
    font-weight: 600;
}

.lv-date {
    color: #999;
}

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

.grid-layout .lv-post-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.grid-layout .lv-post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.grid-layout .lv-post-rank {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

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

.grid-layout .lv-post-thumbnail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

.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.15);
}

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

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

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

/* Widget Sidebar Styles */
.widget .leovilhena-top-posts {
    margin: 0;
}

.widget .lv-posts-title {
    font-size: 18px;
    margin-bottom: 15px;
}

.widget .lv-post-item {
    padding: 15px;
    margin-bottom: 15px;
}

.widget .lv-post-item:last-child {
    margin-bottom: 0;
}

.widget .lv-post-rank {
    width: 40px;
    height: 40px;
    font-size: 16px;
}

.widget .lv-post-thumbnail {
    width: 80px !important;
    height: 60px !important;
}

.widget .lv-post-title {
    font-size: 15px;
}

.widget .lv-post-meta {
    font-size: 12px;
    gap: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .list-layout .lv-post-item {
        flex-direction: column;
    }
    
    .list-layout .lv-post-thumbnail {
        width: 100%;
        height: 180px;
    }
    
    .grid-layout .lv-posts-container {
        grid-template-columns: 1fr;
    }
    
    .lv-post-meta {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .lv-posts-title {
        font-size: 20px;
    }
    
    .lv-post-rank {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .lv-post-title {
        font-size: 16px;
    }
}

/* Estilos especiais para posts sem imagem */
.lv-post-item:not(:has(.lv-post-thumbnail)) .lv-post-content {
    margin-left: 0;
}

/* Badges de posição com cores diferentes */
.lv-post-item:nth-child(1) .lv-post-rank {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
}

.lv-post-item:nth-child(2) .lv-post-rank {
    background: linear-gradient(135deg, #C0C0C0 0%, #808080 100%);
}

.lv-post-item:nth-child(3) .lv-post-rank {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
}

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

.lv-post-item {
    animation: fadeInUp 0.5s ease-out;
}

.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;
}

/* Tema Escuro (opcional) */
.leovilhena-top-posts.dark-theme .lv-post-item {
    background: #2a2a2a;
    color: #fff;
}

.leovilhena-top-posts.dark-theme .lv-post-title a {
    color: #fff;
}

.leovilhena-top-posts.dark-theme .lv-post-title a:hover {
    color: #667eea;
}

.leovilhena-top-posts.dark-theme .lv-post-meta {
    color: #aaa;
}

/* Skeleton Loading (preparado para futuro) */
.lv-post-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print Styles */
@media print {
    .lv-post-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .lv-post-rank {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
