/*
 * Theme "Không gian Văn hóa Hồ Chí Minh Hội Liên hiệp Phụ nữ xã Bình Châu"
 * Bảng màu theo UI_GUIDELINE.md / demo.jpg
 */

:root {
    --kgvh-red: #b01e24;
    --kgvh-red-dark: #8e1418;
    --kgvh-gold: #c9a227;
    --kgvh-cream: #fbf6ec;
    --kgvh-text: #212529;
    --kgvh-muted: #6c757d;

    /* Ghi đè biến Bootstrap 5.3 */
    --bs-primary: var(--kgvh-red);
    --bs-primary-rgb: 176, 30, 36;
    --bs-body-bg: var(--kgvh-cream);
    --bs-body-color: var(--kgvh-text);
    --bs-link-color: var(--kgvh-red);
    --bs-link-hover-color: var(--kgvh-red-dark);
}

body {
    font-family: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
}

/* ==== Nút chính ==== */
.btn-primary {
    --bs-btn-bg: var(--kgvh-red);
    --bs-btn-border-color: var(--kgvh-red);
    --bs-btn-hover-bg: var(--kgvh-red-dark);
    --bs-btn-hover-border-color: var(--kgvh-red-dark);
    --bs-btn-active-bg: var(--kgvh-red-dark);
    --bs-btn-active-border-color: var(--kgvh-red-dark);
}

/* ==== Header ==== */
.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--kgvh-red);
    color: var(--kgvh-gold);
    font-size: 1.4rem;
    flex-shrink: 0;
}

.brand-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text small {
    font-size: 0.62rem;
    letter-spacing: 0.04em;
    color: var(--kgvh-text);
}

.brand-text strong {
    color: var(--kgvh-red);
    font-size: 1.02rem;
    letter-spacing: 0.02em;
}

.brand-text .brand-sub {
    color: var(--kgvh-gold);
    font-weight: 600;
}

.navbar .nav-link {
    color: var(--kgvh-text);
    font-weight: 500;
    padding-inline: 0.75rem;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--kgvh-red);
}

.navbar .nav-link.active {
    color: var(--kgvh-red);
    border-bottom: 2px solid var(--kgvh-red);
}

/* ==== Hero banner ==== */
.hero-banner {
    background:
        radial-gradient(ellipse at 85% 20%, rgba(201, 162, 39, 0.18), transparent 55%),
        linear-gradient(120deg, #fdf9f0 0%, #f7ecd8 60%, #f3e3c3 100%);
    border-bottom: 4px solid var(--kgvh-gold);
    position: relative;
    overflow: hidden;
}

.hero-banner .container {
    position: relative;
    z-index: 1;
}

/* ==== Hero dạng ảnh (banner upload từ admin — chỉ ảnh + nút) ==== */
.hero-image-banner {
    border-bottom: 4px solid var(--kgvh-gold);
    background: var(--kgvh-cream);
}

.hero-slide {
    position: relative;
}

.hero-slide-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 640px;
    object-fit: cover;
    object-position: center;
}

.hero-slide-btn {
    position: absolute;
    left: 5%;
    bottom: 8%;
    box-shadow: 0 0.4rem 1rem rgba(33, 37, 41, 0.35);
    z-index: 2;
}

@media (max-width: 575.98px) {
    .hero-slide-img {
        min-height: 200px;
    }

    .hero-slide-btn {
        left: 50%;
        transform: translateX(-50%);
        bottom: 6%;
        white-space: nowrap;
    }
}

/* ==== Họa tiết trang trí (ảnh riêng từng vị trí, thay trong Admin → Cài đặt) ==== */
.deco {
    position: absolute;
    pointer-events: none;
    user-select: none;
    max-width: 40vw;
}

.deco-hero-left {
    left: -50px;
    bottom: -40px;
    width: 320px;
    opacity: 0.5;
}

.deco-hero-right {
    right: -30px;
    top: -20px;
    width: 240px;
    opacity: 0.45;
}

.deco-features-left {
    left: -30px;
    top: -30px;
    width: 300px;
    opacity: 0.55;
    z-index: 0;
}

