/**
 * Tên file: style.css
 * Tên tác giả: La Văn Thanh
 * Mô tả: Định dạng toàn bộ UI/UX trang chủ. Đã cập nhật và bổ sung các rules tạo animation mượt mà (Fade In Up) [WEBVNZ.COM].
 */

/* --- CORE VARIABLES (Google Material Design Palette) --- */
:root {
    /* Google Brand Colors */
    --google-blue: #1a73e8;
    --google-red: #ea4335;
    --google-yellow: #fbbc04;
    --google-green: #34a853;

    /* Backgrounds */
    --bg-main: #ffffff;
    --bg-secondary: #f8f9fa;
    /* Google's light gray surface */
    --header-bg: rgba(255, 255, 255, 0.98);
    --mobile-menu-bg: #ffffff;

    /* Borders & Shadows */
    --border-color: #dadce0;
    /* Standard Google hairline border */
    --elevation-1: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --elevation-2: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 2px 6px 2px rgba(60, 64, 67, 0.15);
    --elevation-3: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);

    /* Text Colors */
    --text-heading: #202124;
    /* Almost black */
    --text-main: #3c4043;
    /* Dark gray for body */
    --text-muted: #5f6368;
    /* Mid gray for secondary text */
    --text-on-primary: #ffffff;

    /* Core Accent (can be swapped to any Google color, default Blue) */
    --accent: var(--google-blue);

    /* Layout */
    --radius: 12px;
    /* Material standard is often 8px, 12px, 16px, or 24px */
    --container: 1200px;
}

/* --- DARK MODE OVERRIDES (Material Dark Theme) --- */
html.dark {
    /* Backgrounds */
    --bg-main: #202124;
    /* Material dark surface */
    --bg-secondary: #303134;
    /* Elevated dark surface */
    --header-bg: rgba(32, 33, 36, 0.98);
    --mobile-menu-bg: #202124;

    /* Google Brand Colors (Desaturated for Dark Mode) */
    --google-blue: #8ab4f8;
    --google-red: #f28b82;
    --google-yellow: #fdd663;
    --google-green: #81c995;

    /* Borders & Shadows */
    --border-color: #5f6368;
    --elevation-1: 0 1px 2px 0 rgba(0, 0, 0, 0.5), 0 1px 3px 1px rgba(0, 0, 0, 0.3);
    --elevation-2: 0 1px 2px 0 rgba(0, 0, 0, 0.5), 0 2px 6px 2px rgba(0, 0, 0, 0.3);
    --elevation-3: 0 1px 3px 0 rgba(0, 0, 0, 0.5), 0 4px 8px 3px rgba(0, 0, 0, 0.3);

    /* Text Colors */
    --text-heading: #e8eaed;
    --text-main: #e8eaed;
    --text-muted: #9aa0a6;

    --accent: var(--google-blue);
}

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

html {
    scroll-padding-top: 80px;
}

/* Custom Scrollbar (Subtle) */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

::selection {
    background: rgba(26, 115, 232, 0.2);
    color: var(--text-heading);
}

body {
    font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-heading);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius);
}

i {
    vertical-align: middle;
    line-height: 1;
}

/* Utility Classes */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: 90px 0;
}

.text-accent {
    color: var(--accent);
}

/* --- ANIMATIONS (Cập nhật mới) --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.fade-in-up.appear {
    opacity: 1;
    transform: translateY(0);
}

/* --- GOOGLE STYLE BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    /* Pill shape */
    font-weight: 500;
    letter-spacing: 0.25px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    border: 1px solid transparent;
    font-size: 15px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-on-primary);
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3);
}

.btn-primary:hover {
    background: #1557b0;
    /* Darker Google Blue */
    box-shadow: var(--elevation-2);
}

html.dark .btn-primary:hover {
    background: #aecbfa;
    color: #202124;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: rgba(26, 115, 232, 0.04);
    /* Subtle hover overlay */
    border-color: var(--accent);
}

html.dark .btn-outline:hover {
    background: rgba(138, 180, 248, 0.08);
}

/* Theme Toggle & Mobile Menu Btn */
.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.icon-btn:hover {
    background: rgba(60, 64, 67, 0.08);
    color: var(--text-heading);
}

html.dark .icon-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
    display: none;
}

/* --- MATERIAL CARDS --- */
.material-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.material-card:hover {
    box-shadow: var(--elevation-2);
    transform: translateY(-2px);
}

/* --- HEADER --- */
header {
    background: var(--header-bg);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background 0.3s;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-heading);
    z-index: 1002;
}

.logo i {
    color: var(--accent);
    font-size: 26px;
}

.main-menu {
    display: flex;
    gap: 30px;
}

.main-menu a {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.main-menu a:hover {
    color: var(--text-heading);
}

.main-menu a i {
    font-size: 18px;
    opacity: 0.8;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1002;
}

/* Mobile Menu Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(32, 33, 36, 0.6);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- HERO --- */
.hero {
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(26, 115, 232, 0.1);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 20px;
}

html.dark .hero-tag {
    background: rgba(138, 180, 248, 0.15);
}

.hero-content h1 {
    font-size: 52px;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-btns {
    display: flex;
    gap: 16px;
}

.code-window-wrapper {
    position: relative;
}

.code-window {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    font-family: 'Roboto Mono', 'Consolas', monospace;
    font-size: 14px;
    color: #202124;
    box-shadow: var(--elevation-3);
}

html.dark .code-window {
    background: #202124;
    border-color: #5f6368;
    color: #e8eaed;
}

.c-k {
    color: #1a73e8;
    font-weight: bold;
}

/* Keyword */
.c-f {
    color: #188038;
}

/* Function/Class */
.c-s {
    color: #d93025;
}

/* String */
.c-c {
    color: #5f6368;
    font-style: italic;
}

/* Comment */
html.dark .c-k {
    color: #8ab4f8;
}

html.dark .c-f {
    color: #81c995;
}

html.dark .c-s {
    color: #f28b82;
}

html.dark .c-c {
    color: #9aa0a6;
}

/* --- SECTIONS COMMON --- */
.section-header {
    max-width: 680px;
    margin: 0 auto 50px;
    text-align: center;
}

.section-header h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-muted);
}

