/* =========================================================
   PUBLIC BLOG / ARTICLE PAGES
   Scoped styles: archive, article categories and article reading
   ========================================================= */

.article-page {
    --blog-primary: var(--color-primary, #223c78);
    --blog-primary-dark: var(--color-primary-full, #172a55);
    --blog-primary-soft: var(--color-primary-light, #edf2fb);
    --blog-text: var(--color-text-main, #202b3c);
    --blog-muted: var(--color-text-light, #707b90);
    --blog-border: var(--color-border, #e5eaf2);
    --blog-surface: #fff;
    --blog-canvas: #f6f8fc;
    --blog-radius: 22px;
    color: var(--blog-text);
    padding: 1.4rem 0 4.5rem;
}

.article-page *,
.article-page *::before,
.article-page *::after {
    box-sizing: border-box;
}

.article-page .container {
    max-width: 1240px;
}

.article-page a {
    transition: color .2s ease, border-color .2s ease, background-color .2s ease,
        box-shadow .2s ease, transform .2s ease;
}

.article-breadcrumb {
    display: flex;
    justify-content: flex-start;
    margin: .25rem 0 1.35rem;
}

.article-breadcrumb .breadcrumb-box {
    display: inline-block;
    padding: .6rem .9rem !important;
    border: 1px solid var(--blog-border);
    border-radius: 999px !important;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 4px 14px rgba(23, 42, 85, .035);
}

.article-breadcrumb .breadcrumb {
    align-items: center;
    gap: .1rem .2rem;
    font-size: .78rem;
}

.article-breadcrumb .breadcrumb-item,
.article-breadcrumb .breadcrumb-item.active {
    color: var(--blog-muted);
}

.article-breadcrumb .breadcrumb-item a {
    color: var(--blog-primary);
    font-weight: 650;
    text-decoration: none;
}

.article-breadcrumb .breadcrumb-item a:hover {
    color: var(--blog-primary-dark);
}

.article-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: #aab4c5;
}

.article-hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, .7fr);
    align-items: center;
    gap: 2rem;
    min-height: 245px;
    margin-bottom: 2.8rem;
    padding: clamp(1.6rem, 4vw, 3.2rem);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 28px;
    background:
        radial-gradient(circle at 84% 20%, rgba(126, 155, 218, .2), transparent 22%),
        linear-gradient(125deg, #f8faff 0%, #eef3fc 58%, #e6edfa 100%);
    box-shadow: 0 16px 42px rgba(23, 42, 85, .065);
}

.article-hero::before {
    content: "";
    position: absolute;
    top: -110px;
    left: -45px;
    width: 280px;
    height: 280px;
    border: 1px solid rgba(34, 60, 120, .09);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(34, 60, 120, .025), 0 0 0 58px rgba(34, 60, 120, .018);
    z-index: -1;
}

.article-hero-copy {
    position: relative;
    z-index: 1;
}

.article-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .8rem;
    color: var(--blog-primary);
    font-size: .8rem;
    font-weight: 800;
}

.article-eyebrow-mark {
    display: inline-grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 10px;
    color: #fff;
    background: var(--blog-primary);
    box-shadow: 0 5px 12px rgba(34,60,120,.18);
}

.article-hero h1 {
    max-width: 760px;
    margin: 0;
    color: var(--blog-primary-dark);
    font-size: clamp(1.65rem, 3.1vw, 2.55rem);
    font-weight: 850;
    line-height: 1.5;
    letter-spacing: -.035em;
}

.article-hero p {
    max-width: 700px;
    margin: .8rem 0 0;
    color: #68758d;
    font-size: .94rem;
    line-height: 2.1;
}

.article-hero-art {
    position: relative;
    min-height: 165px;
    display: grid;
    place-items: center;
    color: var(--blog-primary);
}

.article-hero-art::before,
.article-hero-art::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(34,60,120,.16);
    border-radius: 50%;
    transform: rotate(-25deg);
}

.article-hero-art::before {
    width: 210px;
    height: 132px;
}

.article-hero-art::after {
    width: 158px;
    height: 184px;
}

.article-hero-art-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border: 1px solid rgba(255,255,255,.8);
    border-radius: 30px;
    color: #fff;
    background: linear-gradient(145deg, var(--blog-primary), #3c5ca1);
    box-shadow: 0 18px 35px rgba(34,60,120,.22);
    font-size: 3.2rem;
    transform: rotate(-7deg);
}

.article-list-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.15rem;
}

.article-list-heading h2 {
    margin: 0;
    color: var(--blog-text);
    font-size: 1.28rem;
    font-weight: 850;
}

.article-list-heading p {
    margin: .35rem 0 0;
    color: var(--blog-muted);
    font-size: .83rem;
    line-height: 1.9;
}

.article-count {
    flex: 0 0 auto;
    padding: .4rem .7rem;
    border: 1px solid var(--blog-border);
    border-radius: 999px;
    color: #65728a;
    background: #fff;
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

.article-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.15rem;
}

.article-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--blog-border);
    border-radius: 20px;
    background: var(--blog-surface);
    box-shadow: 0 5px 20px rgba(27, 44, 82, .035);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.article-card:hover {
    border-color: #c9d5ee;
    box-shadow: 0 16px 34px rgba(27, 44, 82, .1);
    transform: translateY(-4px);
}

