/* --- Cài đặt Nền tảng & Biến màu --- */
:root {
    --primary-blue: #0d6efd;
    --primary-blue-dark: #0b5ed7;
    --secondary-blue: #e7f3ff;
    --text-dark: #212529;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dee2e6;
    --success-color: #198754;
    --header-bg: #111827; /* NỀN TỐI CHO HEADER */
    --header-text: #e5e7eb; /* Màu chữ trên nền tối */
    --header-text-hover: #ffffff;
}

body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; color: var(--text-dark); line-height: 1.7; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 80px 0; }
h1, h2, h3 { font-weight: 700; line-height: 1.3; }
h1 { font-size: 3.2rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

/* === HEADER CHUYÊN NGHIỆP === */
.main-header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--header-text-hover);
    text-decoration: none;
}

/* Navigation cho Desktop */
.header-nav.desktop-nav {
    display: none; /* Ẩn trên mobile */
}
@media (min-width: 992px) {
    .header-nav.desktop-nav {
        display: flex;
        align-items: center;
    }
}
.header-nav a {
    text-decoration: none;
    color: var(--header-text);
    font-weight: 600;
    margin-left: 1.5rem;
    transition: color 0.2s ease;
}
.header-nav a:hover {
    color: var(--header-text-hover);
}
.header-nav a.btn {
    border-color: var(--header-text);
    color: var(--header-text);
}
.header-nav a.btn:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

/* Nút Hamburger cho Mobile */
.mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 1.5rem;
    cursor: pointer;
}
@media (min-width: 992px) {
    .mobile-nav-toggle {
        display: none;
    }
}

/* Navigation cho Mobile (Menu trượt ra) */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%; /* Ẩn bên ngoài màn hình */
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--header-bg);
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    padding: 2rem;
}
.mobile-nav.is-active {
    right: 0; /* Hiện ra */
}
.mobile-nav a {
    color: var(--header-text);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    padding: 1rem 0;
    border-bottom: 1px solid #374151;
}
.mobile-nav a.btn {
    margin-top: 2rem;
    text-align: center;
    background-color: var(--primary-blue);
    color: white;
    border: none;
}
.mobile-nav .close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
}

/* --- Nút bấm (CTA) chuyên nghiệp --- */
.btn { display: inline-block; padding: 12px 28px; font-weight: 600; font-size: 1rem; text-decoration: none; border-radius: 8px; transition: all 0.3s ease; }
.btn-primary { background-color: var(--primary-blue); color: white; }
.btn-primary:hover { background-color: var(--primary-blue-dark); transform: translateY(-2px); }
.btn-secondary { background-color: transparent; color: var(--text-dark); border: 2px solid var(--border-color); cursor: pointer; }
#view-demo-btn { color: white; }
#view-demo-btn:hover { color: var(--text-dark); }
.btn-secondary:hover { background-color: white; border-color: var(--primary-blue); }

/* === 1. Hero Section === */
.hero {
    position: relative;
    background-image: url("/static/img/b2b_hero_background.png/");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 120px 20px;
    text-align: center;
    z-index: 1;
    color: white;
    overflow: hidden;
}

/* Overlay tạo độ đậm dễ đọc chữ */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.2));
    z-index: 0;
}

/* Đảm bảo nội dung luôn nằm trên ảnh */
.hero .container {
    position: relative;
    z-index: 2;
    max-width: 1140px;
}

/* Responsive Typography */
.hero h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: #eaeaea;
    max-width: 700px;
    margin-bottom: 2rem;
}

/* Nút CTA vẫn giữ nguyên như bạn đã có */
.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* === 2. Social Proof Section === */
.social-proof { text-align: center; padding: 40px 0; }
.social-proof p { font-size: 1.1rem; font-weight: 500; color: var(--text-light); margin-bottom: 1rem; }
.partner-logos { display: flex; justify-content: center; align-items: center; gap: 3rem; filter: grayscale(1); opacity: 0.6; }
.partner-logos img { max-height: 40px; }

