/* ================================================================
   Blog Article (show) - Professional redesign
   Built ONLY on the platform design-system variables:
   --primary --secondary --accent --dark --white
   --gray-100..500 --section-bg --success --warning --danger
   These auto-adapt to the active light/dark mode.
   ================================================================ */

/* ---------- Hero ---------- */
.blog-article-hero {
    position: relative;
    padding: 44px 0 64px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 62%, var(--primary-saturated) 130%);
    overflow: hidden;
}

.blog-article-hero__bg {
    position: absolute;
    inset: 0;
}

.blog-article-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.14;
}

.blog-article-hero__mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 40, 72, 0.72) 0%, rgba(0, 80, 112, 0.42) 100%);
}

.blog-article-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(620px 320px at 88% -15%, rgba(255, 255, 255, 0.12), transparent 60%),
        radial-gradient(520px 300px at -8% 115%, rgba(255, 255, 255, 0.1), transparent 60%);
}

.blog-article-hero__inner {
    position: relative;
    z-index: 2;
}

.blog-article-hero__inner a {
    color: #fff;
    text-decoration: none;
}

.blog-article-breadcrumb {
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
}

.blog-article-breadcrumb a {
    color: rgba(255, 255, 255, 0.78);
    transition: color 0.18s ease;
}

.blog-article-breadcrumb a:hover {
    color: #fff;
}

.blog-article-hero__title {
    color: #fff;
    margin: 18px 0 0;
    line-height: 1.3;
    letter-spacing: -0.015em;
    font-size: clamp(24px, 3.4vw, 36px);
}

.blog-article-hero__subtitle {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
    max-width: 760px;
    margin: 10px 0 0;
    font-size: 15px;
}

.blog-article-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.blog-article-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.blog-article-hero__avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 46px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.15);
}

.blog-article-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-article-hero__sep {
    width: 1px;
    height: 36px;
    background: rgba(255, 255, 255, 0.22);
    flex: 0 0 1px;
}

.blog-article-share {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.2s ease;
    cursor: pointer;
    margin-inline-start: auto;
}

.blog-article-share:hover {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.35);
}

/* ---------- Body ---------- */
.blog-article-body {
    margin-top: 32px;
}

.blog-article-cover {
    aspect-ratio: 16 / 8.6;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    border: 4px solid var(--white);
    box-shadow: 0 22px 45px -22px rgba(2, 20, 45, 0.4);
    background: var(--gray-100);
}

.blog-article-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-article-description {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-inline-start: 4px solid var(--accent);
    border-radius: 18px;
    padding: 20px 22px;
}

.blog-article-description__icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: var(--section-bg);
    color: var(--primary);
}

.blog-article-description p {
    margin: 0;
}

/* ---------- Article content typography ---------- */
.blog-article-content {
    color: var(--dark);
    font-size: 15px;
    line-height: 1.95;
    word-wrap: break-word;
}

.blog-article-content br {
    display: none;
}

.blog-article-content h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.015em;
    margin: 40px 0 18px;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--gray-100);
    line-height: 1.45;
    scroll-margin-top: 96px;
}

.blog-article-content h2::before {
    content: '';
    display: block;
    width: 46px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin-bottom: 12px;
}

.blog-article-content h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--dark);
    margin: 30px 0 14px;
    padding-inline-start: 14px;
    border-inline-start: 3px solid var(--primary);
    line-height: 1.55;
    scroll-margin-top: 96px;
}

.blog-article-content h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin: 22px 0 10px;
}

.blog-article-content p {
    margin: 0 0 16px;
    color: var(--dark);
}

.blog-article-content a:not(.blog-article-cta__btn) {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent);
    transition: text-decoration-color 0.18s ease;
}

.blog-article-content a:hover {
    text-decoration-color: var(--primary);
}

.blog-article-content ul,
.blog-article-content ol {
    margin: 0 0 18px;
    padding-inline-start: 24px;
}

.blog-article-content ul li,
.blog-article-content ol li {
    margin: 9px 0;
    padding-inline-start: 4px;
}

.blog-article-content ul li::marker {
    color: var(--primary);
}

.blog-article-content ol li::marker {
    color: var(--primary);
    font-weight: 700;
}

.blog-article-content strong {
    font-weight: 800;
    color: var(--secondary);
}

.blog-article-content code {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: var(--section-bg);
    color: var(--primary);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid var(--gray-100);
}

.blog-article-content pre {
    position: relative;
    direction: ltr;
    text-align: left;
    background: #0c1c34;
    color: #dce9f5;
    padding: 20px 22px;
    border-radius: 16px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 18px 34px -24px rgba(0, 0, 0, 0.55);
    line-height: 1.75;
}

.dark-mode .blog-article-content pre {
    background: #0a1626;
}

.blog-article-content pre code {
    background: none;
    color: inherit;
    border: 0;
    padding: 0;
    font-size: 13px;
}

.blog-article-copy-btn {
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    z-index: 2;
    font-size: 11px;
    font-weight: 700;
    color: #dce9f5;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 4px 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}

.blog-article-copy-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.blog-article-content figure {
    margin: 22px 0;
    border-radius: 14px;
}

.blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 16px 34px -20px rgba(2, 20, 45, 0.45);
}

.blog-article-content figcaption {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 10px;
    text-align: center;
}

.blog-article-content blockquote {
    margin: 22px 0;
    padding: 16px 20px;
    background: var(--section-bg);
    border-inline-start: 4px solid var(--accent);
    border-radius: 14px;
    color: var(--dark);
    font-weight: 600;
}

.blog-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 22px 0;
    font-size: 14px;
}

