:root {
    --red: #b30000;
    --red-dark: #8f0000;
    --gold: #ffd54f;
    --text: #222;
}

body {
    font-family: Arial, sans-serif;
    color: var(--text);
    background: #fff;
}

.site-header {
    background: var(--red);
    color: #fff;
    padding: 0 0;
    border-bottom: 2px solid var(--gold);
}

.site-title {
    font-weight: 700;
    font-size: 22px;
    line-height: 1.3;
}

.hero {
    background: #fff;
    padding: 20px;
    margin-top: 16px;
    border: 1px solid #eee;
}

    .hero img {
        width: 100%;
        height: auto;
        border: 1px solid #ddd;
    }

.hero-caption {
    font-size: 15px;
    color: #555;
    margin-top: 8px;
}

.section-title {
    border-left: 6px solid var(--red);
    padding-left: 10px;
    margin: 24px 0 12px;
    font-weight: 700;
}

.featured-grid .card-title {
    font-weight: 700;
    font-size: 16px;
}

.news-item {
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

    .news-item:last-child {
        border-bottom: none;
    }

    .news-item a {
        color: var(--text);
        font-weight: 600;
        text-decoration: none;
    }

        .news-item a:hover {
            color: var(--red-dark);
            text-decoration: underline;
        }

.promo-banner {
    background: var(--gold);
    color: var(--text);
    padding: 14px;
    text-align: center;
    font-weight: 700;
    border: 2px solid var(--red);
    margin-top: 20px;
}

.site-footer {
    background: #fff;
    border-top: 1px solid #eee;
    margin-top: 30px;
    padding: 16px 0;
    font-size: 14pt;
    color: #666;
}

.logo {
    height: 56px;
}

.main-menu .nav-link {
    color: white;
    font-weight: 600;
    padding: 12px 16px;
}

.site-header {
    background: var(--red);
    color: #fff;
    padding: 0 0;
    border-bottom: 2px solid var(--gold);
}

.site-title {
    font-weight: 700;
    font-size: 22px;
    line-height: 1.3;
}

.hero {
    background: #fff;
    padding: 20px;
    margin-top: 16px;
    border: 1px solid #eee;
}

    .hero img {
        width: 100%;
        height: auto;
        border: 1px solid #ddd;
    }

.hero-caption {
    font-size: 15px;
    color: #555;
    margin-top: 8px;
}

.section-title {
    border-left: 6px solid var(--red);
    padding-left: 10px;
    margin: 24px 0 12px;
    font-weight: 700;
}

.featured-grid .card-title {
    font-weight: 700;
    font-size: 16px;
}

.news-item {
    padding: 4px 0;
    border-bottom: 1px solid #eee;
}

    .news-item:last-child {
        border-bottom: none;
    }

    .news-item a {
        color: var(--text);
        font-weight: 600;
        text-decoration: none;
    }

        .news-item a:hover {
            color: var(--red-dark);
            text-decoration: underline;
        }

.promo-banner {
    background: var(--gold);
    color: var(--text);
    padding: 14px;
    text-align: center;
    font-weight: 700;
    border: 2px solid var(--red);
    margin-top: 20px;
}

.site-footer {
    background: #fff;
    border-top: 1px solid #eee;
    margin-top: 30px;
    padding: 16px 0;
    font-size: 14pt;
    color: #666;
}

.logo {
    height: 56px;
}

.leader-title {
    background: #DB0713;
    color: #fff;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
}

    .leader-title h3 {
        margin: 0;
        font-size: 20px;
        font-weight: bold;
    }

/* Tránh cắt card khi hover scale + đổ bóng */
.leader-wrapper {
    overflow: visible;
}

.leader-wrapper .row.gy-3 {
    overflow: visible;
    align-items: center;
}

.col-5-custom {
    flex: 0 0 20%;
    max-width: 20%;
    padding: 16px 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Khung xám cố định + vòng màu (~3px) xen kẽ xám (45°) xoay */
.leader-card {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    isolation: isolate;
    transform-origin: center center;
    /* Ra vào chậm, easing mượt — dễ “đọc” chuyển động */
    transition:
        transform 0.95s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.95s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.25s ease;
    box-sizing: border-box;
    background: #dfe3eb;
    border: 3px solid #cfd6e0;
}

.leader-card__base {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: linear-gradient(165deg, #e8eaed 0%, #f0f2f5 50%, #e4e7ec 100%);
    pointer-events: none;
}

.leader-card__glow {
    position: absolute;
    width: 200%;
    height: 200%;
    left: -50%;
    top: -50%;
    z-index: 1;
    animation: leaderBorderSpin 8s linear infinite;
    will-change: transform;
    /* Vệt xám (#d1d5db) xen vệt màu — xoay là thấy rõ từng dải */
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #2563eb 45deg 90deg,
        #d1d5db 90deg 135deg,
        #22d3ee 135deg 180deg,
        #d1d5db 180deg 225deg,
        #60a5fa 225deg 270deg,
        #d1d5db 270deg 315deg,
        #1d4ed8 315deg 360deg
    );
    filter: saturate(1.35) brightness(1.08);
}

/* Mỗi cột một bảng màu; tốc độ xoay khác nhau chút cho cảm giác “sống” */
.col-5-custom:nth-child(5n + 1) .leader-card__glow {
    animation-duration: 7.5s;
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #2563eb 45deg 90deg,
        #d1d5db 90deg 135deg,
        #22d3ee 135deg 180deg,
        #d1d5db 180deg 225deg,
        #60a5fa 225deg 270deg,
        #d1d5db 270deg 315deg,
        #1d4ed8 315deg 360deg
    );
}

.col-5-custom:nth-child(5n + 2) .leader-card__glow {
    animation-duration: 9s;
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #e11d48 45deg 90deg,
        #d1d5db 90deg 135deg,
        #a855f7 135deg 180deg,
        #d1d5db 180deg 225deg,
        #db0713 225deg 270deg,
        #d1d5db 270deg 315deg,
        #c026d3 315deg 360deg
    );
}

.col-5-custom:nth-child(5n + 3) .leader-card__glow {
    animation-duration: 8.3s;
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #eab308 45deg 90deg,
        #d1d5db 90deg 135deg,
        #f59e0b 135deg 180deg,
        #d1d5db 180deg 225deg,
        #facc15 225deg 270deg,
        #d1d5db 270deg 315deg,
        #d97706 315deg 360deg
    );
}

.col-5-custom:nth-child(5n + 4) .leader-card__glow {
    animation-duration: 9.5s;
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #14b8a6 45deg 90deg,
        #d1d5db 90deg 135deg,
        #059669 135deg 180deg,
        #d1d5db 180deg 225deg,
        #2dd4bf 225deg 270deg,
        #d1d5db 270deg 315deg,
        #0d9488 315deg 360deg
    );
}

.col-5-custom:nth-child(5n + 5) .leader-card__glow {
    animation-duration: 8.8s;
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #ea580c 45deg 90deg,
        #d1d5db 90deg 135deg,
        #fb923c 135deg 180deg,
        #d1d5db 180deg 225deg,
        #f97316 225deg 270deg,
        #d1d5db 270deg 315deg,
        #dc2626 315deg 360deg
    );
}