/* === 3 & 4. Problem/Solution Section === */
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 3rem; align-items: center; }
@media(min-width: 992px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.problem-solution ul { list-style: none; padding: 0; }
.problem-solution li { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; }
.problem-solution .icon { font-size: 1.5rem; margin-top: 5px; }
.problem-solution .icon.problem { color: #dc3545; }
.problem-solution .icon.solution { color: var(--success-color); }

/* === 5. Features Section === */
.features { background-color: var(--bg-light); }
.section-header { text-align: center; margin-bottom: 3rem; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.feature-card { background: var(--bg-white); padding: 2rem; border-radius: 12px; border: 1px solid var(--border-color); }
.feature-card .icon { font-size: 2rem; color: var(--primary-blue); margin-bottom: 1rem; }

/* === Footer === */
.site-footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 60px 0 20px;
    font-size: 0.95rem;
}

.footer-content {
    display: grid;
    /* NÂNG CẤP: Chia 4 cột linh hoạt */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid #374151;
}

.footer-column h3, .footer-column h4 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-column.footer-about p {
    line-height: 1.7;
    max-width: 350px;
    margin-bottom: 1.5rem;
}

.footer-column.footer-contact p {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.footer-column a {
    display: block;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
    margin-bottom: 0.75rem;
}

.footer-column a:hover {
    color: #ffffff;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}
.social-icons a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #374151;
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.1rem;
}
.social-icons a:hover {
    background-color: var(--primary-blue);
}

.footer-bottom {
    text-align: center;
    font-size: 0.9rem;
}
.footer-bottom p {
    margin: 0;
}

.certifications {
    margin-top: 1.5rem;
}
.certifications img {
    max-height: 45px; /* Điều chỉnh kích thước logo BCT cho phù hợp */
    width: auto;
}


/* Responsive cho Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr; /* Chuyển thành 1 cột trên mobile */
        text-align: center;
    }
    .footer-column.footer-about p {
        margin-left: auto;
        margin-right: auto;
    }
    .footer-column.footer-contact p {
        justify-content: center;
    }
    .social-icons {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .hero h1, .hero h2 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

/* === Bảng giá === */
.pricing {
    background-color: var(--bg-light);
}

.pricing .subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 1rem auto 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 cột cho mobile */
    gap: 2rem;
    margin-top: 3rem;
    align-items: stretch;
}

/* 3 cột cho desktop */
@media (min-width: 992px) {
    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pricing-card {
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.pricing-card.recommended {
    border-color: var(--primary-blue);
    position: relative;
    transform: scale(1.05); /* Làm gói này to hơn một chút */
}

.recommended-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-blue);
    color: #fff;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.pricing-card h3 { font-size: 1.5rem; }
.price { font-size: 3rem; font-weight: 800; color: var(--text-dark); margin: 1rem 0; }
.price span { font-size: 1rem; font-weight: 500; color: var(--text-light); }

.feature-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    flex-grow: 1; /* Đẩy nút bấm xuống dưới cùng */
    text-align: left;
}
.feature-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.feature-list i {
    color: var(--success-color);
}
.feature-list strong {
    color: var(--primary-blue);
}

.pricing-card .btn {
    width: 82%;
    margin-top: auto;
}

/* --- MODAL DEMO CHUYÊN NGHIỆP --- */
.modal {
    display: none; /* Mặc định ẩn */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(33, 37, 41, 0.7);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    padding: 2rem;
    animation: fadeInModal 0.3s ease-out;
}
.modal.visible { display: flex; }
.modal-content {
    position: relative;
    background: var(--bg-white);
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    height: 90%;
    max-height: 600px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    animation: slideDownModal 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal .close {
    color: #fff;
    background-color: rgba(0,0,0,0.3);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    z-index: 10;
}
.modal .close:hover { transform: rotate(90deg); background-color: rgba(0,0,0,0.5); }

.demo-gallery {
    width: 100%;
    height: 100%;
    position: relative;
}
.demo-slides-container {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}
.demo-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
}
.demo-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Hiển thị toàn bộ ảnh */
    background-color: #f1f3f5;
}
.demo-slide .caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 40px 30px 30px;
    text-align: center;
}
.demo-slide .caption h3 { font-size: 1.5rem; }

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.nav-arrow:hover { background-color: rgba(0,0,0,0.5); }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

@keyframes fadeInModal { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDownModal { from { transform: translateY(-30px); } to { transform: translateY(0); } }