/* Trang /tai-lieu */
.docs-page { background: var(--bg-zone-soft); }

.docs-hero {
    background: var(--bg-page-hero);
    padding: 20px 0 18px;
    border-bottom: 1px solid var(--line);
}

.docs-kicker {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand);
    margin: 0 0 8px;
    padding: 3px 8px;
    background: var(--mist);
    border-left: 3px solid var(--brand);
}

.docs-title {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.4vw, 30px);
    color: var(--ink);
    margin: 0 0 8px;
}

.docs-lead {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 62ch;
}

.docs-list {
    padding-top: 24px;
    padding-bottom: 56px;
}

.docs-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.docs-filter {
    appearance: none;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-soft);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.docs-filter:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.docs-filter.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.docs-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    padding: 18px 18px 20px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.docs-card:hover {
    border-color: var(--brand);
    box-shadow: 0 10px 28px rgba(0, 65, 144, 0.08);
    transform: translateY(-2px);
}

.docs-card[hidden] {
    display: none !important;
}

.docs-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.docs-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
    background: var(--mist);
    padding: 3px 8px;
}

.docs-format {
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.docs-name {
    font-family: var(--font-display);
    font-size: 17px;
    line-height: 1.35;
    color: var(--ink);
    margin: 0 0 8px;
}
.docs-name a {
    color: inherit !important;
    text-decoration: none !important;
}
.docs-name a:hover {
    color: var(--brand) !important;
}

.docs-excerpt {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-soft);
    flex: 1;
}

.docs-linkmeta {
    margin: 0 0 14px;
    font-size: 12.5px;
    color: var(--brand);
    font-weight: 600;
}

.docs-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.docs-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    background: var(--brand);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.docs-download:hover {
    background: var(--brand-deep);
    color: #fff !important;
}

.docs-note {
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 800px) {
    .docs-grid {
        grid-template-columns: 1fr;
    }
}

/* —— Chi tiết tài liệu /tai-lieu/{slug}/ —— */
.doc-detail {
    background: var(--bg-zone-soft);
    overflow-x: hidden;
    max-width: 100%;
    padding-top: 20px;
    padding-bottom: 48px;
}

/* Cột content + sidebar CTA — reader chỉ ở cột trái */
.doc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 24px;
    align-items: start;
}

.doc-layout-main {
    min-width: 0;
    max-width: 100%;
}

.doc-layout-side {
    min-width: 0;
}

.doc-detail-crumb {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.doc-detail-crumb a {
    color: var(--brand) !important;
    text-decoration: none !important;
    font-weight: 600;
}

.doc-detail-title {
    font-family: var(--font-display);
    font-size: clamp(22px, 2.4vw, 30px);
    color: var(--ink);
    margin: 0 0 8px;
}

.doc-detail-lead {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--ink-soft);
    max-width: 62ch;
}

.doc-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.doc-detail-cta-box {
    background: #fff;
    border: 1px solid var(--line);
    padding: 16px;
}
.doc-detail-cta-box--sticky {
    position: sticky;
    top: 16px;
}

.doc-detail-cta-label {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}

.doc-detail-zalo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    background: #0068ff;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    width: 100%;
    box-sizing: border-box;
    transition: background 0.2s ease;
}
.doc-detail-zalo:hover {
    background: #0052cc;
    color: #fff !important;
}
.doc-detail-zalo--lg {
    width: auto;
    min-width: 220px;
    margin: 0 auto 10px;
}

.doc-detail-cta-hint {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
}
.doc-detail-cta-hint strong {
    color: var(--ink-soft);
    font-weight: 600;
}

.doc-related-box {
    margin-top: 16px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 16px;
}
.doc-related-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
}
.doc-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.doc-related-list li {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.4;
}
.doc-related-list li:last-child { margin-bottom: 0; }
.doc-related-code {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 2px;
}
.doc-related-list a {
    color: var(--brand) !important;
    text-decoration: none !important;
    font-weight: 600;
}
.doc-related-list a:hover {
    color: var(--brand-deep) !important;
}

.doc-lock-kicker {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
}

.doc-lock-title {
    margin: 0 0 10px;
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--ink);
}

.doc-lock-text {
    margin: 0 0 18px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--ink-soft);
}

/* —— Reader chỉ trong cột content —— */
.scribd-reader {
    --scribd-stage: #2b3038;
    --scribd-stage-2: #1f242b;
    --scribd-page-w: 100%;
    background: var(--scribd-stage);
    padding: 0 0 24px;
    overflow: hidden;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.scribd-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(24, 28, 34, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    box-sizing: border-box;
}

.scribd-toolbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 6px 14px;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.scribd-back {
    justify-self: start;
    color: #d7dde6 !important;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 600;
}
.scribd-back:hover { color: #fff !important; }

.scribd-pager,
.scribd-zoom {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.scribd-pager { justify-self: center; }
.scribd-zoom { justify-self: end; }

.scribd-page-label,
#scribdZoomLabel {
    color: #e8edf4;
    font-size: 12px;
    font-weight: 700;
    min-width: 4.5ch;
    text-align: center;
}

.scribd-btn {
    appearance: none;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}
.scribd-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
}
.scribd-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.scribd-stage {
    background:
        radial-gradient(ellipse 70% 40% at 50% 0%, rgba(255, 255, 255, 0.05), transparent 55%),
        linear-gradient(180deg, var(--scribd-stage) 0%, var(--scribd-stage-2) 100%);
    padding: 10px 10px 8px;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.scribd-stack {
    width: var(--scribd-page-w);
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.scribd-page {
    margin: 0 0 10px;
    scroll-margin-top: 56px;
    max-width: 100%;
    width: 100%;
}

.scribd-paper {
    background: #fff;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 8px 18px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.scribd-paper-body {
    flex: 1;
    padding: 22px 28px 14px;
    font-size: calc(14px * var(--scribd-zoom, 1));
    line-height: 1.55;
    color: #1a2330;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.scribd-paper-body h3 {
    font-family: var(--font-display);
    font-size: calc(15px * var(--scribd-zoom, 1));
    margin: 0 0 10px;
    color: var(--brand-deep);
}
.scribd-paper-body p {
    margin: 0 0 8px;
}

.scribd-paper-foot {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 18px 12px;
    border-top: 1px solid #eef1f5;
    font-size: 10px;
    color: #8a95a5;
    font-weight: 600;
}

.scribd-paywall {
    position: relative;
    margin: 4px 0 0;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
}

.scribd-paywall-blur {
    position: absolute;
    inset: 0;
    border-radius: 2px;
    background:
        linear-gradient(180deg, rgba(43, 48, 56, 0) 0%, rgba(43, 48, 56, 0.55) 28%, rgba(31, 36, 43, 0.92) 100%),
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.04) 0 18px,
            rgba(255, 255, 255, 0.01) 18px 36px
        );
}

.scribd-paywall-card {
    position: relative;
    z-index: 1;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
    padding: 20px 16px;
    text-align: center;
    width: min(360px, 100%);
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .doc-layout {
        grid-template-columns: 1fr;
    }
    .doc-detail-cta-box--sticky {
        position: static;
    }
    .doc-layout-side {
        order: -1;
    }
}

@media (max-width: 800px) {
    .scribd-toolbar-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 6px;
        padding: 6px 10px;
    }
    .scribd-back,
    .scribd-pager,
    .scribd-zoom {
        justify-self: center;
    }
    .scribd-reader {
        --scribd-page-w: 100%;
    }
    .scribd-stage {
        padding: 12px 10px 8px;
    }
    .scribd-paper-body {
        padding: 14px 14px 10px;
    }
}