.article-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(145deg, #edf2fb, #e2e9f7);
}

.article-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
}

.article-card:hover .article-card-media img {
    transform: scale(1.045);
}

.article-card-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #8b9dc4;
    font-size: 2.6rem;
    background:
        radial-gradient(circle at 22% 25%, rgba(255,255,255,.8), transparent 34%),
        linear-gradient(145deg, #eef3fc, #dfe8f8);
}

.article-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    padding: 1.15rem 1.15rem 1.05rem;
}

.article-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    margin-bottom: .7rem;
    color: #8390a5;
    font-size: .76rem;
}

.article-card-meta i {
    color: #6d82b5;
    font-size: .82rem;
}

.article-card h2 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--blog-text);
    font-size: 1.03rem;
    font-weight: 800;
    line-height: 1.9;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.article-card-title-link {
    color: inherit;
    text-decoration: none;
}

.article-card-title-link:hover {
    color: var(--blog-primary);
}

.article-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .8rem;
    margin-top: auto;
    padding-top: 1rem;
}

.article-read-more {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--blog-primary);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

.article-read-more i {
    transition: transform .2s ease;
}

.article-card:hover .article-read-more i {
    transform: translateX(-3px);
}

.article-empty-state {
    padding: 3rem 1.25rem;
    border: 1px dashed #cbd5e7;
    border-radius: 20px;
    text-align: center;
    background: #fff;
}

.article-empty-state-icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    color: var(--blog-primary);
    background: var(--blog-primary-soft);
    font-size: 1.5rem;
}

.article-empty-state h2 {
    margin: 0 0 .55rem;
    color: var(--blog-text);
    font-size: 1.1rem;
    font-weight: 800;
}

.article-empty-state p {
    margin: 0;
    color: var(--blog-muted);
    font-size: .87rem;
}

.article-pagination {
    margin-top: 2.3rem;
}

.article-pagination .pagination {
    gap: .35rem;
    flex-wrap: wrap;
}

.article-pagination .page-link {
    display: grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    padding: .55rem .85rem;
    border: 1px solid var(--blog-border);
    border-radius: 11px !important;
    color: var(--blog-primary);
    background: #fff;
    font-size: .83rem;
    font-weight: 700;
    box-shadow: none;
}

.article-pagination .page-link:hover {
    border-color: #c2d0ed;
    background: var(--blog-primary-soft);
}

.article-pagination .page-item.active .page-link {
    border-color: var(--blog-primary);
    color: #fff;
    background: var(--blog-primary);
    box-shadow: 0 5px 12px rgba(34,60,120,.17);
}

.article-pagination .page-item.disabled .page-link {
    color: #b2bac8;
    background: #f9fafc;
}

.article-detail-page {
    padding-top: 1.1rem;
}

