/* assets/css/responsive.css */

/* --- 1. Tablet & Mobile (Màn hình < 1200px) --- */
@media (max-width: 1200px) {
    :root {
        --header-height: 70px;
        --header-height: 80px;
    }

    body {
        padding-top: var(--header-height);
    }

    .container {
        padding: 0 15px;
    }

    .nav__list {
        gap: 20px;
    }
}


/* --- 2. Mobile Lớn & Tablet Dọc (Màn hình < 992px) --- */
@media (max-width: 992px) {
    .article-main__title {
        font-size: 24px;
    }

    .sidebar-news {
        flex: 1; /* Chia đều trên màn hình hẹp hơn */
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 cột */
    }
}


/* --- 3. Mobile (Màn hình < 768px) --- */
@media (max-width: 768px) {
    /* Base */
    :root {
        --header-height: 60px;
        --header-height: 70px;
    }
    
    body {
        font-size: 15px;
    }

    /* Header & Nav */
    .header__inner {
        padding: 0 10px;
    }

    .logo-text {
        font-size: 18px;
    }

    .logo-text img {
        max-height: 45px; /* Giới hạn để logo không bị quá sát viền trên điện thoại */
        max-height: 55px; /* Giới hạn để logo không bị quá sát viền trên điện thoại */
    }

    /* Mobile Menu */
    .mobile-menu-btn {
        display: flex;
        order: -1; /* Đưa nút 3 gạch sang bên trái */
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav__list {
        position: fixed;
        top: var(--header-height);
        left: -100%; /* Trượt thanh menu từ mép trái */
        width: 260px;
        height: calc(100vh - var(--header-height));
        background-color: var(--color-bg-primary);
        flex-direction: column;
        padding: 30px 20px;
        box-shadow: 5px 0 15px rgba(0,0,0,0.05); /* Đổi bóng đổ sang bên phải thanh menu */
        transition: left 0.3s ease;
        z-index: 999;
    }

    .nav__list.nav__list--active {
        left: 0; /* Menu hiển thị ở bên trái */
    }

    /* Banner */
    .hero-banner {
        min-height: 180px; /* Thu nhỏ chiều cao banner phù hợp với điện thoại */
        margin-bottom: 30px;
    }

    .hero-banner__title {
        font-size: 24px;
    }

    /* Video Section */
    .video-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cột cho mobile */
        gap: 15px;
    }

    .play-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    /* Main Content */
    .main-content {
        flex-direction: column; /* Stack dọc cột trái và phải */
        gap: 30px;
    }

    .article-main__title {
        font-size: 20px;
    }

    /* Lưới tin tức 1 cột trên mobile */
    .news-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-news {
        margin-top: 30px;
    }
    
    .news-item__thumb {
        width: 100px;
    }

    /* Buttons */
    .scroll-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    .fixed-cta {
        bottom: 70px;
        right: 15px;
        padding: 10px 15px;
        font-size: 13px;
    }

    /* Floating Contact */
    .floating-contact {
        bottom: 15px;
        left: 15px;
        gap: 10px;
    }
    
    .floating-contact__btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .btn-zalo {
        font-size: 11px;
    }

    /* Modal Video trên Mobile */
    .video-modal__content {
        width: 95%;
    }
    
    .video-modal__close {
        top: -35px;
        font-size: 30px;
    }
}

/* --- 4. Mobile Nhỏ (Màn hình < 480px) --- */
@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: 1fr; /* 1 cột cho video trên màn siêu nhỏ */
    }

    .news-item {
        flex-direction: column; /* Rớt ảnh tin tức lên trên, chữ xuống dưới */
    }
    
    .news-item__thumb {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}