/* Blog of cs50.com.ua: post cards and the post page, after the old site */
.cs50-blog .page-title { margin: 10px 0 30px; font-size: 40px; line-height: 1.2; font-weight: 700; color: #333; }

.cs50-post-card { display: flex; align-items: center; gap: 24px; margin-bottom: 20px; padding: 20px; background: #fff; border-radius: 6px; box-shadow: 0 2px 4px rgba(60, 74, 102, .12); }
.cs50-post-card__image { flex: 0 0 240px; display: flex; align-items: center; justify-content: center; height: 150px; }
.cs50-post-card__image img { max-width: 100%; max-height: 150px; object-fit: contain; }
.cs50-post-card__image.is-empty { background: #f4f6fa; border-radius: 6px; color: #b5bdcc; font-size: 48px; text-decoration: none; }
.cs50-post-card__body { flex: 1 1 auto; min-width: 0; }
.cs50-post-card__title { margin: 0 0 8px; font-size: 24px; line-height: 1.3; font-weight: 700; }
.cs50-post-card__title a { color: #333; text-decoration: none; }
.cs50-post-card__title a:hover { color: #3c4a66; text-decoration: underline; }
.cs50-post-card__date { display: block; margin-bottom: 8px; font-size: 13px; color: #8a93a5; }
.cs50-post-card__text { margin: 0; font-size: 15px; line-height: 1.5; color: #555; }

.cs50-post { padding-bottom: 40px; }
.cs50-post .page-title { margin-bottom: 14px; }
.cs50-post__meta { margin-bottom: 26px; font-size: 14px; color: #3c4a66; }
.cs50-post__text { max-width: 1140px; font-size: 16px; line-height: 1.6; color: #333; overflow-wrap: break-word; }
.cs50-post__text img { max-width: 100%; height: auto; }
.cs50-post__text h2, .cs50-post__text h3 { margin: 28px 0 12px; font-weight: 700; color: #333; }
.cs50-post__text p { margin: 0 0 14px; }
.cs50-post__text a { color: #6a4fb3; }
.cs50-post__text pre { padding: 14px; background: #f4f6fa; border: 1px solid #e3e7ef; border-radius: 6px; overflow-x: auto; font-size: 14px; }
.cs50-post__text code { background: #f4f6fa; color: #3c4a66; }
.cs50-post__text table { max-width: 100%; display: block; overflow-x: auto; }
.cs50-blog__subpages { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; }

.cs50-post .comments { margin-top: 40px; }
/* stays in the page without comments: a comment just posted is put into it */
body .cs50-post .comments.is-empty { display: none; }
.cs50-post .comments ul { margin: 0; padding: 0; list-style: none; }
.cs50-post .comments ul ul { padding-left: 28px; }
.cs50-post .comment { margin-bottom: 14px; padding: 14px 16px; background: #fff; border-radius: 6px; box-shadow: 0 2px 4px rgba(60, 74, 102, .12); }
.cs50-post .comment .credentials { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; color: #8a93a5; }
.cs50-post .comment .userpic { flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.cs50-post .comment .userpic--letter { display: inline-flex; align-items: center; justify-content: center; background: #ece8fb; color: #5b3fd6; font-size: 13px; font-weight: 700; line-height: 1; }
.cs50-post .comment .username { font-weight: 700; color: #333; }
.cs50-post .comment-form { max-width: 640px; margin-top: 24px; }
.cs50-post .comment-form label { display: block; margin-bottom: 4px; font-weight: 600; color: #333; }
.cs50-post .comment-form input[type="text"], .cs50-post .comment-form textarea { width: 100%; padding: 8px 12px; border: 1px solid #cfd5e1; border-radius: 4px; background: #fff; font-size: 15px; }
.cs50-post .comment-form textarea { min-height: 120px; }
.cs50-post .comment-form .errormsg { display: block; color: #c0392b; font-size: 13px; }
.cs50-post .comment-form .auth-type { display: flex; gap: 12px; margin: 0 0 12px; padding: 0; list-style: none; }

@media (max-width: 767px) {
    .cs50-blog .page-title { font-size: 28px; margin-bottom: 20px; }
    .cs50-post-card { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
    .cs50-post-card__image { flex-basis: auto; }
    .cs50-post-card__title { font-size: 20px; }
}

/* The cover the importer puts first is shown at the size of the old site */
.cs50-post__text > p:first-child > img:only-child { max-height: 300px; width: auto; }

/* the commenter sees their own comment at once, with a note that others will see it after approval */
.comments .comment-pending { margin: 6px 0 8px; padding: 8px 12px; border-radius: 8px; background: #fff7e0; color: #7a5b00; font-size: 14px; }
.comments .comment-email-note, .comment-form .comment-email-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; background: #eef6ff; color: #1d4b7a; font-size: 14.5px; }
