/* ==========================================================================
   Moban 8-10-3 — main.css
   Phong cách: Tạp chí biên tập (Editorial Magazine)
   Bảng màu: Thép xám #5A6B7B | Hổ phách #E8A13A | Nền xám nhạt #ECEFF2
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&display=swap');

/* Page-level horizontal overflow guard */
html, body { overflow-x: hidden; }

:root {
    --steel: #5A6B7B;
    --steel-dark: #3E4B59;
    --steel-deep: #2B333C;
    --amber: #E8A13A;
    --amber-dark: #C9832A;
    --paper: #ECEFF2;
    --white: #ffffff;
    --ink: #1E242B;
    --line: #D5DAE0;
    --font-display: 'Oswald', 'Roboto', sans-serif;
    --font-body: 'Roboto', sans-serif;
}

/* ====== Bố cục tổng thể ====== */
.site-content { min-height: 60vh; padding-bottom: 0; }

/* ====== Hàng 1: Thanh công cụ ====== */
.top-toolbar {
    background: var(--steel-deep);
    color: #B9C2CC;
    font-size: 13px;
    border-bottom: 3px solid var(--amber);
}
.toolbar-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 40px;
}
.toolbar-date { white-space: nowrap; min-width: 0; }
.toolbar-date-text { text-transform: capitalize; letter-spacing: .3px; }
.toolbar-search {
    display: flex;
    flex: 1 1 auto;
    max-width: 360px;
    min-width: 0;
}
.toolbar-search-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    background: #3A4552;
    color: var(--white);
    padding: 6px 12px;
    font-size: 13px;
    outline: none;
}
.toolbar-search-input::placeholder { color: #8C98A5; }
.toolbar-search-btn {
    border: 0;
    background: var(--amber);
    color: var(--ink);
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    cursor: pointer;
    transition: background .2s ease;
}
.toolbar-search-btn:hover { background: var(--white); }
.toolbar-social {
    margin-left: auto;
    display: flex;
    gap: 6px;
    min-width: 0;
}
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--steel);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    transition: background .2s ease, color .2s ease;
}
.social-link:hover { background: var(--amber); color: var(--ink); }

/* ====== Hàng 2: Điều hướng chính ====== */
.main-navbar {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 0 rgba(43, 51, 60, .06);
}
.navbar-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 68px;
}
.site-logo { flex: 0 0 auto; min-width: 0; }
.logo-img { max-height: 46px; width: auto; }

.main-nav { flex: 1 1 auto; min-width: 0; }
.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}
.nav-menu li { min-width: 0; }
.nav-menu a {
    display: block;
    padding: 10px 14px;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--steel-deep);
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .2s ease, border-color .2s ease;
}
.nav-menu a:hover,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
    color: var(--amber-dark);
    border-bottom-color: var(--amber);
}

.header-actions { display: flex; gap: 8px; flex: 0 0 auto; }

/* ====== Nút bấm (góc cạnh, không bo tròn) ====== */
.btn {
    display: inline-block;
    padding: 11px 26px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    border: 2px solid var(--steel);
    border-radius: 0;
    background: var(--steel);
    color: var(--white);
    cursor: pointer;
    transition: all .2s ease;
    text-align: center;
}
.btn:hover { background: var(--steel-dark); border-color: var(--steel-dark); color: var(--white); }
.btn-primary { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-dark); border-color: var(--amber-dark); color: var(--white); }
.btn-login { background: transparent; color: var(--steel); padding: 8px 18px; }
.btn-login:hover { background: var(--steel); color: var(--white); }
.btn-register { background: var(--amber); border-color: var(--amber); color: var(--ink); padding: 8px 18px; }
.btn-register:hover { background: var(--amber-dark); border-color: var(--amber-dark); color: var(--white); }
.btn-sm { padding: 7px 16px; font-size: 12px; }
.btn-block { display: block; width: 100%; }
.btn-hero {
    background: var(--amber);
    border-color: var(--amber);
    color: var(--ink);
    padding: 14px 34px;
    font-size: 15px;
}
.btn-hero:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-view-all { margin-top: 26px; }
.btn-cta { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn-cta:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-download { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn-download:hover { background: var(--steel-deep); border-color: var(--steel-deep); color: var(--white); }

/* ====== Hero bìa tạp chí ====== */
.hero-cover {
    position: relative;
    display: grid;
    grid-template-areas: "stack";
    min-height: 520px;
    align-items: end;
    background: var(--steel-deep);
    overflow: hidden;
}
.hero-media, .hero-content { grid-area: stack; }
.hero-media { position: relative; z-index: 1; min-width: 0; }
.hero-img { width: 100%; height: 520px; object-fit: cover; }
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(0deg, rgba(30,36,43,.92) 0%, rgba(30,36,43,.55) 45%, rgba(30,36,43,.15) 100%);
}
.hero-content {
    z-index: 3;
    padding-bottom: 56px;
    padding-top: 56px;
    color: var(--white);
}
.hero-kicker {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--ink);
    background: var(--amber);
    padding: 6px 14px;
    margin-bottom: 18px;
}
.hero-title {
    font-family: var(--font-display);
    font-size: 52px;
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: .5px;
    max-width: 820px;
    margin-bottom: 14px;
}
.hero-title a { color: var(--white); }
.hero-title a:hover { color: var(--amber); }
.hero-excerpt {
    max-width: 640px;
    font-size: 16px;
    color: #CDD5DD;
    margin-bottom: 26px;
}

