/* Amellin — блог в стиле ленты сообщества: серый фон, белые карточки, спокойная типографика. */

.am-blog {
    background: #edeef0;
    color: #1d2a38;
    padding: 22px 0 60px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.am-blog-wrap {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 16px;
}

.am-blog-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 6px 0 16px;
}

.am-blog-head h1 {
    margin: 0 0 6px;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.am-blog-head p {
    margin: 0;
    max-width: 620px;
    color: #6b7788;
    font-size: 15px;
    line-height: 1.5;
}

.am-blog-count {
    color: #8a95a5;
    font-size: 13px;
    white-space: nowrap;
}

.am-blog-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.am-post {
    background: #fff;
    border: 1px solid #dde1e6;
    border-radius: 8px;
    padding: 18px 20px;
}

.am-post:hover {
    border-color: #cbd2da;
}

.am-post-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.am-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f3f4f6;
}

.am-post-author {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.am-post-author b {
    color: #26323f;
    font-size: 14px;
    line-height: 1.3;
}

.am-post-author span {
    color: #8a95a5;
    font-size: 12px;
    line-height: 1.4;
}

.am-post-cat {
    margin-left: auto;
    padding: 4px 9px;
    border-radius: 999px;
    background: #fff4d6;
    color: #8a5a00;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.am-post-title {
    margin: 12px 0 8px;
    font-size: 22px;
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.am-post-title a {
    color: #1d2a38;
    text-decoration: none;
}

.am-post-title a:hover {
    color: #2f6fa8;
}

.am-post-excerpt {
    margin: 0;
    color: #4b5a6b;
    font-size: 15px;
    line-height: 1.6;
}

.am-post-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #eef1f4;
}

.am-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #7b8798;
    font-size: 12px;
}

.am-post-tags span {
    white-space: nowrap;
}

.am-post-more {
    color: #2f6fa8;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.am-post-more:hover {
    text-decoration: underline;
}

.am-blog-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 0 12px;
    color: #8a95a5;
    font-size: 13px;
}

.am-blog-crumbs a {
    color: #5f6d7e;
    text-decoration: none;
}

.am-blog-crumbs a:hover {
    color: #2f6fa8;
    text-decoration: underline;
}

.am-post-full {
    padding: 26px 30px 24px;
}

.am-post-full .am-post-title {
    margin: 14px 0 10px;
    font-size: 34px;
    line-height: 1.18;
}

.am-post-lead {
    margin: 0 0 22px;
    color: #5b6878;
    font-size: 18px;
    line-height: 1.6;
}

.am-post-body {
    color: #2b3a4a;
    font-size: 17px;
    line-height: 1.72;
}

.am-post-body p {
    margin: 0 0 16px;
}

.am-post-body h2 {
    margin: 34px 0 12px;
    font-size: 25px;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.am-post-body h3 {
    margin: 26px 0 10px;
    font-size: 20px;
    font-weight: 750;
}

.am-post-body ul,
.am-post-body ol {
    margin: 0 0 18px;
    padding-left: 24px;
}

.am-post-body li {
    margin: 6px 0;
}

.am-post-body a {
    color: #2f6fa8;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.am-post-body strong {
    color: #16202b;
}

.am-post-body table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
    font-size: 15px;
}

.am-post-body th,
.am-post-body td {
    padding: 9px 11px;
    border: 1px solid #dfe3e8;
    text-align: left;
    vertical-align: top;
}

.am-post-body th {
    background: #f5f6f8;
    font-weight: 700;
}

.am-post-body blockquote {
    margin: 18px 0;
    padding: 10px 16px;
    border-left: 3px solid #ffb84d;
    background: #fffaf0;
    color: #4b5a6b;
}

.am-post-faq {
    margin: 30px 0 0;
}

.am-post-faq h2 {
    margin: 0 0 10px;
    font-size: 23px;
    font-weight: 800;
}

.am-post-faq details {
    padding: 12px 0;
    border-bottom: 1px solid #eef1f4;
}

.am-post-faq summary {
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}

.am-post-faq p {
    margin: 8px 0 0;
    color: #4b5a6b;
    font-size: 16px;
    line-height: 1.65;
}

.am-post-cta {
    margin: 28px 0 0;
    padding: 18px 20px;
    border: 1px solid #f0d98a;
    border-radius: 8px;
    background: #fff8e1;
}

.am-post-cta b {
    display: block;
    margin-bottom: 6px;
    font-size: 17px;
}

.am-post-cta p {
    margin: 0 0 12px;
    color: #5b4a1c;
    font-size: 15px;
    line-height: 1.55;
}

.am-post-cta a {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 6px;
    background: #26323f;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.am-post-cta a:hover {
    background: #3a4a5c;
}

.am-post-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 0;
}

.am-post-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid #dde1e6;
    border-radius: 6px;
    color: #4b5a6b;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.am-post-actions a:hover {
    border-color: #2f6fa8;
    color: #2f6fa8;
}

.am-post-author-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
    padding: 16px;
    border-radius: 8px;
    background: #f6f7f9;
}

.am-post-author-card img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.am-post-author-card b {
    display: block;
    font-size: 15px;
}

.am-post-author-card p {
    margin: 4px 0 0;
    color: #5b6878;
    font-size: 14px;
    line-height: 1.5;
}

.am-post-author-card a {
    margin-left: auto;
    color: #2f6fa8;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.am-post-comments {
    margin-top: 14px;
    padding: 16px 18px;
    border: 1px solid #dde1e6;
    border-radius: 8px;
    background: #fff;
}

.am-post-comments h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.am-post-comments p {
    margin: 0 0 10px;
    color: #5b6878;
    font-size: 14px;
    line-height: 1.55;
}

.am-post-comments a {
    color: #2f6fa8;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.am-blog-related {
    margin-top: 28px;
}

.am-blog-related h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 800;
}

.am-post-compact {
    padding: 16px 18px;
}

.am-post-compact .am-post-title {
    margin: 10px 0 6px;
    font-size: 18px;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .am-blog {
        padding-top: 14px;
    }

    .am-blog-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .am-blog-head h1 {
        font-size: 26px;
    }

    .am-post {
        padding: 14px;
    }

    .am-post-full {
        padding: 18px 16px;
    }

    .am-post-full .am-post-title {
        font-size: 26px;
    }

    .am-post-lead {
        font-size: 16px;
    }

    .am-post-body {
        font-size: 16px;
    }

    .am-post-body h2 {
        font-size: 22px;
    }

    .am-post-foot {
        flex-direction: column;
        align-items: flex-start;
    }

    .am-post-cat {
        font-size: 10px;
    }

    .am-post-author-card {
        flex-wrap: wrap;
    }

    .am-post-author-card a {
        margin-left: 56px;
    }
}
