/* Cài đặt cơ bản cho toàn bộ trang web */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    color: #333333; /* Chữ xám đậm giúp mắt không bị mỏi khi đọc lâu */
    line-height: 1.6;
    background-color: #f5f7fa; /* Nền xám rất nhạt cho cảm giác hiện đại */
}

/* Phần Đầu trang (Header & Menu) */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); /* Tạo bóng đổ nhẹ cho thanh menu */
    position: sticky; /* Giữ menu luôn nổi trên cùng khi cuộn chuột */
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1100px; /* Độ rộng chuẩn cho web Nhật để nội dung không bị loãng */
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    color: #0056b3; /* Xanh dương đậm: Thể hiện sự chuyên nghiệp, tin cậy */
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #333333;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s;
}

nav a:hover {
    color: #0056b3; /* Đổi màu xanh khi đưa chuột vào */
}

/* Nút Mua hàng nổi bật */
.btn-buy {
    background-color: #f57c00; /* Màu cam: Kích thích hành động mua hàng */
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 4px; /* Bo góc nhẹ theo chuẩn thiết kế Nhật hiện đại */
    font-weight: 700;
}

.btn-buy:hover {
    background-color: #e65100;
    color: #ffffff;
}

/* Phần Chân trang (Footer) */
footer {
    background-color: #1e293b;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* Phần Giới thiệu chính (Hero Section) */
.hero {
    background-color: #ffffff;
    padding: 80px 20px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 36px;
    color: #1e293b; /* Màu đen xanh đậm, sang trọng */
    margin-bottom: 20px;
    line-height: 1.4;
}

.hero p {
    font-size: 16px;
    color: #475569;
    margin-bottom: 40px;
    line-height: 1.8; /* Khoảng cách dòng rộng để khách dễ đọc */
}

.hero-btn {
    display: inline-block;
    background-color: #f57c00;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    padding: 15px 40px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s;
    box-shadow: 0 4px 6px rgba(245, 124, 0, 0.3); /* Tạo bóng đổ màu cam 3D cho nút */
}

.hero-btn:hover {
    background-color: #e65100;
}

/* Khu vực Video mô phỏng trong Hero */
.hero-video-wrapper {
    margin: 40px auto;
    max-width: 800px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15); /* Bóng đổ 3D sâu hơn để nổi bật */
    border: 5px solid #1e293b; /* Khung viền màu đen xanh giả lập màn hình */
}

.mockup-video {
    width: 100%;
    aspect-ratio: 16 / 9; /* Tự động chia tỷ lệ khung hình video chuẩn */
    background-color: #334155;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #cbd5e1;
    font-size: 18px;
    font-weight: 700;
}

.hero-actions {
    margin-top: 30px;
}

/* Tiện ích căn giữa chung */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Phần 3 Phần mềm (Products & Tabs) */
.products {
    padding: 80px 0;
    background-color: #f5f7fa;
}

.products h2 {
    text-align: center;
    font-size: 28px;
    color: #0056b3;
    margin-bottom: 40px;
    font-weight: 700;
}

.tabs-container {
    max-width: 900px;
    margin: 0 auto;
}

.tabs-menu {
    display: flex;
    list-style: none;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 30px;
}

.tab-link {
    flex: 1;
    text-align: center;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #e2e8f0;
    border-radius: 8px 8px 0 0;
    margin: 0 5px;
}

.tab-link:hover {
    background-color: #cbd5e1;
}

.tab-link.active {
    background-color: #0056b3;
    color: #ffffff;
}

.product-card {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.product-card h3 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 20px;
    border-bottom: 2px solid #0056b3;
    padding-bottom: 10px;
    display: inline-block;
}

.product-card p {
    font-size: 16px;
    color: #475569;
    margin-bottom: 25px;
    line-height: 1.7;
}

.product-features {
    list-style: none;
    margin-bottom: 30px;
}

.product-features li {
    font-size: 16px;
    color: #1e293b;
    margin-bottom: 12px;
    font-weight: 500;
}