.article-detail-header {
    max-width: 960px;
    margin: 0 auto 1.7rem;
    padding: clamp(.5rem, 2.5vw, 1.5rem) 0 0;
}

.article-detail-category {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .85rem;
    padding: .42rem .75rem;
    border: 1px solid #dfe7f7;
    border-radius: 999px;
    color: var(--blog-primary);
    background: #f3f6fd;
    font-size: .78rem;
    font-weight: 750;
}

.article-detail-header h1 {
    margin: 0;
    color: var(--blog-primary-dark);
    font-size: clamp(1.7rem, 3.4vw, 2.7rem);
    font-weight: 850;
    line-height: 1.65;
    letter-spacing: -.035em;
}

.article-detail-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    margin-top: 1.1rem;
    color: var(--blog-muted);
    font-size: .82rem;
}

.article-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: .42rem;
}

.article-detail-meta i {
    color: #7186b6;
    font-size: .95rem;
}

.article-cover-wrap {
    max-width: 1040px;
    margin: 0 auto 2.4rem;
    padding: .55rem;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 25px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(23,42,85,.1);
}

.article-cover-image {
    display: block;
    width: 100%;
    max-height: 580px;
    aspect-ratio: 16 / 8.5;
    border-radius: 19px;
    object-fit: cover;
    background: #eef2fa;
}

.article-reading-layout {
    max-width: 900px;
    margin: 0 auto;
}

.article-reading-card {
    padding: clamp(1.1rem, 4vw, 3rem);
    border: 1px solid var(--blog-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 36px rgba(27,44,82,.045);
}

.article-reading-label {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.55rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #edf0f6;
    color: var(--blog-primary);
    font-size: .84rem;
    font-weight: 800;
}

.article-reading-label::before {
    content: "";
    width: 4px;
    height: 21px;
    border-radius: 3px;
    background: var(--blog-primary);
}

.article-detail-page .article-content {
    color: #374256;
    font-size: 1.03rem;
    line-height: 2.35;
    overflow-wrap: anywhere;
    word-break: normal;
}

.article-detail-page .article-content > :first-child {
    margin-top: 0;
}

.article-detail-page .article-content h2 {
    position: relative;
    margin: 2.6rem 0 1rem;
    padding-right: 1rem;
    color: var(--blog-primary-dark);
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.7;
    font-weight: 850;
}

.article-detail-page .article-content h2::before {
    content: "";
    position: absolute;
    top: .25rem;
    right: 0;
    bottom: .25rem;
    width: 4px;
    border-radius: 4px;
    background: var(--blog-primary);
}

.article-detail-page .article-content h3 {
    margin: 2rem 0 .8rem;
    color: #263a66;
    font-size: 1.18rem;
    line-height: 1.8;
    font-weight: 800;
}

.article-detail-page .article-content h4 {
    margin: 1.6rem 0 .65rem;
    color: #334363;
    font-size: 1.05rem;
    font-weight: 800;
}

.article-detail-page .article-content p {
    margin: 0 0 1.25rem;
}

.article-detail-page .article-content ul,
.article-detail-page .article-content ol {
    margin: 1rem 0 1.6rem;
    padding-right: 1.45rem;
}

.article-detail-page .article-content li {
    padding-right: .2rem;
    margin-bottom: .5rem;
}

.article-detail-page .article-content li::marker {
    color: var(--blog-primary);
}

.article-detail-page .article-content a {
    color: var(--blog-primary);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.article-detail-page .article-content a:hover {
    color: var(--blog-primary-dark);
}

.article-detail-page .article-content blockquote {
    margin: 1.8rem 0;
    padding: 1.1rem 1.25rem;
    border-right: 4px solid var(--blog-primary);
    border-radius: 0 13px 13px 0;
    color: #40516e;
    background: #f4f7fd;
}

.article-detail-page .article-content blockquote > :last-child {
    margin-bottom: 0;
}

.article-detail-page .article-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.75rem auto;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(23,42,85,.07);
}

.article-detail-page .article-content figure {
    max-width: 100%;
    margin: 1.8rem 0;
}

.article-detail-page .article-content figcaption {
    padding-top: .6rem;
    color: var(--blog-muted);
    font-size: .82rem;
    line-height: 1.8;
    text-align: center;
}

.article-detail-page .article-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border: 1px solid var(--blog-border);
    font-size: .9rem;
}

