:root {
    --primary-color: #ce9310;
    --bg-body: #0a0a0a;
    --bg-box: #161616;
    --text-main: #ddd;
    --border-color: #333;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', sans-serif; }
body { background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; }

/* Header & Nav */
header { background: #000; padding: 20px 0; border-bottom: 2px solid var(--primary-color); text-align: center; }
header h1 { color: var(--primary-color); text-transform: uppercase; font-size: 1.8rem; }
nav.main-nav { background: #1a1a1a; border-bottom: 1px solid var(--border-color); }
nav.main-nav .container { display: flex; align-items: center; }
@media (max-width: 768px) {
    .nav-spacer {
        display: none;
    }

    nav.main-nav .container {
        justify-content: center;
    }
}
nav.main-nav ul { display: flex; list-style: none; }
nav.main-nav a { display: block; padding: 15px 20px; color: #bbb; text-decoration: none; font-weight: bold; font-size: 0.9rem; }
nav.main-nav a:hover, nav.main-nav a.active { color: #fff; background: #333; border-bottom: 2px solid var(--primary-color); }

/* Layout */
/* =========================
   DESKTOP FIX
   ========================= */
@media (min-width: 769px) {

    .container {
        width: 1200px;
        margin: 0 auto;
        padding: 0;
    }

    .wrapper {
        display: flex;
    }

    .sidebar {
        width: 250px;
        position: sticky;
        top: 90px;
    }

    .main-content {
        width: auto;
    }

    .nav-spacer {
        display: block;
        width: 250px;
    }
}
.wrapper { display: flex; gap: 20px; margin-top: 20px; }
.sidebar { width: 250px; flex-shrink: 0; }
.main-content { flex-grow: 1; background: var(--bg-box); border: 1px solid var(--border-color); padding: 25px; border-radius: 4px; min-height: 600px; }

/* UI Elements */
.sidebar-box { background: var(--bg-box); border: 1px solid var(--border-color); margin-bottom: 20px; }
.sidebar-header { background: var(--primary-color); color: #000; padding: 10px; font-weight: bold; text-align: center; text-transform: uppercase; }
.sidebar ul li a { display: block; padding: 10px 15px; color: #bbb; text-decoration: none; border-bottom: 1px solid #222; }
.sidebar ul li a:hover, .sidebar ul li a.active { color: var(--primary-color); background: #222; }

h2 { color: var(--primary-color); border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 20px; text-transform: uppercase; }
.highlight-box { background: #222; border-left: 4px solid #b30000; padding: 15px; margin: 20px 0; }
.btn-large { background: #b30000; color: #fff; padding: 15px 40px; text-decoration: none; font-weight: bold; border-radius: 5px; }
footer { text-align: center; padding: 40px; color: #666; font-size: 0.8rem; }

/* Danh sách bài viết hàng dọc */
.article-list-container {
    display: flex;
    flex-direction: column; /* Ép xuống dòng */
    gap: 10px;
    margin-bottom: 30px;
}

/* Màu chữ riêng cho link bài viết (khác màu vàng của tiêu đề mục) */
.article-item-link {
    color: #5d9cec !important; /* Màu xanh lơ dịu mắt, bạn có thể đổi thành màu khác */
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.95rem;
    transition: 0.3s;
}

.article-item-link:hover {
    color: #fff !important;
    padding-left: 5px; /* Hiệu ứng nhích sang phải khi di chuột */
}

/* Chỉnh lại tiêu đề mục cho nổi bật */
.main-content h2 {
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-top: 20px;
    background: linear-gradient(90deg, #222, transparent);
    padding-top: 5px;
    padding-bottom: 5px;
}

.article-item-link {
    color: #5d9cec !important; /* Màu xanh lơ cho tên bài viết */
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
}

.article-item-link:hover {
    color: #fff !important;
    text-decoration: underline;
}

/* Tiêu đề mục giữ màu vàng */
.main-content h2 {
    color: var(--primary-color);
}

.sidebar ul {
    list-style: none;      /* bỏ dấu chấm */
    padding-left: 0;       /* bỏ thụt lề mặc định */
    margin: 0;
}

.sidebar ul li {
    margin: 8px 0;
}

.sidebar {
    position: sticky;
    top: 90px; /* cách header bao nhiêu px thì chỉnh */
    height: fit-content;
}

@media (max-width: 768px) {

    /* Tổng thể */
    .container {
        padding: 0 10px;
    }

    .wrapper {
        display: block !important;
    }

    /* ẨN sidebar trên mobile */
    .sidebar {
        width: 100% !important;
        margin: 0 0 15px 0;
        float: none;
    }

    /* Nếu là trang chủ → show sidebar */
    body.home-page .sidebar {
        display: block;
    }

    /* Nếu là trang hướng dẫn & bài viết → ẩn sidebar */
    body.guide-page .sidebar {
        display: none;
    }

    /* Nội dung chính */
    .main-content {
        width: 100% !important;
        padding: 15px !important;
    }
}

/* SOCIAL LINKS */
.social-links {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social {
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Màu từng nền tảng */
.social.zalo {
    background: #0068ff;
}

.social.facebook {
    background: #1877f2;
}

.social.telegram {
    background: #2aa9e0;
}

/* FIX LỆCH FORM DO SCROLLBAR */
html {
    overflow-y: scroll;
}