/* Ảnh 1,3,5… thuận kim đồng hồ — ảnh 2,4,6… ngược (đạp hơn) */
.col-5-custom:nth-child(even) .leader-card__glow {
    animation-direction: reverse;
}

.leader-card__inner {
    position: relative;
    z-index: 2;
    /* Độ dày vòng màu xoay (~3px) */
    margin: 3px;
    border-radius: 18px;
    background: #fff;
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
    min-height: 0;
    transition: box-shadow 0.95s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hover nhẹ: ~gấp rưỡi (1.5) so với kích thước ban đầu — tránh scale(2.2) quá to */
.leader-card:hover {
    transform: translateY(-10px) scale(1.5);
    z-index: 5;
    box-shadow:
        0 18px 40px rgba(15, 23, 42, 0.18),
        0 8px 18px rgba(185, 28, 28, 0.14);
}

.leader-card:hover .leader-card__inner {
    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.1),
        0 4px 14px rgba(185, 28, 28, 0.14);
}

.leader-photo-wrap {
    width: 100%;
    margin-bottom: 12px;
    border-radius: 14px;
    overflow: hidden;
}

.leader-photo-wrap a {
    display: block;
}

@keyframes leaderBorderSpin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .leader-card:hover {
        transform: none;
        box-shadow: none;
    }

    .leader-card__glow {
        animation: none;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        filter: none;
    }

    .col-5-custom:nth-child(5n + 1) .leader-card__glow {
        background: linear-gradient(135deg, #d1d5db 0%, #3b82f6 40%, #0ea5e9 100%);
    }

    .col-5-custom:nth-child(5n + 2) .leader-card__glow {
        background: linear-gradient(135deg, #d1d5db 0%, #db0713 45%, #a855f7 100%);
    }

    .col-5-custom:nth-child(5n + 3) .leader-card__glow {
        background: linear-gradient(135deg, #d1d5db 0%, #eab308 45%, #f59e0b 100%);
    }

    .col-5-custom:nth-child(5n + 4) .leader-card__glow {
        background: linear-gradient(135deg, #d1d5db 0%, #14b8a6 45%, #059669 100%);
    }

    .col-5-custom:nth-child(5n + 5) .leader-card__glow {
        background: linear-gradient(135deg, #d1d5db 0%, #ea580c 45%, #dc2626 100%);
    }
}

.leader-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    margin: 0;
    display: block;
    border-radius: 14px;
    transition: transform 0.25s ease;
}

/* Ảnh theo scale của cả card — tránh phóng đôi */
.leader-card:hover .leader-img {
    transform: none;
}

.leader-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    flex-grow: 1;
    width: 100%;
}

/* Hiển thị đủ họ tên & chức vụ — không cắt ... */
.leader-name {
    font-weight: 700;
    color: #1d2939;
    font-size: 17px;
    line-height: 1.45;
    margin-bottom: 8px;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.leader-role {
    font-size: 14px;
    line-height: 1.55;
    color: #475467;
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 600;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* 📱 Responsive cho mobile */
@media (max-width: 768px) {
    .col-5-custom {
        flex: 0 0 50%; /* 2 card mỗi hàng */
        max-width: 50%;
    }

    .leader-card {
        max-width: 100%;
    }

    .leader-card:hover {
        transform: translateY(-8px) scale(1.35);
    }
}

@media (max-width: 480px) {
    .col-5-custom {
        flex: 0 0 100%; /* 1 card mỗi hàng */
        max-width: 100%;
    }

    .leader-card {
        max-width: 100%;
    }

    .leader-card:hover {
        transform: translateY(-6px) scale(1.28);
    }
}

/* Tiêu đề khối (THƯỜNG TRỰC / BTV / UV): nền xám, chữ đỏ — đồng bộ 3 panel */
.thuongtruc-panel-header {
    background-color: #e8eaed !important;
    color: #b91c1c !important;
    border-bottom: 1px solid #d1d5db;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

/* --- Trang thuongtrucTU.aspx: cùng viền xám + vệt màu xoay như Default (leader-card) --- */
.thuongtruc-page .leader-card.thuongtruc-ld {
    max-width: 250px;
}

.thuongtruc-page .leader-card.thuongtruc-ld--big {
    max-width: 300px;
}

.thuongtruc-page .thuongtruc-ld--rev .leader-card__glow {
    animation-direction: reverse;
}

.thuongtruc-page .thuongtruc-ld__inner .ld-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin-bottom: 10px;
    display: block;
}

.thuongtruc-page .thuongtruc-ld--big .ld-img-big {
    max-width: 100%;
}

.thuongtruc-page .leader-card.thuongtruc-ld:hover {
    transform: translateY(-8px) scale(1.12);
    z-index: 5;
}

@media (max-width: 768px) {
    .thuongtruc-page .leader-card.thuongtruc-ld:hover {
        transform: translateY(-6px) scale(1.08);
    }
}

/* Bảng màu xoay (giống .col-5-custom 5n+k) */
.thuongtruc-page .thuongtruc-glow-1 .leader-card__glow {
    animation-duration: 7.5s;
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #2563eb 45deg 90deg,
        #d1d5db 90deg 135deg,
        #22d3ee 135deg 180deg,
        #d1d5db 180deg 225deg,
        #60a5fa 225deg 270deg,
        #d1d5db 270deg 315deg,
        #1d4ed8 315deg 360deg
    );
}

.thuongtruc-page .thuongtruc-glow-2 .leader-card__glow {
    animation-duration: 9s;
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #e11d48 45deg 90deg,
        #d1d5db 90deg 135deg,
        #a855f7 135deg 180deg,
        #d1d5db 180deg 225deg,
        #db0713 225deg 270deg,
        #d1d5db 270deg 315deg,
        #c026d3 315deg 360deg
    );
}

.thuongtruc-page .thuongtruc-glow-3 .leader-card__glow {
    animation-duration: 8.3s;
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #eab308 45deg 90deg,
        #d1d5db 90deg 135deg,
        #f59e0b 135deg 180deg,
        #d1d5db 180deg 225deg,
        #facc15 225deg 270deg,
        #d1d5db 270deg 315deg,
        #d97706 315deg 360deg
    );
}

.thuongtruc-page .thuongtruc-glow-4 .leader-card__glow {
    animation-duration: 9.5s;
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #14b8a6 45deg 90deg,
        #d1d5db 90deg 135deg,
        #059669 135deg 180deg,
        #d1d5db 180deg 225deg,
        #2dd4bf 225deg 270deg,
        #d1d5db 270deg 315deg,
        #0d9488 315deg 360deg
    );
}

.thuongtruc-page .thuongtruc-glow-5 .leader-card__glow {
    animation-duration: 8.8s;
    background: conic-gradient(
        from 0deg,
        #d1d5db 0deg 45deg,
        #ea580c 45deg 90deg,
        #d1d5db 90deg 135deg,
        #fb923c 135deg 180deg,
        #d1d5db 180deg 225deg,
        #f97316 225deg 270deg,
        #d1d5db 270deg 315deg,
        #dc2626 315deg 360deg
    );
}