.article-detail-page .article-content th,
.article-detail-page .article-content td {
    min-width: 100px;
    padding: .75rem .85rem;
    border: 1px solid var(--blog-border);
    text-align: right;
}

.article-detail-page .article-content th {
    color: var(--blog-primary-dark);
    background: #f1f5fc;
    font-weight: 800;
}

.article-detail-page .article-content tr:nth-child(even) td {
    background: #fafbfd;
}

.article-detail-page .article-content hr {
    margin: 2rem 0;
    border-color: var(--blog-border);
    opacity: 1;
}

.article-detail-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.3rem;
    padding: 1.2rem clamp(1.1rem, 4vw, 2rem);
    border: 1px solid var(--blog-border);
    border-radius: 17px;
    background: #f9faff;
}

.article-detail-footer p {
    margin: 0;
    color: var(--blog-muted);
    font-size: .84rem;
    line-height: 1.9;
}

.article-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    flex: 0 0 auto;
    min-height: 42px;
    padding: .55rem .85rem;
    border: 1px solid #cdd8ef;
    border-radius: 11px;
    color: var(--blog-primary);
    background: #fff;
    text-decoration: none;
    font-size: .83rem;
    font-weight: 800;
}

.article-back-link:hover {
    color: #fff;
    background: var(--blog-primary);
    border-color: var(--blog-primary);
}

@media (max-width: 991.98px) {
    .article-hero {
        grid-template-columns: minmax(0, 1fr) 190px;
        gap: 1rem;
    }

    .article-hero-art::before { width: 165px; }
    .article-hero-art::after { width: 130px; }

    .article-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .article-page {
        padding: .7rem 0 3.25rem;
    }

    .article-breadcrumb {
        margin-bottom: 1rem;
    }

    .article-breadcrumb .breadcrumb-box {
        border-radius: 13px !important;
        padding: .55rem .75rem !important;
    }

    .article-hero {
        display: block;
        min-height: auto;
        padding: 1.45rem;
        margin-bottom: 2rem;
        border-radius: 21px;
    }

    .article-hero h1 {
        font-size: 1.65rem;
    }

    .article-hero p {
        font-size: .88rem;
    }

    .article-hero-art {
        display: none;
    }

    .article-list-heading {
        align-items: flex-start;
    }

    .article-list-heading h2 {
        font-size: 1.1rem;
    }

    .article-count {
        font-size: .72rem;
        padding: .35rem .55rem;
    }

    .article-card-grid {
        gap: .8rem;
    }

    .article-card {
        border-radius: 15px;
    }

    .article-card-body {
        padding: .9rem;
    }

    .article-card h2 {
        font-size: .9rem;
        line-height: 1.8;
        -webkit-line-clamp: 3;
    }

    .article-card-meta {
        gap: .35rem;
        font-size: .7rem;
    }

    .article-card-footer {
        padding-top: .7rem;
    }

    .article-read-more {
        font-size: .75rem;
    }

    .article-detail-header {
        margin-bottom: 1.3rem;
    }

    .article-detail-header h1 {
        font-size: 1.65rem;
        line-height: 1.65;
    }

    .article-cover-wrap {
        margin-bottom: 1.5rem;
        padding: .3rem;
        border-radius: 17px;
    }

    .article-cover-image {
        aspect-ratio: 4 / 3;
        border-radius: 13px;
    }

    .article-reading-card {
        padding: 1.1rem;
        border-radius: 17px;
    }

    .article-detail-page .article-content {
        font-size: .96rem;
        line-height: 2.2;
    }

    .article-detail-page .article-content h2 {
        margin-top: 2rem;
    }

    .article-detail-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 479.98px) {
    .article-card-grid {
        grid-template-columns: 1fr;
    }

    .article-card-media {
        aspect-ratio: 16 / 9;
    }

    .article-card-body {
        padding: 1rem 1rem .95rem;
    }

    .article-card h2 {
        font-size: .98rem;
        -webkit-line-clamp: 3;
    }

    .article-card-meta {
        font-size: .75rem;
    }

    .article-count {
        display: none;
    }

    .article-detail-meta {
        font-size: .76rem;
    }

    .article-pagination .page-link {
        min-width: 37px;
        min-height: 37px;
        padding: .4rem .65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .article-page *,
    .article-page *::before,
    .article-page *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}


/* Preserve icon glyph sizing despite the site's global icon line-height rule. */
.article-page .bi {
    line-height: 1;
    vertical-align: -.08em;
}


/* Article sidebar and moderated comments */
.article-detail-page .article-detail-header {
    margin-bottom: 1.7rem;
}

.article-detail-page .article-detail-category {
    text-decoration: none;
}

.article-detail-page .article-detail-category:hover {
    border-color: #c6d4ef;
    background: #eaf0fc;
}

.article-meta-comments {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--blog-primary);
    text-decoration: none;
    font-weight: 750;
}

