/* CV Latest Posts Widget Styles */

.cv-latest-posts-widget {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.cv-latest-posts-widget .widget-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.cv-post-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.cv-post-item:hover {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    transform: translateY(-1px);
}

.cv-post-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

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

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

.cv-post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.cv-no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.cv-post-content {
    flex: 1;
    min-width: 0;
}

.cv-post-category {
    margin-bottom: 5px;
}

.cv-post-category a {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: background-color 0.3s ease;
}

.cv-post-category a:hover {
    background: #005a87;
    text-decoration: none;
}

.cv-post-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.cv-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cv-post-title a:hover {
    color: #007cba;
    text-decoration: none;
}

.cv-post-date {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.cv-no-posts {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin: 0;
}

/* Responsividade */
@media (max-width: 768px) {
    .cv-latest-posts-widget {
        padding: 15px;
    }
    
    .cv-post-item {
        gap: 10px;
        padding: 8px;
    }
    
    .cv-post-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .cv-post-title {
        font-size: 13px;
    }
    
    .cv-post-category a {
        font-size: 10px;
        padding: 1px 6px;
    }
}

@media (max-width: 480px) {
    .cv-post-thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .cv-post-title {
        font-size: 12px;
    }
    
    .cv-post-item {
        gap: 8px;
    }
}

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

.cv-post-item {
    animation: fadeInUp 0.5s ease forwards;
}

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

/* Estilo para diferentes temas do WordPress */
.widget .cv-latest-posts-widget .widget-title {
    border-bottom: 2px solid #007cba;
    color: #333;
}

/* Compatibilidade com temas escuros */
@media (prefers-color-scheme: dark) {
    .cv-latest-posts-widget {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .cv-post-title a {
        color: #ffffff;
    }
    
    .cv-post-title a:hover {
        color: #4a9eff;
    }
    
    .cv-post-item:hover {
        background-color: #2a2a2a;
        border-color: #3a3a3a;
    }
    
    .cv-no-posts {
        background: #2a2a2a;
        color: #cccccc;
    }
}

