:root {
    /* Brand Colors from Logo */
    --primary: #0F172A; /* Slate 900 (Màu chữ DATA) */
    --primary-light: #1E293B; /* Slate 800 */
    --primary-dark: #020617; /* Slate 950 */
    --secondary: #475569; /* Slate 600 (Màu chữ Làm chủ) */
    --accent: #F97316; /* Orange (Màu chấm tròn) */
    --accent-hover: #EA580C;
    
    /* Light Theme Neutrals */
    --bg-color: #F8FAFC; /* Slate 50 */
    --surface: #FFFFFF; /* White */
    --surface-hover: #F1F5F9; /* Slate 100 */
    --text-main: #0F172A; /* Slate 900 */
    --text-muted: #64748B; /* Slate 500 */
    --border: #E2E8F0; /* Slate 200 */
    
    /* Spacing & Misc */
    --radius-md: 12px;
    --radius-lg: 20px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--secondary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Apply subtle grid pattern to body background */
    background-image: 
        linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.2; font-weight: 800; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: var(--transition); border: none; text-decoration: none; gap: 8px;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.4); }
.btn-accent { background-color: var(--accent); color: white; }
.btn-accent:hover { background-color: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.4); }
.btn-outline { background-color: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.2); }
.btn-large { padding: 16px 32px; font-size: 1.125rem; border-radius: 12px; }

/* Header */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 100;
    border-bottom: 1px solid var(--border);
}
.header-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo img { height: 48px; width: auto; }
.nav-link { color: var(--text-muted); text-decoration: none; font-weight: 600; margin-left: 24px; transition: var(--transition); }
.nav-link:hover { color: var(--primary); }

/* Hero Section */
.hero { padding: 80px 0; position: relative; overflow: hidden; text-align: center; }
.hero-container { position: relative; z-index: 2; max-width: 900px; margin: 0 auto; }
.hero-title { font-size: 3.5rem; margin-bottom: 24px; color: var(--text-main); }
.hero-title .highlight { color: var(--accent); } /* Đổi màu highlight sang cam để nổi bật trên nền sáng */
.hero-subtitle { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 40px; }

/* Banner Showcase */
.banner-showcase {
    margin-top: 60px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
}
.banner-showcase img { width: 100%; height: auto; display: block; }

/* Ambient Glow */
.hero-bg-shapes { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.shape { position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.15; }
.shape-1 { width: 500px; height: 500px; background: var(--secondary); top: -100px; left: 0; }
.shape-2 { width: 600px; height: 600px; background: var(--accent); bottom: -200px; right: 0; }

/* Gallery Section */
.gallery { padding: 100px 0; background-color: var(--surface); }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 16px; }
.section-header p { color: var(--text-muted); font-size: 1.125rem; }

.grid-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px; }

/* Card */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    display: flex; flex-direction: column; height: 100%; position: relative;
    box-shadow: var(--shadow-sm);
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
    background: var(--surface);
}
.card-icon {
    font-size: 2.5rem; margin-bottom: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px;
    background: rgba(15, 23, 42, 0.05);
    color: var(--primary);
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.1);
}
.card-title { font-size: 1.25rem; margin-bottom: 16px; color: var(--text-main); }
.card-desc { color: var(--text-muted); margin-bottom: 32px; flex-grow: 1; }
.card-bullets { list-style: none; padding: 0; margin-bottom: 32px; flex-grow: 1; display: flex; flex-direction: column; gap: 10px; }
.card-bullets li { display: flex; align-items: flex-start; gap: 8px; font-size: 0.95rem; color: var(--text-muted); line-height: 1.5; }
.card-bullets li::before { content: "✓"; color: var(--accent); font-weight: bold; flex-shrink: 0; margin-top: 1px; }

