/**
 * Recent Posts Widget Styles
 * Beautiful design for Recent Posts with thumbnails
 */

/* Widget Container */
.widget_bloglo_recent_posts {
    margin-bottom: 30px;
}

/* Posts List */
.bloglo-recent-posts-list {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

/* Post Item */
.bloglo-recent-post-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    list-style: none !important;
}

.bloglo-recent-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Post Wrapper */
.bloglo-recent-post-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* Thumbnail */
.bloglo-recent-post-thumbnail {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.bloglo-recent-post-thumbnail:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.bloglo-recent-post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.bloglo-recent-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.bloglo-recent-post-thumbnail:hover img {
    transform: scale(1.1);
}

/* Content */
.bloglo-recent-post-content {
    flex: 1;
    min-width: 0;
}

/* Title */
.bloglo-recent-post-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.bloglo-recent-post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bloglo-recent-post-title a:hover {
    color: #1e73be;
}

/* Meta */
.bloglo-recent-post-meta {
    font-size: 13px;
    color: #777;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.bloglo-recent-post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.bloglo-recent-post-meta i {
    font-size: 12px;
    opacity: 0.7;
}

.bloglo-recent-post-author a,
.bloglo-recent-post-date {
    color: #777;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bloglo-recent-post-author a:hover {
    color: #1e73be;
}

/* No Thumbnail Style */
.bloglo-recent-post-item:not(:has(.bloglo-recent-post-thumbnail)) .bloglo-recent-post-title {
    margin-bottom: 10px;
}

/* Widget Title */
.widget_bloglo_recent_posts .widget-title {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.widget_bloglo_recent_posts .widget-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: #1e73be;
    border-radius: 2px;
}

/* Loading State */
.bloglo-recent-posts-loading {
    text-align: center;
    padding: 20px;
    color: #999;
}

/* Empty State */
.bloglo-recent-posts-empty {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .bloglo-recent-post-thumbnail {
        width: 60px;
        height: 60px;
    }
    
    .bloglo-recent-post-title {
        font-size: 14px;
    }
    
    .bloglo-recent-post-meta {
        font-size: 12px;
    }
    
    .bloglo-recent-post-wrapper {
        gap: 12px;
    }
    
    .bloglo-recent-post-item {
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
}

/* Dark Mode Support */
body.dark-mode .bloglo-recent-post-item {
    border-bottom-color: #333;
}

body.dark-mode .bloglo-recent-post-title a {
    color: #eee;
}

body.dark-mode .bloglo-recent-post-title a:hover {
    color: #4db8ff;
}

body.dark-mode .bloglo-recent-post-meta,
body.dark-mode .bloglo-recent-post-author a,
body.dark-mode .bloglo-recent-post-date {
    color: #aaa;
}

body.dark-mode .bloglo-recent-post-author a:hover {
    color: #4db8ff;
}

body.dark-mode .widget_bloglo_recent_posts .widget-title:after {
    background: #4db8ff;
}

/* Animation on Load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bloglo-recent-post-item {
    animation: fadeInUp 0.3s ease;
}

.bloglo-recent-post-item:nth-child(1) { animation-delay: 0.1s; }
.bloglo-recent-post-item:nth-child(2) { animation-delay: 0.2s; }
.bloglo-recent-post-item:nth-child(3) { animation-delay: 0.3s; }
.bloglo-recent-post-item:nth-child(4) { animation-delay: 0.4s; }
.bloglo-recent-post-item:nth-child(5) { animation-delay: 0.5s; }