/* Оболочка страницы статьи (требует catalog.css для body/header) */
body.blog-post-body {
    background-color: #131c29;
    color: #eef2f6;
}

.blog-post-shell {
    padding: 12px 0 40px;
    animation: blogFadeIn 0.35s ease;
}

@keyframes blogFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.blog-read-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #4884ff, #3acf6b);
    z-index: 9999;
    transition: width 0.08s linear;
    pointer-events: none;
}

.blog-post-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 4px 48px;
}

.blog-post-card {
    background: linear-gradient(165deg, #1a2533 0%, #131c29 55%, #0f1722 100%);
    border: 1px solid #ffffff12;
    border-radius: 24px;
    padding: clamp(20px, 3vw, 36px);
    box-shadow: 0 28px 56px -24px #00000090;
}

.blog-bc {
    font-size: 0.8rem;
    opacity: 0.65;
    margin-bottom: 18px;
}

.blog-bc a {
    color: #8aa9ff;
    text-decoration: none;
    transition: color 0.15s;
}

.blog-bc a:hover {
    color: #b8d4ff;
}

.blog-bc span {
    margin: 0 6px;
    opacity: 0.45;
}

.blog-post__cover {
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 26px;
    border: 1px solid #ffffff15;
    position: relative;
}

.blog-post__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0f172280 0%, transparent 45%);
    pointer-events: none;
}

.blog-post__cover img {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
    display: block;
}

.blog-post__head h1 {
    font-size: clamp(1.5rem, 4.2vw, 2.15rem);
    line-height: 1.22;
    margin: 0 0 14px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #f8fafc;
}

.blog-post__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    margin-bottom: 18px;
}

.blog-post__meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.78rem;
    padding: 6px 12px;
    border-radius: 999px;
    background: #0f1722;
    border: 1px solid #2a3545;
    color: #b8c6db;
}

.blog-post__meta-pill i {
    color: #4884ff;
    font-size: 0.72rem;
}

.blog-post__meta-pill--time i {
    color: #3acf6b;
}

.blog-post__lead {
    font-size: clamp(1rem, 2.5vw, 1.12rem);
    line-height: 1.65;
    color: #cbd5e1;
    margin: 0 0 28px;
    padding: 16px 18px;
    border-radius: 14px;
    background: #4884ff10;
    border-left: 4px solid #4884ff;
}

.blog-post-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ffffff10;
}

.blog-post-toolbar__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.45;
    margin-right: 4px;
}

.blog-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid #ffffff20;
    background: #0f1722;
    color: #eef2f6;
    cursor: pointer;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.9rem;
}

.blog-share-btn:hover {
    background: #4884ff;
    border-color: #4884ff;
    color: #fff;
    transform: translateY(-2px);
}