.card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: auto;
}

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; visibility: hidden; transition: var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--surface); width: 90%; max-width: 480px;
    border-radius: var(--radius-lg); padding: 24px; position: relative;
    transform: scale(0.95) translateY(20px); transition: var(--transition);
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
.modal-content.modal-large { max-width: 800px; padding: 32px; }
.modal-overlay.active .modal-content { transform: scale(1) translateY(0); }
.close-btn {
    position: absolute; top: 16px; right: 16px; background: rgba(15,23,42,0.05); border: none;
    font-size: 1.5rem; color: var(--text-muted); cursor: pointer;
    width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.close-btn:hover { background: rgba(15,23,42,0.1); color: var(--text-main); }
.modal-header { text-align: center; margin-bottom: 16px; }
.modal-header h2 { margin-bottom: 8px; color: var(--text-main); }
.modal-header p { color: var(--text-muted); font-size: 0.95rem; }

/* Form */
.lead-form { 
    display: flex; flex-direction: column; gap: 14px; 
    max-height: 60vh; 
    overflow-y: auto; 
    padding-right: 8px; /* Dành chỗ cho scrollbar không đè lên viền */
}
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-weight: 600; font-size: 0.9rem; color: var(--text-main); }
.form-group input, .form-group select {
    padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
    font-family: inherit; font-size: 1rem; transition: var(--transition);
    background: var(--bg-color); color: var(--text-main); outline: none;
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2364748B%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 16px top 50%;
    background-size: 12px auto;
    padding-right: 40px;
    cursor: pointer;
}
.form-group input:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.15); }
.btn-submit { margin-top: 10px; width: 100%; padding: 14px; font-size: 1.1rem; }
.form-guarantee { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 8px; }

/* Privacy Consent Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 4px;
    padding: 14px 16px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: var(--transition);
    cursor: pointer;
}
.checkbox-group:hover {
    background: rgba(249, 115, 22, 0.04);
    border-color: rgba(249, 115, 22, 0.3);
}

/* Ẩn checkbox mặc định xấu của trình duyệt */
.checkbox-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 2px;
    position: relative;
}
/* Trạng thái hover */
.checkbox-group input[type="checkbox"]:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}
/* Trạng thái đã tick ✓ */
.checkbox-group input[type="checkbox"]:checked {
    background-color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}
/* Dấu tick được vẽ bằng CSS */
.checkbox-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 7px;
    height: 11px;
    border: 2.5px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}
.checkbox-group label {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--secondary);
    line-height: 1.6;
    cursor: pointer;
    margin-bottom: 0 !important;
    user-select: none;
}
.checkbox-group label a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.checkbox-group label a:hover {
    text-decoration: underline;
}

/* Success Message */
.success-message { text-align: center; }
.success-icon { font-size: 4rem; margin-bottom: 16px; }
.success-message h3 { margin-bottom: 16px; color: var(--primary); }
.success-message p { color: var(--text-muted); margin-bottom: 24px; }

/* Spinner */
.icon-spinner { animation: rotate 2s linear infinite; z-index: 2; width: 20px; height: 20px; }
.icon-spinner .path { stroke: #ffffff; stroke-linecap: round; animation: dash 1.5s ease-in-out infinite; }
@keyframes rotate { 100% { transform: rotate(360deg); } }
@keyframes dash {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 60px 0 20px; background-color: var(--surface); }
.footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; margin-bottom: 40px; }
.footer-info { max-width: 400px; }
.footer-info img { height: 40px; margin-bottom: 16px; }
.footer-info p { color: var(--text-muted); }
.footer-contact h4 { margin-bottom: 16px; font-size: 1.25rem; color: var(--text-main); }
.footer-contact p { color: var(--text-muted); margin-bottom: 8px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 0.9rem; }