.deco-features-right {
    right: -20px;
    bottom: -50px;
    width: 270px;
    opacity: 0.9;
    z-index: 0;
}

.deco-band-left {
    left: -60px;
    bottom: -60px;
    width: 420px;
    opacity: 0.16;
}

.deco-band-right {
    right: -20px;
    bottom: -70px;
    width: 235px;
    opacity: 0.85;
}

.deco-footer {
    right: -40px;
    bottom: -50px;
    width: 300px;
    opacity: 0.14;
}

.hero-kicker {
    letter-spacing: 0.25em;
    font-weight: 600;
    color: var(--kgvh-text);
}

.hero-title {
    color: var(--kgvh-red);
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 4rem);
    letter-spacing: 0.02em;
    margin-bottom: 0;
}

.hero-subtitle {
    color: var(--kgvh-gold);
    font-weight: 700;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    letter-spacing: 0.12em;
}

.hero-desc {
    color: var(--kgvh-muted);
}

.hero-quote {
    background: linear-gradient(135deg, var(--kgvh-red) 0%, var(--kgvh-red-dark) 100%);
    color: #fff;
    border-radius: 1rem 1rem 1rem 0;
    padding: 1.5rem 1.75rem;
    font-size: 1.15rem;
    box-shadow: 0 0.5rem 1.5rem rgba(142, 20, 24, 0.25);
}

.hero-quote-author {
    color: var(--kgvh-gold);
    font-style: italic;
    font-weight: 600;
}

/* ==== Heading section ==== */
.section-title {
    color: var(--kgvh-red);
    font-weight: 800;
    letter-spacing: 0.08em;
    position: relative;
    display: table;
    margin-inline: auto;
    padding-inline: 2.5rem;
}

.section-title::before,
.section-title::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 1.75rem;
    height: 2px;
    background: var(--kgvh-gold);
}

.section-title::before { left: 0; }
.section-title::after { right: 0; }

/* ==== Card chuyên mục (lưới trang chủ) ==== */
.category-card {
    border: none;
    border-radius: 0.9rem;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.9rem rgba(33, 37, 41, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(33, 37, 41, 0.14);
}

.category-card img {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    width: 100%;
}

/* ==== Khối tiện ích (feature strip) ==== */
.features-section {
    position: relative;
    overflow-x: clip;
}

.features-section .container {
    z-index: 1;
}

.features-section .feature-strip {
    position: relative;
    z-index: 1;
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 0.9rem;
    background: linear-gradient(145deg, var(--kgvh-red) 0%, var(--kgvh-red-dark) 100%);
    color: #fff;
    margin-bottom: 0.75rem;
    box-shadow: 0 0.35rem 0.8rem rgba(176, 30, 36, 0.3);
}

@media (min-width: 992px) {
    .feature-col + .feature-col {
        border-left: 1px solid rgba(33, 37, 41, 0.1);
    }
}

/* ==== Band thống kê (bo tròn 2 góc trên, sen đỏ góc phải) ==== */
.stats-band {
    background: linear-gradient(120deg, var(--kgvh-red-dark) 0%, var(--kgvh-red) 100%);
    border-radius: 1.75rem 1.75rem 0 0;
    position: relative;
    overflow: hidden;
}

.stats-band .container {
    z-index: 1;
}

.stat-number {
    font-size: 2.3rem;
    font-weight: 800;
    color: #fff;
}

.stat-label {
    letter-spacing: 0.12em;
    font-size: 0.8rem;
    opacity: 0.85;
}

@media (min-width: 992px) {
    .stat-col + .stat-col {
        border-left: 1px solid rgba(255, 255, 255, 0.25);
    }
}

/* ==== Footer ==== */
.site-footer {
    background: linear-gradient(120deg, var(--kgvh-red-dark) 0%, var(--kgvh-red) 100%);
    position: relative;
    overflow: hidden;
}

.site-footer .container {
    position: relative;
    z-index: 1;
}

/* ==== Header hiệu ứng cuộn ==== */
.site-header .navbar {
    transition: box-shadow 0.25s ease;
}

.site-header.scrolled .navbar {
    box-shadow: 0 0.25rem 1rem rgba(33, 37, 41, 0.1);
}

.search-box {
    width: 190px;
}

/* ==== Footer ==== */
.site-footer {
    border-radius: 1.75rem 1.75rem 0 0;
    margin-top: 3rem;
}

/* Trang chủ: band thống kê đã bo góc phía trên, footer nối liền không bo */
main:has(.stats-band) + .site-footer {
    border-radius: 0;
    margin-top: 0;
}

.footer-heading {
    color: var(--kgvh-gold);
    letter-spacing: 0.08em;
}

.footer-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--kgvh-gold);
}

