/* ============================================================
   Moban 8-10-16 — responsive.css
   ============================================================ */

/* ---------- Màn hình laptop nhỏ ---------- */
@media (max-width: 1024px) {
    :root {
        --nav-width: 210px;
    }

    .game-grid,
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero {
        min-height: 540px;
    }
}

/* ---------- Máy tính bảng & mobile: timeline chuyển một phía ---------- */
@media (max-width: 768px) {
    /* Bố cục: nav thành ngăn kéo, khối nội dung xếp dọc */
    .layout-shell {
        display: block;
    }

    .side-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-105%);
        transition: transform 0.35s ease;
        z-index: 220;
    }

    body.nav-open .side-nav {
        transform: translateX(0);
    }

    body.nav-open {
        overflow: hidden;
    }

    .nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(52, 18, 41, 0.6);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.35s ease, visibility 0.35s ease;
        z-index: 210;
    }

    body.nav-open .nav-overlay {
        opacity: 1;
        visibility: visible;
    }

    /* Thanh trên cùng cho mobile */
    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 150;
        padding: 12px 18px;
        background: linear-gradient(96deg, var(--plum) 0%, var(--plum-deep) 100%);
        box-shadow: 0 6px 18px rgba(52, 18, 41, 0.3);
    }

    .mobile-topbar .logo-img {
        max-height: 42px;
    }

    body.nav-open .nav-toggle-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    body.nav-open .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }

    body.nav-open .nav-toggle-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .site-main-wrap {
        padding-top: 0;
    }

    /* Dòng thời gian: trục dời sang trái, mọi nút cùng một phía */
    .tl-track::before {
        left: 14px;
        transform: none;
    }

    .tl-node,
    .tl-node:nth-child(even) {
        display: block;
        position: relative;
        padding-left: 44px;
    }

    .tl-dot {
        position: absolute;
        left: 7px;
        top: 24px;
        margin-top: 0;
        width: 15px;
        height: 15px;
    }

    .tl-media {
        height: 170px;
    }

    /* Hero gọn lại */
    .hero {
        min-height: 480px;
    }

    .hero-stats {
        gap: 26px;
    }

    /* CTA dọc */
    .cta-banner {
        flex-direction: column;
        text-align: center;
        padding: 38px 28px;
    }

    /* Trang chi tiết */
    .single-pager {
        display: block;
    }

    .pager-item + .pager-item {
        margin-top: 16px;
    }

    .pager-next {
        text-align: left;
    }

    .static-page-card {
        padding: 30px 24px;
    }

    .footer-widgets {
        display: block;
    }

    .footer-widget + .footer-widget {
        margin-top: 28px;
    }
}

/* ---------- Điện thoại nhỏ ---------- */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        min-height: 440px;
    }

    .hero-inner {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .tl-tabs {
        gap: 8px;
    }

    .tl-tab {
        padding: 8px 18px;
        font-size: 0.84rem;
    }

    .game-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .tl-body {
        padding: 18px 18px 22px;
    }

    .section-title {
        font-size: 1.7rem;
    }

    .footer-nav {
        flex-direction: column;
        gap: 12px;
    }
}