/* ====== Tiêu đề khối (kiểu báo chí) ====== */
.section-title, .side-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--steel-deep);
    margin: 0 0 28px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--steel-deep);
}
.title-accent {
    flex: 0 0 auto;
    width: 14px;
    height: 26px;
    background: var(--amber);
}
.side-title { font-size: 19px; margin-bottom: 18px; }
.side-title .title-accent { width: 8px; height: 19px; }

/* ====== Ba cột đặc sắc ====== */
.features-section { padding: 56px 0 20px; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
.feature-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-top: 4px solid var(--steel);
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
    min-width: 0;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(43, 51, 60, .16);
    border-top-color: var(--amber);
}
.feature-card-center { border-top-color: var(--amber); }
.feature-media { position: relative; overflow: hidden; }
.feature-img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .4s ease; }
.feature-card:hover .feature-img { transform: scale(1.06); }
.feature-tag {
    position: absolute;
    top: 12px;
    left: 0;
    background: var(--steel-deep);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 5px 12px;
}
.feature-card-center .feature-tag { background: var(--amber); color: var(--ink); }
.feature-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1 1 auto; }
.feature-title {
    font-family: var(--font-display);
    font-size: 21px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--steel-deep);
    margin-bottom: 8px;
}
.feature-desc { font-size: 14px; color: #5c6874; margin-bottom: 18px; flex: 1 1 auto; }
.feature-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.feature-score {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    color: var(--amber-dark);
}

/* ====== Bố cục hai cột trang trong ====== */
.front-two-col {
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-template-areas: "main side";
    gap: 36px;
    padding: 44px 0 56px;
}
.front-main-col { grid-area: main; min-width: 0; }
.front-side-col { grid-area: side; min-width: 0; }

/* ====== Danh sách tin tức ====== */
.news-list { display: flex; flex-direction: column; }
.news-item { border-bottom: 1px solid var(--line); }
.news-link {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    align-items: flex-start;
}
.news-thumb {
    flex: 0 0 180px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
}
.news-thumb img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .35s ease; }
.news-item:hover .news-thumb img { transform: scale(1.07); }
.news-info { flex: 1 1 auto; min-width: 0; }
.news-date {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--amber-dark);
    text-transform: uppercase;
    margin-bottom: 6px;
}
.news-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--steel-deep);
    margin-bottom: 8px;
    transition: color .2s ease;
}
.news-item:hover .news-title { color: var(--amber-dark); }
.news-excerpt { font-size: 14px; color: #5c6874; }
.empty-note { padding: 24px 0; color: #7a8590; }

/* ====== Khối thanh bên ====== */
.side-block {
    background: var(--white);
    border: 1px solid var(--line);
    padding: 22px;
    margin-bottom: 24px;
}
.side-game-row {
    display: flex;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
    align-items: center;
}
.side-game-row:last-of-type { border-bottom: 0; padding-bottom: 0; }
.side-game-row img { flex: 0 0 72px; width: 72px; height: 72px; object-fit: cover; }
.side-game-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.side-game-info strong { font-family: var(--font-display); font-size: 15px; text-transform: uppercase; color: var(--steel-deep); }
.side-game-info span { font-size: 13px; color: #5c6874; }
.side-game-info a { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--amber-dark); }
.side-game-info a:hover { color: var(--steel-deep); }

/* ====== Đám mây thẻ tag ====== */
.tag-cloud-box { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud-box a {
    display: inline-block;
    padding: 5px 12px;
    background: var(--paper);
    border: 1px solid var(--line);
    color: var(--steel-dark);
    font-size: 13px;
    font-weight: 500;
    transition: all .2s ease;
}
.tag-cloud-box a:hover { background: var(--amber); border-color: var(--amber); color: var(--ink); }

.side-cat-list { list-style: none; padding: 0; margin: 0; }
.side-cat-list li { border-bottom: 1px solid var(--line); padding: 9px 0; font-size: 14px; }
.side-cat-list li:last-child { border-bottom: 0; }
.side-cat-list a { color: var(--steel-deep); font-weight: 500; }
.side-cat-list a:hover { color: var(--amber-dark); }

.side-recent-list { list-style: none; padding: 0; margin: 0; }
.side-recent-list li { border-bottom: 1px solid var(--line); padding: 9px 0; font-size: 14px; line-height: 1.5; }
.side-recent-list li:last-child { border-bottom: 0; }
.side-recent-list a { color: var(--steel-deep); }
.side-recent-list a:hover { color: var(--amber-dark); }

.side-block-cta p { font-size: 14px; color: #5c6874; margin-bottom: 16px; }

/* Widget WP mặc định trong sidebar */
.front-side-col .widget { background: var(--white); border: 1px solid var(--line); padding: 22px; margin-bottom: 24px; }
.front-side-col .widget-title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--steel-deep);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--amber);
}

/* ====== Banner CTA ====== */
.cta-strip { background: var(--steel-deep); padding: 44px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-title {
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 4px;
}
.cta-desc { color: #B9C2CC; font-size: 15px; }

/* ====== Trang lưu trữ / danh mục ====== */
.archive-head { padding: 44px 0 8px; }
.page-title {
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--steel-deep);
    padding-left: 18px;
    border-left: 8px solid var(--amber);
    line-height: 1.15;
}
.archive-sub { margin-top: 10px; padding-left: 26px; color: #5c6874; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
    padding: 28px 0 10px;
}
.post-card {
    background: var(--white);
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(43,51,60,.14); }
.post-card-media { display: block; overflow: hidden; }
.post-card-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-media img { transform: scale(1.06); }
.post-card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1 1 auto; }
.post-card-date { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--amber-dark); text-transform: uppercase; margin-bottom: 6px; }
.post-card-title {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}
.post-card-title a { color: var(--steel-deep); }
.post-card-title a:hover { color: var(--amber-dark); }
.post-card-excerpt { font-size: 14px; color: #5c6874; margin-bottom: 12px; flex: 1 1 auto; }
.post-card-more { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--steel); }
.post-card-more:hover { color: var(--amber-dark); }

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    padding: 22px 0 10px;
}

