/* css/related_articles.css */

.related-articles-section {
    margin-top: 50px;
    margin-bottom: 50px;
    background-color: #fafafa;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.related-articles-section .section-title {
    margin-top: 0;
    margin-bottom: 25px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    color: #333;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
}

.related-article-card {
    background-color: #fefefe;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.related-article-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-article-thumbnail {
    width: 100%;
    height: 140px;
    overflow: hidden;
}

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

.related-article-card:hover .related-article-thumbnail img {
    transform: scale(1.05);
}

.related-article-info {
    padding: 15px;
}

.related-article-title {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* 限制标题行数 */
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.related-article-card a:hover .related-article-title {
    color: #EE0000;
}

.related-article-meta {
    font-size: 0.85em;
    color: #999;
}

@media (max-width: 768px) {
    .related-articles-section {
        padding: 20px;
    }

    .related-articles-grid {
        grid-template-columns: 1fr;
    }

    .related-article-thumbnail {
        height: 160px;
    }
} 