/* style.css - Thiết kế Slide hiện đại, trẻ trung, sáng tạo với hiệu ứng kính mờ (Glassmorphism) */

:root {
    --primary-blue: #0d6efd;
    --primary-cyan: #0dcaf0;
    --primary-pink: #d63384;
    --primary-rose: #fd7e14;
    --light-bg: #eef3f7;
    --card-bg: rgba(255, 255, 255, 0.45);
    --border-color: rgba(255, 255, 255, 0.45);
    --text-main: #1f2c3d;
    --text-muted: #657589;
    --sidebar-width: 290px;
    --font-family: 'Plus Jakarta Sans', sans-serif;
    --transition-speed: 0.35s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: #eef3f7;
    color: var(--text-main);
    overflow: hidden;
    height: 100dvh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Background animated lights (Mang màu sắc trẻ trung tươi sáng rực rỡ) */
.bg-light {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.55;
    pointer-events: none;
    animation: floatLight 20s infinite alternate ease-in-out;
    will-change: transform;
    backface-visibility: hidden;
}

.bg-light-blue {
    background: radial-gradient(circle, rgba(13, 110, 253, 0.35) 0%, rgba(13, 110, 253, 0.05) 70%);
    width: 600px;
    height: 600px;
    top: -100px;
    left: -100px;
}

.bg-light-pink {
    background: radial-gradient(circle, rgba(214, 51, 132, 0.35) 0%, rgba(214, 51, 132, 0.05) 70%);
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: 15%;
    animation-delay: -5s;
}

.bg-light-cyan {
    background: radial-gradient(circle, rgba(13, 202, 240, 0.25) 0%, transparent 70%);
    width: 400px;
    height: 400px;
    top: 30%;
    right: -100px;
    animation-delay: -10s;
}

@keyframes floatLight {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(60px, 40px) scale(1.1);
    }
}

/* App Layout */
.app-container {
    position: relative;
    z-index: 10;
    display: flex;
    width: min(97vw, 100vw);
    height: min(94dvh, 94svh, 94vh);
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(31, 38, 135, 0.06);
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(255, 255, 255, 0.65);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 28px 18px;
    z-index: 20;
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.25rem;
    font-weight: 850;
    color: #112a46;
    letter-spacing: 0.5px;
}

.logo span {
    line-height: 1.15;
    font-size: 1.05rem;
}

.logo-icon {
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 4px;
}

.nav-menu::-webkit-scrollbar {
    width: 3px;
}
.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}

.nav-menu ul {
    list-style: none;
}

.nav-item-divider {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin: 16px 0 8px 12px;
    opacity: 0.8;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #3a4b5c;
    transition: all 0.25s ease;
    margin-bottom: 4px;
}

.nav-item i {
    width: 18px;
    font-size: 0.95rem;
    text-align: center;
    color: var(--text-muted);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.75);
    color: var(--primary-blue);
}

.nav-item:hover i {
    color: var(--primary-blue);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.12) 0%, rgba(214, 51, 132, 0.12) 100%);
    color: #0b5ed7;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, 0.15);
}

.nav-item.active i {
    color: #0b5ed7;
}

.sidebar-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 0;
}

/* Nút icon-only trong sidebar footer */
.btn-sidebar-action {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid rgba(13, 110, 253, 0.2);
    background: rgba(13, 110, 253, 0.07);
    color: var(--primary-blue);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.22s ease;
    flex-shrink: 0;
}

.btn-sidebar-action:hover {
    background: rgba(13, 110, 253, 0.15);
    border-color: rgba(13, 110, 253, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.15);
}

/* Ẩn ở slide đầu tiên */
.sidebar-footer.hidden-on-cover {
    opacity: 0;
    pointer-events: none;
}


/* Main Content Area - Hỗ trợ thanh cuộn dọc khi màn hình laptop tràn */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    padding: clamp(16px, 3vh, 36px) clamp(20px, 3.5vw, 48px);
    overflow-y: auto;
    overflow-x: hidden; /* Chặn thanh cuộn ngang khi các phần tử trượt animation */
}

/* Background Slideshow - Ảnh nền xoay vòng cho giao diện trẻ trung */
.bg-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    border-radius: inherit;
}

.bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    will-change: opacity;
}

.bg-slide.active {
    opacity: 0.15;
}

/* Giao diện trang trọng: Hiện ảnh nền dạng Watermark sáng chìm vào nền đỏ (độ tương phản 8% cực kỳ sang trọng) */
body.state-theme .bg-slideshow {
    display: block;
}

body.state-theme .bg-slide {
    filter: grayscale(100%) brightness(1.75) contrast(0.45);
    mix-blend-mode: normal;
}

body.state-theme .bg-slide.active {
    opacity: 0.24;
}

/* Đảm bảo chữ ghi chú biểu đồ dễ đọc trên nền đỏ của giao diện trang trọng */
body.state-theme .chart-note {
    color: rgba(255, 205, 0, 0.75) !important;
}

/* Đảm bảo tất cả nội dung slide nằm trên lớp nền */
.global-header-logo,
.slides-wrapper {
    position: relative;
    z-index: 1;
}


/* Slides Wrapper */
.slides-wrapper {
    flex-grow: 1;
    position: relative;
    width: 100%;
}

/* Slide Pane Base */
.slide-pane {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.slide-pane.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Header logo trên góc trái từ slide thứ 2 trở đi (Cố định, không có hiệu ứng chuyển cảnh) */
.global-header-logo {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    flex-shrink: 0;
    transition: none !important;
}

.global-header-logo img {
    height: 56px;
    width: auto;
    object-fit: contain;
    transition: none !important;
}

.global-header-logo .logo-text {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1.35;
    letter-spacing: 0.5px;
    transition: none !important;
}

/* Ẩn logo ở trang bìa */
.hide-logo .global-header-logo {
    display: none !important;
}

/* Card Styling - Kính mờ cực kỳ đẹp mắt */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
}

/* Title Slide Styling */
.cover-container {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.badge-wrapper {
    display: flex;
    gap: 16px;
}

.badge {
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.04);
}

.badge-dtn {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-cyan));
    color: white;
}

.badge-hpn {
    background: linear-gradient(135deg, var(--primary-pink), #fd7e14);
    color: white;
}

.main-title {
    font-size: 2.5rem;
    font-weight: 850;
    line-height: 1.4;
    color: #112a46;
    background: linear-gradient(135deg, #0f243c 0%, #481232 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sub-agency {
    font-size: 1.6rem;
    font-weight: 700;
}

.timeline-tag {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-blue);
    background: rgba(13, 110, 253, 0.08);
    padding: 8px 24px;
    border-radius: 30px;
    display: inline-block;
}

.start-card {
    max-width: 700px;
    text-align: center;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #3a4b5c;
    margin-bottom: 24px;
}

/* Slide Grid Structure */
.slide-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 32px;
    align-items: center;
}

.slide-text-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.slide-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #112a46;
    display: flex;
    align-items: center;
    gap: 12px;
}

.icon-title {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
}

.slide-description {
    font-size: 0.98rem;
    line-height: 1.6;
    color: var(--text-muted);
}

/* Left Card-List Layout */
.list-wrapper {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.list-item-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.5);
}