/* ====== Phân trang ====== */
.pagination-wrap { padding: 26px 0 10px; text-align: center; }
.pagination-wrap .nav-links { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination-wrap .page-numbers {
    display: inline-block;
    min-width: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--steel-deep);
    font-weight: 700;
    font-family: var(--font-display);
}
.pagination-wrap .page-numbers.current { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.pagination-wrap .page-numbers:hover { background: var(--steel); border-color: var(--steel); color: var(--white); }

/* ====== Trang chi tiết bài viết ====== */
.single-post { background: var(--white); border: 1px solid var(--line); padding: 36px 40px; margin-top: 30px; }
.single-cat {
    display: inline-block;
    background: var(--amber);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 5px 12px;
    margin-bottom: 14px;
}
.single-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--steel-deep);
    text-transform: uppercase;
    margin-bottom: 14px;
}
.single-meta { display: flex; gap: 18px; font-size: 13px; color: #7a8590; text-transform: uppercase; letter-spacing: .8px; margin-bottom: 22px; }
.single-thumbnail { margin-bottom: 26px; }
.single-thumbnail img { width: 100%; }
.single-content { font-size: 16px; color: #333d47; }
.single-content p { margin-bottom: 1.2em; }
.single-content h2, .single-content h3, .single-content h4 {
    font-family: var(--font-display);
    color: var(--steel-deep);
    text-transform: uppercase;
    margin: 1.4em 0 .6em;
}
.single-content a { color: var(--amber-dark); text-decoration: underline; }
.single-content img { margin: 1em 0; }
.single-content blockquote { border-left: 5px solid var(--amber); background: var(--paper); padding: 16px 22px; margin: 1.2em 0; font-style: italic; }
.single-content ul, .single-content ol { margin: 0 0 1.2em 1.4em; }
.single-tags { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: #5c6874; }
.single-tags a { color: var(--steel); text-decoration: underline; }
.single-download-box {
    margin-top: 30px;
    background: var(--steel-deep);
    color: var(--white);
    padding: 28px 30px;
    text-align: center;
}
.single-download-box h3 { font-family: var(--font-display); font-size: 22px; text-transform: uppercase; margin-bottom: 6px; }
.single-download-box p { color: #B9C2CC; font-size: 14px; margin-bottom: 18px; }

.single-nav {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    background: var(--white);
    border: 1px solid var(--line);
    padding: 18px 24px;
    margin-top: 24px;
    min-width: 0;
}
.single-nav-item { min-width: 0; flex: 1 1 0; }
.single-nav-item:last-child { text-align: right; }
.single-nav a { font-weight: 600; color: var(--steel-deep); }
.single-nav a:hover { color: var(--amber-dark); }

.related-section { margin-top: 40px; }

/* Trang tĩnh */
.static-page { background: var(--white); border: 1px solid var(--line); padding: 36px 40px; margin-bottom: 50px; }

/* Không tìm thấy */
.not-found-box { background: var(--white); border: 1px solid var(--line); padding: 46px 36px; text-align: center; margin: 30px 0 50px; }
.not-found-box h2 { font-family: var(--font-display); font-size: 28px; text-transform: uppercase; color: var(--steel-deep); margin-bottom: 10px; }
.not-found-box p { color: #5c6874; margin-bottom: 22px; }

/* ====== Footer ====== */
.site-footer { background: var(--steel-deep); color: #B9C2CC; margin-top: 50px; padding-top: 50px; }
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 34px;
    padding-bottom: 36px;
    border-bottom: 1px solid #3A4552;
}
.footer-widget { min-width: 0; font-size: 14px; }
.footer-widget .widget-title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--amber);
    display: inline-block;
}
.footer-widget a { color: #B9C2CC; }
.footer-widget a:hover { color: var(--amber); }
.footer-widget ul { list-style: none; padding: 0; }
.footer-widget li { padding: 5px 0; }
.footer-bottom { padding: 30px 0 36px; text-align: center; }
.disclaimer-text { font-size: 13px; line-height: 1.8; color: #8C98A5; max-width: 820px; margin: 18px auto 8px; }
.footer-copyright { font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: #6B7684; margin-top: 14px; }

/* ====== Nút quay lại đầu trang ====== */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 0;
    background: var(--amber);
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: opacity .3s ease, transform .3s ease, visibility .3s ease, background .2s ease;
    box-shadow: 0 6px 18px rgba(30, 36, 43, .28);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--steel-deep); color: var(--white); }

/* ====== Menu mobile ====== */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: var(--steel);
    border: 0;
    cursor: pointer;
    padding: 0 10px;
}
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
    content: "";
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: transform .25s ease, opacity .25s ease;
    position: relative;
}
.nav-toggle-icon::before { position: absolute; top: -7px; }
.nav-toggle-icon::after { position: absolute; top: 7px; }
.nav-toggle.is-open .nav-toggle-icon { background: transparent; }
.nav-toggle.is-open .nav-toggle-icon::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open .nav-toggle-icon::after { transform: translateY(-7px) rotate(-45deg); }

/* ====== Hiệu ứng xuất hiện khi cuộn ====== */
.scroll-reveal { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
    body.js-enabled .scroll-reveal:not(.is-inview) { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
    body.js-enabled .scroll-reveal.is-inview { opacity: 1; transform: translateY(0); }
}