.article-meta-comments:hover {
    color: var(--blog-primary-dark);
}

.article-detail-columns {
    margin-top: .2rem;
}

.article-main-column {
    min-width: 0;
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 1.5rem;
}

.article-sidebar-card {
    padding: 1.25rem;
    border: 1px solid var(--blog-border);
    border-radius: 19px;
    background: #fff;
    box-shadow: 0 7px 25px rgba(27, 44, 82, .045);
}

.article-sidebar-heading {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #edf0f6;
}

.article-sidebar-heading-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 13px;
    color: #fff;
    background: var(--blog-primary);
    box-shadow: 0 5px 13px rgba(34,60,120,.15);
    font-size: 1.15rem;
}

.article-sidebar-heading-icon-soft {
    color: var(--blog-primary);
    background: var(--blog-primary-soft);
    box-shadow: none;
}

.article-sidebar-heading h2 {
    margin: 0 0 .2rem;
    color: var(--blog-text);
    font-size: .98rem;
    font-weight: 850;
}

.article-sidebar-heading p {
    margin: 0;
    color: var(--blog-muted);
    font-size: .75rem;
    line-height: 1.7;
}

.article-sidebar-link-list {
    display: flex;
    flex-direction: column;
}

.article-sidebar-article-link {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .95rem 0;
    color: var(--blog-text);
    text-decoration: none;
    border-bottom: 1px solid #eff2f7;
}

.article-sidebar-article-link:last-child {
    border-bottom: 0;
}

.article-sidebar-article-link img,
.article-sidebar-thumb-placeholder {
    display: grid;
    place-items: center;
    width: 74px;
    height: 65px;
    flex: 0 0 74px;
    overflow: hidden;
    border-radius: 11px;
    object-fit: cover;
    color: #7c91be;
    background: #edf2fb;
    font-size: 1.25rem;
}

.article-sidebar-article-link strong {
    display: -webkit-box;
    overflow: hidden;
    color: #334057;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.8;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.article-sidebar-article-link:hover strong {
    color: var(--blog-primary);
}

.article-sidebar-article-copy {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    min-width: 0;
}

.article-sidebar-article-copy small {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--blog-muted);
    font-size: .72rem;
}

.article-sidebar-article-copy small i {
    color: var(--blog-primary);
}

.article-sidebar-all-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: .2rem;
    padding: .75rem .85rem;
    border-radius: 10px;
    color: var(--blog-primary);
    background: var(--blog-primary-soft);
    text-decoration: none;
    font-size: .8rem;
    font-weight: 800;
}

.article-sidebar-all-link:hover {
    color: #fff;
    background: var(--blog-primary);
}

.article-sidebar-categories {
    display: flex;
    flex-direction: column;
    margin-top: .5rem;
}

.article-sidebar-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .7rem .15rem;
    border-bottom: 1px solid #eff2f7;
    color: #536078;
    font-size: .82rem;
    font-weight: 650;
    text-decoration: none;
}