/* ==== Back to top ==== */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--kgvh-red);
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 0.4rem 1rem rgba(142, 20, 24, 0.35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
    z-index: 1030;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--kgvh-red-dark);
}

/* ==== Scroll reveal ==== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ==== Card bài viết ==== */
.post-card {
    border: none;
    border-radius: 0.9rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0.25rem 0.9rem rgba(33, 37, 41, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(33, 37, 41, 0.13);
}

.post-card .post-thumb {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
    display: block;
    background: #f3e3c3;
}

.post-card .card-title a {
    color: var(--kgvh-text);
    text-decoration: none;
}

.post-card .card-title a:hover {
    color: var(--kgvh-red);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==== Box nội dung trắng (trang chi tiết) ==== */
.article-card {
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 2.25rem;
    box-shadow: 0 0.3rem 1.2rem rgba(33, 37, 41, 0.07);
}

@media (max-width: 767.98px) {
    .article-card {
        padding: 1.25rem 1rem;
        border-radius: 0.75rem;
    }
}

.article-title {
    font-size: clamp(1.5rem, 3.2vw, 2.1rem);
    font-weight: 800;
    line-height: 1.35;
    color: var(--kgvh-text);
}

.article-meta {
    color: var(--kgvh-muted);
    font-size: 0.9rem;
}

.article-lead {
    font-size: 1.15rem;
    font-weight: 600;
    color: #495057;
    line-height: 1.75;
    background: #fdf9f0;
    border-left: 4px solid var(--kgvh-gold);
    padding: 1rem 1.25rem;
    border-radius: 0 0.6rem 0.6rem 0;
}

/* ==== Nội dung bài viết ==== */
.article-content {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #212529;
    text-align: justify;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-weight: 700;
    color: var(--kgvh-red-dark);
    margin: 1.75rem 0 0.9rem;
    line-height: 1.4;
}

.article-content h2 { font-size: 1.45rem; }
.article-content h3 { font-size: 1.28rem; }
.article-content h4 { font-size: 1.15rem; }

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.6rem;
    display: block;
    margin: 1.25rem auto;
    box-shadow: 0 0.25rem 0.9rem rgba(33, 37, 41, 0.1);
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.75rem;
}

/* Bảng/khung trong bài nhập từ nguồn cũ (hochiminh.vn) — gọn gàng, không tràn ngang. */
.article-content table {
    max-width: 100%;
    margin: 0 auto 1.25rem;
    border-collapse: collapse;
}

.article-content table td,
.article-content table th {
    padding: 0.35rem 0.6rem;
    vertical-align: top;
    border: none;
}

.article-content .story_content,
.article-content .story_body {
    text-align: inherit !important;
}

.article-content hr {
    border: 0;
    border-top: 2px solid var(--kgvh-gold, #c9a227);
    opacity: 0.6;
    width: 180px;
    margin: 1.75rem auto;
}

.article-content li {
    margin-bottom: 0.4rem;
}

.article-content blockquote {
    border-left: 4px solid var(--kgvh-gold);
    background: #fdf9f0;
    padding: 1rem 1.25rem;
    border-radius: 0 0.6rem 0.6rem 0;
    font-style: italic;
}

.article-content iframe {
    max-width: 100%;
    border-radius: 0.6rem;
}

.article-content a {
    color: var(--kgvh-red);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ==== Thẻ (tag pill) ==== */
.tag-pill {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 50rem;
    background: #fdf6e9;
    border: 1px solid rgba(201, 162, 39, 0.4);
    color: var(--kgvh-red-dark);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.tag-pill:hover {
    background: var(--kgvh-red);
    border-color: var(--kgvh-red);
    color: #fff;
}

/* ==== Khối nội dung liên quan (Knowledge Graph) ==== */
.related-box {
    background: #fdf9f0;
    border: 1px solid rgba(201, 162, 39, 0.35);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
}

/* ==== Nút chia sẻ ==== */
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: none;
    color: #fff;
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
    color: #fff;
}

.share-fb { background: #1877f2; }
.share-zalo { background: #0068ff; }
.share-x { background: #14171a; }
.share-linkedin { background: #0a66c2; }
.share-email { background: var(--kgvh-gold); }
.share-copy { background: #6c757d; }

.share-copy.copied {
    background: #1e7e34;
}

/* ==== Header trang danh sách ==== */
.page-header {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    border-left: 6px solid var(--kgvh-red);
    box-shadow: 0 0.3rem 1.2rem rgba(33, 37, 41, 0.07);
}

.page-header-title {
    font-size: clamp(1.35rem, 2.6vw, 1.8rem);
    font-weight: 800;
    color: var(--kgvh-red-dark);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ==== Breadcrumb ==== */
.breadcrumb-bar {
    background: #fff;
    border-bottom: 3px solid var(--kgvh-gold);
    box-shadow: 0 0.15rem 0.6rem rgba(33, 37, 41, 0.05);
    padding: 0.7rem 0;
}

.breadcrumb-bar .breadcrumb {
    --bs-breadcrumb-divider: "›";
    font-size: 0.88rem;
}

.breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
    color: var(--kgvh-gold);
    font-weight: 700;
}

.breadcrumb-bar .breadcrumb-item a {
    color: var(--kgvh-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s ease;
}

.breadcrumb-bar .breadcrumb-item a:hover {
    color: var(--kgvh-red);
}

.breadcrumb-bar .breadcrumb-item.active {
    color: var(--kgvh-red-dark);
    font-weight: 600;
    max-width: 60vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==== Khối lời dạy ==== */
.quote-card {
    background: linear-gradient(135deg, #fdf9f0, #f7ecd8);
    border: 1px solid rgba(201, 162, 39, 0.35);
    border-radius: 1rem;
    padding: 1.5rem;
    height: 100%;
}

.quote-card .quote-mark {
    font-size: 2.2rem;
    color: var(--kgvh-gold);
    line-height: 1;
    font-family: Georgia, serif;
}

/* ==== Trang tư liệu ==== */
.doc-card {
    display: flex;
    gap: 1rem;
    background: #fff;
    border-radius: 0.9rem;
    padding: 1rem;
    box-shadow: 0 0.25rem 0.9rem rgba(33, 37, 41, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.doc-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.6rem 1.3rem rgba(33, 37, 41, 0.12);
}

.doc-cover {
    width: 92px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
    background: #f3e3c3;
}

.doc-cover-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kgvh-red);
    font-weight: 700;
    font-size: 0.8rem;
    background: #fdf6e9;
    border: 1px solid rgba(201, 162, 39, 0.35);
}

/* ==== Video ==== */
.video-thumb-wrap {
    position: relative;
    display: block;
}

.video-thumb-wrap::after {
    content: "▶";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #fff;
    background: rgba(33, 37, 41, 0.35);
    opacity: 0.9;
    transition: opacity 0.2s ease;
    border-radius: inherit;
}

.video-thumb-wrap:hover::after {
    opacity: 1;
    background: rgba(176, 30, 36, 0.45);
}

.ratio-16x9-cover {
    aspect-ratio: 16 / 9;
    object-fit: cover;
    width: 100%;
}

/* ==== Trang tiểu sử Chủ tịch Hồ Chí Minh ==== */
.bio-hero {
    background:
        radial-gradient(ellipse at 50% -20%, rgba(201, 162, 39, 0.35), transparent 60%),
        linear-gradient(150deg, var(--kgvh-red-dark) 0%, var(--kgvh-red) 55%, #c62830 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--kgvh-gold);
}

.bio-hero-star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid var(--kgvh-gold);
    color: var(--kgvh-gold);
    font-size: 1.9rem;
    margin-bottom: 1rem;
}

.bio-hero-kicker {
    letter-spacing: 0.3em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
}

.bio-hero-title {
    font-size: clamp(1.9rem, 4.5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.bio-hero-years {
    color: var(--kgvh-gold);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.15em;
}

.bio-hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.05rem;
}

.bio-quote {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-style: italic;
    font-weight: 600;
    color: var(--kgvh-red-dark);
    background: #fdf9f0;
    border: 1px solid rgba(201, 162, 39, 0.45);
    border-radius: 1rem;
    padding: 1.75rem 1.5rem;
    line-height: 1.7;
}

.bio-quote-author {
    color: var(--kgvh-gold);
    font-size: 0.95rem;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.1em;
}

/* ==== Dòng thời gian ==== */
.timeline {
    position: relative;
    max-width: 900px;
    padding: 0.5rem 0;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, var(--kgvh-gold), var(--kgvh-red));
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    width: 50%;
    padding: 0 2.5rem 2rem 0;
}

.timeline-item:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 2rem 2.5rem;
}

.timeline-dot {
    position: absolute;
    top: 0.4rem;
    right: -9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--kgvh-red);
    border: 4px solid var(--kgvh-gold);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.2);
    z-index: 1;
}

.timeline-item:nth-child(even) .timeline-dot {
    right: auto;
    left: -9px;
}

.timeline-card {
    background: #fff;
    border-radius: 0.9rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 0.25rem 1rem rgba(33, 37, 41, 0.08);
    border-top: 3px solid var(--kgvh-gold);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.timeline-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.6rem 1.4rem rgba(33, 37, 41, 0.13);
}

.timeline-year {
    display: inline-block;
    background: linear-gradient(135deg, var(--kgvh-red), var(--kgvh-red-dark));
    color: #fff;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.9rem;
    border-radius: 50rem;
}

@media (max-width: 767.98px) {
    .timeline::before {
        left: 9px;
        transform: none;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding: 0 0 1.5rem 2.25rem;
    }

    .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        right: auto;
        left: 0;
    }
}

/* ==== Khối UNESCO ==== */
.unesco-box {
    background:
        radial-gradient(ellipse at 50% 120%, rgba(201, 162, 39, 0.4), transparent 60%),
        linear-gradient(135deg, var(--kgvh-red-dark), var(--kgvh-red));
    border-radius: 1rem;
    padding: 2.25rem 1.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(142, 20, 24, 0.3);
}

.unesco-star {
    display: block;
    color: var(--kgvh-gold);
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ==== Flipbook viewer (đọc PDF kiểu lật trang) ==== */
.flipbook-viewer {
    position: relative;
}

.flipbook-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    min-height: 320px;
    background: #f6f3ea;
    border-radius: 1rem;
    border: 1px solid #eee;
    text-align: center;
    padding: 2rem;
}

.flipbook-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(20, 15, 5, 0.92);
    flex-direction: column;
}

.flipbook-viewer.flipbook-open .flipbook-overlay {
    display: flex;
}

.flipbook-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    color: #fff;
}

.flipbook-stage {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    overflow: auto;
    padding: 1rem;
}

.flipbook-page-left,
.flipbook-page-right {
    max-width: 45vw;
    max-height: 78vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    background: #fff;
}

.flipbook-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.25);
}

.flipbook-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1.25rem 1.25rem;
}

.flipbook-status {
    color: #fff;
    font-size: 0.9rem;
    min-width: 10rem;
    text-align: center;
}

@media (max-width: 767.98px) {
    .flipbook-stage {
        flex-wrap: wrap;
    }

    .flipbook-page-left,
    .flipbook-page-right {
        max-width: 90vw;
        max-height: 60vh;
    }
}

/* ==== Accessibility ==== */
:focus-visible {
    outline: 3px solid var(--kgvh-gold);
    outline-offset: 2px;
}