.blog-article-content th,
.blog-article-content td {
    border: 1px solid var(--gray-100);
    padding: 11px 14px;
    text-align: start;
}

.blog-article-content th {
    background: var(--section-bg);
    font-weight: 700;
    color: var(--secondary);
}

/* ---------- Article chips / footer actions ---------- */
.blog-article-chip {
    background: var(--section-bg);
    color: var(--secondary);
    border: 1px solid var(--gray-100);
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.blog-article-chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px -10px color-mix(in srgb, var(--primary) 60%, transparent);
}

/* ---------- Sidebar ---------- */
.blog-article-toc__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.blog-article-toc__list--sub,
.blog-article-toc__sublist {
    margin-inline-start: 12px;
    margin-top: 2px;
    border-inline-start: 1px solid var(--gray-200);
    padding-inline-start: 10px;
}

.blog-article-toc__item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-500);
    text-decoration: none;
    transition: all 0.18s ease;
    border-inline-start: 3px solid transparent;
    line-height: 1.5;
}

.blog-article-toc__item--sub a {
    font-size: 12px;
    padding-inline-start: 8px;
}

.blog-article-toc__item a:hover {
    color: var(--dark);
    background: var(--section-bg);
}

.blog-article-toc__item.active a {
    color: var(--primary);
    background: var(--section-bg);
    border-inline-start-color: var(--primary);
    font-weight: 700;
}

.blog-article-toc__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray-300);
    flex: 0 0 6px;
    transition: background 0.18s ease;
}

.blog-article-toc__item--sub .blog-article-toc__dot {
    width: 4px;
    height: 4px;
    flex-basis: 4px;
}

.blog-article-toc__item a:hover .blog-article-toc__dot,
.blog-article-toc__item.active .blog-article-toc__dot {
    background: var(--primary);
}

.blog-article-toc__empty {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.7;
}

/* CTA */
.blog-article-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

.blog-article-cta::after {
    content: '';
    position: absolute;
    top: -46px;
    inset-inline-end: -46px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.blog-article-cta::before {
    content: '';
    position: absolute;
    bottom: -60px;
    inset-inline-start: -40px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.blog-article-cta__icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    position: relative;
    z-index: 1;
}

.blog-article-cta h3 {
    color: #fff;
    position: relative;
    z-index: 1;
    margin: 16px 0 0;
}

.blog-article-cta p {
    color: rgba(255, 255, 255, 0.78);
    position: relative;
    z-index: 1;
    line-height: 1.7;
    margin: 8px 0 0;
}

.blog-article-cta__btn {
    background: var(--accent);
    color: var(--secondary);
    padding: 11px 18px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.blog-article-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5);
    color: var(--secondary);
    text-decoration: none;
}

/* Mini posts */
.blog-article-mini-post {
    border-bottom: 1px dashed var(--gray-100);
    text-decoration: none;
    transition: all 0.18s ease;
}

.blog-article-mini-post:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.blog-article-mini-post:hover {
    background: var(--section-bg);
    border-radius: 12px;
}

.blog-article-mini-post__img {
    width: 58px;
    height: 46px;
    background: var(--gray-100);
}

.blog-article-mini-post__title {
    transition: color 0.18s ease;
}

.blog-article-mini-post:hover .blog-article-mini-post__title {
    color: var(--primary);
}

/* ---------- Author card ---------- */
.post-author-info-card {
    position: relative;
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: 22px;
    box-shadow: 0 18px 40px -32px rgba(2, 20, 45, 0.4);
    overflow: hidden;
}

.post-author-info-card__mask {
    display: none;
}

.post-author-info-card__details {
    width: 100%;
    padding: 24px !important;
}

.post-author-info-card__secondary-img {
    display: none;
}

.post-author-info-card .size-80 {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 4px;
}

.post-author-info-card__details-about {
    height: auto !important;
    overflow: visible !important;
    background: var(--section-bg);
    border-inline-start: 3px solid var(--accent);
    border-radius: 14px;
    padding: 14px 18px;
    color: var(--gray-500);
    margin: 20px 0 !important;
    line-height: 1.8;
}

/* ---------- Suggested posts ---------- */
.suggested-posts-slider {
    margin-top: 48px;
}

.suggested-posts-slider + div {
    margin-top: 8px;
}

/* ---------- Comments ---------- */
.card-before-line {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: 22px;
    box-shadow: 0 18px 40px -32px rgba(2, 20, 45, 0.4);
}

.card-before-line > h4 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--gray-100);
}

/* ---------- Fixed bottom ---------- */
.post-bottom-fixed-card {
    position: fixed;
    bottom: -150%;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-100);
    padding: 16px 0;
    box-shadow: 0 -10px 30px -20px rgba(2, 20, 45, 0.4);
    transition: all 0.5s ease;
    z-index: 50;
}

.post-bottom-fixed-card.show {
    bottom: 0;
}

.post-bottom-fixed-card__post-img {
    width: 68px;
    height: 48px;
}

.post-bottom-fixed-card__progress {
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 3px;
    background-color: transparent;
    z-index: 55;
}

.post-bottom-fixed-card__progress .progress-line {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .blog-article-hero {
        padding: 32px 0 44px;
    }

    .blog-article-hero__meta {
        gap: 14px;
    }

    .blog-article-hero__sep {
        display: none;
    }

    .blog-article-share {
        margin-inline-start: 0;
    }

    .blog-article-cover {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 575px) {
    .blog-article-hero__title {
        font-size: 22px;
    }

    .blog-article-content {
        font-size: 14px;
    }

    .blog-article-content h2 {
        font-size: 19px;
    }

    .post-author-info-card__details {
        padding: 18px !important;
    }
}