.item-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.item-icon-wrapper.blue { background: rgba(13, 110, 253, 0.1); color: var(--primary-blue); }
.item-icon-wrapper.pink { background: rgba(214, 51, 132, 0.1); color: var(--primary-pink); }
.item-icon-wrapper.teal { background: rgba(13, 202, 240, 0.15); color: #02c39a; }
.item-icon-wrapper.green { background: rgba(46, 196, 182, 0.15); color: #2ec4b6; }
.item-icon-wrapper.orange { background: rgba(253, 126, 20, 0.1); color: #fd7e14; }
.item-icon-wrapper.red { background: rgba(230, 57, 70, 0.1); color: #e63946; }

.item-text h4 {
    font-size: 0.95rem;
    font-weight: 750;
    color: #1c2d42;
    margin-bottom: 4px;
}

.item-text p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: #55677c;
}

/* Header Stat Cards */
.header-stat-card {
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    border-left: 5px solid var(--primary-blue);
    background: rgba(13, 110, 253, 0.04);
}

.header-stat-card.blue-highlight {
    border-left-color: var(--primary-blue);
    background: rgba(13, 110, 253, 0.03);
}

.header-stat-card.red-highlight {
    border-left-color: #e63946;
    background: rgba(230, 57, 70, 0.03);
}

.header-stat-card.green-highlight {
    border-left-color: #2ec4b6;
    background: rgba(46, 196, 182, 0.03);
}

.stat-highlight {
    font-size: 2.3rem;
    font-weight: 850;
    line-height: 1;
    margin-bottom: 4px;
    color: #112a46;
}

.blue-highlight .stat-highlight { color: var(--primary-blue); }
.red-highlight .stat-highlight { color: #e63946; }
.green-highlight .stat-highlight { color: #2ec4b6; }

.stat-sub-label {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Stats Cards Grid for Personnel Overview */
.stats-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
    border-radius: 18px;
}

.color-dtn-card { border-bottom: 5px solid var(--primary-blue); }
.color-hpn-card { border-bottom: 5px solid var(--primary-pink); }

.stat-icon {
    font-size: 1.7rem;
    margin-bottom: 10px;
    color: var(--primary-blue);
}
.color-hpn-card .stat-icon { color: var(--primary-pink); }

.stat-num {
    font-size: 2.6rem;
    font-weight: 850;
    line-height: 1.1;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #112a46 0%, #441e3d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.88rem;
    font-weight: 750;
    color: #1f2c3d;
    margin-bottom: 2px;
}

.stat-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Visual Side */
.slide-visual-side {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 24px;
}

.slide-visual-side h3 {
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.chart-container {
    position: relative;
    width: 100%;
    height: 320px;
}

/* Image Carousel */
.image-gallery-card {
    padding: 20px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 500px; /* Tăng chiều cao khung hiển thị ảnh lớn hơn nữa */
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
}

.carousel-images {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.98);
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: white;
    padding: 18px 24px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.carousel-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 18px;
    transform: translateY(-50%);
    pointer-events: none;
}

.carousel-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.25s ease;
    font-size: 0.95rem;
    opacity: 0; /* Ẩn mũi tên mặc định */
}

/* Hiện mũi tên khi rê chuột vào container ảnh */
.carousel-container:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #1f2c3d;
    text-shadow: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transform: scale(1.1);
}

/* Quote Card for Final Slide */
.quote-card {
    position: relative;
    padding: clamp(20px, 3vh, 40px) clamp(20px, 2.5vw, 36px);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.04);
}

.quote-icon-top {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 2.4rem;
    color: rgba(13, 110, 253, 0.08);
}

.quote-icon-bottom {
    position: absolute;
    bottom: 16px;
    right: 16px;
    font-size: 2.4rem;
    color: rgba(214, 51, 132, 0.08);
}

.quote-text {
    font-size: clamp(0.95rem, 1.8vh, 1.25rem);
    font-weight: 600;
    line-height: 1.75;
    color: #1a324a;
    font-style: italic;
    margin-bottom: 12px;
    text-align: justify;
    text-indent: 20px;
}

.quote-sub-text {
    font-size: clamp(0.85rem, 1.5vh, 1.01rem);
    font-weight: 600;
    line-height: 1.6;
    color: var(--text-muted);
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    padding-top: 10px;
}

/* Summary Slide Styles */
.summary-slide-container {
    max-width: min(1050px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: clamp(10px, 1.8vh, 20px);
    padding: 0 8px;
}

.summary-logo {
    height: clamp(100px, 16vh, 180px);
    width: auto;
    object-fit: contain;
    margin-bottom: 8px;
}

.summary-title {
    font-size: clamp(1.3rem, 2.5vh, 1.85rem);
    font-weight: 850;
    color: var(--primary-blue);
    letter-spacing: 1px;
}

/* Presentation Buttons */
.cover-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.btn-sm {
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 750;
    border-radius: 20px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Nút bắt đầu và toàn màn hình siêu gọn ở góc phải trang chính */
.cover-actions-corner {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    gap: 10px;
    z-index: 100;
}

.btn-compact {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.btn-primary-compact {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-pink));
    color: white;
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.15);
}

.btn-primary-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(13, 110, 253, 0.25);
}

.btn-secondary-compact {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary-compact:hover {
    background: white;
    color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Chỉ số trang góc phải của header */
.top-slide-indicator {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.03);
    padding: 4px 10px;
    border-radius: 12px;
    letter-spacing: 0.2px;
    transition: none !important;
}

/* Nút bật/tắt âm thanh thuyết minh */
.mute-btn {
    background: rgba(0, 0, 0, 0.04);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.mute-btn:hover {
    background: rgba(13, 110, 253, 0.1);
    color: var(--primary-blue);
}

.mute-btn.muted {
    background: rgba(220, 53, 69, 0.1);
    color: #e63946;
}

/* Đảo cột xen kẽ tránh đơn điệu */
.slide-grid.reverse {
    grid-template-columns: 1.05fr 0.95fr;
}

.slide-grid.reverse .slide-text-side {
    order: 2;
}

.slide-grid.reverse .slide-visual-side {
    order: 1;
}

/* Hiệu ứng chuyển động Stagger & Đa dạng hướng xuất hiện (Chậm hơn & Chậm dần khi về cuối) */
.slide-pane.active .slide-text-side {
    animation: slideInLeft 1.1s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.slide-pane.active .slide-visual-side {
    animation: slideInRight 1.1s cubic-bezier(0.25, 1, 0.5, 1) 0.2s both;
}

/* Trượt ngược lại đối với layout đảo (reverse) */
.slide-pane.active .slide-grid.reverse .slide-text-side {
    animation: slideInRight 1.1s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.slide-pane.active .slide-grid.reverse .slide-visual-side {
    animation: slideInLeft 1.1s cubic-bezier(0.25, 1, 0.5, 1) 0.2s both;
}

/* Hiệu ứng xuất hiện so le (Stagger) của các thẻ card con (Kéo dài thời gian và giảm tốc) */
.slide-pane.active .list-item-card:nth-child(1) {
    animation: fadeInUp 1.0s cubic-bezier(0.25, 1, 0.5, 1) 0.3s both;
}

.slide-pane.active .list-item-card:nth-child(2) {
    animation: fadeInUp 1.0s cubic-bezier(0.25, 1, 0.5, 1) 0.5s both;
}

.slide-pane.active .list-item-card:nth-child(3) {
    animation: fadeInUp 1.0s cubic-bezier(0.25, 1, 0.5, 1) 0.7s both;
}

.slide-pane.active .stat-card:nth-child(1) {
    animation: scaleIn 1.0s cubic-bezier(0.25, 1, 0.5, 1) 0.25s both;
}

.slide-pane.active .stat-card:nth-child(2) {
    animation: scaleIn 1.0s cubic-bezier(0.25, 1, 0.5, 1) 0.45s both;
}

/* Định nghĩa Keyframes hoạt họa */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Trình chiếu khi Toàn màn hình (Fullscreen Presentation Mode) */
:fullscreen .sidebar {
    display: none !important;
}

:fullscreen .app-container {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
    background: rgba(255, 255, 255, 0.45);
}

:fullscreen .main-content {
    padding: 40px 80px;
}

:-webkit-full-screen .sidebar {
    display: none !important;
}

:-webkit-full-screen .app-container {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
    background: rgba(255, 255, 255, 0.45);
}

:-webkit-full-screen .main-content {
    padding: 40px 80px;
}

/* Responsive & Laptop adjustments */
@media (max-width: 1366px) {
    .app-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    .main-content {
        padding: 20px 30px;
    }
    .slide-grid {
        gap: 20px;
    }
    .carousel-container {
        height: 310px;
    }
}

@media (max-width: 1100px) {
    .app-container {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    .slide-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        overflow-y: auto;
    }
    .slide-visual-side {
        min-height: 300px;
    }
    .carousel-container {
        height: 290px;
    }
}

/* Nút chuyển đổi giao diện */
.theme-toggle-wrapper {
    margin-top: auto;
    padding: 12px 0;
    border-top: 1px dashed var(--border-color);
}

.theme-toggle-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 750;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.theme-toggle-btn:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* GIAO DIỆN TRANG TRỌNG / NHÀ NƯỚC (STATE THEME) */
body.state-theme {
    --primary-blue: #c8102e; /* Đỏ Quốc Kỳ */
    --primary-cyan: #ffcd00; /* Vàng Gold */
    --primary-pink: #c8102e; /* Đỏ */
    --primary-rose: #c8102e; /* Đỏ */
    --light-bg: #5c0002;      /* Đỏ đô đậm */
    --card-bg: #fffbf0;      /* Kem ấm phẳng */
    --border-color: #d4af37;  /* Vàng đồng cổ điển */
    --text-main: #000000;     /* Đổi thành đen để tương phản tối đa trên nền card kem */
    --text-muted: #333333;    /* Đổi thành xám đậm dể đọc */
    --font-family: 'Times New Roman', 'Georgia', serif;
    background-color: #5c0002;
}

body.state-theme .bg-light {
    display: none !important; /* Tắt đèn nền chuyển động */
}

body.state-theme .app-container {
    background: #7a0006; /* Đỏ cờ đậm */
    border: 3px solid #d4af37; /* Viền vàng đồng hoàng gia quanh app */
    border-radius: 6px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.state-theme .sidebar {
    background: #4a0002; /* Đỏ sẫm hơn cho thanh menu */
    border-right: 2px solid #d4af37;
    border-radius: 0 !important;
}

body.state-theme .sidebar-header .logo span {
    color: #ffcd00 !important;
}

body.state-theme .global-header-logo .logo-text {
    color: #ffcd00 !important; /* Đổi ĐTN & HPN góc trái thành màu vàng tươi sáng */
}

body.state-theme .nav-item {
    color: #fff0e0; /* Trắng ngà sáng để dễ đọc */
    border-radius: 4px !important;
}

body.state-theme .nav-item i {
    color: #ffcd00;
}

body.state-theme .nav-item:hover {
    background: rgba(255, 205, 0, 0.1);
    color: #ffcd00;
}

body.state-theme .nav-item.active {
    background: #c8102e;
    color: #ffcd00;
    box-shadow: inset 0 0 0 1.5px #d4af37;
}

body.state-theme .nav-item.active i {
    color: #ffcd00;
}

body.state-theme .nav-item-divider {
    color: #ffcd00;
    opacity: 0.8;
}

body.state-theme .sidebar-footer {
    border-top-color: rgba(255, 205, 0, 0.25);
}

body.state-theme .btn-sidebar-action {
    background: rgba(255, 205, 0, 0.1);
    border-color: rgba(255, 205, 0, 0.3);
    color: #ffcd00;
}

body.state-theme .btn-sidebar-action:hover {
    background: rgba(255, 205, 0, 0.2);
    border-color: rgba(255, 205, 0, 0.6);
    box-shadow: 0 4px 12px rgba(255, 205, 0, 0.2);
}


/* Main Content Area - Thêm cờ đỏ sao vàng làm chìm */
body.state-theme .main-content {
    background-color: #7a0006;
    /* Sao vàng 5 cánh béo chìm ở chính giữa nội dung đúng chuẩn Quốc kỳ Việt Nam từ Wikipedia */
    background-image: radial-gradient(circle, rgba(255, 205, 0, 0.05) 0%, transparent 70%),
                      url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffcd00" opacity="0.11"><path d="M12 2 L14.94 8.83 L21.5 8.83 L16.22 12.72 L18.22 18.89 L12 15.11 L5.78 18.89 L7.78 12.72 L2.5 8.83 L9.06 8.83 Z"/></svg>');
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain; /* Ép ngôi sao luôn nằm gọn gàng bên trong vùng nội dung */
    padding: 36px 48px;
}

body.state-theme .badge-wrapper {
    display: none !important; /* Ẩn 2 thẻ Đoàn thanh niên & Hội phụ nữ ở trên cùng trang bìa */
}

/* Tự động ép bo góc ít hơn cho toàn bộ các phần tử */
body.state-theme .glass-card,
body.state-theme .list-item-card,
body.state-theme .stat-card,
body.state-theme .carousel-container,
body.state-theme .app-container {
    border-radius: 6px !important;
}

body.state-theme .glass-card {
    background: #fffdf2; /* Màu kem nhạt giống giấy tờ nhà nước */
    border: 1.5px solid #d4af37;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.state-theme .glass-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 205, 0, 0.15);
}

body.state-theme .list-item-card {
    background: #fffdf2; /* Đổi sang màu kem ngả vàng đồng bộ */
    border: 1px solid #d4af37;
}

body.state-theme .slide-title {
    color: #ffcd00; /* Tiêu đề slide màu vàng rực rỡ nổi bật trên nền đỏ */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

body.state-theme .icon-title {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    color: #ffcd00;
}

body.state-theme .slide-description {
    color: #fff5e0; /* Trắng ngả vàng kem dịu mắt trên nền đỏ */
}

body.state-theme .quote-card {
    border: 2.5px solid #d4af37;
    background: #fffdf2;
}

body.state-theme .quote-text {
    color: #5c0002;
    font-family: 'Times New Roman', 'Georgia', serif;
}

body.state-theme .quote-icon-top,
body.state-theme .quote-icon-bottom {
    color: rgba(200, 16, 46, 0.12);
}

body.state-theme .badge-dtn {
    background: #c8102e;
    color: #fff5e0;
    border: 1.5px solid #ffcd00;
    border-radius: 4px !important; /* Đổi sang dạng khối chữ nhật sắc nét */
    padding: 6px 16px;
}

body.state-theme .badge-hpn {
    background: #ffcd00;
    color: #2b0002;
    border: 1.5px solid #ffcd00;
    border-radius: 4px !important; /* Đổi sang dạng khối chữ nhật sắc nét */
    padding: 6px 16px;
}

body.state-theme .main-title {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    color: #ffcd00; /* Tiêu đề trang bìa màu vàng nổi bật */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

body.state-theme .sub-agency {
    color: #ffffff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

body.state-theme .timeline-tag {
    color: #ffcd00;
    background: rgba(255, 205, 0, 0.1);
    border: 1.5px solid #d4af37;
    border-radius: 4px !important; /* Đổi sang dạng khối chữ nhật sắc nét */
    padding: 8px 24px;
}

body.state-theme .item-icon-wrapper.blue { background: rgba(200, 16, 46, 0.08); color: #c8102e; }
body.state-theme .item-icon-wrapper.pink { background: rgba(200, 16, 46, 0.08); color: #c8102e; }
body.state-theme .item-icon-wrapper.teal { background: rgba(255, 205, 0, 0.15); color: #b8860b; }
body.state-theme .item-icon-wrapper.green { background: rgba(200, 16, 46, 0.08); color: #c8102e; }
body.state-theme .item-icon-wrapper.orange { background: rgba(255, 205, 0, 0.15); color: #b8860b; }
body.state-theme .item-icon-wrapper.red { background: rgba(200, 16, 46, 0.08); color: #c8102e; }

body.state-theme .header-stat-card {
    border-left-color: #ffcd00;
    background: rgba(255, 205, 0, 0.05); /* Tông vàng nhạt chìm */
    border: 1.5px solid #d4af37;
    border-left-width: 6px;
}

body.state-theme .header-stat-card .stat-highlight {
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
    color: #ffcd00 !important; /* Đổi màu số (~100 triệu) thành vàng gold nổi bật */
}

body.state-theme .header-stat-card .stat-sub-label,
body.state-theme .header-stat-card .stat-sub,
body.state-theme .header-stat-card .stat-label {
    color: #fff5e0 !important; /* Đổi thành trắng ngả vàng kem rõ nét trên nền đỏ sẫm */
}

body.state-theme .blue-highlight .stat-highlight { color: #c8102e; }
body.state-theme .red-highlight .stat-highlight { color: #c8102e; }
body.state-theme .green-highlight .stat-highlight { color: #c8102e; }

body.state-theme .stat-card {
    background: #fffdf2 !important; /* Đổi sang màu kem ngả vàng đồng bộ */
    border: 1.5px solid #d4af37;
}
body.state-theme .color-dtn-card { border-bottom: 5px solid #c8102e; }
body.state-theme .color-hpn-card { border-bottom: 5px solid #ffcd00; }
body.state-theme .stat-icon { color: #c8102e; }
body.state-theme .color-hpn-card .stat-icon { color: #b8860b; }

body.state-theme .stat-num {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    color: #c8102e;
}

body.state-theme .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ffcd00;
    border-color: #d4af37;
}

body.state-theme .theme-toggle-btn:hover {
    background: #ffcd00;
    color: #5c0002;
    border-color: #ffcd00;
}

body.state-theme .top-slide-indicator {
    color: #ffcd00;
    background: rgba(255, 205, 0, 0.15);
    border: 1px solid #d4af37;
}

body.state-theme .mute-btn {
    color: #ffcd00;
    background: rgba(255, 205, 0, 0.15);
    border: 1px solid #d4af37;
}

body.state-theme .mute-btn:hover {
    background: #ffcd00;
    color: #5c0002;
}

body.state-theme .mute-btn.muted {
    background: rgba(200, 16, 46, 0.2);
    color: #ffcd00;
    border-color: #c8102e;
}

body.state-theme .carousel-container {
    border: 2px solid #d4af37;
}

body.state-theme .carousel-caption {
    background: linear-gradient(to top, rgba(92, 0, 2, 0.9) 0%, transparent 100%);
    color: #ffcd00;
}

body.state-theme .summary-title {
    color: #ffcd00;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

body.state-theme .summary-quote {
    border: 3px solid #d4af37 !important;
}

body.state-theme .stat-average {
    color: #ffcd00 !important; /* Đổi màu chữ trung bình (ví dụ: trung bình ~3.2 bài/ngày) thành màu vàng gold */
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

body.state-theme .slide-visual-side h3 {
    color: #ffcd00 !important; /* Đổi màu các tiêu đề phụ trên nền đỏ (ví dụ: BIỂU ĐỒ SO SÁNH, HÌNH ẢNH HOẠT ĐỘNG) thành vàng gold */
    opacity: 0.9;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
}

/* Tự động căn giữa và phóng rộng nội dung khi slide không có cột hình ảnh (như slide Lực lượng mới) */
.slide-pane:not(:has(.slide-visual-side)) .slide-grid {
    grid-template-columns: 1fr;
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
}

.slide-pane:not(:has(.slide-visual-side)) .slide-title {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.slide-pane:not(:has(.slide-visual-side)) .slide-description {
    text-align: center;
    margin-bottom: 20px;
}

/* =============================================
   RESPONSIVE: Laptop 1080p @ 125% DPI (viewport ~864px tall)
   Tự động co toàn bộ nội dung vừa màn hình
   ============================================= */
@media (max-height: 820px) {
    :root {
        --sidebar-width: 250px;
    }

    .global-header-logo {
        margin-bottom: 12px;
        padding-bottom: 8px;
    }

    .global-header-logo img {
        height: 42px;
    }

    .slide-title {
        font-size: 1.55rem;
    }

    .main-title {
        font-size: 2rem;
    }

    .sub-agency {
        font-size: 1.3rem;
    }

    .cover-container {
        gap: 18px;
    }

    .carousel-container {
        height: 380px;
    }

    .list-item-card {
        padding: 12px 16px;
    }

    .item-text h4 {
        font-size: 0.9rem;
    }

    .stat-num {
        font-size: 2.1rem;
    }

    .stat-card {
        padding: 16px 12px;
    }

    .slide-grid {
        gap: 20px;
    }
}

@media (max-height: 700px) {
    :root {
        --sidebar-width: 230px;
    }

    .global-header-logo img {
        height: 34px;
    }

    .global-header-logo {
        margin-bottom: 8px;
        padding-bottom: 6px;
    }

    .slide-title {
        font-size: 1.35rem;
    }

    .main-title {
        font-size: 1.6rem;
    }

    .sub-agency {
        font-size: 1.1rem;
    }

    .carousel-container {
        height: 300px;
    }

    .stat-num {
        font-size: 1.8rem;
    }

    .slide-grid {
        gap: 14px;
    }

    .list-wrapper {
        gap: 8px;
    }

    .list-item-card {
        padding: 10px 14px;
    }

    .summary-logo {
        height: 70px;
    }
}