.article-sidebar-categories a:last-child {
    border-bottom: 0;
}

.article-sidebar-categories a > span {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}

.article-sidebar-categories a > span i {
    color: #8798bb;
}

.article-sidebar-categories a > i {
    color: #a0aabe;
    font-size: .72rem;
}

.article-sidebar-categories a:hover,
.article-sidebar-categories a.active {
    color: var(--blog-primary);
}

.article-sidebar-categories a.active {
    font-weight: 850;
}

.article-sidebar-categories a.active > span i {
    color: var(--blog-primary);
}

.article-sidebar-empty {
    margin: 1rem 0 0;
    color: var(--blog-muted);
    font-size: .82rem;
    line-height: 1.9;
}

.article-sidebar-help {
    padding: 1.25rem;
    border: 1px solid #dce6f8;
    border-radius: 19px;
    background:
        radial-gradient(circle at 100% 0, rgba(111, 146, 211, .12), transparent 45%),
        #f4f7fd;
}

.article-sidebar-help > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: .85rem;
    border-radius: 13px;
    color: #fff;
    background: var(--blog-primary);
    font-size: 1.15rem;
}

.article-sidebar-help h2 {
    margin: 0 0 .55rem;
    color: var(--blog-primary-dark);
    font-size: .98rem;
    font-weight: 850;
    line-height: 1.8;
}

.article-sidebar-help p {
    margin: 0 0 .95rem;
    color: #66748e;
    font-size: .8rem;
    line-height: 2;
}

.article-sidebar-help a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--blog-primary);
    text-decoration: none;
    font-size: .82rem;
    font-weight: 850;
}

.article-sidebar-help a:hover {
    color: var(--blog-primary-dark);
    gap: .7rem;
}

.article-comments-panel {
    margin-top: 1.5rem;
    padding: clamp(1.05rem, 2.5vw, 1.8rem);
    border: 1px solid var(--blog-border);
    border-radius: 23px;
    background: #fff;
    box-shadow: 0 10px 34px rgba(27, 44, 82, .045);
    scroll-margin-top: 2rem;
}

.article-comments-heading {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1.15rem;
}

.article-comments-heading-icon {
    display: grid;
    place-items: center;
    width: 47px;
    height: 47px;
    flex: 0 0 47px;
    border-radius: 15px;
    color: var(--blog-primary);
    background: var(--blog-primary-soft);
    font-size: 1.25rem;
}

.article-comments-heading h2 {
    margin: 0 0 .3rem;
    color: var(--blog-text);
    font-size: 1.15rem;
    font-weight: 850;
}

.article-comments-heading p {
    margin: 0;
    color: var(--blog-muted);
    font-size: .8rem;
    line-height: 1.8;
}

.article-comments-count {
    margin-inline-start: auto;
    padding: .35rem .6rem;
    border: 1px solid var(--blog-border);
    border-radius: 999px;
    color: var(--blog-muted);
    background: #fff;
    font-size: .73rem;
    font-weight: 750;
    white-space: nowrap;
}

.article-comment-alert {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin: 1rem 0;
    padding: .85rem 1rem;
    border-radius: 12px;
    font-size: .85rem;
    line-height: 1.9;
}

.article-comment-alert i {
    margin-top: .25rem;
    font-size: 1rem;
}

.article-comment-alert-success {
    border: 1px solid #ccebdd;
    color: #176b4c;
    background: #f0fbf6;
}

.article-comment-alert-error {
    border: 1px solid #f3d4d5;
    color: #9e343d;
    background: #fff5f5;
}

.article-comments-list {
    display: flex;
    flex-direction: column;
}

.article-comment-item {
    display: flex;
    align-items: flex-start;
    gap: .8rem;
    padding: 1.05rem 0;
    border-bottom: 1px solid #edf0f6;
}

