/* ==================
   GLOBAL & COMMON STYLES
   ================== */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f9;
}

/* ==================
   HEADER STYLES
   ================== */
#header-placeholder {
    background-color: #ffffff;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e0e0e0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* <-- THÊM DÒNG NÀY */
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 50px;
    margin-right: 10px;
}

.site-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #2d2f31;
}

.main-nav a {
    margin-left: 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

.main-nav a:hover {
    color: #5624d0;
}


/* ==================
   NEW FOOTER STYLES
   ================== */
#footer-placeholder {
    background-color: #ffffff;
    color: #333;
    margin-top: 50px;
    border-top: 1px solid #e9ecef;
    /* Màu viền sáng hơn */
    font-size: 0.95em;
}

.footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.footer-grid {
    display: grid;
    /* Tạo 4 cột trên màn hình lớn, và tự động xuống hàng trên màn hình nhỏ */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.footer-column .footer-brand {
    font-size: 1.8em;
    font-weight: bold;
    color: #0d6efd;
    /* Màu xanh dương giống mẫu */
    margin: 0 0 10px 0;
}

.footer-column .footer-about {
    line-height: 1.7;
    color: #555;
}

.footer-column .footer-heading {
    font-size: 1.1em;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #212529;
    /* Màu đen đậm hơn */
}

.footer-list,
.footer-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-list li a {
    text-decoration: none;
    color: #555;
    display: block;
    padding: 5px 0;
    transition: color 0.2s, padding-left 0.2s;
}

.footer-list li a:hover {
    color: #0d6efd;
    padding-left: 5px;
}

/* Thêm icon > vào trước link */
.footer-list li a::before {
    content: '>';
    margin-right: 10px;
    color: #0d6efd;
    font-weight: bold;
}

.footer-info li {
    display: flex;
    align-items: center;
    padding: 6px 0;
    color: #555;
}

.footer-info li i {
    color: #0d6efd;
    margin-right: 12px;
    width: 20px;
    /* Căn chỉnh các icon thẳng hàng */
    text-align: center;
}

.footer-info li a {
    text-decoration: none;
    color: #555;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.footer-info li a:hover {
    color: #0d6efd;
}

.footer-bottom {
    background-color: #f8f9fa;
    text-align: center;
    padding: 15px;
    font-size: 0.85em;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}

.footer-bottom p {
    margin: 0;
}

/* ==================
   TABS COMPONENT (Dùng chung ở trang subject)
   ================== */
.tabs {
    overflow: hidden;
    border-bottom: 1px solid #ccc;
    margin-bottom: 15px;
}

.tab-link {
    background-color: inherit;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    font-size: 1em;
}

.tab-link:hover {
    background-color: #ddd;
}

.tab-link.active {
    border-bottom: 2px solid #5624d0;
    font-weight: bold;
}

.tab-content {
    display: none;
    line-height: 1.6;
}

dl dt {
    font-weight: bold;
    margin-top: 10px;
}

dl dd {
    margin-left: 20px;
}

/* ==================
   RESPONSIVE - Dành cho màn hình nhỏ (Mobile)
   ================== */
@media (max-width: 768px) {

    /* 1. Sửa Header */
    /* BÊN TRONG @media (max-width: 768px) */
    .header-container {
        /* 1. Thiết lập lại hướng và căn chỉnh */
        flex-direction: row;
        /* QUAN TRỌNG: Chuyển về hàng ngang */
        align-items: center;
        justify-content: center;
        /* Căn giữa logo */

        /* 2. Dùng position để định vị hamburger một cách chính xác */
        position: relative;
        height: 60px;
        /* Thêm chiều cao cố định để căn chỉnh dễ hơn */
    }

    .main-nav {
        /* Căn giữa các link nav */
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 20px;
    }

    .main-nav a {
        margin-left: 0;
    }

    /* 2. Sửa Footer */
    .footer-grid {
        /* Ép footer về 1 cột duy nhất */
        grid-template-columns: 1fr;
        text-align: center;
        /* Căn giữa nội dung trong footer */
    }

    .footer-list li a::before {
        display: none;
        /* Ẩn dấu > trên mobile cho gọn */
    }

    .footer-info li,
    .footer-info li a {
        justify-content: center;
        /* Căn giữa các mục thông tin */
    }

    .footer-column .footer-brand {
        font-size: 1.5em;
    }
}

/* ==================
   OFF-CANVAS SIDEBAR & OVERLAY
   ================== */

/* Lớp phủ làm mờ nền */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    /* Nằm dưới sidebar nhưng trên nội dung */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Style cơ bản cho cả hai sidebar */
.sidebar {
    position: fixed;
    top: 0;
    height: 100%;
    width: 280px;
    /* Chiều rộng của sidebar */
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
    transition: transform 0.3s ease-in-out;
    padding: 20px;
    overflow-y: auto;
}

/* Sidebar trái (menu chính) */
.left-sidebar {
    left: 0;
    transform: translateX(-100%);
    /* Ẩn về bên trái */
}

.left-sidebar.open {
    transform: translateX(0);
    /* Hiện ra */
}

.left-sidebar a {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: #333;
    font-size: 1.1em;
    border-bottom: 1px solid #eee;
}

/* Nút Hamburger */
.hamburger-btn {
    display: none;
    /* Ẩn trên desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.hamburger-btn span {
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 5px;
}

/* Class để khóa cuộn trang khi sidebar mở */
.body-no-scroll {
    overflow: hidden;
}

/* Style cho header bên trong sidebar */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px 15px 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.sidebar-logo-container {
    display: flex;
    align-items: center;
}

/* Style cho nút X */
.close-sidebar-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5em;
    color: #888;
}

.close-sidebar-btn:hover {
    color: #333;
}

/* Bỏ gạch chân cho link logo */
.logo-link {
    text-decoration: none;
    color: inherit;
}

/* Căn giữa menu chính trên desktop */
.main-nav-desktop {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.main-nav-desktop a {
    /* Giữ nguyên các style cũ và thêm margin ngang */
    margin: 0 15px; /* Khoảng cách giữa các mục menu */
    text-decoration: none;
    color: #5624d0; /* Đổi màu cho nổi bật hơn */
    font-weight: 500;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent; /* Chuẩn bị cho hiệu ứng hover */
    transition: color 0.2s, border-bottom-color 0.2s;
}

.main-nav-desktop a:hover {
    color: #401b9c;
    border-bottom-color: #401b9c; /* Hiệu ứng gạch chân khi hover */
}
/* ==================
   RESPONSIVE (Cập nhật)
   ================== */
@media (max-width: 768px) {

    /* Ẩn menu desktop trên mobile */
    .main-nav-desktop {
        display: none;
    }

    /* Hiện nút hamburger trên mobile */
    .hamburger-btn {
        display: flex;
        /* Định vị nút bấm ở góc trái */
        position: absolute;
        left: 15px;
        /* Khoảng cách từ lề trái */
        top: 50%;
        transform: translateY(-50%);
        /* Căn giữa theo chiều dọc một cách hoàn hảo */

    }


}