* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #fff;
    color: #222;
    padding-top: 82px;
}

.NewsDetail .NTitle {
    font-size: 2.5rem;
    color: #284f9e;
    font-weight: 600;
    display: inline-block;
    margin: 0;
    padding-bottom: 20px;
}
 .NImg{
        border: 1px solid #284f9e;
    }
.NTitle, .NTitle a{
    color: #444;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}
/* Header */
.site-header {
    background-color: #284f9e;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-wrapper {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

.main-header {
    display: flex;
    align-items: center;
    justify-content:center;
    padding: 20px 0;
}
/* Menu tim kiem */
.main-header .headToolBar a{
    color:#fff;
    font-size: 15px;
}
.SearchMenu a {
    color: #fff;
    margin: 0px 10px 0px 10px;
    text-align: center;
    font-weight:400;
}

.logo-section {
    display: none; /* Ẩn logo ở màn hình lớn */
}

.subimg-logo {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 24px;
    color: #284f9e;
    text-decoration: none;
    letter-spacing: 3px;
    padding: 0 15px;
}

.site-title {
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    border-left: 1px solid rgba(255,255,255,0.3);
    padding-left: 18px;
}

/* MLIS Main Nav Styling */
.main-nav {
    display: flex;
    gap: 30px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-right:30px;
}

.main-nav li {
    display: inline-block;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
    transition: opacity 0.2s;
}

.main-nav a:hover,
.main-nav a.Selected {
    opacity: 0.8;
}

.search-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

/* Page Container */
.page-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 30px 40px 0px 460px; /* Tăng left padding từ 320px lên 460px để có khoảng cách 40px với sidebar */
    display: block;
}



/* Left Sidebar */
.left-sidebar {
    position: fixed;
    top: 75px;
    left: 0;
    width: 420px;
    height: calc(100vh - 82px);
    overflow-y: auto;
    background-color: #f7f7f7;
    padding: 0;
    /*border-right: 1px solid #e0e0e0;*/
    z-index: 100;
}

/* Logo trong sidebar cho màn hình lớn */
.sidebar-logo {
    display: block;
    padding: 20px 25px;
    background-color: #f7f7f7;
    text-align: center;
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
}

/* Sidebar Part 1 - MLIS Dynamic Menu */
.sidebar-part1 {
    padding: 30px 25px;
}

/* Sidebar Part 2 - Content Switch Links */
.sidebar-part2 {
    background-color: #f7f7f7;
    padding: 0px 25px;
}

.sidebar-part2-title {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ccc;
}

.left-sidebar::-webkit-scrollbar {
    width: 8px;
}

.left-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.left-sidebar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 4px;
}

.left-sidebar:hover::-webkit-scrollbar-thumb {
    background: #999;
}

.left-sidebar::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Firefox scrollbar */
.left-sidebar {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.left-sidebar:hover {
    scrollbar-color: #999 transparent;
}

.sidebar-section {
    margin-bottom: 15px;
}

.sidebar-title {
    display: none;
}

/* MLIS Sidebar Links Styling */
.sidebar-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-links li {
    margin-bottom: 12px;
}

.sidebar-links a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    display: block;
    padding: 14px 16px;
    background-color: #fff;
    border-radius: 6px;
    border-left: 3px solid #e0e0e0;
    /*transition: all 0.3s;*/
}

.sidebar-links a:hover {
    background-color: #e8e8e8;
    border-left-color: #284f9e;
    transform: translateX(5px);
    border-bottom: #284f9e;
}

.sidebar-links a.Selected,
.sidebar-links .Selected a {
    background-color: #284f9e;
    color: #fff;
    border-left-color: #1e3c72;
    font-weight: 600;
}
.news-title-text .NTitle{
    margin-bottom: 20px;
}
.news-title-text .NTitle:before {
    display: inline-block;
    font-family: 'FontAwesome';
    content: '\F105';
    margin: 0px 10px 0 0px;
    font-size: 13px;
}
.content-news-list{
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 3px solid #e0e0e0;
    padding-top: 30px;
}