.article-comment-avatar {
    display: grid;
    place-items: center;
    width: 41px;
    height: 41px;
    flex: 0 0 41px;
    border: 1px solid #dce5f7;
    border-radius: 13px;
    color: var(--blog-primary);
    background: #f0f4fc;
    font-size: .95rem;
    font-weight: 850;
}

.article-comment-content {
    flex: 1 1 auto;
    min-width: 0;
}

.article-comment-author-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem;
}

.article-comment-author-row strong {
    color: #344258;
    font-size: .85rem;
    font-weight: 850;
}

.article-comment-approved {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .45rem;
    border-radius: 6px;
    color: #27815c;
    background: #edf9f3;
    font-size: .67rem;
    font-weight: 750;
}

.article-comment-content p {
    margin: .55rem 0 0;
    color: #566278;
    font-size: .88rem;
    line-height: 2.05;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.article-comments-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    border: 1px dashed #d5deec;
    border-radius: 15px;
    text-align: center;
    background: #fafcff;
}

.article-comments-empty-icon {
    display: grid;
    place-items: center;
    width: 47px;
    height: 47px;
    margin-bottom: .65rem;
    border-radius: 14px;
    color: #7188b8;
    background: #edf2fb;
    font-size: 1.35rem;
}

.article-comments-empty strong {
    color: #3e4b61;
    font-size: .89rem;
    font-weight: 850;
}

.article-comments-empty p {
    margin: .35rem 0 0;
    color: var(--blog-muted);
    font-size: .78rem;
}

.article-comment-form-wrap {
    margin-top: 1.5rem;
    padding: clamp(1rem, 2.5vw, 1.4rem);
    border: 1px solid #e7ecf5;
    border-radius: 17px;
    background: #f9fbff;
}

.article-comment-form-heading {
    margin-bottom: 1.1rem;
}

.article-comment-form-heading h3 {
    margin: 0 0 .35rem;
    color: var(--blog-text);
    font-size: 1rem;
    font-weight: 850;
}

.article-comment-form-heading p {
    margin: 0;
    color: var(--blog-muted);
    font-size: .8rem;
    line-height: 1.8;
}

.article-comment-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.article-comment-field {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    min-width: 0;
}

.article-comment-field-full {
    grid-column: 1 / -1;
}

.article-comment-field label,
.article-comment-trap label {
    color: #46536a;
    font-size: .82rem;
    font-weight: 800;
}

.article-comment-field label span {
    color: #c14e5b;
}

.article-comment-field label small {
    color: var(--blog-muted);
    font-size: .72rem;
    font-weight: 550;
}

