/* Related Posts Component */

.related-posts {
    margin-top: var(--space-16);
    padding: var(--space-12) 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.related-posts h2 {
    margin-bottom: var(--space-8);
    font-size: var(--type-h2);
    font-weight: var(--weight-bold);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    margin-top: var(--space-6);
}

/* Force single column on very small screens */
@media (max-width: 399px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

.related-post-card {
    padding: var(--space-6);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); /* Increased from --radius-lg (8px → 12px) */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Gradient border support */
.related-post-card.gradient-border {
    border: none;
}

.related-post-card.fluid-combined {
    border: none;
}

.related-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-post-card h3 {
    margin: 0 0 var(--space-3) 0;
    font-size: var(--text-lg);
    font-weight: var(--weight-semibold);
}

.related-post-card h3 a {
    color: var(--text-primary);
    text-decoration: none;
}

.related-post-card h3 a:hover {
    color: var(--color-primary);
}

.related-post-card time {
    display: block;
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.related-post-card p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}