.btn-download {
    display: inline-block;
    background-color: #10b981; /* Màu xanh lá cây - Chuẩn UI/UX cho nút Tải xuống */
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.3s;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-download:hover {
    background-color: #059669;
}

/* Phần Bảng giá (Pricing) */
.pricing {
    padding: 80px 0;
    background-color: #ffffff; /* Đổi màu nền trắng để tách biệt với phần tính năng */
}

.pricing h2 {
    text-align: center;
    font-size: 28px;
    color: #0056b3;
    margin-bottom: 50px;
    font-weight: 700;
}

.pricing-grid {
    display: flex;
    gap: 40px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-card {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 40px 30px;
    border-radius: 8px;
    flex: 1;
    text-align: center;
    position: relative;
}

.pricing-card.popular {
    background-color: #ffffff;
    border: 2px solid #f57c00; /* Viền cam làm nổi bật gói VIP */
    box-shadow: 0 10px 25px rgba(245, 124, 0, 0.15);
    transform: scale(1.05); /* Làm gói VIP to hơn 5% so với gói thường */
}

.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f57c00;
    color: #ffffff;
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

.pricing-card h3 {
    font-size: 22px;
    color: #1e293b;
    margin-bottom: 15px;
}

.price {
    font-size: 16px;
    color: #475569;
    margin-bottom: 30px;
}

.price span {
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
}

.features-list {
    list-style: none;
    margin-bottom: 30px;
    text-align: left;
}

.features-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15px;
    color: #475569;
}

.btn-plan, .btn-plan-popular {
    display: block;
    padding: 12px 0;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-plan {
    background-color: #e2e8f0;
    color: #475569;
}

.btn-plan:hover {
    background-color: #cbd5e1;
}

.btn-plan-popular {
    background-color: #f57c00;
    color: #ffffff;
}

.btn-plan-popular:hover {
    background-color: #e65100;
}

/* Phần Hồ sơ công ty (Company Profile) */
.company {
    padding: 80px 0;
    background-color: #f5f7fa; /* Nền xám nhạt để tách biệt với phần bảng giá */
}

.company h2 {
    text-align: center;
    font-size: 28px;
    color: #0056b3;
    margin-bottom: 50px;
    font-weight: 700;
}

.company-table {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-collapse: collapse; /* Gộp đường viền bảng cho gọn gàng */
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.company-table th, .company-table td {
    padding: 20px;
    border: 1px solid #e2e8f0;
    font-size: 15px;
}

.company-table th {
    width: 30%;
    background-color: #f8fafc;
    color: #1e293b;
    text-align: left; /* Căn trái tiêu đề theo chuẩn Nhật */
    font-weight: 700;
}

.company-table td {
    width: 70%;
    color: #475569;
}

/* Phần Tin tức / Cập nhật luật (News) */
.news {
    padding: 80px 0;
    background-color: #ffffff;
}

.news h2 {
    text-align: center;
    font-size: 28px;
    color: #0056b3;
    margin-bottom: 40px;
    font-weight: 700;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
    border-top: 2px solid #1e293b;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 20px 10px;
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.3s;
}

.news-item:hover {
    background-color: #f8fafc;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 200px;
    flex-shrink: 0;
}

.news-date {
    font-size: 15px;
    color: #475569;
}

.news-category {
    font-size: 12px;
    font-weight: bold;
    padding: 4px 10px;
    color: #ffffff;
    border-radius: 20px;
}

.category-law { background-color: #ef4444; } /* Đỏ cho Luật */
.category-update { background-color: #3b82f6; } /* Xanh cho Cập nhật */
.category-tips { background-color: #10b981; } /* Xanh lá cho Mẹo */

.news-title {
    font-size: 16px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.news-title:hover {
    color: #0056b3;
    text-decoration: underline;
}

.news-btn-wrapper {
    text-align: center;
    margin-top: 30px;
}

.btn-more {
    display: inline-block;
    padding: 10px 30px;
    border: 1px solid #0056b3;
    color: #0056b3;
    font-weight: bold;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-more:hover {
    background-color: #0056b3;
    color: #ffffff;
}

/* =========================================
   TRANG CHI TIẾT BÀI VIẾT (ARTICLE PAGE)
   ========================================= */
.article-container {
    max-width: 800px;
    margin: 60px auto;
    padding: 40px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.article-header {
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.article-header h1 {
    font-size: 28px;
    color: #1e293b;
    margin-top: 15px;
    line-height: 1.4;
}

.article-content p {
    font-size: 16px;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 25px;
}

.article-content h2 {
    font-size: 22px;
    color: #0056b3;
    margin: 40px 0 15px 0;
    padding-left: 10px;
    border-left: 4px solid #f57c00; /* Vạch cam trang trí tiêu đề nhỏ */
}

.article-footer {
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 30px;
}

.btn-back {
    display: inline-block;
    padding: 10px 25px;
    background-color: #e2e8f0;
    color: #475569;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-back:hover {
    background-color: #cbd5e1;
}

/* Phần Liên hệ (Contact Section) */
.contact {
    padding: 80px 0;
    background-color: #f5f7fa; /* Nền xám nhạt để tách biệt với Hồ sơ công ty */
}

.contact h2 {
    text-align: center;
    font-size: 28px;
    color: #0056b3;
    margin-bottom: 15px;
    font-weight: 700;
}

.contact-desc {
    text-align: center;
    color: #475569;
    font-size: 15px;
    margin-bottom: 40px;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical; /* Cho phép khách hàng tự kéo giãn khung gõ chữ theo chiều dọc */
}

.contact-form textarea:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.1);
}

/* Tái cấu trúc Footer chuẩn Nhật Bản */
footer {
    background-color: #1e293b;
    color: #ffffff;
    padding: 60px 0 20px 0;
    margin-top: 0;
    text-align: left; /* Ghi đè lệnh căn giữa ở code cũ */
}

.footer-grid {
    display: flex;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    border-bottom: 1px solid #334155;
}

.footer-col {
    flex: 1; /* Chia đều 3 cột */
}

.footer-col h3 {
    font-size: 22px;
    color: #ffffff;
    margin-bottom: 15px;
}

.footer-col h4 {
    font-size: 16px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.footer-col p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-col ul a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    color: #64748b;
    font-size: 13px;
}

/* =========================================
   TỐI ƯU CHO ĐIỆN THOẠI DI ĐỘNG (RESPONSIVE)
   ========================================= */
@media (max-width: 768px) {
    /* Xếp menu gọn lại */
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    /* Thu nhỏ chữ ở phần Hero để vừa màn hình */
    .hero {
        padding: 50px 20px;
    }
    
    .hero h1 {
        font-size: 24px;
        br { display: none; } /* Bỏ ngắt dòng cứng trên điện thoại */
    }

    /* Đổi Menu Tab và Bảng giá thành xếp dọc trên điện thoại */
    .tabs-menu, .pricing-grid {
        flex-direction: column;
    }
    
    .tab-link {
        margin: 0 0 5px 0;
        border-radius: 5px;
    }

    /* Bỏ hiệu ứng phóng to của gói Pro để không tràn màn hình */
    .pricing-card.popular {
        transform: none;
    }

    /* Chuyển bảng công ty thành dạng khối xếp dọc dễ đọc */
    .company-table th, .company-table td {
        display: block;
        width: 100%;
    }
    
    .company-table th {
        border-bottom: none; /* Bỏ viền dưới của tiêu đề để nối liền với nội dung */
    }

    /* Đổi danh sách Tin tức thành xếp dọc để dễ bấm trên điện thoại */
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Đổi Footer thành xếp dọc trên điện thoại */
    .footer-grid {
        flex-direction: column;
        gap: 30px;
    }
} /* KẾT THÚC KHỐI LỆNH ĐIỆN THOẠI (Dấu ngoặc này rất quan trọng) */

/* =========================================
   FORM TẢI XUỐNG (POP-UP MODAL)
   ========================================= */
.modal {
    display: none; /* Ẩn form theo mặc định */
    position: fixed;
    z-index: 1000; /* Nổi lên trên tất cả mọi thứ */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Phủ màn đen mờ phía sau */
}

.modal-content {
    background-color: #ffffff;
    margin: 3% auto; /* Đẩy form lên cao hơn (từ 5% xuống 3%) */
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    /* Giới hạn chiều cao và tạo thanh cuộn nếu màn hình quá thấp */
    max-height: 90vh; 
    overflow-y: auto; 
}

.close-btn {
    color: #94a3b8;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: #1e293b;
}

.modal-content h2 {
    font-size: 22px;
    color: #0056b3;
    margin-bottom: 10px;
    text-align: center;
}

.modal-content > p {
    font-size: 14px;
    color: #475569;
    margin-bottom: 25px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.required {
    color: #ffffff;
    background-color: #ef4444; /* Màu đỏ cảnh báo bắt buộc điền */
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
    vertical-align: middle;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 0 0 2px rgba(0, 86, 179, 0.1);
}

.btn-submit {
    width: 100%;
    background-color: #f57c00;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #e65100;
}

.privacy-note {
    font-size: 13px;
    color: #64748b;
    margin-top: 15px;
    text-align: center;
}