.service-grid,
.projects-grid,
.faq-grid {
    display: grid;
    gap: 24px;
}

.service-grid,
.projects-grid {
    grid-template-columns: repeat(3, 1fr);
}

.faq-grid {
    grid-template-columns: repeat(2, 1fr);
}

/* Service Icon Google Style */
.icon-box-google {
    width: 56px;
    height: 56px;
    background: rgba(26, 115, 232, 0.1);
    color: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 28px;
}

html.dark .icon-box-google {
    background: rgba(138, 180, 248, 0.15);
}

/* --- COMPARISON CARD GRID --- */
.compare-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.compare-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    border-top: 4px solid var(--google-green);
}

.compare-card:hover {
    border-top-color: var(--accent);
}

.comp-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.comp-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.comp-versus {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comp-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.comp-row.winner {
    border-left: 4px solid var(--google-green);
}

.comp-row.loser {
    border-left: 4px solid var(--google-red);
    opacity: 0.8;
}

.comp-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    text-align: left;
}

.comp-val {
    font-weight: 600;
    font-size: 14px;
}

.comp-val.good {
    color: var(--google-green);
}

/* Workflow - Google Stepper Style */
.process-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 40px 0;
}

.process-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 80px;
    right: 80px;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.step-item {
    position: relative;
    z-index: 1;
    text-align: center;
    width: 180px;
    transform: translateY(-40px);
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: 8px;
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--bg-main);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 auto 16px;
    transition: 0.3s;
}

.step-item:hover .step-number {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* --- GIAO DIỆN THẺ DỰ ÁN (Material Card) --- */
.project-card {
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.project-img-wrap {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.project-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-img-wrap img {
    transform: scale(1.03);
}

.project-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.project-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.5;
    flex-grow: 1;
}

/* Material Chips (Thẻ tag công nghệ) */
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.google-chip {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 16px;
    /* Pill shape standard for chips */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.google-chip i {
    font-size: 16px;
}

.project-actions {
    display: flex;
    gap: 12px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 50px;
    flex: 1;
}

/* Pricing - Simple & Clean */
.price-card {
    text-align: center;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.price-card.popular {
    border: 2px solid var(--accent);
    box-shadow: var(--elevation-2);
    transform: translateY(-4px);
}

.price-num {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.price-num span {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: 0;
}

.badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.price-footer {
    margin-top: auto;
}

/* --- FOOTER --- */
footer {
    background: var(--bg-secondary);
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-links a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: 0.2s;
    border: 1px solid var(--border-color);
}

.social-links a:hover {
    background: var(--bg-main);
    color: var(--accent);
}

/* --- FLOATING CTA --- */
.floating-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    box-shadow: var(--elevation-2);
    transition: 0.2s;
    position: relative;
}

.float-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--elevation-3);
}

.float-zalo {
    background: #0068FF;
}

.float-phone {
    background: var(--google-green);
}

.float-tooltip {
    position: absolute;
    right: 68px;
    background: var(--text-heading);
    color: var(--bg-main);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s;
}

.float-btn:hover .float-tooltip {
    opacity: 1;
    right: 72px;
}

/* --- RESPONSIVE OPTIMIZATION --- */
@media (max-width: 1024px) {
    .hero {
        padding: 120px 0 60px;
        text-align: center;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-tag {
        margin: 0 auto 20px;
    }

    .hero-content p {
        margin: 0 auto 30px;
    }

    .hero-btns {
        justify-content: center;
    }

    .service-grid,
    .projects-grid,
    .compare-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Mobile Menu - Material Drawer Style */
    .main-menu {
        position: fixed;
        top: 0;
        right: -280px;
        width: 260px;
        height: 100vh;
        background: var(--mobile-menu-bg);
        flex-direction: column;
        padding: 80px 24px 24px;
        gap: 16px;
        transition: 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
        z-index: 1001;
    }

    .main-menu.active {
        right: 0;
    }

    .main-menu a {
        font-size: 16px;
        padding: 12px 16px;
        border-radius: 8px;
        border-bottom: none;
    }

    .main-menu a:hover,
    .main-menu a.active {
        background: rgba(26, 115, 232, 0.08);
        color: var(--accent);
    }

    .menu-toggle {
        display: flex;
        z-index: 1003;
    }

    .header-cta {
        display: none;
    }

    .process-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding-left: 16px;
    }

    .process-steps::before {
        left: 40px;
        right: auto;
        top: 0;
        bottom: 0;
        width: 2px;
        height: 100%;
    }

    .step-item {
        width: 100%;
        text-align: left;
        padding: 0 0 32px 48px;
        background: transparent;
        transform: none;
        margin-bottom: 0;
    }

    .step-number {
        margin: 0;
        position: absolute;
        left: 0;
        top: 0;
        width: 40px;
        height: 40px;
        font-size: 16px;
        background: var(--bg-main);
        z-index: 2;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 28px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-image {
        display: none;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

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

    .service-grid,
    .projects-grid,
    .faq-grid,
    .compare-grid {
        grid-template-columns: 1fr;
    }

    .price-card.popular {
        transform: translateY(0);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .floating-cta {
        bottom: 16px;
        right: 16px;
    }

    .float-btn {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }
}