/* Стили блога поверх глобального /style.css (шапка topbar берётся оттуда). */

body { background: #05060f; color: #eef1ff; line-height: 1.65; overflow-x: hidden; }
.bwrap a { color: #8ea0ff; text-decoration: none; }
.bwrap a:hover { color: #ffffff; }

/* ---------- Контейнеры (отступ сверху под фиксированный topbar) ---------- */
.bwrap { max-width: 1060px; margin: 0 auto; padding: 118px 24px 60px; }
.bwrap--article { max-width: 860px; }

.bhero { text-align: center; padding: 28px 0 8px; }
.bhero h1 {
    font-size: clamp(30px, 5vw, 46px); font-weight: 800; margin-bottom: 12px;
    background: linear-gradient(90deg, #ffffff, #aab6ff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bhero p { color: #aab2d9; max-width: 640px; margin: 0 auto; }

/* ---------- Рубрики ---------- */
.bcats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 26px 0 8px; }
.bcats a {
    padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #c4caef;
    border: 1px solid rgba(148,163,255,0.22); background: rgba(255,255,255,0.03);
}
.bcats a:hover { color: #fff; border-color: rgba(148,163,255,0.5); }
.bcats a.active { color: #fff; background: linear-gradient(90deg, #5b6cff, #7c5cff); border-color: transparent; }

.bempty { text-align: center; color: #aab2d9; padding: 48px 0; }

/* ---------- Карточки ---------- */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; margin-top: 28px; }
.bcard {
    border: 1px solid rgba(122,135,255,0.18); border-radius: 18px; overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.bcard:hover { transform: translateY(-3px); border-color: rgba(148,163,255,0.45); box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
.bcard__link { display: block; color: inherit; }
.bcard__img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.bcard__body { padding: 16px 18px 20px; }
.bcard__meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: #8f97c1; margin-bottom: 10px; }
.bcard__cat {
    display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
    color: #cfd6ff; background: rgba(92,108,255,0.16); border: 1px solid rgba(122,135,255,0.3);
}
.bcard__body h2, .bcard__body h3 { font-size: 18px; line-height: 1.35; color: #fff; margin-bottom: 8px; }
.bcard__body p { font-size: 14px; color: #aab2d9; }

/* ---------- Статья ---------- */
.bcrumbs { font-size: 13px; color: #8f97c1; margin-bottom: 22px; }
.bcrumbs span { margin: 0 6px; opacity: 0.6; }
.barticle__head h1 { font-size: clamp(26px, 4.4vw, 40px); font-weight: 800; line-height: 1.2; color: #fff; margin-bottom: 14px; }
.barticle__meta { display: flex; align-items: center; gap: 14px; font-size: 14px; color: #8f97c1; margin-bottom: 22px; }
.barticle__cover { width: 100%; height: auto; border-radius: 18px; border: 1px solid rgba(122,135,255,0.2); margin-bottom: 28px; }

.barticle__content { font-size: 17px; color: #dfe4ff; }
.barticle__content h2 { font-size: 26px; color: #fff; margin: 38px 0 14px; line-height: 1.3; }
.barticle__content h3 { font-size: 20px; color: #fff; margin: 28px 0 10px; }
.barticle__content p { margin: 0 0 16px; }
.barticle__content ul, .barticle__content ol { margin: 0 0 18px 24px; }
.barticle__content li { margin-bottom: 8px; }
.barticle__content a { border-bottom: 1px solid rgba(142,160,255,0.35); }
.barticle__content a:hover { border-color: #fff; }
.barticle__content strong { color: #fff; }
.barticle__content hr { border: 0; border-top: 1px solid rgba(122,135,255,0.2); margin: 28px 0; }
.barticle__content blockquote {
    border-left: 3px solid #5b6cff; padding: 10px 18px; margin: 0 0 18px;
    background: rgba(92,108,255,0.08); border-radius: 0 12px 12px 0; color: #c4caef;
}
.barticle__content code {
    font-family: "JetBrains Mono", Consolas, monospace; font-size: 0.9em;
    background: rgba(122,135,255,0.14); border: 1px solid rgba(122,135,255,0.22);
    border-radius: 6px; padding: 1px 6px; color: #cfd6ff;
}
.barticle__content pre {
    background: #0a0d1f; border: 1px solid rgba(122,135,255,0.22); border-radius: 14px;
    padding: 16px 18px; overflow-x: auto; margin: 0 0 20px;
}
.barticle__content pre code { background: none; border: 0; padding: 0; color: #d9e0ff; font-size: 14px; line-height: 1.6; }

.table-wrap { overflow-x: auto; margin: 0 0 20px; border-radius: 14px; border: 1px solid rgba(122,135,255,0.22); }
.barticle__content table { border-collapse: collapse; width: 100%; font-size: 15px; }
.barticle__content th, .barticle__content td { padding: 10px 14px; text-align: left; border-bottom: 1px solid rgba(122,135,255,0.16); }
.barticle__content th { background: rgba(92,108,255,0.14); color: #fff; font-weight: 700; white-space: nowrap; }
.barticle__content tr:last-child td { border-bottom: 0; }

/* ---------- CTA ---------- */
.bcta {
    margin: 40px 0; padding: 28px; text-align: center; border-radius: 20px;
    border: 1px solid rgba(122,135,255,0.3);
    background: linear-gradient(135deg, rgba(91,108,255,0.16), rgba(124,92,255,0.10));
}
.bcta h2 { font-size: 24px; color: #fff; margin-bottom: 10px; }
.bcta p { color: #c4caef; margin-bottom: 18px; }
.bcta__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.bcta .topbar__cta-link, .bcta a.bcta__buy {
    display: inline-block; padding: 11px 18px; border-radius: 999px; font-weight: 700; color: #fff;
    border: 1px solid rgba(128,140,255,0.28);
    background: linear-gradient(90deg, #5b6cff, #7c5cff);
    box-shadow: 0 12px 28px rgba(92,108,255,0.28);
}
.bcta__alt {
    display: inline-block; padding: 11px 18px; border-radius: 999px; font-weight: 700; color: #cfd6ff;
    border: 1px solid rgba(148,163,255,0.4);
}
.bcta__alt:hover { color: #fff; border-color: #fff; }

.brelated h2 { font-size: 24px; color: #fff; margin: 8px 0 4px; }
.bgrid--related { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ---------- Подвал ---------- */
.bfooter { border-top: 1px solid rgba(122,135,255,0.15); padding: 26px 24px 34px; text-align: center; color: #8f97c1; font-size: 14px; }

@media (max-width: 640px) {
    .bheader__nav { order: 3; width: 100%; justify-content: center; padding-bottom: 6px; }
    .barticle__content { font-size: 16px; }
}
