/* Related Posts Component Styles - Extends existing sidebar-widget patterns */

/* Related Posts Widget - Extends .sidebar-widget from blog-reading.css */
.related-posts-widget {
    /* Inherits base styles from .sidebar-widget */
    /* Additional specific styles for related posts */
}

.related-posts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-post-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.related-post-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.related-post-image {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.related-post-image i {
    font-size: 1.5rem;
    color: white;
}

.related-post-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

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

.related-post-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.related-post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: #3b82f6;
    text-decoration: none;
}

.related-post-excerpt {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.related-post-meta small {
    color: #64748b;
    font-size: 0.75rem;
}

.related-post-meta i {
    color: #3b82f6;
    font-size: 0.8rem;
}

.related-post-tags {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.related-post-tag {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.65rem;
    padding: 0.2rem 0.4rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
}

.no-posts {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
}

.no-posts i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: #94a3b8;
}

.no-posts p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .related-post-item {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .related-post-image {
        width: 50px;
        height: 50px;
    }
    
    .related-post-image i {
        font-size: 1.2rem;
    }
    
    .related-post-title {
        font-size: 0.85rem;
    }
    
    .related-post-excerpt {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .related-post-item {
        flex-direction: column;
        text-align: center;
    }
    
    .related-post-image {
        align-self: center;
        margin-bottom: 0.5rem;
    }
}
