/* =========================================================
   Блог — публичная часть (в дизайне сайта)
   ========================================================= */

/* верхняя панель на страницах блога */
.blog-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px clamp(20px, 5vw, 60px);
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 40;
}
.blog-topbar__brand {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700; font-size: 0.95rem; color: var(--blue-deep);
    font-family: 'Manrope', sans-serif;
}
.blog-topbar__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--red); }
.blog-topbar__back { font-size: 0.9rem; font-weight: 500; color: var(--blue); }
.blog-topbar__back:hover { color: var(--red); }

/* страница */
.blog-page {
    min-height: 70vh;
    background: linear-gradient(175deg, #F6F9FF 0%, var(--sky) 100%);
    padding: 70px 0 90px;
}

/* шапка блога */
.blog-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.blog-head__title {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.9rem, 5vw, 3rem);
    font-weight: 800; color: var(--blue-deep); letter-spacing: -0.02em; line-height: 1.08;
}
.blog-head__sub { margin-top: 14px; color: var(--muted); font-size: 1.08rem; }

/* сетка карточек */
.blog-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.post-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.post-card__cover { aspect-ratio: 16 / 9; background: var(--sky); overflow: hidden; }
.post-card__cover img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.5s var(--ease);
}
.post-card:hover .post-card__cover img { transform: scale(1.05); }
.post-card__cover--empty { display: flex; align-items: center; justify-content: center; font-size: 2.4rem; }
.post-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.post-card__date { font-size: 0.78rem; color: var(--red); font-weight: 600; }
.post-card__title {
    font-family: 'Manrope', sans-serif;
    font-size: 1.15rem; font-weight: 700; color: var(--blue-deep);
    line-height: 1.25; margin: 8px 0 10px;
}
.post-card__excerpt { color: var(--muted); font-size: 0.93rem; flex: 1; }
.post-card__more { margin-top: 16px; font-weight: 700; font-size: 0.9rem; color: var(--blue); }
.post-card:hover .post-card__more { color: var(--red); }

.blog-empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- статья ---------- */
.post { }
.post__container { max-width: 760px; }
.post__back { display: inline-block; font-size: 0.9rem; font-weight: 500; color: var(--blue); margin-bottom: 30px; }
.post__back:hover { color: var(--red); }
.post__head { margin-bottom: 30px; }
.post__date { font-size: 0.85rem; color: var(--red); font-weight: 600; }
.post__title {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(1.7rem, 4.5vw, 2.6rem);
    font-weight: 800; color: var(--blue-deep);
    line-height: 1.12; letter-spacing: -0.02em; margin-top: 10px;
}
.post__cover { margin-bottom: 34px; }
.post__cover img {
    width: 100%; border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.post__content { font-size: 1.06rem; line-height: 1.75; color: #2A3149; }
.post__content p { margin-bottom: 18px; }
.post__content h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.45rem; color: var(--blue-deep); margin: 36px 0 14px;
}
.post__content ul { margin: 0 0 18px 22px; }
.post__content li { margin-bottom: 8px; }
.post__content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.post__content a:hover { color: var(--red); }
.post__cta {
    margin-top: 46px; padding: 30px;
    background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue-deep) 100%);
    border-radius: var(--radius); text-align: center; color: var(--white);
}
.post__cta p {
    font-family: 'Manrope', sans-serif;
    font-size: 1.15rem; font-weight: 700; margin-bottom: 18px;
}

/* адаптив */
@media (max-width: 980px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .blog-grid { grid-template-columns: 1fr; }
    .blog-page { padding: 50px 0 70px; }
    .post__content { font-size: 1rem; }
}