@media (prefers-reduced-motion: reduce) {
    .thuongtruc-page .leader-card__glow {
        animation: none;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        filter: none;
    }

    .thuongtruc-page .thuongtruc-glow-1 .leader-card__glow {
        background: linear-gradient(135deg, #d1d5db 0%, #3b82f6 40%, #0ea5e9 100%);
    }

    .thuongtruc-page .thuongtruc-glow-2 .leader-card__glow {
        background: linear-gradient(135deg, #d1d5db 0%, #db0713 45%, #a855f7 100%);
    }

    .thuongtruc-page .thuongtruc-glow-3 .leader-card__glow {
        background: linear-gradient(135deg, #d1d5db 0%, #eab308 45%, #f59e0b 100%);
    }

    .thuongtruc-page .thuongtruc-glow-4 .leader-card__glow {
        background: linear-gradient(135deg, #d1d5db 0%, #14b8a6 45%, #059669 100%);
    }

    .thuongtruc-page .thuongtruc-glow-5 .leader-card__glow {
        background: linear-gradient(135deg, #d1d5db 0%, #ea580c 45%, #dc2626 100%);
    }
}

/* Desktop giữ nguyên */
.media-tabs {
    display: flex;
    gap: 8px;
}

    .media-tabs .tab {
        padding: 6px 12px;
        border-radius: 4px;
        background: rgba(255,255,255,0.1);
        color: #fff;
        text-decoration: none;
        transition: background 0.3s ease;
    }

        .media-tabs .tab:hover {
            background: #fff;
            color: #DB0713;
        }

        .media-tabs .tab.active {
            background: #fff;
            color: #DB0713;
            font-weight: bold;
        }

/* 📱 Mobile: mỗi tab xuống dòng, căn giữa */
@media (max-width: 576px) {
    .card-header {
        flex-direction: column; /* đổi layout dọc */
        align-items: flex-start; /* tiêu đề căn trái */
    }

    .media-tabs {
        display: block; /* đổi sang block */
        width: 100%;
        margin-top: 8px;
    }

        .media-tabs .tab {
            display: block;
            width: 100%; /* mỗi tab chiếm full chiều ngang */
            margin-bottom: 6px;
            text-align: center; /* chữ căn giữa */
        }
}

.vb-container {
    height: 500px;
    overflow: hidden;
    position: relative;
}

.vb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    width: 100%;
    animation: scrollUpDown 15s linear infinite alternate;
    animation-play-state: running;
}

    .vb-list li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        border-bottom: 1px solid #ddd;
    }

.vb-icon {
    color: #DB0713;
    margin-right: 8px;
    flex-shrink: 0;
}

.vb-list li a {
    flex-grow: 1;
    font-size: 15px;
    color: #333;
    text-decoration: none;
    text-align: justify;
}

.vb-list li:nth-child(odd) {
    background-color: #f9f9f9; /* nền xám nhạt cho hàng lẻ */
}

.vb-list li:nth-child(even) {
    background-color: #ffffff; /* nền trắng cho hàng chẵn */
}

.vb-list li:hover {
    background-color: #ffecec; /* nền đỏ nhạt khi hover */
}

.vb-date {
    font-size: 12px;
    color: #777;
    margin-left: 10px;
    flex-shrink: 0;
}

/* Hover dừng lại */
.vb-container:hover .vb-list {
    animation-play-state: paused;
}

/* Animation chạy lên rồi xuống */
@keyframes scrollUpDown {
    0% {
        top: 0;
    }

    100% {
        top: -100%;
    }
}

.news-thumb {
    width: 100%;
    height: 200px; /* hoặc chiều cao anh muốn */
    object-fit: cover; /* giữ tỷ lệ, crop thừa */
    border-radius: .25rem; /* bo góc như bootstrap */
}

.carousel-inner img {
    transition: none !important;
    transform: none !important;
}

.Content {
    background-color: #fff9e6; /* nền vàng mờ */
    padding: 15px;
    border-radius: 4px;
}

    .Content ul.nav {
        list-style: none;
        margin: 0;
        padding: 0;
    }

        .Content ul.nav li {
            display: flex;
            align-items: center;
            margin-bottom: 20px; /* cách nhau 10px */
            border-bottom: 1px solid #f0d9a9; /* viền ngăn cách mờ */
            padding-bottom: 10px;
        }

            .Content ul.nav li:last-child {
                border-bottom: none; /* bỏ viền cuối */
            }

            .Content ul.nav li img {
                width: 40px;
                height: 40px;
                object-fit: cover;
                margin-right: 10px;
                border-radius: 4px;
            }

            .Content ul.nav li .article-title {
                font-weight: bold;
                color: #b22222; /* đỏ đậm */
                font-size: 16px;
            }

            .Content ul.nav li a.item {
                display: flex;
                align-items: center;
                text-decoration: none;
            }

                .Content ul.nav li a.item:hover .article-title {
                    color: #ff0000; /* hover đỏ sáng hơn */
                }

#autocompleteList {
    border: 1px solid #ddd;
    max-height: 500px;
    overflow-y: auto;
}

    #autocompleteList .list-group-item {
        background-color: #d2f7e0; /* đỏ nhạt */
        color: #000; /* chữ đen cho dễ đọc */
    }

        #autocompleteList .list-group-item:hover {
            background-color: #ffcccc; /* đỏ nhạt hơn khi hover */
        }

.main-menu .nav-link:hover {
    background-color: #a00000;
}

.main-menu .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

.main-menu .dropdown-menu {
    background-color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.main-menu .dropdown-item {
    font-weight: 500;
    padding: 10px 20px;
}

    .main-menu .dropdown-item:hover {
        background-color: #f8d7da;
        color: #b30000;
    }

.row.align-items-stretch {
    display: flex;
}

    .row.align-items-stretch > [class*='col-'] {
        display: flex;
    }

    .row.align-items-stretch .card {
        flex: 1; /* ép card cao bằng nhau */
    }

.news-item i {
    font-size: 14px;
}

.card-body a {
    text-decoration: none; /* bỏ gạch chân */
}

    .card-body a:hover {
        text-decoration: none; /* giữ nguyên khi hover */
        color: #b30000; /* đổi màu khi hover cho nổi bật */
    }

.row.align-items-stretch {
    display: flex;
}

    .row.align-items-stretch > [class*='col-'] {
        display: flex;
    }

    .row.align-items-stretch .card {
        flex: 1;
    }
/* Ken Burns effect */
.carousel-item img {
    animation: kenburns 5s ease-in-out forwards;
    transform-origin: center center;
}

@keyframes kenburns {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(-10px, -10px);
    }
}

.main-menu .nav-link:hover {
    background-color: #a00000;
}

.main-menu .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