/* Content Switch Links Styling */
.content-switch-links {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top:3px solid #e0e0e0;
    padding-top: 30px;
}

.content-switch-links li {
    margin-bottom: 10px;
}

.content-switch-links a {
    color: #444;
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    display: block;
    transition: color 0.2s;
}

.content-switch-links a:hover {
    color: #284f9e;
}

.content-switch-links a.active {
    color: #284f9e;
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding-top: 0;
    overflow-y: visible;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
    /* Bỏ hết các thuộc tính height */
}

.main-content::-webkit-scrollbar {
    width: 10px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 5px;
}

.main-content:hover::-webkit-scrollbar-thumb {
    background: #888;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Firefox scrollbar */
.main-content {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.main-content:hover {
    scrollbar-color: #888 transparent;
}

/* Mobile Content Switch - Ẩn trên desktop */
.mobile-content-switch {
    display: none;
}

/* Part 1 - Dynamic Content */
.content-part1 {
    background-color: #fff;
    position: relative;
    max-width: none; /* Bỏ giới hạn max-width */
    margin: 0; /* Bỏ margin auto */
    /* Chiều cao sẽ tự động theo nội dung */
}

/* Dynamic Content Sections */
.dynamic-section {
     display: none;
}

.dynamic-section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

.content-meta {
    color: #666;
    font-size: 14px;
}

.content-body {
    line-height: 1.7;
    color: #333;
}

.content-body p {
    margin-bottom: 18px;
    font-size: 16px;
}

.content-body h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 30px 0 15px;
    color: #222;
}

.content-body ul {
    margin: 15px 0;
    padding-left: 25px;
}

.content-body li {
    margin-bottom: 10px;
}

.content-part1 .scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: #999;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Part 2 - Static Content */
/* ĐỨNG NGOÀI page-container - FULL WIDTH */
.content-part2, #rowBottom, #rowFooter {
    /*border-top: 4px solid #284f9e;*/
    /*padding: 50px 40px;*/
    width: 100%;
    margin: 0;
    margin-left: 420px; /* Offset để tránh sidebar */
    width: calc(100% - 420px); /* Trừ đi width của sidebar */
}

.content-part2-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 0;
}

/*.content-part2 h2 {
    font-size: 28px;
    font-weight: 700;
    color: #284f9e;
    margin-bottom: 30px;
    text-align: center;
}*/

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.info-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.info-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: #284f9e;
    margin-bottom: 15px;
}

.info-card p {
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

.info-card ul {
    margin-top: 15px;
    padding-left: 20px;
}

.info-card li {
    margin-bottom: 8px;
    color: #666;
}

/* Mobile Menu */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    z-index: 1002;
    position: relative;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 82px;
    left: 0;
    width: 100%;
    height: calc(100vh - 82px);
    background-color: #fff;
    z-index: 999;
    overflow-y: auto;
}

.mobile-menu-overlay.active {
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 30px 20px;
}

.mobile-menu-section {
    margin-bottom: 30px;
}

.mobile-menu-section:first-child {
    flex-shrink: 0;
}

.mobile-menu-section:last-child {
    flex: 1;
    margin-bottom: 0;
}

.mobile-menu-section h3 {
    display: none;
}