.blog-share-btn--vk:hover { background: #0077ff; border-color: #0077ff; }
.blog-share-btn--tg:hover { background: #26a5e4; border-color: #26a5e4; }

.blog-post-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.blog-post-layout--full {
    grid-template-columns: 1fr;
}

.blog-post-toc {
    position: sticky;
    top: 72px;
    padding: 18px 16px;
    background: #0f1722;
    border: 1px solid #2a3545;
    border-radius: 16px;
    font-size: 0.8rem;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.blog-post-toc__title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.5;
    margin: 0 0 12px;
    font-weight: 600;
}

.blog-post-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.blog-post-toc li {
    margin-bottom: 6px;
}

.blog-post-toc a {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    color: #9aabbf;
    text-decoration: none;
    line-height: 1.35;
    transition: 0.15s;
}

.blog-post-toc a:hover,
.blog-post-toc a.active {
    color: #93c5fd;
    background: #4884ff18;
}

.blog-post-toc li.level-3 a {
    padding-left: 18px;
    font-size: 0.74rem;
}

/* Типографика статьи */
.blog-post__content,
.blog-post__content.business-idea-article {
    line-height: 1.78;
    font-size: 1.02rem;
    color: #e2e8f0;
    max-width: none;
    min-width: 0;
}

.blog-post__content > *:first-child {
    margin-top: 0;
}

.blog-post__content h1,
.blog-post__content h2,
.blog-post__content h3,
.blog-post__content h4 {
    color: #f8fafc;
    font-weight: 700;
    line-height: 1.3;
    margin: 1.65em 0 0.6em;
    scroll-margin-top: 88px;
}

.blog-post__content h2 {
    font-size: 1.38rem;
    padding-bottom: 0.4em;
    border-bottom: 1px solid #ffffff12;
}

.blog-post__content h3 {
    font-size: 1.15rem;
    color: #93c5fd;
}

.blog-post__content h4 {
    font-size: 1.05rem;
}

.blog-post__content p {
    margin: 0 0 1.05em;
}

.blog-post__content ul,
.blog-post__content ol {
    margin: 0 0 1.15em 1.4em;
    padding: 0;
}

.blog-post__content li {
    margin-bottom: 0.5em;
}

.blog-post__content blockquote {
    margin: 1.3em 0;
    padding: 16px 20px;
    border-left: 4px solid #4884ff;
    background: linear-gradient(90deg, #4884ff14, transparent);
    border-radius: 0 14px 14px 0;
    color: #cbd5e1;
    font-style: italic;
}

.blog-post__content pre {
    background: #0a0f1a;
    border: 1px solid #2a3545;
    border-radius: 14px;
    padding: 16px 18px;
    overflow-x: auto;
    margin: 1.2em 0;
    font-size: 0.88rem;
}

.blog-post__content code {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.9em;
    background: #0f1722;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid #2a3545;
}

.blog-post__content pre code {
    background: none;
    border: none;
    padding: 0;
}

.blog-post__content a {
    color: #8aa9ff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-post__content a:hover {
    color: #b8d0ff;
}

.blog-post__content img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 1.35em auto;
    border: 1px solid #ffffff18;
    box-shadow: 0 16px 40px -16px #00000070;
}

.blog-post__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25em 0;
    font-size: 0.92rem;
    display: block;
    overflow-x: auto;
}

.blog-post__content th,
.blog-post__content td {
    border: 1px solid #2a3545;
    padding: 10px 14px;
    text-align: left;
}

.blog-post__content th {
    background: #0f1722;
    color: #93c5fd;
}

.blog-post__content hr {
    border: none;
    border-top: 1px solid #ffffff15;
    margin: 2.2em 0;
}

.blog-post__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid #ffffff10;
}

.blog-post-aside-cta {
    margin-top: 32px;
    padding: 22px 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, #4884ff18, #3acf6b12);
    border: 1px solid #4884ff33;
    text-align: center;
}

.blog-post-aside-cta h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.blog-post-aside-cta p {
    margin: 0 0 16px;
    font-size: 0.88rem;
    opacity: 0.8;
    line-height: 1.5;
}

.blog-related {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid #ffffff10;
}

.blog-related__title {
    font-size: 1.15rem;
    margin: 0 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog-related__title i {
    color: #4884ff;
}

.blog-related__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.blog-related__grid .blog-card {
    margin: 0;
}

@media (max-width: 900px) {
    .blog-post-layout {
        grid-template-columns: 1fr;
    }

    .blog-post-toc {
        position: static;
        max-height: none;
    }

    .blog-related__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .blog-post-card {
        padding: 18px 16px;
        border-radius: 18px;
    }

    .blog-post-toolbar {
        gap: 8px;
    }
}

@media print {
    .blog-read-progress,
    .blog-post-toolbar,
    .blog-post-toc,
    .blog-post-aside-cta,
    .blog-related,
    .blog-post__footer {
        display: none !important;
    }

    .blog-post-card {
        box-shadow: none;
        border: none;
        padding: 0;
    }

    .blog-post__content {
        color: #111;
    }
}