/* About Page Specific Styles */
.about-hero { padding: 80px 0 60px; text-align: center; position: relative; overflow: hidden; }
.about-content { padding: 80px 0; background: var(--surface); }
.about-grid-2col { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; margin-bottom: 80px; }
.about-grid-2col.reverse { grid-template-columns: 1fr 1.2fr; }
.about-image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.about-image img { width: 100%; height: auto; display: block; }
.story-text h3 { font-size: 1.75rem; margin-bottom: 20px; color: var(--primary); }
.story-text p { color: var(--text-muted); margin-bottom: 20px; font-size: 1.05rem; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; margin-top: 48px; }
.step-card { background: var(--bg-color); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; transition: var(--transition); }
.step-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-sm); }
.step-number { font-size: 2rem; font-weight: 900; color: var(--accent); margin-bottom: 12px; font-family: inherit; }
.step-title { font-size: 1.15rem; margin-bottom: 8px; color: var(--text-main); }
.step-desc { font-size: 0.925rem; color: var(--text-muted); }

/* Free Badge Utility */
.free-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #DCFCE7; /* Light Green */
    color: #166534; /* Dark Green */
    font-size: 0.725rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid #BBF7D0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Preview Modal Image Carousel */
.preview-image-container {
    width: 100%;
    height: 450px;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    background: var(--bg-color);
    position: relative;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}
.preview-image-container:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}
.preview-image-container img {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top center; /* Ưu tiên hiển thị phần trên (quan trọng nhất) của ảnh bảng tính */
    transition: var(--transition);
    cursor: zoom-in;
}
.carousel-nav-btn {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    font-size: 1.5rem !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
    font-family: inherit;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.carousel-nav-btn:hover {
    background: var(--accent) !important;
    color: white !important;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 15px rgba(249, 115, 22, 0.4);
}
#prevPreviewBtn { left: 16px; }
#nextPreviewBtn { right: 16px; }

.carousel-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    gap: 8px;
    background: rgba(15, 23, 42, 0.75);
    padding: 6px 16px;
    border-radius: 20px;
    z-index: 10;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.carousel-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.25s ease;
    margin: 0 2px;
}
.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}
.carousel-dot.active {
    background: #FFFFFF;
    transform: scale(1.1);
    width: 20px;
    border-radius: 4px;
}

/* Mobile UI Utils */
.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--primary); padding: 4px; }
.mobile-sticky-cta { display: none; }

/* Responsive */
@media (max-width: 768px) {
    .header-container { flex-direction: row; justify-content: space-between; align-items: center; padding: 12px 24px; }
    .logo img { height: 36px; }
    .mobile-menu-btn { display: block; }
    .nav { 
        display: flex; position: absolute; top: 100%; left: 0; width: 100%; background: var(--surface); 
        flex-direction: column; padding: 10px 20px 20px; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); 
        border-bottom: 1px solid var(--border);
        
        /* Animation: Slide down and fade in */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-15px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
    }
    .nav.active { 
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .nav-link { margin: 12px 0; font-size: 1.1rem; text-align: center; }
    .hero { padding: 40px 0; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1.1rem; margin-bottom: 24px; }
    .btn-large { padding: 14px 24px; font-size: 1.05rem; width: 100%; }
    .section-header h2 { font-size: 1.8rem; }
    .footer-container { flex-direction: column; text-align: center; }
    .footer-info { margin: 0 auto; }
    .card { padding: 24px; }
    .card-bullets li { font-size: 1rem; }
    .card-actions { grid-template-columns: 1fr; }
    .about-grid-2col, .about-grid-2col.reverse { grid-template-columns: 1fr; gap: 32px; }
    .about-grid-2col.reverse .about-image { order: -1; }
    .preview-image-container { height: 300px; }
    
    .mobile-sticky-cta { 
        display: flex; justify-content: center; align-items: center; 
        position: fixed; bottom: 0; left: 0; width: 100%; 
        background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px);
        padding: 12px 16px; box-shadow: 0 -4px 20px rgba(0,0,0,0.15); z-index: 999;
        border-top: 1px solid var(--border);
    }
    .mobile-sticky-cta .btn { width: 100%; font-size: 1.1rem; padding: 14px; margin: 0; }
    body { padding-bottom: 80px; } /* Create space so sticky footer doesn't hide content */
}