/* Mobile Nav Styles */
.mobile-menu-overlay .main-nav {
    display: inline-block;
    flex-direction: column;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-overlay .main-nav li {
    display: block;
    margin-bottom: 0;
}

.mobile-menu-overlay .main-nav a {
    display: block;
    padding: 5px 0px;
    color: #333;
    /*background-color: #f5f5f5;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;*/
    transition: all 0.3s;
}

.mobile-menu-overlay .main-nav a:hover,
.mobile-menu-overlay .main-nav a.Selected {
    background-color: #284f9e;
    color: #fff;
    border-left-color: #1e3c72;
    transform: translateX(5px);
}

/* Mobile Sidebar Links Styles */
.mobile-menu-overlay .sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-overlay .sidebar-links li {
    margin-bottom: 0;
}

.mobile-menu-overlay .sidebar-links a {
    display: block;
    padding: 15px 20px;
    color: #333;
    background-color: #f5f5f5;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #e0e0e0;
    transition: all 0.3s;
}

.mobile-menu-overlay .sidebar-links a:hover,
.mobile-menu-overlay .sidebar-links a.Selected,
.mobile-menu-overlay .sidebar-links .Selected a {
    background-color: #284f9e;
    color: #fff;
    border-left-color: #1e3c72;
    transform: translateX(5px);
}
.mobile-menu-overlay .SearchMenu a{
    color:#284f9e;
}

/* Responsive */
@media (max-width: 991px) {
    .headToolBar {
        display:block;
        float: none;
    }
}

@media (max-width: 968px) {
   
    .main-header{
        justify-content:space-around;
    }
    .subimg-logo{
        height: 60px;
    }
    body {
        padding-top: 82px;
    }

    /* Đổi màu header sang trắng cho mobile */
    .site-header {
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    /* Hiển thị logo trong header cho mobile */
    .logo-section {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    /* Ẩn logo trong sidebar cho mobile */
    .sidebar-logo {
        display: none;
    }

    /* Đổi màu nút toggle sang xanh */
    .mobile-toggle {
        display: block;
        color: #284f9e;
    }

    /* Ẩn main nav cho mobile */
    .main-nav {
        display: none;
    }
    .main-header .headToolBar, .main-header .MenuTT{
        display:none;
    }

    .page-container {
        height: auto !important;
    min-height: auto !important;
        padding: 0px 20px 0px 20px;
    }

    .left-sidebar {
        display: none;
    }

    /* Ẩn sidebar-part2 trong sidebar cho mobile */
    .sidebar-part2 {
        display: none;
    }

    /* Hiển thị mobile-content-switch trong main-content */
    .mobile-content-switch {
        display: block;
        background-color: #f7f7f7;
        padding: 20px;
        margin: 50px 0;
        border-radius: 8px;
    }

    .mobile-content-switch .sidebar-part2-title {
        font-size: 13px;
        font-weight: 700;
        color: #555;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        margin-bottom: 15px;
        padding-bottom: 8px;
        border-bottom: 1px solid #ccc;
    }

    .mobile-content-switch .content-switch-links {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-content-switch .content-switch-links li {
        margin-bottom: 10px;
    }

    .mobile-content-switch .content-switch-links a {
        color: #444;
        text-decoration: none;
        font-size: 14px;
        line-height: 1.7;
        display: block;
        padding: 12px 15px;
        background-color: #fff;
        border-radius: 6px;
        border-left: 3px solid #e0e0e0;
        transition: all 0.3s;
    }

    .mobile-content-switch .content-switch-links a:hover {
        background-color: #e8e8e8;
        border-left-color: #284f9e;
        transform: translateX(5px);
    }

    .mobile-content-switch .content-switch-links a.active {
        background-color: #284f9e;
        color: #fff;
        border-left-color: #1e3c72;
        font-weight: 600;
    }

    .main-header {
        position: relative;
    }

    .search-btn {
        display: none;
    }

    .main-content {
       height: auto !important;
    min-height: auto !important;
    overflow-y: visible !important;
    }

    .content-part1 {
        padding: 20px;
        min-height: auto;
    }

    /* Content-part2 cho mobile */
    .content-part2, #rowBottom, #rowFooter {
        margin-left: 0; /* Bỏ offset sidebar */
        width: 100%; /* Full width cho mobile */
    }

    .content-part2-wrapper {
        padding-left: 0; /* Bỏ offset sidebar */
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .header-wrapper {
        padding: 0 20px;
    }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Footer */



/* Đảm bảo content-part2 cũng nổi trên sidebar khi scroll */
.content-part2 {
    position: relative;
    z-index: 101;
    background-color: #fff;
}

/* Thêm margin-bottom cho page-container để tránh footer bị dính */
.page-container {
    margin-bottom: 0;
}

