﻿/* Global Styles & Variables */
:root {
    --bg: #f4f6f8;
    --white: #ffffff;
    --muted: #6b7280;
    --brand: #0057d9;
    --accent: #ff6a00;
    --dark: #0f172a;
    --maxw: 1200px;
    --border-color: #eef3f8;
    --shadow-sm: 0 6px 18px rgba(12,15,30,0.04);
    --shadow-md: 0 8px 26px rgba(12,15,30,0.04);
    --shadow-lg: 0 12px 40px rgba(12,15,30,0.06);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3 {
    line-height: 1.3;
}

h2.section-title {
    font-size: 28px;
    color: var(--brand);
    margin-bottom: 24px;
    text-align: center;
}

section {
    padding: 48px 0;
    border-bottom: 1px solid var(--border-color);
}

section:last-of-type {
    border-bottom: none;
}

.card {
    background: var(--white);
    padding: 24px;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
}

.cta {
    background: linear-gradient(90deg, var(--accent), #ff8a4c);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    border: 0;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease;
}

.cta:hover {
    transform: scale(1.05);
}

/* Header */
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--brand), #6f42c1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--brand);
}

/* Hero */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding-top: 16px;
}

.hero-content .eyebrow {
    display: inline-block;
    background: #e9f2ff;
    color: var(--brand);
    padding: 8px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 16px;
}

.hero-content h1 {
    font-size: 48px;
    margin: 0;
    color: var(--brand);
}

.hero-content p.lead {
    color: var(--muted);
    font-size: 18px;
    margin-top: 16px;
    max-width: 550px;
}

.hero-content .kpis {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.kpi {
    background: var(--white);
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    min-width: 140px;
    text-align: center;
}

.hero-content .cta-group {
    margin-top: 24px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.hero-content .usage-note {
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
}

.video-wrapper {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16/9;
}

.video-wrapper #player {
    width: 100%;
    height: 100%;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: left;
}

.feature h3 {
    color: var(--dark);
    margin: 8px 0;
    font-size: 20px;
}

/* Deep Content */
.two-col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    align-items: start;
}

.two-col ul, .two-col ol {
    padding-left: 20px;
}

.two-col aside h3 {
    margin-bottom: 12px;
}

/* Comparison Table */
.compare {
    width: 100%;
    border-collapse: collapse;
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    overflow: hidden;
}

.compare th, .compare td {
    padding: 16px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.compare thead {
    background: #e9f2ff;
    color: var(--brand);
}

.compare tbody tr:nth-child(even) {
    background: var(--white);
}

/* Pricing */
.pricing {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.price-card {
    flex: 1;
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.price-card h3 {
    font-size: 22px;
    color: var(--brand);
}

.price-card .price {
    font-size: 28px;
    font-weight: 600;
    margin: 12px 0;
}

.price-card .cta {
    margin-top: auto;
}

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: auto;
}

.faq-container details {
    background: var(--white);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.faq-container summary {
    font-weight: 700;
}

/* Footer */
footer {
    padding: 24px 0;
    text-align: center;
    color: var(--muted);
}

.socials {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 16px;
}

.socials a {
    display: inline-flex;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 8px 24px rgba(12, 15, 30, 0.06);
    text-decoration: none;
    color: var(--brand);
    font-weight: 700;
    transition: transform 0.2s, box-shadow 0.2s;
}

.socials a:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(12, 15, 30, 0.1);
}

.socials a i {
    font-size: 20px;
    line-height: 1;
}

/* --- Back to Top Button --- */
#backToTopBtn {
    display: none; /* Ẩn mặc định */
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--brand);
    color: white;
    cursor: pointer;
    padding: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 24px;
    box-shadow: var(--shadow-md);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

#backToTopBtn.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTopBtn:hover {
    background-color: var(--dark);
}

/* --- Responsive Design --- */

/* Large Desktops & Screens (e.g., > 1400px) */
@media (min-width: 1400px) {
    .container {
        padding: 20px 0; /* Remove side padding on very large screens */
    }
}

/* Tablets & Small Desktops (e.g., < 992px) */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .hero-content p.lead {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content .kpis, .hero-content .cta-group {
        justify-content: center;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .pricing {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: auto;
    }
}

/* Mobile Devices (e.g., < 768px) */
@media (max-width: 767px) {
    body {
        -webkit-text-size-adjust: 100%; /* Fix font boosting on mobile */
    }

    section{
        padding: 28px 0 !important;
    }

    h2.section-title {
        font-size: 24px;
    }

    header {
        flex-direction: column;
        gap: 16px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .features {
        grid-template-columns: 1fr;
    }

    .compare {
        display: block; /* Make table scrollable on small screens */
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .compare th, .compare td {
        white-space: nowrap; /* Prevent line breaks in table cells */
    }

    #backToTopBtn {
        width: 44px;
        height: 44px;
        font-size: 20px;
        right: 15px;
        bottom: 15px;
    }

    footer {
        border-top: 1px solid #94a7ba;
        padding: 12px 0 !important;
        margin-top: 8px;
    }
}