.main-menu .dropdown-menu {
    background-color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.main-menu .dropdown-item {
    font-weight: 500;
    padding: 10px 20px;
}

    .main-menu .dropdown-item:hover {
        background-color: #f8d7da;
        color: #b30000;
    }

.navbar-toggler {
    border-color: #fff;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' ... fill='%23fff'/%3E");
}
/* Giữ màu chữ trắng khi active */
.navbar .nav-link.active,
.navbar .nav-link.show,
.navbar .nav-link:focus {
    color: #fff !important;
}

/* Nếu muốn hover cũng trắng */
.navbar .nav-link:hover {
    color: #f8f9fa !important;
}

.navbar .nav-link.active {
    color: #fff !important;
    position: relative;
}

    .navbar .nav-link.active::after {
        content: "";
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: #fff;
        transition: width 0.3s ease;
    }

.navbar-toggler {
    border-color: #ffc107; /* viền vàng */
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='%23ffc107' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.header-title {
    background-color: #b30000; /* đỏ đậm */
    background-image: url('../images/hoavan.png'); /* ảnh hoa văn PNG/JPG */
    background-repeat: repeat; /* hoặc no-repeat nếu ảnh phủ toàn bộ */
    background-size: cover; /* hoặc contain tùy ảnh */
}

/* GridView đẹp hơn với Bootstrap */
.table {
    font-size: 0.95rem;
    border-radius: 6px;
    overflow: hidden;
}

    .table th {
        /*  background-color: #b30000; đỏ đậm */
        color: #b30000;
        text-align: center;
    }

    .table td {
        vertical-align: middle;
    }

.table-hover tbody tr:hover {
    background-color: #f5f5f5;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
    font-weight: 500;
}

.stat-left {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #333;
}

.stat-right {
    font-weight: bold;
    color: #000;
}

.news-title {
    font-size: 1.6rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.news-summary {
    font-style: italic;
    color: #555;
}

.news-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
}

.news-content {
    line-height: 1.6;
    font-size: 1rem;
}

.share-buttons .btn {
    font-weight: 500;
}

.card-title a:hover {
    color: #dc3545; /* đỏ bootstrap */
}

.card {
    transition: transform 0.2s ease-in-out;
}

    .card:hover {
        transform: scale(1);
    }

.btn.active {
    pointer-events: none; /* không click được */
    font-weight: bold;
}

.card-header {
    font-size: 1rem;
}

.card-body .d-flex:hover {
    background-color: #f8f9fa;
    border-radius: 5px;
}
/* Popup fade in/out */
.popup-vanban {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 0 12px rgba(0,0,0,0.2);
    z-index: 9999;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease;
}

.card {
    border: 1px solid #f2f2f2; /* siêu nhạt */
}

.popup-vanban.show {
    opacity: 1;
    transform: translateY(0);
}

.popup-header {
    background: #b30000;
    color: #fff;
    padding: 10px;
    font-weight: bold;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.popup-body {
    padding: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.popup-item {
    margin-bottom: 10px;
}

    .popup-item a {
        font-weight: 500;
        color: #007bff;
        text-decoration: none;
    }

.popup-date {
    font-size: 0.8rem;
    color: #666;
}

.popup-footer {
    text-align: right;
    padding: 10px;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup-content {
    background: #fff;
    width: 800px;
    height: 600px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
}

.section-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #b22222;
    margin-bottom: 30px;
}

.member-row.single {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.member-row.double {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.member-list.three-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* luôn 3 cột */
    gap: 20px;
    justify-items: center;
}

.member-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    text-align: center;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    max-width: 280px;
}

    .member-card h3 {
        font-size: 18px;
        font-weight: bold;
        color: #b22222; /* đỏ nhấn mạnh */
        margin: 10px 0;
    }

    .member-card p {
        font-size: 14px;
        color: #555;
        line-height: 1.4;
    }

    .member-card:hover {
        transform: translateY(-5px);
    }

    .member-card.big {
        max-width: 320px;
        border: 2px solid #b22222;
    }

.member-photo {
    width: 100%;
    height: auto;
    object-fit: cover;
    margin-bottom: 15px;
}

.member-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 5px 0;
}

.member-role {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.section-title {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #b22222; /* đỏ nhấn mạnh */
    margin-bottom: 20px;
}

.member-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    font-size: 15px;
}

    .member-table th,
    .member-table td {
        border: 1px solid #ddd;
        padding: 10px 12px;
        text-align: left;
    }

    .member-table th {
        background-color: #b22222; /* nền đỏ cho tiêu đề */
        color: #fff;
        text-align: center;
    }

    .member-table tr:nth-child(even) {
        background-color: #f9f9f9; /* xen kẽ màu nhạt */
    }

    .member-table tr:hover {
        background-color: #f1f1f1; /* hover đổi màu */
    }

    .member-table td:first-child {
        text-align: center;
        font-weight: bold;
        width: 50px;
    }

.banner-desktop {
    background-size: cover;
    background-position: center;
    height: 120px;
    max-width: 1140px;
    margin: 0 auto;
    padding-left: 220px;
}

.banner-text h1 {
    font-size: 1.05rem;
}

.banner-text h2 {
    font-size: 1.35rem;
}

@media (max-width: 768px) {
    .banner-mobile h1,
    .banner-mobile h2 {
        font-size: 1rem;
    }
}

/* media */
.media-title {
    font-size: 22px;
    font-weight: bold;
}

.media-tabs .tab {
    padding: 6px 12px;
    margin-left: 8px;
    border-radius: 4px;
    background: #eee;
    color: #333;
    text-decoration: none;
}

    .media-tabs .tab.active {
        background: #fff;
        color: #b51000;
        font-weight: bold;
    }

/* Khung slider */
.slider-box {
    position: relative; /* Bắt buộc: để caption định vị theo khung */
    overflow: hidden;
    height: 300px; /* đổi 400px nếu cần */
    background: #000; /* chống nháy khi ảnh chưa load */
}

/* Dải slide trượt theo trục X */
.slides {
    display: flex;
    width: 100%;
    transform: translateX(0);
    transition: transform 2s ease; /* trượt mượt trong 2s */
    will-change: transform;
}

/* Mỗi slide chiếm full khung */
.slide {
    flex: 0 0 100%;
    position: relative; /* để caption nằm trong slide */
}

.swiper {
    width: 100%;
    height: 300px; /* hoặc 400px */
}

.swiper-slide {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .swiper-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.swiper-slide {
    position: relative; /* để caption định vị trong slide */
}

.caption {
    position: absolute;
    bottom: 20px; /* nhấc lên 10px so với mép dưới */
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    padding: 10px 15px;
    font-size: 16px;
    text-align: center;
    opacity: 1;
    font-weight: bold;
}

.swiper-button-next,
.swiper-button-prev {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(0,0,0,0.4) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

    /* Icon bên trong */
    .swiper-button-next::after,
    .swiper-button-prev::after {
        font-size: 18px !important;
        color: #fff !important;
        font-weight: bold !important;
    }

    .swiper-button-next:hover,
    .swiper-button-prev:hover {
        background: rgba(0,0,0,0.6); /* hover đậm hơn */
    }

.video-list {
    height: 300px; /* hoặc 100% nếu cha có height cố định */
    overflow-y: auto;
    background: #b51000;
    padding: 15px;
    border-radius: 6px;
}

    .video-list li {
        display: flex;
        align-items: center;
        gap: 10px; /* thêm khoảng cách giữa ảnh và text */
    }

    .video-list .thumb {
        width: 80px;
        height: 60px;
        object-fit: cover;
        border-radius: 4px;
    }

    .video-list a {
        color: #fff;
        font-size: 14px;
        text-decoration: none;
    }

        .video-list a:hover {
            text-decoration: underline;
        }

    .video-list li.active {
        background-color: #fff; /* nền đỏ đậm hơn */
        color: #ff0000 !important;
        border-radius: 4px;
    }

        .video-list li.active a {
            color: #ff0000 !important;
            font-weight: bold;
        }

.MultiFunctionControl .banner {
    width: 100%;
    /* margin: 30px auto 0px auto; */
    display: flex;
    justify-content: left;
    align-items: center;
    /* padding-left: 30px; */
    padding: 20px 10px;
    gap: 35px;
    position: relative;
}

    .MultiFunctionControl .banner img {
        width: 200px;
        height: auto;
        object-fit: cover;
    }

    .MultiFunctionControl .banner .info {
        font-family: Inter;
        font-size: 30px;
        font-weight: bold;
        line-height: 42px;
        text-align: left;
        color: #68443b;
    }

    .MultiFunctionControl .banner .info2 {
        font-family: "Roboto";
        font-size: 40px;
        font-weight: 900;
        line-height: 40px;
        letter-spacing: 0.5px;
        text-align: left;
        color: #ff1801;
        text-shadow: 1px 1px 1px #b51000, 1px 2px 1px #a1a1a1, 1px 2px 1px #e9e9e9, 1px 4px 1px #b9b9b9, 1px 7px 2px rgb(166 166 166 / 20%), 1px 11px 10px rgb(153 153 153 / 20%), 1px 15px 10px rgb(189 189 189 / 40%);
    }

header {
    background: linear-gradient(90deg, #ffffff, #fff5f7, #ffe6eb);
    background-size: 400% 400%;
    animation: gradientMove 12s ease infinite;
    color: #333;
    border-bottom: 1px solid #ddd;
}

/* Animation keyframes */
@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Nếu muốn chữ trong header vẫn đỏ nổi bật */
header .info2 {
    color: #ff1801;
}

/* Banner text hover effect */
.MultiFunctionControl .banner .info2 {
    transition: all 0.3s ease;
}

    .MultiFunctionControl .banner .info2:hover {
        color: #fff;
        text-shadow: 0 0 10px #ff1801, 0 0 20px #ff4500;
    }

/* Logo hover effect */
.MultiFunctionControl .banner img {
    transition: transform 0.3s ease;
}

    .MultiFunctionControl .banner img:hover {
        transform: scale(1.05) rotate(-2deg);
    }

/* Mobile responsive */
@media (max-width: 576px) {
    .MultiFunctionControl .banner {
        flex-direction: column; /* đổi sang dọc */
        align-items: center; /* căn giữa */
        gap: 0px;
        text-align: center; /* chữ căn giữa */
        padding: 0px;
    }

        .MultiFunctionControl .banner img {
            width: 120px; /* logo vừa phải */
            height: auto;
            object-fit: cover;
            margin-bottom: 5px; /* cách chữ */
        }

        .MultiFunctionControl .banner .text {
            width: 100%;
            margin-bottom: 6px;
        }

        .MultiFunctionControl .banner .info {
            font-size: 20px;
            line-height: 22px;
            width: 100%;
            margin-bottom: 4px;
            text-align: center;
        }

        .MultiFunctionControl .banner .info2 {
            font-size: 22px;
            line-height: 26px;
            width: 100%;
            text-align: center;
            margin-bottom: 4px;
        }
}

.footer {
    color: #fff;
    margin: 0 auto;
    position: relative;
    background: url("../images/trongdong1.png") no-repeat scroll center center #b31515;
    border-top: 5px solid #db0713;
    padding-bottom: 25px;
    margin-top: 20px;
    text-align: center;
    padding: 20px 10px;
}

#backtotop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #dc3545; /* đỏ */
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 24px;
    cursor: pointer;
    display: none;
    z-index: 999999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

    #backtotop:hover {
        background: #b02a37; /* đỏ đậm khi hover */
        transform: scale(1.1);
        box-shadow: 0 0 15px rgba(220,53,69,0.8); /* phát sáng đỏ */
    }

@keyframes bounceIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    60% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

#backtotop.show {
    animation: bounceIn 0.5s;
}

.custom-header {
    background: transparent !important; /* bỏ nền */
    border-bottom: 1px solid #dc3545; /* viền dưới đỏ */
    padding: 10px;
    color: #dc3545 !important; /* chữ đỏ */
}

/* Cột phải & khối phụ: card + tiêu đề mục đồng bộ */
.portal-sidebar .portal-sidebar-card,
.portal-sidebar-top .portal-sidebar-card {
    border: 1px solid rgba(220, 53, 69, 0.18);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    background: #fff;
    /* Không dùng flex-fill: tránh kéo giãn khối — khoảng cách dùng gap/margin */
    flex: 0 0 auto;
}

/* Tiêu đề mục dạng tab (group-tabs-wrap) — dùng chung Default.aspx + MasterPage1 / toàn site */
.group-tabs-wrap .nav-pills {
    border-bottom: 1px solid #e5e7eb;
    gap: 0;
    align-items: flex-end;
}

.group-tabs-wrap .nav-pills .nav-link {
    color: #4b5563;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 10px 12px 9px;
    margin-bottom: -1px;
    background: transparent;
    box-shadow: inset 0 -2px 4px rgba(15, 23, 42, 0.06);
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.group-tabs-wrap .nav-pills .nav-link.parent-tab {
    letter-spacing: 0.4px;
    font-weight: 700;
    color: #9f1239;
    border: 1px solid #f1d5db;
    border-bottom: 3px solid transparent;
    background: linear-gradient(180deg, #fff7f9 0%, #fff 100%);
    box-shadow: inset 0 -1px 0 rgba(159, 18, 57, 0.08);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
    margin-right: -7px;
    padding-right: 22px;
    padding-left: 14px;
    border-radius: 6px 0 0 0;
    position: relative;
    z-index: 3;
}

.group-tabs-wrap .nav-pills .nav-item:nth-child(2) .nav-link {
    clip-path: polygon(14px 0, 100% 0, 100% 100%, 14px 100%);
    margin-left: -7px;
    padding-left: 24px;
    z-index: 2;
}

.group-tabs-wrap .nav-pills .nav-item:last-child .nav-link {
    border-top-right-radius: 6px;
}

@media (max-width: 576px) {
    .group-tabs-wrap .nav-pills .nav-link.parent-tab,
    .group-tabs-wrap .nav-pills .nav-item:nth-child(2) .nav-link {
        clip-path: none;
        margin-left: 0;
        margin-right: 0;
        padding-left: 12px;
        padding-right: 12px;
        border-radius: 6px;
    }

    .group-tabs-wrap .nav-pills {
        gap: 6px;
    }
}

.group-tabs-wrap .nav-pills .nav-link.active {
    color: #db0713;
    font-weight: 700;
    background: #fff;
    border-bottom-color: #db0713;
    box-shadow: 0 6px 14px rgba(16, 24, 40, 0.14), 0 2px 4px rgba(16, 24, 40, 0.08);
    transform: translateY(-1px);
    position: relative;
    z-index: 2;
}

.group-tabs-wrap .nav-pills .nav-link.parent-tab.active {
    color: #fff;
    border-color: #db0713;
    border-bottom-color: #db0713;
    background: linear-gradient(180deg, #e11d2f 0%, #c8101f 100%);
    box-shadow: none;
    filter: drop-shadow(0 6px 10px rgba(136, 19, 31, 0.35)) drop-shadow(0 2px 4px rgba(16, 24, 40, 0.12));
}

.group-tabs-wrap .nav-pills .nav-link:hover:not(.active) {
    color: #1f2937;
    background: #f8fafc;
    box-shadow: inset 0 -2px 5px rgba(15, 23, 42, 0.09);
}

.group-tabs-wrap.single-title-tabs .nav-pills .nav-link.parent-tab {
    clip-path: none;
    margin-right: 0;
    border-radius: 6px 6px 0 0;
}

.group-tabs-wrap.single-title-tabs span.nav-link.parent-tab {
    cursor: default;
}

.portal-home-featured.group-tabs-wrap .card-header.bg-white {
    padding-left: 0;
    padding-right: 0;
}

/* Hàng banner 9+3 (carousel): cao tối thiểu ~130px */
.portal-banner-row-card .portal-mid-banner-link {
    display: block;
    line-height: 0;
    background: #f1f5f9;
    min-height: 130px;
}

.portal-banner-row-card .portal-mid-banner-img {
    width: 100%;
    min-height: 120px;
    max-width: 100%;
    display: block;
    /* object-fit: cover; */
    /* object-position: center; */
}

.portal-home-featured .card-body {
    min-height: 0;
}

/* Một card gộp 4 mục (Văn bản Đảng, Báo Nhân dân, Liên kết, Thống kê) */
.portal-sidebar-bundled.portal-sidebar-card {
    overflow: hidden;
}

.portal-sidebar-bundled .portal-sidebar-bundle-section + .portal-sidebar-bundle-section {
    border-top: 1px solid rgba(220, 53, 69, 0.14);
}

/* Banner tra cứu bản đồ Đảng bộ (trên khối thời tiết) */
.portal-bando-banner {
    background: linear-gradient(145deg, #9f1239 0%, #b91c1c 40%, #dc2626 100%);
    padding: 14px 12px 12px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(185, 28, 28, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portal-bando-banner:hover,
.portal-bando-banner:focus-visible {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(185, 28, 28, 0.45);
    outline: none;
}

.portal-bando-banner__icon {
    font-size: 1.85rem;
    line-height: 1;
    margin-bottom: 10px;
    opacity: 0.95;
}

.portal-bando-banner__text {
    font-weight: 700;
    font-size: 0.88rem;
    line-height: 1.45;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.portal-bando-banner__cta {
    font-weight: 600;
    opacity: 0.92;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
}

.portal-sidebar-bundled .portal-sidebar-bundle-section .card-header {
    border-radius: 0 !important;
}

/* Chiều cao widget Báo Nhân dân — chỉnh một chỗ (px hoặc vh) */
.portal-nhandan-iframe {
    width: 100%;
    height: 500px;
    border: none;
    display: block;
}

/* Thời tiết Tuyên Quang (sidebar — Open-Meteo) */
.portal-weather-widget {
    text-align: center;
    padding: 4px 2px 2px;
}

.portal-weather-widget__icon {
    font-size: 2.25rem;
    line-height: 1;
    margin-bottom: 6px;
}

.portal-weather-widget__temp {
    font-size: 1.85rem;
    font-weight: 800;
    color: #b91c1c;
    line-height: 1.1;
}

.portal-weather-widget__unit {
    font-size: 1rem;
    font-weight: 600;
    vertical-align: super;
    margin-left: 1px;
}

.portal-weather-widget__feels {
    margin-top: 4px;
}

.portal-weather-widget__meta {
    padding-left: 0.25rem;
    border-top: 1px dashed rgba(185, 28, 28, 0.15);
    padding-top: 8px;
    margin-top: 8px !important;
}

/*
 * Ảnh placeholder noimage.png: hiển thị TRỌN khung (không cắt chữ / logo).
 * Mỗi vùng có khung khác nhau (16:9, thumb 80×60, banner 120px…); contain + nền xám nhạt.
 * File gốc nên là ngang ~16:9 (vd 1200×675) — anh xuất PNG đủ lớn; web sẽ scale co.
 */
img[src*="noimage.png"] {
    object-fit: contain !important;
    object-position: center;
    background-color: #f1f5f9;
}

/* Banner giữa/phải — placeholder noimage: không crop logo/chữ */
.portal-mid-banner-img[src*="noimage.png"] {
    object-fit: contain !important;
    object-position: center;
    width: 100%;
    height: auto;
    min-height: 130px;
    max-height: 220px;
    background-color: #f1f5f9;
}

/* Thumbnail list video (80×60 inline) */
img.thumb[src*="noimage.png"] {
    object-fit: contain !important;
}

/* Nhóm 5: khung 16/9 + max-height trong Default.aspx */
.nhom5-mini-img[src*="noimage.png"] {
    object-fit: contain !important;
    max-height: 200px;
}

/* Nhóm 6: khớp max-height ảnh trong Default.aspx */
.nhom6-article__img[src*="noimage.png"] {
    object-fit: contain !important;
    max-height: 240px;
}

.leader-img[src*="noimage.png"] {
    object-fit: contain !important;
}

/* ========== Trang chi tiết lãnh đạo (Lanhdao.aspx) — viền xám + vòng màu xoay (cùng ý Default.aspx) ========== */
/* Cùng bề ngang container (~1140px) — không bóp khung so với nội dung trang */
.ld-profile-shell {
    max-width: 1140px;
    margin: 1.25rem auto 2rem;
    padding: 0 12px;
}

.ld-profile-card {
    position: relative;
    width: 100%;
    border-radius: 26px;
    overflow: hidden;
    isolation: isolate;
    box-sizing: border-box;
    background: #dfe3eb;
    border: 3px solid #cfd6e0;
}

.ld-profile-base {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background: linear-gradient(165deg, #e8eaed 0%, #f0f2f5 50%, #e4e7ec 100%);
    pointer-events: none;
}

/* Một vòng đủ gam (đỏ — cam — vàng — lục — ngọc — lam — tím — hồng), xen xám nhạt để dải chạy rõ — chỉ Lanhdao */
.ld-profile-glow {
    position: absolute;
    width: 200%;
    height: 200%;
    left: -50%;
    top: -50%;
    z-index: 1;
    animation: leaderBorderSpin 8s linear infinite;
    will-change: transform;
    background: conic-gradient(
        from 0deg,
        #cbd5e1 0deg 22deg,
        #dc2626 22deg 48deg,
        #cbd5e1 48deg 52deg,
        #ea580c 52deg 78deg,
        #cbd5e1 78deg 82deg,
        #ca8a04 82deg 108deg,
        #cbd5e1 108deg 112deg,
        #16a34a 112deg 138deg,
        #cbd5e1 138deg 142deg,
        #0d9488 142deg 168deg,
        #cbd5e1 168deg 172deg,
        #2563eb 172deg 198deg,
        #cbd5e1 198deg 202deg,
        #6366f1 202deg 228deg,
        #cbd5e1 228deg 232deg,
        #9333ea 232deg 258deg,
        #cbd5e1 258deg 262deg,
        #db2777 262deg 288deg,
        #cbd5e1 288deg 292deg,
        #e11d48 292deg 318deg,
        #cbd5e1 318deg 360deg
    );
    filter: saturate(1.4) brightness(1.06);
}

/* Vòng màu xoay ~10px — chỉ trang Lanhdao */
.ld-profile-inner {
    position: relative;
    z-index: 2;
    margin: 10px;
    border-radius: 16px;
    background: #fff;
    padding: 1.5rem 1.75rem 1.75rem;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
}

.ld-profile-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    align-items: flex-start;
}

.ld-profile-photo-col {
    flex: 0 0 240px;
    max-width: 100%;
}

.ld-profile-photo-frame {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.1);
}

.ld-profile-photo {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.ld-profile-main {
    flex: 1;
    min-width: 220px;
}

.ld-profile-name {
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 700;
    color: #9f1239;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.ld-profile-role {
    font-size: 1.1rem;
    font-weight: 600;
    color: #475467;
    margin: 0 0 1.1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(220, 53, 69, 0.12);
}

.ld-profile-bio {
    font-size: 1rem;
    line-height: 1.7;
    color: #1f2937;
    text-align: justify;
    margin: 0;
}

/* Tràn theo .container cha — danh sách tin không bị hẹp 960px */
.ld-profile-activity {
    max-width: none;
    width: 100%;
    margin: 0 auto 2.5rem;
    padding: 0;
}

.ld-profile-activity .ld-activity-head {
    border-radius: 8px 8px 0 0;
}

.ld-profile-activity .card-body {
    background: #fafafa;
}

.ld-profile-activity .card-img-top {
    height: 160px;
    object-fit: cover;
    width: 100%;
}

.ld-profile-activity .card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ld-profile-activity .card-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ld-news-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.ld-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1) !important;
}

@media (max-width: 767.98px) {
    .ld-profile-photo-col {
        flex: 1 1 100%;
        display: flex;
        justify-content: center;
    }

    .ld-profile-photo-frame {
        max-width: 280px;
        width: 100%;
    }

    .ld-profile-photo {
        max-width: 100%;
    }

    .ld-profile-layout {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ld-profile-glow {
        animation: none;
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
        filter: none;
        background: linear-gradient(
            125deg,
            #dc2626 0%,
            #ea580c 14%,
            #ca8a04 28%,
            #16a34a 42%,
            #0d9488 56%,
            #2563eb 70%,
            #9333ea 84%,
            #db2777 100%
        );
    }

    .ld-news-card:hover {
        transform: none;
    }
}

.ld-profile-photo[src*="noimage.png"] {
    object-fit: contain !important;
    background-color: #f1f5f9;
}

/* Tin nổi bật — carousel ảnh lớn */
.featured-main-image[src*="noimage.png"] {
    object-fit: contain !important;
}

img.equal-img[src*="noimage.png"] {
    object-fit: contain !important;
}

.portal-sidebar .portal-sidebar-card .card-header.bg-white,
.portal-sidebar-top .portal-sidebar-card .card-header.bg-white {
    padding-left: 0;
    padding-right: 0;
}

.sidebar-muc-icon {
    height: 20px;
    width: auto;
    flex-shrink: 0;
    display: block;
}

.sidebar-muc-title .sidebar-muc-text {
    line-height: 1.25;
    letter-spacing: 0.02em;
}

.equal-img {
    width: 100%;
    aspect-ratio: 16 / 9; /* hoặc 4/3 tuỳ ý */
    object-fit: cover;
    border-radius: 10px;
}

/* Toggle button */
/* Nút bật/tắt chatbot */
#chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 80px;
    width: 50px;
    height: 50px;
    background: url("../images/logo.png") no-repeat center center;
    background-size: cover;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s;
}

    #chatbot-toggle:hover {
        transform: scale(1.1);
    }

/* Khung chat */
#chatbot-box {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
}

/* Vùng tin nhắn */
#chatbot-messages {
    max-height: 360px;
    overflow-y: auto;
    padding: 5px;
}

/* Bong bóng chat người dùng */
.user-msg {
    background: #0078ff;
    color: #fff;
    padding: 8px 12px;
    border-radius: 15px 15px 0 15px;
    margin: 5px 0;
    display: inline-block;
    max-width: 80%;
    float: right; /* đẩy bong bóng sang phải */
    clear: both; /* tránh dính với bong bóng trước */
    text-align: left; /* chữ bên trong vẫn căn trái cho dễ đọc */
}

/* Bong bóng chat bot */
.bot-msg {
    background: #f1f1f1;
    color: #333;
    padding: 8px 12px;
    border-radius: 15px 15px 15px 0;
    margin: 5px 0;
    display: inline-block;
    max-width: 80%;
    float: left; /* đẩy bong bóng sang trái */
    clear: both;
    text-align: left;
}

    /* Avatar bot */
    .bot-msg::before {
        content: "";
        display: inline-block;
        width: 20px;
        height: 20px;
        background: url("../images/logo.png") no-repeat center center;
        background-size: contain; /* hoặc cover */
        margin-right: 5px;
        vertical-align: middle;
    }

/* Header */
#chatbot-box::before {
    content: "Trợ lý AI";
    display: block;
    background: #b22222; /* đỏ đậm */
    color: #fff9e6; /* chữ vàng nhạt */
    padding: 10px;
    font-weight: bold;
    text-align: center;
}

/* Input + button */
#chatbot-input {
    width: 100%;
    border: 1px solid #b22222;
    padding: 10px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    border-radius: 6px;
    margin: 8px;
}

#chatbot-send {
    width: calc(100% - 16px);
    margin: 0 8px 8px 8px;
    background: #b22222; /* đỏ đậm */
    color: #fff9e6; /* vàng nhạt */
    border: none;
    padding: 10px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 6px;
    transition: background 0.3s;
}

    #chatbot-send:hover {
        background: #ff0000; /* đỏ sáng hơn khi hover */
    }

@media (max-width: 767px) {
    #carouselBannerGiua,
    #carouselBannerPhai,
    .card.flex-fill {
        display: none !important;
    }
}

@media (max-width: 767px) {
    /* Chỉ hiện 3 tin đầu, ẩn từ tin thứ 4 trở đi ở Tin nổi bật khác */
    .news-item:nth-child(n+4) {
        display: none !important;
    }
}

@media (max-width: 767px) {
    /* Chỉ hiện 3 tin đầu, ẩn từ tin thứ 4 trở đi tin ngang  */
    .list-group-item:nth-child(n+3) {
        display: none !important;
    }
}

@media (max-width: 767px) {
    /* Chỉ hiện 3 video đầu, ẩn từ video thứ 4 trở đi */
    .swiper-slide:nth-child(n+3) {
        display: none !important;
    }
}

@media (max-width: 767px) {
    /* Chỉ hiện 3 tin đầu, ẩn từ tin thứ 4 trở đi */
    .mb-2:nth-child(n+3) {
        display: none !important;
    }
}

@media (max-width: 767px) {
    /* Ẩn cột thứ 3 (Trích yếu) */
    #ctl00_ContentPlaceHolder1_gvVanBan th:nth-child(3),
    #ctl00_ContentPlaceHolder1_gvVanBan td:nth-child(3) {
        display: none !important;
    }
}

.chuchay-bar {
    display: flex;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 8px 12px;
}

.date-box {
    flex: 0 0 27%;
    font-weight: bold;
    color: #DB0713;
}

.marquee-box {
    flex: 1; /* chiếm phần còn lại (70%) */
    color: #333;
    font-weight: bold;
}

/* 📱 Mobile: mỗi phần 1 dòng */
@media (max-width: 768px) {
    .chuchay-bar {
        display: block; /* đổi từ flex sang block */
        text-align: center; /* căn giữa cho đẹp */
    }

    .date-box {
        width: 100%;
        margin-bottom: 5px; /* cách dòng chữ chạy */
    }

    .marquee-box {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .card-header + .p-3 p {
        display: -webkit-box;
        -webkit-line-clamp: 3; /* số dòng muốn hiển thị (2 hoặc 3) */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 576px) {
    .p-3.bg-light.border.rounded p {
        display: -webkit-box; /* dùng flexbox ẩn dòng */
        -webkit-line-clamp: 3; /* số dòng muốn hiển thị */
        -webkit-box-orient: vertical; /* hướng dọc */
        overflow: hidden; /* ẩn phần dư */
        text-overflow: ellipsis; /* thêm dấu ... */
    }
}

@media (max-width: 576px) {
    .banner-wrapper {
        display: none !important; /* ẩn toàn bộ banner */
    }

    .chuchay-bar {
        display: none !important; /* ẩn khối chữ chạy */
    }
}

/* ========== Trang tìm kiếm văn bản (SearchDocument.aspx) ========== */
.search-document-page {
    --sd-accent: #b91c1c;
    --sd-accent-dark: #9f1239;
    --sd-radius: 12px;
}

.search-document-page .search-doc-filter {
    border: 1px solid rgba(185, 28, 28, 0.15);
    border-radius: var(--sd-radius);
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    background: #fff;
}

.search-document-page .search-doc-filter__head {
    background: linear-gradient(135deg, #9f1239 0%, #b91c1c 45%, #dc2626 100%);
    color: #fff;
    padding: 1rem 1.25rem;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.search-document-page .search-doc-filter__head i {
    font-size: 1.35rem;
    opacity: 0.95;
}

.search-document-page .search-doc-filter__body {
    padding: 1.25rem 1.25rem 1rem;
}

.search-document-page .search-doc-filter__body .form-control,
.search-document-page .search-doc-filter__body .form-select {
    border-radius: 10px;
    border-color: #e2e8f0;
}

.search-document-page .search-doc-filter__body .form-control:focus,
.search-document-page .search-doc-filter__body .form-select:focus {
    border-color: rgba(185, 28, 28, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(185, 28, 28, 0.12);
}

.search-document-page .search-doc-actions .btn-danger {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(180deg, #e11d2f 0%, #c8101f 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.35);
}

.search-document-page .search-doc-actions .btn-danger:hover {
    filter: brightness(1.05);
}

.search-document-page .search-doc-actions .btn-outline-secondary {
    border-radius: 10px;
    font-weight: 600;
}

.search-document-page .search-doc-results {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--sd-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    background: #fff;
}

.search-document-page .search-doc-results__head {
    padding: 0.9rem 1.25rem;
    background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.search-document-page .search-doc-results__title {
    font-weight: 700;
    color: #1e293b;
    font-size: 1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-document-page .search-doc-results__title i {
    color: var(--sd-accent);
}

.search-document-page .search-doc-badge {
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.4em 0.75em;
    border-radius: 999px;
    background: rgba(185, 28, 28, 0.1);
    color: var(--sd-accent-dark);
    border: 1px solid rgba(185, 28, 28, 0.2);
}

/* Bảng kết quả */
.search-document-page .search-doc-table {
    font-size: 0.925rem;
    margin-bottom: 0 !important;
    --bs-table-striped-bg: rgba(248, 250, 252, 0.85);
}

.search-document-page .search-doc-table thead th {
    background: #fff;
    color: var(--sd-accent-dark);
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid rgba(185, 28, 28, 0.25) !important;
    padding: 0.85rem 0.75rem;
    white-space: nowrap;
}

.search-document-page .search-doc-table tbody td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
    border-color: #eef2f7 !important;
}

.search-document-page .search-doc-table tbody tr:hover td {
    background-color: rgba(254, 242, 242, 0.45) !important;
}

.search-document-page .search-doc-stt {
    font-weight: 700;
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: center;
}

.search-document-page .search-doc-skh {
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.search-document-page .search-doc-trichyeu {
    color: #334155;
    line-height: 1.45;
    text-align: justify;
    max-width: 420px;
}

.search-document-page .search-doc-meta {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.35;
}

.search-document-page .search-doc-date {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.search-document-page .search-doc-table .btn-view-doc {
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(185, 28, 28, 0.35);
    color: var(--sd-accent);
    background: #fff;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.search-document-page .search-doc-table .btn-view-doc:hover {
    background: linear-gradient(180deg, #e11d2f 0%, #c8101f 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.35);
}

/* Phân trang GridView — ô pager */
.search-document-page td.search-doc-pager {
    border-top: 1px solid #e5e7eb !important;
    background: linear-gradient(180deg, #fafbfc 0%, #f1f5f9 100%) !important;
    padding: 1rem 0.75rem !important;
    text-align: center !important;
}

.search-document-page td.search-doc-pager table {
    margin: 0 auto !important;
    border: none !important;
}

.search-document-page td.search-doc-pager table td {
    border: none !important;
    padding: 4px !important;
}

.search-document-page td.search-doc-pager a,
.search-document-page td.search-doc-pager span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.35rem;
    min-height: 2.35rem;
    padding: 0 0.5rem;
    margin: 0 2px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.search-document-page td.search-doc-pager a {
    color: var(--sd-accent);
    background: #fff;
    border: 1px solid #e2e8f0;
}

.search-document-page td.search-doc-pager a:hover {
    background: rgba(254, 242, 242, 0.9);
    border-color: rgba(185, 28, 28, 0.35);
}

/* Trang hiện tại (span) */
.search-document-page td.search-doc-pager span {
    color: #fff !important;
    background: linear-gradient(180deg, #e11d2f 0%, #c8101f 100%);
    border: 1px solid #c8101f;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.35);
}

.search-document-page .search-doc-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #64748b;
}

.search-document-page .search-doc-empty i {
    font-size: 3rem;
    color: #cbd5e1;
    display: block;
    margin-bottom: 1rem;
}

.search-document-page .search-doc-empty strong {
    color: #334155;
    font-size: 1.05rem;
}

@media (max-width: 767px) {
    .search-document-page .search-doc-trichyeu {
        max-width: none;
    }
}