/*
 * Mẫu bài viết tạp chí TAHUBA.
 * Mọi selector đều nằm trong .tahuba-article để không ảnh hưởng giao diện chung.
 */
.content-layout.tahuba-content-layout-wide {
    grid-template-columns: minmax(0, 1fr);
}

.tahuba-content-layout-wide .article-related-sidebar {
    position: static;
}

.tahuba-content-layout-wide .sidebar-article-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tahuba-article {
    --tb-bg: #ffffff;
    --tb-surface: #f7f9fc;
    --tb-surface-soft: #edf4f8;
    --tb-border: rgba(7, 63, 104, 0.15);
    --tb-text: #17384f;
    --tb-muted: #526777;
    --tb-blue: #0877b5;
    --tb-gold: #b58948;

    width: 100%;
    margin: 24px auto 0;
    padding: 32px;
    overflow: hidden;
    border: 1px solid var(--tb-border);
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(8, 119, 181, 0.08), transparent 32rem),
        var(--tb-bg);
    color: var(--tb-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.75;
    text-align: left;
}

.tahuba-article,
.tahuba-article *,
.tahuba-article *::before,
.tahuba-article *::after {
    box-sizing: border-box;
}

.tahuba-article p {
    margin: 0 0 14px;
    color: var(--tb-muted);
    line-height: 1.75;
    text-align: left;
}

.tahuba-article strong {
    color: var(--tb-text);
}

.tahuba-article .tb-intro {
    max-width: 720px;
    margin: 0 auto 34px;
    font-size: 1.08rem;
    text-align: center;
}

.tahuba-article .tb-intro p {
    color: #344f62;
    text-align: center;
}

.tahuba-article .tb-hero-media,
.tahuba-article .tb-section-media,
.tahuba-article .tb-wide-media {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--tb-border);
    border-radius: 16px;
    background: var(--tb-surface);
}

.tahuba-article .tb-hero-media {
    margin-bottom: 34px;
}

.tahuba-article .tb-wide-media {
    margin: 42px 0;
}

.tahuba-article .tb-hero-media img,
.tahuba-article .tb-section-media img,
.tahuba-article .tb-wide-media img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    border: 0;
    border-radius: 0;
    object-fit: cover;
}

.tahuba-article .tb-hero-media img {
    aspect-ratio: 16 / 9;
}

.tahuba-article .tb-section-media img {
    aspect-ratio: 4 / 3;
}

.tahuba-article .tb-wide-media img {
    aspect-ratio: 3 / 2;
}

.tahuba-article .tb-image-slot {
    display: flex;
    min-height: 260px;
    padding: 28px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    background:
        linear-gradient(135deg, rgba(8, 119, 181, 0.08), rgba(181, 137, 72, 0.08)),
        var(--tb-surface);
    color: var(--tb-muted);
    text-align: center;
}

.tahuba-article .tb-hero-media .tb-image-slot {
    min-height: 360px;
}

.tahuba-article .tb-image-slot strong {
    color: var(--tb-blue);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tahuba-article .tb-image-slot span {
    max-width: 520px;
}

.tahuba-article figcaption {
    padding: 11px 16px 13px;
    border-top: 1px solid var(--tb-border);
    background: #f4f7fa;
    color: #627585;
    font-size: 0.82rem;
    line-height: 1.5;
    text-align: center;
}

.tahuba-article .tb-quote {
    margin: 36px 0;
    padding: 28px 30px;
    border: 1px solid var(--tb-border);
    border-left: 4px solid var(--tb-gold);
    border-radius: 14px;
    background: linear-gradient(135deg, #f7f9fc, #eef5f9);
    color: var(--tb-text);
    font-size: 1.08rem;
    font-weight: 650;
    line-height: 1.7;
    text-align: center;
}

.tahuba-article .tb-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 0.92fr);
    gap: 32px;
    margin: 48px 0;
    align-items: center;
}

.tahuba-article .tb-section.tb-section-reverse .tb-section-copy {
    order: 2;
}

.tahuba-article .tb-section.tb-section-reverse .tb-section-media {
    order: 1;
}

.tahuba-article .tb-section-copy {
    min-width: 0;
}