.article-comment-field input,
.article-comment-field textarea {
    width: 100%;
    min-height: 45px;
    padding: .75rem .85rem;
    border: 1px solid #dfe5ef;
    border-radius: 11px;
    outline: none;
    color: var(--blog-text);
    background: #fff;
    font: inherit;
    font-size: .86rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.article-comment-field textarea {
    min-height: 135px;
    resize: vertical;
    line-height: 1.9;
}

.article-comment-field input::placeholder,
.article-comment-field textarea::placeholder {
    color: #a0aabc;
}

.article-comment-field input:focus,
.article-comment-field textarea:focus {
    border-color: #91a7dc;
    box-shadow: 0 0 0 .2rem rgba(34, 60, 120, .09);
}

.article-comment-field-hint {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .8rem;
    color: #939db0;
    font-size: .71rem;
}

.article-field-error,
.article-validation-summary {
    color: #b33e4b;
    font-size: .76rem;
    line-height: 1.8;
}

.article-validation-summary:empty {
    display: none;
}

.article-validation-summary ul {
    margin: 0 0 .9rem;
    padding: .75rem 1rem .75rem 1.5rem;
    border: 1px solid #f0d4d6;
    border-radius: 10px;
    background: #fff5f5;
}

.article-comment-trap {
    position: absolute !important;
    right: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.article-comment-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.article-comment-submit-row p {
    display: flex;
    align-items: flex-start;
    gap: .4rem;
    margin: 0;
    color: var(--blog-muted);
    font-size: .73rem;
    line-height: 1.8;
}

.article-comment-submit-row p i {
    margin-top: .2rem;
    color: #3a9673;
    font-size: .9rem;
}

.article-comment-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 44px;
    flex: 0 0 auto;
    padding: .65rem 1rem;
    border: 1px solid var(--blog-primary);
    border-radius: 11px;
    color: #fff;
    background: var(--blog-primary);
    font: inherit;
    font-size: .84rem;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.article-comment-submit:hover {
    border-color: var(--blog-primary-dark);
    background: var(--blog-primary-dark);
    box-shadow: 0 7px 16px rgba(34,60,120,.17);
    transform: translateY(-1px);
}

@media (max-width: 991.98px) {
    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        margin-top: 1.1rem;
    }

    .article-sidebar-help {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767.98px) {
    .article-sidebar {
        grid-template-columns: 1fr;
        gap: .8rem;
    }

    .article-sidebar-help {
        grid-column: auto;
    }

    .article-comments-panel {
        padding: 1rem;
        border-radius: 18px;
    }

    .article-comments-heading {
        align-items: flex-start;
        gap: .65rem;
    }

    .article-comments-heading-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 12px;
        font-size: 1.05rem;
    }

    .article-comments-heading h2 {
        font-size: 1.02rem;
    }

    .article-comments-heading p {
        font-size: .75rem;
    }

    .article-comments-count {
        display: none;
    }

    .article-comment-form-wrap {
        padding: .9rem;
    }

    .article-comment-submit-row {
        align-items: stretch;
        flex-direction: column;
    }

    .article-comment-submit {
        width: 100%;
    }
}

@media (max-width: 479.98px) {
    .article-comment-form-grid {
        grid-template-columns: 1fr;
    }

    .article-comment-field-full {
        grid-column: auto;
    }

    .article-comment-item {
        gap: .65rem;
    }

    .article-comment-avatar {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
        border-radius: 11px;
    }

    .article-sidebar-card,
    .article-sidebar-help {
        padding: 1rem;
    }
}


.article-sidebar-related {
    border-top: 3px solid var(--blog-primary);
}


/* AJAX feedback and submit state for article comments */
.article-comment-feedback {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin: 0 0 1rem;
    padding: .9rem 1rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: .84rem;
    line-height: 1.9;
}

.article-comment-feedback[hidden] {
    display: none !important;
}

.article-comment-feedback > i {
    flex: 0 0 auto;
    margin-top: .28rem;
    font-size: 1rem;
}

.article-comment-feedback-success {
    border-color: #ccebdd;
    color: #176b4c;
    background: #f0fbf6;
}

.article-comment-feedback-error {
    border-color: #f3d4d5;
    color: #9e343d;
    background: #fff5f5;
}

.article-comment-submit-label {
    display: inline;
}

.article-comment-spinner {
    display: none;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255,255,255,.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: article-comment-spin .7s linear infinite;
}

.article-comment-submit.is-loading .article-comment-spinner {
    display: inline-block;
}

.article-comment-submit.is-loading .article-comment-submit-icon {
    display: none;
}

.article-comment-submit:disabled {
    opacity: .78;
    cursor: wait;
    transform: none;
    box-shadow: none;
}

.article-comment-submit:focus-visible {
    outline: 3px solid rgba(34, 60, 120, .25);
    outline-offset: 3px;
}

@keyframes article-comment-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .article-comment-spinner {
        animation-duration: 1.5s;
    }
}


/* Keep article archive/category/detail breadcrumb paths swipeable on mobile. */
@media (max-width: 767.98px) {
    .article-breadcrumb {
        width: 100%;
        min-width: 0;
    }

    .article-breadcrumb .breadcrumb-box {
        display: block;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
        border-radius: 13px !important;
    }

    .article-breadcrumb .breadcrumb-swiper {
        width: 100%;
        max-width: 100%;
    }

    .article-breadcrumb .breadcrumb {
        flex-wrap: nowrap !important;
        gap: 0;
        white-space: nowrap;
    }

    .article-breadcrumb .breadcrumb-item {
        flex: 0 0 auto;
        white-space: nowrap;
    }
}