.tahuba-article .tb-section-kicker {
    display: block;
    margin-bottom: 7px;
    color: var(--tb-blue);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.tahuba-article .tb-section-title {
    margin: 0 0 16px;
    color: var(--tb-text);
    font-size: clamp(1.45rem, 2.8vw, 2rem);
    font-weight: 750;
    line-height: 1.25;
    text-align: left;
}

.tahuba-article .tb-section-title::after {
    display: block;
    width: 44px;
    height: 3px;
    margin-top: 13px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--tb-blue), var(--tb-gold));
    content: "";
}

.tahuba-article .tb-long-copy {
    margin: 42px 0;
    padding: 28px;
    border: 1px solid var(--tb-border);
    border-radius: 16px;
    background: #f8fafc;
}

.tahuba-article .tb-long-copy h2,
.tahuba-article .tb-thanks h2 {
    margin: 0 0 18px;
    color: var(--tb-text);
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    line-height: 1.3;
    text-align: left;
}

.tahuba-article .tb-thanks {
    margin-top: 46px;
    padding: 30px;
    border: 1px solid var(--tb-border);
    border-radius: 18px;
    background: var(--tb-surface);
}

.tahuba-article .tb-contact {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid rgba(8, 119, 181, 0.24);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--tb-surface-soft), #f8fbfd);
    text-align: center;
}

.tahuba-article .tb-contact h3 {
    margin: 0 0 8px;
    color: var(--tb-text);
    font-size: 1.12rem;
    line-height: 1.4;
    text-align: center;
}

.tahuba-article .tb-contact p {
    text-align: center;
}

.tahuba-article .tb-contact a {
    display: inline-block;
    margin-top: 5px;
    padding: 9px 18px;
    border: 1px solid rgba(8, 119, 181, 0.28);
    border-radius: 999px;
    color: var(--tb-blue);
    font-weight: 750;
    text-decoration: none;
}

.tahuba-article .tb-ending {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--tb-border);
    text-align: center;
}

.tahuba-article .tb-ending p {
    margin-bottom: 6px;
    color: #6b7d8b;
    font-size: 0.88rem;
    text-align: center;
}

.tahuba-article .tb-ending strong {
    color: var(--tb-gold);
}

.article-toc {
    margin: 22px 0 22px;
    border: 1px solid rgba(8, 119, 181, 0.25);
    border-radius: 12px;
    overflow: hidden;
    background: #f5faff;
    width: fit-content;
}

.article-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 16px;
    border-bottom: 1px solid rgba(8, 119, 181, 0.18);
    color: #17384f;
    letter-spacing: 0.04em;
}

.article-toc-header strong {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.article-toc-header strong i {
    color: #0877b5;
}

.article-toc.is-collapsed .article-toc-header {
    border-bottom: 0;
}

.article-toc-toggle {
    display: inline-grid;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #0877b5;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.article-toc-toggle:hover,
.article-toc-toggle:focus-visible {
    background: rgba(8, 119, 181, 0.1);
}

.article-toc-list {
    margin: 0;
    padding: 13px 20px 15px 38px;
}

.article-toc-list li {
    margin: 5px 0;
    padding-left: 2px;
}

.article-toc-list .article-toc-subitem {
    margin-left: 18px;
    list-style-type: lower-alpha;
}

.article-toc-list a {
    color: #25627f;
    font-weight: 600;
    text-decoration: none;
}

.article-toc-list a:hover,
.article-toc-list a:focus-visible {
    color: #0877b5;
    text-decoration: underline;
}

.article-toc-target {
    scroll-margin-top: 110px;
}

@media (max-width: 767px) {
    .article-toc.is-collapsed {
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    .tahuba-content-layout-wide .sidebar-article-list {
        grid-template-columns: 1fr;
    }

    .tahuba-article {
        margin-top: 18px;
        padding: 22px 18px;
        border-radius: 14px;
    }

    .tahuba-article .tb-section,
    .tahuba-article .tb-section.tb-section-reverse {
        grid-template-columns: 1fr;
        gap: 22px;
        margin: 38px 0;
    }

    .tahuba-article .tb-section.tb-section-reverse .tb-section-copy,
    .tahuba-article .tb-section.tb-section-reverse .tb-section-media {
        order: initial;
    }

    .tahuba-article .tb-hero-media .tb-image-slot {
        min-height: 240px;
    }

    .tahuba-article .tb-image-slot {
        min-height: 210px;
    }

    .tahuba-article .tb-quote,
    .tahuba-article .tb-long-copy,
    .tahuba-article .tb-thanks,
    .tahuba-article .tb-contact {
        padding: 21px;
    }

    .article-toc {
        margin-bottom: 22px;
    }
}